Skip to content

Commit 77d737c

Browse files
committed
fix(#44): animation bindings can omit the trigger
1 parent 660e6c4 commit 77d737c

File tree

11 files changed

+6819
-6622
lines changed

11 files changed

+6819
-6622
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
name: Publish package
22

33
on:
4-
workflow_call:
4+
push:
5+
tags: ['*']
56

67
concurrency:
78
group: ${{github.workflow}}-${{github.ref}}

.github/workflows/tag_release.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,3 @@ jobs:
2525
tag: ${{ steps.tag_version.outputs.new_tag }}
2626
name: ${{ steps.tag_version.outputs.new_version }}
2727
body: ${{ steps.tag_version.outputs.changelog }}
28-
29-
publish_packages:
30-
name: Publish packages
31-
uses: './.github/workflows/publish.yml'

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "tree-sitter-angular"
33
description = "Angular grammar for tree-sitter"
4-
version = "0.4.1"
4+
version = "0.4.2"
55
keywords = ["incremental", "parsing", "angular"]
66
categories = ["parsing", "text-editors"]
77
repository = "https://github.com/tree-sitter/tree-sitter-angular"

grammar.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ module.exports = grammar(HTML, {
297297
choice(
298298
prec(1, $.property_binding),
299299
prec(1, $.two_way_binding),
300+
prec(1, $.animation_binding),
300301
prec(1, $.event_binding),
301302
prec(1, $.structural_directive),
302303
$._normal_attribute, // <-- This needs to be hidden from syntax tree
@@ -365,6 +366,8 @@ module.exports = grammar(HTML, {
365366
property_binding: ($) => seq('[', $.binding_name, ']', $._binding_assignment),
366367
event_binding: ($) => seq('(', $.binding_name, ')', $._binding_assignment),
367368
two_way_binding: ($) => seq('[(', $.binding_name, ')]', $._binding_assignment),
369+
animation_binding: ($) =>
370+
seq('[@', $.binding_name, ']', optional(field('trigger', $._binding_assignment))),
368371

369372
_binding_assignment: ($) =>
370373
seq(
@@ -374,7 +377,7 @@ module.exports = grammar(HTML, {
374377
$._double_quote,
375378
),
376379

377-
binding_name: ($) => seq(optional('@'), choice($.identifier, $.member_expression)),
380+
binding_name: ($) => seq(choice($.identifier, $.member_expression)),
378381

379382
_normal_attribute: ($) =>
380383
seq(

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tree-sitter-angular",
3-
"version": "0.4.1",
3+
"version": "0.4.2",
44
"description": "Tree-sitter grammar for the Angular framework",
55
"main": "bindings/node",
66
"types": "bindings/node",

src/grammar.json

Lines changed: 41 additions & 12 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: 66 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)