-
Notifications
You must be signed in to change notification settings - Fork 226
Expand file tree
/
Copy pathPythonErrorNode.java
More file actions
42 lines (33 loc) · 997 Bytes
/
PythonErrorNode.java
File metadata and controls
42 lines (33 loc) · 997 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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();
}
}