Ast.Visit Method

Definition

Overloads

Visit(AstVisitor)

Visit each node in the Ast, calling the methods in astVisitor for each node in the ast.

Visit(ICustomAstVisitor)

Visit the Ast using a visitor that can choose how the tree traversal is performed. This visit method is for advanced uses of the visitor pattern where an AstVisitor is insufficient.

Visit(AstVisitor)

Visit each node in the Ast, calling the methods in astVisitor for each node in the ast.

C++
public:
 void Visit(System::Management::Automation::Language::AstVisitor ^ astVisitor);

Parameters

astVisitor
AstVisitor

The visitor.

Applies to

PowerShell SDK 7.4.0 and other versions
Product Versions
PowerShell SDK 7.2.0, 7.3.0, 7.4.0
Windows PowerShell 5.1.0.0

Visit(ICustomAstVisitor)

Visit the Ast using a visitor that can choose how the tree traversal is performed. This visit method is for advanced uses of the visitor pattern where an AstVisitor is insufficient.

C++
public:
 System::Object ^ Visit(System::Management::Automation::Language::ICustomAstVisitor ^ astVisitor);

Parameters

astVisitor
ICustomAstVisitor

The visitor.

Returns

Returns the value returned by the visitor.

Applies to

PowerShell SDK 7.4.0 and other versions
Product Versions
PowerShell SDK 7.2.0, 7.3.0, 7.4.0
Windows PowerShell 5.1.0.0