public class ParseTreeProperty<V> extends Object
ParseTreeProperty<Integer> values = new ParseTreeProperty<Integer>(); values.put(tree, 36); int x = values.get(tree); values.removeFrom(tree);You would make one decl (values here) in the listener and use lots of times in your event methods.
Modifier and Type | Field and Description |
---|---|
protected Map<ParseTree,V> |
annotations |
Constructor and Description |
---|
ParseTreeProperty() |
Modifier and Type | Method and Description |
---|---|
V |
get(ParseTree node) |
void |
put(ParseTree node,
V value) |
V |
removeFrom(ParseTree node) |
Copyright © 1992–2021 ANTLR. All rights reserved.