Skip to content

Instantly share code, notes, and snippets.

@jozefchmelar
Created November 21, 2019 18:13
Show Gist options
  • Save jozefchmelar/04f6ec35e9ed2e6aed675f2c99aab9cf to your computer and use it in GitHub Desktop.
Save jozefchmelar/04f6ec35e9ed2e6aed675f2c99aab9cf to your computer and use it in GitHub Desktop.
IronyVisitor
public virtual void AcceptVisitor(IAstVisitor visitor) {
visitor.BeginVisit(this);
if (ChildNodes.Count > 0)
foreach(AstNode node in ChildNodes)
node.AcceptVisitor(visitor);
visitor.EndVisit(this);
}
//from https://github.com/IronyProject/Irony/blob/06a088e0199c6e67097d72512ad69e2e86f041c2/Irony.Interpreter/Ast/Base/AstNode.cs#L141
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment