angular/packages/compiler/test
Kristiyan Kostadinov fd5a04927e fix(compiler): recover invalid parenthesized expressions (#61815)
When the expression parser consumes tokens inside a parenthesized expression, it looks for valid tokens until it hits and invalid one or a closing paren. If it finds an invalid token, it reports and error and tries to recover until it finds a closing paren. The problem is that in such cases, it would produce the `ParenthesizedExpression` and continue parsing **from** from the closing paren which would then produce more errors that add noise to the output and result in an incorrect representation of the user's code. E.g. `foo((event.target as HTMLElement).value)` would be recovered to `foo((event.target)).value` instead of `foo((event.target).value)`.

These changes resolve the issue by skipping over the closing paren at the recovery point.

Fixes #61792.

PR Close #61815
2025-06-02 15:50:46 -04:00
..
expression_parser fix(compiler): recover invalid parenthesized expressions (#61815) 2025-06-02 15:50:46 -04:00
i18n build: migrate packages/compiler to ts_project (#61566) 2025-05-29 14:39:10 -04:00
ml_parser build: migrate packages/compiler to ts_project (#61566) 2025-05-29 14:39:10 -04:00
output refactor(compiler): remove unused code (#61668) 2025-05-26 12:21:09 +00:00
render3 fix(compiler): only report parser errors on invalid expression (#61793) 2025-06-02 09:56:00 -04:00
schema build: move private testing helpers outside platform-browser/testing (#61472) 2025-05-20 10:00:43 +00:00
selector build: migrate packages/compiler to ts_project (#61566) 2025-05-29 14:39:10 -04:00
shadow_css refactor(compiler): convert scripts within packages/compiler to relative imports (#60625) 2025-04-01 11:57:53 +00:00
BUILD.bazel build: migrate packages/compiler to ts_project (#61566) 2025-05-29 14:39:10 -04:00
compiler_facade_interface_spec.ts docs: set syntax highlighting of code examples MD code blocks (#59026) 2024-12-04 17:30:28 +01:00
integration_spec.ts build: migrate packages/compiler to ts_project (#61566) 2025-05-29 14:39:10 -04:00
security_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
style_url_resolver_spec.ts refactor(compiler): convert scripts within packages/compiler to relative imports (#60625) 2025-04-01 11:57:53 +00:00
util_spec.ts refactor(compiler): remove unused code (#61668) 2025-05-26 12:21:09 +00:00