Vixen
02b45cc4
csharp
public interface ISyntaxTree

What the shared tree needs to know about the file it came from.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Parsing is the language's business — Raven drives ANTLR, VXML and VCSS will hand-write descent parsers — so there is no shared SyntaxTree class to inherit. GetLocation is the reason this exists at all: a node knows its span but not its file or where the lines break, and it reaches both through here.

An interface rather than a base class, deliberately. Each language names its own type SyntaxTree; a shared base of the same name would make every file that imports both namespaces ambiguous.

Fields and properties (2)

  • string FilePath

    Path this tree was parsed from, or empty when it has no file.

  • SourceText? Text

    The source text, or null when the tree was built from nodes rather than parsed.

Used by (4)

  • SyntaxNodeVixen.Core.Syntax
  • SyntaxTreeVixen.Ui.Markup
  • ToyTreeVixen.Core.Syntax.Tests
  • SyntaxTreeVixen.Raven