Skip to content

Commit

Permalink
feat: add support for angular 18.1 @let expression (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
ninoDeme authored Sep 23, 2024
1 parent c473dbc commit 1c6bc63
Show file tree
Hide file tree
Showing 9 changed files with 8,501 additions and 8,282 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "tree-sitter-angular"
description = "Angular grammar for tree-sitter"
version = "0.4.3"
version = "0.5.0"
keywords = ["incremental", "parsing", "angular"]
categories = ["parsing", "text-editors"]
repository = "https://github.com/tree-sitter/tree-sitter-angular"
Expand Down
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
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tree-sitter-angular",
"version": "0.4.3",
"version": "0.5.0",
"description": "Tree-sitter grammar for the Angular framework",
"main": "bindings/node",
"types": "bindings/node",
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 1c6bc63

Please sign in to comment.