Delen via


SyntaxWalker Class

Definition

Walks the syntax tree, allowing subclasses to operate on all nodes, token and trivia. The walker will perform a depth first walk of the tree.

public ref class SyntaxWalker abstract
public abstract class SyntaxWalker
type SyntaxWalker = class
Public MustInherit Class SyntaxWalker
Inheritance
SyntaxWalker

Constructors

SyntaxWalker(SyntaxWalkerDepth)

Creates a new walker instance.

Properties

Depth

Syntax the SyntaxWalker should descend into.

Methods

Visit(SyntaxNode)

Called when the walker visits a node. This method may be overridden if subclasses want to handle the node. Overrides should call back into this base method if they want the children of this node to be visited.

VisitToken(SyntaxToken)

Called when the walker visits a token. This method may be overridden if subclasses want to handle the token. Overrides should call back into this base method if they want the trivia of this token to be visited.

VisitTrivia(SyntaxTrivia)

Called when the walker visits a trivia syntax. This method may be overridden if subclasses want to handle the token. Overrides should call back into this base method if they want the children of this trivia syntax to be visited.

Applies to