Class DescendantCollector
java.lang.Object
org.ek9lang.compiler.support.trees.DescendantCollector
THE parse-tree DESCENDANT collector for the compiler - use this, do not hand-write a recursive
for (i < getChildCount()) collector. The compiler-services mcp.oracle.support.ParseTrees
delegates here (stop-at-match). The siblings for walking UP are in this package. Hold one.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends org.antlr.v4.runtime.tree.ParseTree>
voidcollect(org.antlr.v4.runtime.tree.ParseTree node, Class<T> type, boolean descendIntoMatch, List<? super T> out) Collect, in document (pre-order) order,nodeitself and every descendant that is an instance oftype.
-
Constructor Details
-
DescendantCollector
public DescendantCollector()
-
-
Method Details
-
collect
public <T extends org.antlr.v4.runtime.tree.ParseTree> void collect(org.antlr.v4.runtime.tree.ParseTree node, Class<T> type, boolean descendIntoMatch, List<? super T> out) Collect, in document (pre-order) order,nodeitself and every descendant that is an instance oftype.- Parameters:
descendIntoMatch- true to keep descending below a match (a nested match is collected too); false to stop at a match (a nested match inside a matched node is not collected).
-