angular/packages/compiler/test
Kristiyan Kostadinov 2028c3933f refactor(compiler): combine call ASTs (#42882)
Currently the compiler has three different classes to represent a "call to something":
1. `MethodCall` - `foo.bar()`
2. `SafeMethodCall` - `foo?.bar()`.
3. `FunctionCall` - Any calls that don't fit into the first two classes. E.g. `foo.bar()()`.

There are a few problems with this approach:
1. It is inconistent with the TypeScript AST which only has one node: `CallExpression`.
2. It means that we have to maintain more code, because the various parts of the compiler need to know about three node types.
3. It doesn't allow us to easily implement some new JS features like safe calls (e.g. `foo.bar?.())`).

These changes rework the compiler so that it produces only one node: `Call`. The new node behaves  similarly to the TypeScript `CallExpression` whose `receiver` can be any expression.

There was a similar situation in the output AST where we had an `InvokeMethodExpression` and `InvokeFunctionExpression`. I've combined both of them into `InvokeFunctionExpression`.

PR Close #42882
2021-09-21 20:55:29 +00:00
..
aot refactor(compiler): remove cyclic dependencies (#43129) 2021-08-16 13:07:23 -07:00
expression_parser refactor(compiler): combine call ASTs (#42882) 2021-09-21 20:55:29 +00:00
i18n refactor: add override keyword to members implementing abstract declarations (#42512) 2021-07-12 13:11:17 -07:00
ml_parser test(compiler): add a test for parsing multiline expressions in attributes (#43132) 2021-09-16 18:15:51 +00:00
output refactor(compiler): combine call ASTs (#42882) 2021-09-21 20:55:29 +00:00
render3 refactor(compiler): combine call ASTs (#42882) 2021-09-21 20:55:29 +00:00
schema test: clean up internal testing utilities (#42177) 2021-05-26 20:07:25 +00:00
selector feat(compiler): support directive selectors with attributes containing $ (#41567) 2021-05-04 21:06:58 -07:00
template_parser refactor(compiler): combine call ASTs (#42882) 2021-09-21 20:55:29 +00: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 refactor(compiler): ensure compatibility with noImplicitOverride (#42512) 2021-07-12 13:11:14 -07: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 refactor(compiler): remove cyclic dependencies (#43129) 2021-08-16 13:07:23 -07:00
ng_module_resolver_mock_spec.ts test: clean up internal testing utilities (#42177) 2021-05-26 20:07:25 +00:00
ng_module_resolver_spec.ts fix(compiler): preserve @page rules in encapsulated styles (#41915) 2021-05-06 09:33:56 -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 test: clean up internal testing utilities (#42177) 2021-05-26 20:07:25 +00:00
runtime_compiler_spec.ts test: clean up internal testing utilities (#42177) 2021-05-26 20:07:25 +00:00
shadow_css_spec.ts fix(compiler): preserve @page rules in encapsulated styles (#41915) 2021-05-06 09:33:56 -04:00
style_url_resolver_spec.ts refactor(compiler): ensure compatibility with noImplicitOverride (#42512) 2021-07-12 13:11:14 -07: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 test: clean up internal testing utilities (#42177) 2021-05-26 20:07:25 +00:00
util_spec.ts perf(compiler): use raw bytes to represent utf-8 encoded strings (#39694) 2020-11-17 10:09:28 -08:00