Skip to content

Commit

Permalink
feat: add support for angular 18.1 @let expression
Browse files Browse the repository at this point in the history
  • Loading branch information
ninoDeme committed Sep 10, 2024
1 parent c473dbc commit 9353df6
Show file tree
Hide file tree
Showing 5 changed files with 8,496 additions and 8,277 deletions.
13 changes: 13 additions & 0 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ module.exports = grammar(HTML, {
$.for_statement,
$.defer_statement,
$.switch_statement,
$.let_statement,
$._alternative_statement,
),

Expand All @@ -61,6 +62,18 @@ module.exports = grammar(HTML, {
field('error', $.error_statement),
),

// ---------- Let Statement ----------

let_statement: ($) =>
prec.left(
seq(
alias($._control_flow_start, '@'),
alias('let', $.control_keyword),
$.assignment_expression,
';'
),
),

// ---------- Switch Statement ----------

switch_statement: ($) =>
Expand Down
39 changes: 39 additions & 0 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions src/node-types.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9353df6

Please sign in to comment.