angular-cn/packages/compiler/test
Alex Rickabaugh e1a2930893 fix(compiler): avoid parsing EmptyExpr with a backwards span (#41581)
`EmptyExpr` is somewhat unique, in that it's constructed in a circumstance
where the parser has been looking for a particular token or string of tokens
and has failed to find any. This means the parser state when constructing
`EmptyExpr` is fairly unique.

This gives rise to a bug where the parser constructs `EmptyExpr` with a
backwards span - a `start` value that's beyond the `end` value. This likely
happens because of the strange state the parser is in when recovering with
`EmptyExpr`.

This commit adds a backstop/workaround to avoid constructing such broken
`EmptyExpr` spans (or any other kind of span). Eventually, the parser state
should be fixed such that this does not occur, but that requires a
significant change to the parser's functionality, so a simple fix in th
interim is in order.

PR Close #41581
2021-04-13 12:39:17 -07:00
..
aot fix(compiler): update type castings for JSON.parse usage (#40710) 2021-02-09 10:48:43 -08:00
expression_parser fix(compiler): avoid parsing EmptyExpr with a backwards span (#41581) 2021-04-13 12:39:17 -07:00
i18n perf(compiler): optimize computation of i18n message ids (#39694) 2020-11-17 10:09:28 -08:00
ml_parser fix(compiler): recover from an incomplete open tag at the end of a file (#41054) 2021-03-03 09:58:56 -08:00
output refactor(compiler): replace Comment nodes with leadingComments property (#38811) 2020-09-18 08:01:25 -07:00
render3 refactor(compiler): option to include html comments in `ParsedTemplate` (#41251) 2021-03-29 15:16:26 -07:00
schema feat(compiler): add schema for Trusted Types sinks (#39554) 2020-11-23 08:29:04 -08:00
selector build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
template_parser fix(compiler): handle strings inside bindings that contain binding characters (#39826) 2020-12-10 11:11:21 -08:00
BUILD.bazel test(compiler-cli): move testing utils to separate package (#39594) 2020-11-17 11:59:56 -08:00
compiler_facade_interface_spec.ts refactor(compiler): implement `ngDeclareInjectable()` (#41316) 2021-04-07 13:57:13 -07:00
config_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
core_spec.ts refactor(core): remove the need for `ɵɵinjectPipeChangeDetectorRef()` (#41231) 2021-03-30 16:46:37 -07:00
directive_lifecycle_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
directive_normalizer_spec.ts feat(core): remove ViewEncapsulation.Native (#38882) 2020-10-08 11:56:03 -07:00
directive_resolver_mock_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
directive_resolver_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
integration_spec.ts feat(core): update reference and doc to change `async` to `waitAsync`. (#37583) 2020-08-03 12:54:13 -07:00
metadata_resolver_fixture.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
metadata_resolver_spec.ts feat(core): update reference and doc to change `async` to `waitAsync`. (#37583) 2020-08-03 12:54:13 -07:00
ng_module_resolver_mock_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
ng_module_resolver_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
parse_util_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
pipe_resolver_mock_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
pipe_resolver_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
resource_loader_mock_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
runtime_compiler_spec.ts feat(core): update reference and doc to change `async` to `waitAsync`. (#37583) 2020-08-03 12:54:13 -07:00
shadow_css_spec.ts fix(compiler): correctly process multiple rules containing `:host` selectors (#41261) 2021-03-19 12:38:15 -07:00
spies.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
style_url_resolver_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
test_bindings.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
url_resolver_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
util_spec.ts perf(compiler): use raw bytes to represent utf-8 encoded strings (#39694) 2020-11-17 10:09:28 -08:00