angular/packages/compiler-cli/src/transformers
Pete Bacon Darwin d795a00137 refactor(compiler): replace Comment nodes with leadingComments property (#38811)
Common AST formats such as TS and Babel do not use a separate
node for comments, but instead attach comments to other AST nodes.
Previously this was worked around in TS by creating a `NotEmittedStatement`
AST node to attach the comment to. But Babel does not have this facility,
so it will not be a viable approach for the linker.

This commit refactors the output AST, to remove the `CommentStmt` and
`JSDocCommentStmt` nodes. Instead statements have a collection of
`leadingComments` that are rendered/attached to the final AST nodes
when being translated or printed.

PR Close #38811
2020-09-18 08:01:25 -07:00
..
api.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
compiler_host.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
downlevel_decorators_transform.ts feat(compiler-cli): add support for TypeScript 4.0 (#38076) 2020-08-24 13:06:59 -07:00
entry_points.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
inline_resources.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
lower_expressions.ts feat(compiler-cli): add support for TypeScript 4.0 (#38076) 2020-08-24 13:06:59 -07:00
metadata_cache.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
metadata_reader.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
node_emitter.ts refactor(compiler): replace Comment nodes with leadingComments property (#38811) 2020-09-18 08:01:25 -07:00
node_emitter_transform.ts refactor(compiler): replace Comment nodes with leadingComments property (#38811) 2020-09-18 08:01:25 -07:00
patch_alias_reference_resolution.ts fix(compiler-cli): downlevel angular decorators to static properties (#37382) 2020-06-10 09:24:11 -07:00
program.ts refactor(compiler-cli): skip class decorators in tooling constructor parameters transform (#37545) 2020-06-15 12:47:57 -07:00
r3_metadata_transform.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
r3_transform.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
util.ts refactor(compiler): replace Comment nodes with leadingComments property (#38811) 2020-09-18 08:01:25 -07:00