Skip to content

Commit 81c2d6b

Browse files
committed
glayzzle#138 - add end offset
1 parent 42c459a commit 81c2d6b

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

dist/php-parser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4938,9 +4938,9 @@ parser.prototype.lex = function () {
49384938
if (this.extractTokens && this.token !== this.EOF) {
49394939
var entry = this.lexer.yytext;
49404940
if (this.lexer.engine.tokens.values.hasOwnProperty(this.token)) {
4941-
entry = [this.lexer.engine.tokens.values[this.token], entry, this.lexer.yylloc.first_line, this.lexer.yylloc.first_offset];
4941+
entry = [this.lexer.engine.tokens.values[this.token], entry, this.lexer.yylloc.first_line, this.lexer.yylloc.first_offset, this.lexer.offset];
49424942
} else {
4943-
entry = [null, entry, this.lexer.yylloc.first_line, this.lexer.yylloc.first_offset];
4943+
entry = [null, entry, this.lexer.yylloc.first_line, this.lexer.yylloc.first_offset, this.lexer.offset];
49444944
}
49454945
this._tokens.push(entry);
49464946
}

dist/php-parser.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/php-parser.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/parser.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,14 +479,16 @@ parser.prototype.lex = function() {
479479
this.lexer.engine.tokens.values[this.token],
480480
entry,
481481
this.lexer.yylloc.first_line,
482-
this.lexer.yylloc.first_offset
482+
this.lexer.yylloc.first_offset,
483+
this.lexer.offset
483484
];
484485
} else {
485486
entry = [
486487
null,
487488
entry,
488489
this.lexer.yylloc.first_line,
489-
this.lexer.yylloc.first_offset
490+
this.lexer.yylloc.first_offset,
491+
this.lexer.offset
490492
];
491493
}
492494
this._tokens.push(entry);

0 commit comments

Comments
 (0)