angular-cn/packages/compiler/src
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
..
aot fix(compiler): Metadata should not include methods on Object.prototype (#38292) 2020-07-30 15:18:28 -07:00
compiler_util feat(compiler): support unary operators for more accurate type checking (#37918) 2020-08-21 12:25:53 -07:00
css_parser build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
expression_parser refactor(compiler): capture interpolation source-spans in expression parser (#38645) 2020-09-08 13:17:20 -07:00
i18n fix(compiler-cli): compute source-mappings for localized strings (#38645) 2020-09-08 13:17:21 -07:00
jit build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
ml_parser refactor(compiler): `element.sourceSpan` should span the `outerHTML` (#38581) 2020-09-02 14:47:31 -07:00
output refactor(compiler): replace Comment nodes with leadingComments property (#38811) 2020-09-18 08:01:25 -07:00
render3 refactor(compiler): replace Comment nodes with leadingComments property (#38811) 2020-09-18 08:01:25 -07:00
schema build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
template_parser fix(compiler): source span for microsyntax text att should be key span (#38766) 2020-09-10 14:31:23 -07:00
view_compiler build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
assertions.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
ast_path.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
chars.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
compile_metadata.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
compile_reflector.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
compiler.ts refactor(compiler): replace Comment nodes with leadingComments property (#38811) 2020-09-18 08:01:25 -07:00
compiler_facade_interface.ts docs(core): fix path referenced in comments of both compiler facade interface files (#37370) 2020-06-09 08:28:26 -07:00
config.ts refactor(compiler): remove extra imports (#37246) 2020-06-11 19:00:33 -07:00
constant_pool.ts feat(compiler): support unary operators for more accurate type checking (#37918) 2020-08-21 12:25:53 -07:00
core.ts fix(core): `Attribute` decorator `attributeName` is mandatory (#38131) 2020-07-28 11:17:24 -07:00
directive_normalizer.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
directive_resolver.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
identifiers.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
injectable_compiler.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
injectable_compiler_2.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
jit_compiler_facade.ts refactor(compiler): move `ParsedTemplate` interface to compiler (#38594) 2020-09-08 11:43:25 -07:00
lifecycle_reflector.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
metadata_resolver.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
ng_module_compiler.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
ng_module_resolver.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
parse_util.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
pipe_resolver.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
provider_analyzer.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
resource_loader.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
selector.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
shadow_css.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
style_compiler.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
style_url_resolver.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
summary_resolver.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
url_resolver.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
util.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
version.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00