Should be checking for ErrorNode (interface) instead of ErrorNodeImpl (class)

This commit is contained in:
Sam Harwell 2012-08-06 15:01:43 -05:00
parent cb09dd6d09
commit 199e9892dc
2 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ public class ParseTreeWalker {
@SuppressWarnings("unchecked")
public <Symbol extends Token> void walk(ParseTreeListener<Symbol> listener, ParseTree t) {
if ( t instanceof ErrorNodeImpl) {
if ( t instanceof ErrorNode) {
listener.visitErrorNode((ErrorNode<Symbol>)t);
return;
}

View File

@ -102,7 +102,7 @@ public class Trees {
String ruleName = recog.getRuleNames()[ruleIndex];
return ruleName;
}
else if ( t instanceof ErrorNodeImpl) {
else if ( t instanceof ErrorNode) {
return t.toString();
}
else if ( t instanceof TerminalNode) {