d795a00137
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 |
||
---|---|---|
.. | ||
abstract_emitter_node_only_spec.ts | ||
abstract_emitter_spec.ts | ||
js_emitter_node_only_spec.ts | ||
js_emitter_spec.ts | ||
output_ast_spec.ts | ||
output_jit_spec.ts | ||
source_map_spec.ts | ||
ts_emitter_node_only_spec.ts | ||
ts_emitter_spec.ts | ||
value_util_spec.ts |