Skip to content

Commit 8945ace

Browse files
committed
fix: Fix nested unary expression
1 parent 13cb195 commit 8945ace

File tree

5 files changed

+3025
-2957
lines changed

5 files changed

+3025
-2957
lines changed

grammar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ module.exports = grammar(HTML, {
405405

406406
// Unary expression
407407
unary_expression: ($) =>
408-
seq(field('operator', alias('!', $.unary_operator)), field('value', $.expression)),
408+
seq(field('operator', alias('!', $.unary_operator)), field('value', choice($.expression, $.unary_expression))),
409409

410410
// Binary expression
411411
binary_expression: ($) =>

src/grammar.json

Lines changed: 11 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/node-types.json

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)