use of org.antlr.v4.codegen.model.chunk.TokenRef in project antlr4 by antlr.
the class ParserATNFactory method tokenRef.
/** From label {@code A} build graph {@code o-A->o}. */
@Override
public Handle tokenRef(TerminalAST node) {
ATNState left = newState(node);
ATNState right = newState(node);
int ttype = g.getTokenType(node.getText());
left.addTransition(new AtomTransition(right, ttype));
node.atnState = left;
return new Handle(left, right);
}
Aggregations