fix(angular): fix 3 control flow parity gaps with Angular reference#32
Merged
Brooooooklyn merged 1 commit intomainfrom Feb 24, 2026
Merged
fix(angular): fix 3 control flow parity gaps with Angular reference#32Brooooooklyn merged 1 commit intomainfrom
Brooooooklyn merged 1 commit intomainfrom
Conversation
8a3a1d5 to
f3df656
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
crates/oxc_angular_compiler/tests/r3_template_transform_test.rs
Outdated
Show resolved
Hide resolved
- Fix empty parentheses in on-triggers (e.g. `idle()`, `hover()`) being
incorrectly treated as having parameters. Angular's consumeParameters()
returns zero parameters for empty parens.
- Add viewport trigger parameter arity validation using top-level comma
splitting to reject `viewport(a,b)` while accepting object literals
like `viewport({trigger: foo, rootMargin: "123px"})`.
- Fix `@defer (on )` and `@defer (when )` falling through to
"Unrecognized trigger" error after lexer trimming. Now recognizes bare
"on"/"when" keywords and matches Angular's silent acceptance.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
f3df656 to
221f499
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

idle(),hover()) beingincorrectly treated as having parameters. Angular's consumeParameters()
returns zero parameters for empty parens.
splitting to reject
viewport(a,b)while accepting object literalslike
viewport({trigger: foo, rootMargin: "123px"}).@defer (on )and@defer (when )falling through to"Unrecognized trigger" error after lexer trimming. Now recognizes bare
"on"/"when" keywords and matches Angular's silent acceptance.
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
Note
Medium Risk
Changes affect control-flow parsing and error reporting for
@defertriggers, so mismatches could alter accepted syntax or emitted diagnostics, but the scope is narrow and covered by new tests.Overview
Improves
@defertrigger parsing parity with Angular by treating empty parentheses likeidle()/viewport()as no parameters, recognizing bareon/whenkeywords after trimming and silently accepting@defer (on )/@defer (when )instead of erroring.Adds pre-parse arity validation for the
viewporttrigger using top-level comma splitting soviewport(a,b)errors while object-literal options containing nested commas are still accepted, and extendsr3_template_transform_test.rswith focused regression coverage for these cases (plus a few error-recovery/cascade expectations).Written by Cursor Bugbot for commit 221f499. This will update automatically on new commits. Configure here.