actually just show text of erroneous token in red in treeviewer.

This commit is contained in:
parrt 2015-06-12 12:43:30 -07:00
parent 8524630c03
commit 12a36946e8
1 changed files with 2 additions and 2 deletions

View File

@ -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());