diff --git a/lexer.js b/lexer.js index 0606cdcac..a59ff7689 100644 --- a/lexer.js +++ b/lexer.js @@ -54,7 +54,7 @@ Lexer.prototype.lex = function() { } } - throw "Unexpected character: '" + toMatch[0] + "' at position " + this._pos; + throw "Unexpected character: '" + this._input[0] + "' at position " + this._pos; }; Lexer.prototype.setInput = function(input) {