Class LuaSyntaxWalker
Represents a LuaSyntaxVisitor that descends an entire LuaSyntaxNode graph visiting each LuaSyntaxNode and its child SyntaxNodes and SyntaxTokens in depth-first order.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Loretta.CodeAnalysis.Lua
Assembly: Loretta.CodeAnalysis.Lua.dll
Syntax
public abstract class LuaSyntaxWalker : LuaSyntaxVisitor
Constructors
| Improve this Doc View SourceLuaSyntaxWalker(SyntaxWalkerDepth)
Initializes the syntax walker with hte provided depth.
Declaration
protected LuaSyntaxWalker(SyntaxWalkerDepth depth = SyntaxWalkerDepth.Node)
Parameters
Type | Name | Description |
---|---|---|
SyntaxWalkerDepth | depth |
Properties
| Improve this Doc View SourceDepth
The depth up to which the walker should go into.
Declaration
protected SyntaxWalkerDepth Depth { get; }
Property Value
Type | Description |
---|---|
SyntaxWalkerDepth |
Methods
| Improve this Doc View SourceDefaultVisit(SyntaxNode)
Called when the walker walks into a node.
Declaration
public override void DefaultVisit(SyntaxNode node)
Parameters
Type | Name | Description |
---|---|---|
SyntaxNode | node |
Overrides
| Improve this Doc View SourceVisit(SyntaxNode)
Called when the syntax walker visits a node.
Declaration
public override void Visit(SyntaxNode node)
Parameters
Type | Name | Description |
---|---|---|
SyntaxNode | node |
Overrides
| Improve this Doc View SourceVisitLeadingTrivia(SyntaxToken)
Called when the walker should visit the leading trivia of a token.
Declaration
public virtual void VisitLeadingTrivia(SyntaxToken token)
Parameters
Type | Name | Description |
---|---|---|
SyntaxToken | token |
VisitToken(SyntaxToken)
Called when the walker visits a token.
Declaration
public virtual void VisitToken(SyntaxToken token)
Parameters
Type | Name | Description |
---|---|---|
SyntaxToken | token |
VisitTrailingTrivia(SyntaxToken)
Called when the walker should visit the trailing trivia of a token.
Declaration
public virtual void VisitTrailingTrivia(SyntaxToken token)
Parameters
Type | Name | Description |
---|---|---|
SyntaxToken | token |
VisitTrivia(SyntaxTrivia)
Called when the walker visits a trivia.
Declaration
public virtual void VisitTrivia(SyntaxTrivia trivia)
Parameters
Type | Name | Description |
---|---|---|
SyntaxTrivia | trivia |