Skip to content

Commit

Permalink
Merge pull request #228 from stsewd/fix-await-expression
Browse files Browse the repository at this point in the history
fix: await expressions should only be primary expressions
  • Loading branch information
amaanq committed Jul 12, 2023
2 parents 538a532 + 5274c48 commit 7c8930b
Show file tree
Hide file tree
Showing 5 changed files with 50,334 additions and 61,607 deletions.
2 changes: 1 addition & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ module.exports = grammar({

await: $ => prec(PREC.unary, seq(
'await',
$.expression
$.primary_expression,
)),

comment: $ => token(seq('#', /.*/)),
Expand Down
2 changes: 1 addition & 1 deletion src/grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -5293,7 +5293,7 @@
},
{
"type": "SYMBOL",
"name": "expression"
"name": "primary_expression"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion src/node-types.json
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@
"required": true,
"types": [
{
"type": "expression",
"type": "primary_expression",
"named": true
}
]
Expand Down
Loading

0 comments on commit 7c8930b

Please sign in to comment.