forked from jasder/antlr
rename a parameter
This commit is contained in:
parent
2ba5a1f12a
commit
0375f8318a
|
@ -17,11 +17,11 @@ public class ParseTreeVisitor<T> {
|
||||||
* care about some nodes. The ParserRuleContext.accept() method
|
* care about some nodes. The ParserRuleContext.accept() method
|
||||||
* walks all children by default; i.e., calls this method.
|
* walks all children by default; i.e., calls this method.
|
||||||
*/
|
*/
|
||||||
public T visitChildren(ParseTree ctx) {
|
public T visitChildren(ParseTree tree) {
|
||||||
T result = null;
|
T result = null;
|
||||||
int n = ctx.getChildCount();
|
int n = tree.getChildCount();
|
||||||
for (int i=0; i<n; i++) {
|
for (int i=0; i<n; i++) {
|
||||||
ParseTree c = ctx.getChild(i);
|
ParseTree c = tree.getChild(i);
|
||||||
if ( c instanceof ParseTree.RuleNode ) {
|
if ( c instanceof ParseTree.RuleNode ) {
|
||||||
ParseTree.RuleNode r = (ParseTree.RuleNode)c;
|
ParseTree.RuleNode r = (ParseTree.RuleNode)c;
|
||||||
ParserRuleContext<?> rctx = (ParserRuleContext<? extends Token>)r.getRuleContext();
|
ParserRuleContext<?> rctx = (ParserRuleContext<? extends Token>)r.getRuleContext();
|
||||||
|
|
Loading…
Reference in New Issue