Skip to content

Commit

Permalink
fix scalar definition into exp list (related to #532)
Browse files Browse the repository at this point in the history
  • Loading branch information
ichiriac committed Apr 24, 2020
1 parent 1e997fa commit e672c2c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,11 @@ const parser = function (lexer, ast) {
this.tok.T_FILE,
this.tok.T_DIR,
this.tok.T_NS_C,
'"',
'b"',
'B"',
"-",
this.tok.T_NS_SEPARATOR,
].map(mapIt)
),
};
Expand Down
2 changes: 1 addition & 1 deletion src/parser/expr.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ module.exports = {
let value = null;
let key = null;
result = this.node("yield");
if (this.next().is("EXPR") || this.is("SCALAR")) {
if (this.next().is("EXPR")) {
// reads the yield return value
value = this.read_expr();
if (this.token === this.tok.T_DOUBLE_ARROW) {
Expand Down

0 comments on commit e672c2c

Please sign in to comment.