Skip to content
This repository was archived by the owner on Nov 21, 2025. It is now read-only.

Conversation

@dannymcgee
Copy link
Contributor

@dannymcgee dannymcgee commented Mar 20, 2025

This PR updates the TM grammar for flow-control block expressions to tokenize track as a keyword.

Changes made

  • Separate the valid sub-expressions of a @for/@if header into their own "clause" patterns (helps to avoid highlighting track as a keyword in the wrong context)
  • Assign keyword.control.track.ng scope to the track token at the beginning of a "track-by" clause
  • The item binding in item of items is now constant instead of readwrite, following the same logic mentioned in fix(syntaxes): variable token for @let binding #2160. Again, happy to revert this change if that's unwanted.

Screenshots

Before:

track-highlighting-before

After:

track-highlighting-after

@dannymcgee dannymcgee force-pushed the track-clause-highlighting branch from a89d20f to fd2fbd6 Compare March 20, 2025 02:03
@dannymcgee dannymcgee marked this pull request as ready for review March 20, 2025 02:11
Copy link
Collaborator

@atscott atscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for this

@atscott atscott force-pushed the track-clause-highlighting branch from fd2fbd6 to 531ac92 Compare March 28, 2025 16:12
@atscott atscott merged commit 8c84410 into angular:main Mar 28, 2025
4 of 5 checks passed
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants