mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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 |
||
|---|---|---|
| .. | ||
| utils | ||
| ast_spec.ts | ||
| BUILD.bazel | ||
| lexer_spec.ts | ||
| parser_spec.ts | ||
| serializer_spec.ts | ||