Fix interval usage
For JavaScript runtime, Interval class constructor assume start and stop to be number.
This commit is contained in:
parent
e158824ca8
commit
88a7580b78
|
@ -267,7 +267,7 @@ DefaultErrorStrategy.prototype.reportNoViableAlternative = function(recognizer,
|
|||
if (e.startToken.type===Token.EOF) {
|
||||
input = "<EOF>";
|
||||
} else {
|
||||
input = tokens.getText(new Interval(e.startToken, e.offendingToken));
|
||||
input = tokens.getText(new Interval(e.startToken.tokenIndex, e.offendingToken.tokenIndex));
|
||||
}
|
||||
} else {
|
||||
input = "<unknown input>";
|
||||
|
@ -753,4 +753,4 @@ BailErrorStrategy.prototype.sync = function(recognizer) {
|
|||
};
|
||||
|
||||
exports.BailErrorStrategy = BailErrorStrategy;
|
||||
exports.DefaultErrorStrategy = DefaultErrorStrategy;
|
||||
exports.DefaultErrorStrategy = DefaultErrorStrategy;
|
||||
|
|
Loading…
Reference in New Issue