Skip to content

Commit

Permalink
fix(#44): animation bindings can omit the trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
dlvandenberg committed Aug 22, 2024
1 parent 660e6c4 commit 77d737c
Show file tree
Hide file tree
Showing 11 changed files with 6,819 additions and 6,622 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Publish package

on:
workflow_call:
push:
tags: ['*']

concurrency:
group: ${{github.workflow}}-${{github.ref}}
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/tag_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,3 @@ jobs:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: ${{ steps.tag_version.outputs.new_version }}
body: ${{ steps.tag_version.outputs.changelog }}

publish_packages:
name: Publish packages
uses: './.github/workflows/publish.yml'
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.1"
version = "0.4.2"
keywords = ["incremental", "parsing", "angular"]
categories = ["parsing", "text-editors"]
repository = "https://github.com/tree-sitter/tree-sitter-angular"
Expand Down
5 changes: 4 additions & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ module.exports = grammar(HTML, {
choice(
prec(1, $.property_binding),
prec(1, $.two_way_binding),
prec(1, $.animation_binding),
prec(1, $.event_binding),
prec(1, $.structural_directive),
$._normal_attribute, // <-- This needs to be hidden from syntax tree
Expand Down Expand Up @@ -365,6 +366,8 @@ module.exports = grammar(HTML, {
property_binding: ($) => seq('[', $.binding_name, ']', $._binding_assignment),
event_binding: ($) => seq('(', $.binding_name, ')', $._binding_assignment),
two_way_binding: ($) => seq('[(', $.binding_name, ')]', $._binding_assignment),
animation_binding: ($) =>
seq('[@', $.binding_name, ']', optional(field('trigger', $._binding_assignment))),

_binding_assignment: ($) =>
seq(
Expand All @@ -374,7 +377,7 @@ module.exports = grammar(HTML, {
$._double_quote,
),

binding_name: ($) => seq(optional('@'), choice($.identifier, $.member_expression)),
binding_name: ($) => seq(choice($.identifier, $.member_expression)),

_normal_attribute: ($) =>
seq(
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.1",
"version": "0.4.2",
"description": "Tree-sitter grammar for the Angular framework",
"main": "bindings/node",
"types": "bindings/node",
Expand Down
53 changes: 41 additions & 12 deletions src/grammar.json

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

66 changes: 66 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 77d737c

Please sign in to comment.