Search in sources :

Example 1 with ErrorNodeImpl

use of org.antlr.v4.runtime.tree.ErrorNodeImpl in project antlr4 by antlr.

the class ParserRuleContext method addErrorNode.

/** Add a child to this node based upon badToken.  It
	 *  creates a ErrorNodeImpl rather than using
	 *  {@link Parser#createErrorNode(ParserRuleContext, Token)}. I'm leaving this
	 *  in for compatibility but the parser doesn't use this anymore.
	 */
@Deprecated
public ErrorNode addErrorNode(Token badToken) {
    ErrorNodeImpl t = new ErrorNodeImpl(badToken);
    addAnyChild(t);
    t.setParent(this);
    return t;
}
Also used : ErrorNodeImpl(org.antlr.v4.runtime.tree.ErrorNodeImpl)

Aggregations

ErrorNodeImpl (org.antlr.v4.runtime.tree.ErrorNodeImpl)1