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 | Description |
---|---|---|
protected Map<ParseTree,V> |
annotations |
Constructor | Description |
---|---|
ParseTreeProperty() |
Modifier and Type | Method | Description |
---|---|---|
V |
get(ParseTree node) |
|
void |
put(ParseTree node,
V value) |
|
V |
removeFrom(ParseTree node) |
Copyright © 1992–2019 ANTLR. All rights reserved.