Should be checking for ErrorNode (interface) instead of ErrorNodeImpl (class)
This commit is contained in:
parent
cb09dd6d09
commit
199e9892dc
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue