forked from jasder/antlr
added null chk
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9759]
This commit is contained in:
parent
bb960e3c37
commit
9853061093
|
@ -227,6 +227,10 @@ public class ParserATNFactory implements ATNFactory {
|
|||
|
||||
public Handle _ruleRef(GrammarAST node) {
|
||||
Rule r = g.getRule(node.getText());
|
||||
if ( r==null ) {
|
||||
g.tool.errMgr.toolError(ErrorType.INTERNAL_ERROR, "Rule "+node.getText()+" undefined");
|
||||
return null;
|
||||
}
|
||||
RuleStartState start = atn.ruleToStartState[r.index];
|
||||
ATNState left = newState(node);
|
||||
ATNState right = newState(node);
|
||||
|
|
Loading…
Reference in New Issue