SyntaxToken Class
A token node.
public class SyntaxToken : SyntaxNode- Inheritance
SyntaxNodeSyntaxToken
Constructors
| Name | Description |
|---|---|
| SyntaxToken() | Creates a new instance of SyntaxToken |
| SyntaxToken(TokenKind, string?) | Creates a new instance of SyntaxToken |
SyntaxToken overloads
SyntaxToken()
SyntaxToken.csCreates a new instance of SyntaxToken
public SyntaxToken()SyntaxToken(TokenKind, string?)
SyntaxToken.csCreates a new instance of SyntaxToken
Properties
| Name | Description |
|---|---|
| ChildrenCount | Gets the number of children. |
| Text | Gets or sets the associated text |
| TokenKind | Gets or sets the kind of token. |
ChildrenCount
SyntaxToken.csText
SyntaxToken.csTokenKind
SyntaxToken.csMethods
| Name | Description |
|---|---|
| Accept(SyntaxVisitor) | Allow to visit this instance with the specified visitor. |
| GetChildImpl(int) | Gets a child at the specified index. |
| ToDebuggerDisplay() | Returns a debugger-friendly display string for this node. |
Accept(SyntaxVisitor)
SyntaxToken.csAllow to visit this instance with the specified visitor.
public override void Accept(SyntaxVisitor visitor)Parameters
visitorSyntaxVisitor- The visitor
GetChildImpl(int)
SyntaxToken.csGets a child at the specified index.
protected override SyntaxNode? GetChildImpl(int index)Parameters
indexint- Index of the child
Returns
SyntaxNode? A child at the specified index
Remarks
The index is safe to use