Skip to content

Commit

Permalink
Merge pull request zaach#8 from fgnass/patch-1
Browse files Browse the repository at this point in the history
Fix: unput leaves yytext one character short
  • Loading branch information
zaach committed Mar 31, 2014
2 parents c177ca8 + e4cb2bc commit a057d41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion regexp-lexer.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ RegExpLexer.prototype = {
var lines = ch.split(/(?:\r\n?|\n)/g);

this._input = ch + this._input;
this.yytext = this.yytext.substr(0, this.yytext.length - len - 1);
this.yytext = this.yytext.substr(0, this.yytext.length - len);
//this.yyleng -= len;
this.offset -= len;
var oldLines = this.match.split(/(?:\r\n?|\n)/g);
Expand Down

0 comments on commit a057d41

Please sign in to comment.