ParseTreeWalker class

A walker that traverses a parse tree created by a successful parse

Constructors

ParseTreeWalker(ParseResult parseResult)
Create a new walker from a successful parse result Throws if the parse result indicates failure

Properties

hashCode int
The hash code for this object.
no setterinherited
root ParseTreeNode
The root node of the parse tree
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

findByRuleName(String ruleName) List<ParseTreeNode>
Find all nodes matching a given rule name
findFirstByRuleName(String ruleName) ParseTreeNode?
Find the first node matching a given rule name
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
Get a string representation of the parse tree
override
visitPostOrder(ParseTreeVisitor visitor) bool
Visit all nodes in the tree in post-order (children before parent) Returns false if traversal was stopped by the visitor
visitPreOrder(ParseTreeVisitor visitor) bool
Visit all nodes in the tree in pre-order (parent before children) Returns false if traversal was stopped by the visitor

Operators

operator ==(Object other) bool
The equality operator.
inherited