forked from jasder/antlr
actually just show text of erroneous token in red in treeviewer.
This commit is contained in:
parent
8524630c03
commit
12a36946e8
|
@ -424,7 +424,7 @@ public class ParserInterpreter extends Parser {
|
|||
|
||||
Token errToken =
|
||||
getTokenFactory().create(new Pair<TokenSource, CharStream>(tok.getTokenSource(), tok.getTokenSource().getInputStream()),
|
||||
expectedTokenType, tokenText,
|
||||
expectedTokenType, tok.getText(),
|
||||
Token.DEFAULT_CHANNEL,
|
||||
-1, -1, // invalid start/stop
|
||||
tok.getLine(), tok.getCharPositionInLine());
|
||||
|
@ -434,7 +434,7 @@ public class ParserInterpreter extends Parser {
|
|||
Token tok = e.getOffendingToken();
|
||||
Token errToken =
|
||||
getTokenFactory().create(new Pair<TokenSource, CharStream>(tok.getTokenSource(), tok.getTokenSource().getInputStream()),
|
||||
Token.INVALID_TYPE, "<nonviable "+tok.getText()+">",
|
||||
Token.INVALID_TYPE, tok.getText(),
|
||||
Token.DEFAULT_CHANNEL,
|
||||
-1, -1, // invalid start/stop
|
||||
tok.getLine(), tok.getCharPositionInLine());
|
||||
|
|
Loading…
Reference in New Issue