Skip to content

Commit 77e87b6

Browse files
committed
glayzzle#59 fix first char strip on T_STRING_VARNAME token
1 parent 7414f4e commit 77e87b6

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

dist/php-parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6937,7 +6937,7 @@ module.exports = {
69376937
else if (this.token === this.tok.T_DOLLAR_OPEN_CURLY_BRACES) {
69386938
var name = null;
69396939
if (this.next().token === this.tok.T_STRING_VARNAME) {
6940-
var varName = this.text().substring(1);
6940+
var varName = this.text();
69416941
name = this.node('variable');
69426942
this.next();
69436943
name = name(varName, false);

dist/php-parser.min.js

Lines changed: 3 additions & 3 deletions
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/scalar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ module.exports = {
167167
else if (this.token === this.tok.T_DOLLAR_OPEN_CURLY_BRACES) {
168168
var name = null;
169169
if (this.next().token === this.tok.T_STRING_VARNAME) {
170-
var varName = this.text().substring(1);
170+
var varName = this.text();
171171
name = this.node('variable');
172172
this.next();
173173
name = name(varName, false);

0 commit comments

Comments
 (0)