Class SyntaxToken
Represents a tokenized portion of source text that is identified with
a SyntaxKind and may contain a parsed value in
StringValue. Tokens also carry leading trivia
which are usually uninteresting tokens (white space, comments). A token
may be fully round-tripped through its SourceText
property.
Inheritance
System.Object
SyntaxToken
Assembly: DotLang.dll
Syntax
public sealed class SyntaxToken : SyntaxNode
Properties
|
Improve this Doc
View Source
Invalid
Declaration
public static SyntaxToken Invalid { get; }
Property Value
|
Improve this Doc
View Source
Kind
The syntax kind of this token.
Declaration
public SyntaxKind Kind { get; }
Property Value
|
Improve this Doc
View Source
LeadingTrivia
Any potential leading trivia tokens that precede this token such
as white space or comments.
Declaration
public IReadOnlyList<SyntaxToken> LeadingTrivia { get; }
Property Value
Type |
Description |
System.Collections.Generic.IReadOnlyList<SyntaxToken> |
|
|
Improve this Doc
View Source
Location
The location, including start and end points, of this token in its
original source text.
Declaration
public SourceLocation Location { get; }
Property Value
|
Improve this Doc
View Source
SourceText
The original source text for this token (based on Location).
Declaration
public string SourceText { get; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
StringValue
A semantic string representation of this token's value.
Declaration
public string StringValue { get; }
Property Value
Type |
Description |
System.String |
|
Methods
|
Improve this Doc
View Source
Accept(SyntaxVisitor)
Declaration
public override void Accept(SyntaxVisitor visitor)
Parameters
Overrides
Extension Methods