angular-docs-cn/packages
ayazhafiz 57f8dd2978 test(compiler): add tests for parsing of malformed property reads (#38998)
The expression parser already has support for recovering on malformed
property reads, but did not have tests describing the recovered ast in
such cases. This commit adds tests to demonstrate such cases; in
particular, the recovered ast is a full PropertyRead but with an empty
property name. This is likely the most preferred option, as it does not
constrain consumers of the AST to what the property name should look
like. Furthermore, we cannot mark the property name as empty in any
other way (e.g. an EmptyExpr) because the property name, as of present,
is a string field rather than an AST itself.

Note that tokens past a malformed property read are not preserved in the
AST (for example in `foo.1234`, `1234` is not preserved in the AST).
This is because the extra tokens do not belong to the singular
expression created by the property read, and there is not a meaningful
way to interpret a secondary expression in a single parsed expression.

Part of #38596

PR Close #38998
2020-10-05 14:24:46 -07:00
..
animations
bazel
benchpress
common docs(common): update docs for HttpClient methods (#38878) 2020-10-05 12:43:47 -07:00
compiler test(compiler): add tests for parsing of malformed property reads (#38998) 2020-10-05 14:24:46 -07:00
compiler-cli
core
docs
elements
examples
forms
language-service
localize
misc/angular-in-memory-web-api
platform-browser
platform-browser-dynamic
platform-server
private/testing
router
service-worker
upgrade
zone.js feat(zone.js): add jest fakeTimers support (#39016) 2020-10-05 13:23:17 -07:00
BUILD.bazel
README.md
circular-deps-test.conf.js
empty.ts
goog.d.ts
license-banner.txt
system.d.ts
tsconfig-build-no-strict.json
tsconfig-build.json
tsconfig-test.json
tsconfig.json
types.d.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00

README.md

Angular

The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.

Usage information and reference details can be found in Angular documentation.

License: MIT