src.org.python.antlr.PythonErrorNode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jython Show documentation
Show all versions of jython Show documentation
Jython is an implementation of the high-level, dynamic, object-oriented
language Python written in 100% Pure Java, and seamlessly integrated with
the Java platform. It thus allows you to run Python on any Java platform.
package org.python.antlr;
import org.antlr.runtime.Token;
import org.antlr.runtime.TokenStream;
import org.antlr.runtime.RecognitionException;
import org.antlr.runtime.tree.CommonErrorNode;
/** A node representing erroneous token range in token stream
*/
public class PythonErrorNode extends PythonTree {
private CommonErrorNode errorNode;
public PythonErrorNode(TokenStream input, Token start, Token stop,
RecognitionException e) {
this.errorNode = new CommonErrorNode(input, start, stop, e);
}
public PythonErrorNode(CommonErrorNode errorNode){
this.errorNode = errorNode;
}
@Override
public boolean isNil() {
return errorNode.isNil();
}
@Override
public int getAntlrType() {
return errorNode.getType();
}
@Override
public String getText() {
return errorNode.getText();
}
@Override
public String toString() {
return errorNode.toString();
}
}