Skip to content

Commit e672c2c

Browse files
committed
fix scalar definition into exp list (related to #532)
1 parent 1e997fa commit e672c2c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/parser.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,11 @@ const parser = function (lexer, ast) {
231231
this.tok.T_FILE,
232232
this.tok.T_DIR,
233233
this.tok.T_NS_C,
234+
'"',
235+
'b"',
236+
'B"',
237+
"-",
238+
this.tok.T_NS_SEPARATOR,
234239
].map(mapIt)
235240
),
236241
};

src/parser/expr.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ module.exports = {
359359
let value = null;
360360
let key = null;
361361
result = this.node("yield");
362-
if (this.next().is("EXPR") || this.is("SCALAR")) {
362+
if (this.next().is("EXPR")) {
363363
// reads the yield return value
364364
value = this.read_expr();
365365
if (this.token === this.tok.T_DOUBLE_ARROW) {

0 commit comments

Comments
 (0)