Skip to content

Support more binary assignment operators in templates #62064

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from

Conversation

crisbeto
Copy link
Member

These changes expand Angular's expression syntax to support the following binary operators in templates:

  • += - addition assignment
  • -= - subtraction assignment
  • *= - multiplication assignment
  • /= - division assignment
  • %= - remainder assignment
  • **= - exponentiation assignment
  • &&= - logical AND assignment
  • ||= - logical OR assignment
  • ??= - nullish coalescing assignment

crisbeto added 4 commits June 13, 2025 09:58
Adds support for the `+=`, `-=`, `*=`, `/=`, `%=`, `**=`, `&&=`, `||=` and `??=` assignment operators to the lexer.
…rser

Updates the expression parser to account for the new assignment operators that were added to the lexer.
Updates the output AST to support the new set of binary operators.
Updates the remainder of the compiler to handle the new assignment operators and sets up more tests, including for the runtime.
@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer target: minor This PR is targeted for the next minor release labels Jun 16, 2025
@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: compiler Issues related to `ngc`, Angular's template compiler labels Jun 16, 2025
@ngbot ngbot bot added this to the Backlog milestone Jun 16, 2025
Updates the table showing expression syntax to include the new binary operators. Also updates the table of unsupported syntax.
@angular-robot angular-robot bot added the area: docs Related to the documentation label Jun 16, 2025
@crisbeto crisbeto requested a review from devversion June 16, 2025 07:49
@crisbeto crisbeto marked this pull request as ready for review June 16, 2025 07:50
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jun 23, 2025
@crisbeto
Copy link
Member Author

This PR was merged into the repository by commit 9974af5.

The changes were merged into the following branches: main

@crisbeto crisbeto closed this in cf3b583 Jun 23, 2025
crisbeto added a commit that referenced this pull request Jun 23, 2025
…rser (#62064)

Updates the expression parser to account for the new assignment operators that were added to the lexer.

PR Close #62064
crisbeto added a commit that referenced this pull request Jun 23, 2025
)

Updates the output AST to support the new set of binary operators.

PR Close #62064
crisbeto added a commit that referenced this pull request Jun 23, 2025
Updates the remainder of the compiler to handle the new assignment operators and sets up more tests, including for the runtime.

PR Close #62064
crisbeto added a commit that referenced this pull request Jun 23, 2025
Updates the table showing expression syntax to include the new binary operators. Also updates the table of unsupported syntax.

PR Close #62064
princemaple added a commit to princemaple/ngx-html-syntax that referenced this pull request Jul 12, 2025
princemaple added a commit to princemaple/ngx-html-syntax that referenced this pull request Jul 12, 2025
* Support more binary assignment operators in templates

angular/angular#62064

@deathaxe does this look about right?

* add test

* update precedence

* Update NgxHTML.sublime-syntax

Co-authored-by: deathaxe <[email protected]>

* Update NgxHTML.sublime-syntax

* augmented

* test augmented

* test output with assignment

* fix test

* test output with augmented assignment

* expand selection

---------

Co-authored-by: deathaxe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker area: compiler Issues related to `ngc`, Angular's template compiler area: docs Related to the documentation detected: feature PR contains a feature commit target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants