ParseTreeMatch

TODO add class description @uml Represents the result of matching a {@link ParseTree} against a tree pattern.

Constructors

this
this(ParseTree tree, ParseTreePattern pattern, ParseTree[][string] labels, ParseTree mismatchedNode)

@uml Constructs a new instance of {@link ParseTreeMatch} from the specified parse tree and pattern.

Members

Functions

get
ParseTree get(string label)

@uml Get the last node associated with a specific {@code label}.

getAll
ParseTree[] getAll(string label)

@uml Return all nodes matching a rule or token tag with the specified label. * <p>If the {@code label} is the name of a parser rule or token in the grammar, the resulting list will contain both the parse trees matching rule or tags explicitly labeled with the label and the complete set of parse trees matching the labeled and unlabeled tags in the pattern for the parser rule or token. For example, if {@code label} is {@code "foo"}, the result will contain <em>all</em> of the following.</p>

getLabels
ParseTree[][string] getLabels()

@uml Return a mapping from label &rarr; [list of nodes].

getMismatchedNode
ParseTree getMismatchedNode()

@uml Get the node at which we first detected a mismatch.

getPattern
ParseTreePattern getPattern()

@uml Get the tree pattern we are matching against.

getTree
ParseTree getTree()

@uml Get the parse tree we are trying to match to a pattern.

succeeded
bool succeeded()

@uml Gets a value indicating whether the match operation succeeded.

toString
string toString()

@uml @override

Variables

tree
ParseTree tree;

@uml This is the backing field for {@link #getTree()}.

Meta