From c647cf1bc0bb8c1635eb35e7f58258fef5bdde9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Wed, 13 Feb 2019 16:03:38 +0900 Subject: [PATCH] Fix bugs (#193) swc_ecma_parser: - fix lexer - better error reporting for jsx reference test swc_ecma_codegen: - Update references --- .../tests/references/028846a58c67687f.js | 9 +- .../tests/references/29ef8a7a1cbfda7f.js | 3 +- .../tests/references/4b6559716b2f7b21.js | 3 +- .../tests/references/5d687a45c607ea42.js | 3 +- .../tests/references/bc89b2b2f1e19f9e.js | 3 +- .../tests/references/cdca52810bbe4532.js | 3 +- .../tests/references/dec1ae80150e1664.js | 3 +- .../tests/references/f3219596b50bb381.js | 3 +- ecmascript/parser/src/lexer/state.rs | 5 +- ecmascript/parser/src/lexer/tests.rs | 30 ++++ ecmascript/parser/tests/jsx.rs | 2 +- .../parser/tests/jsx/basic/1/input.js.stdout | 3 +- .../parser/tests/jsx/basic/10/input.js.stdout | 3 +- .../parser/tests/jsx/basic/11/input.js.stdout | 3 +- .../parser/tests/jsx/basic/12/input.js.stdout | 3 +- .../parser/tests/jsx/basic/13/input.js.stdout | 3 +- .../parser/tests/jsx/basic/14/input.js.stdout | 3 +- .../parser/tests/jsx/basic/15/input.js.stdout | 3 +- .../parser/tests/jsx/basic/16/input.js.stdout | 3 +- .../parser/tests/jsx/basic/17/input.js.stdout | 3 +- .../parser/tests/jsx/basic/18/input.js.stdout | 3 +- .../parser/tests/jsx/basic/19/input.js.stdout | 3 +- .../parser/tests/jsx/basic/2/input.js.stdout | 3 +- .../parser/tests/jsx/basic/20/input.js.stdout | 3 +- .../parser/tests/jsx/basic/21/input.js.stdout | 3 +- .../parser/tests/jsx/basic/3/input.js.stdout | 3 +- .../parser/tests/jsx/basic/4/input.js.stdout | 3 +- .../parser/tests/jsx/basic/5/input.js.stdout | 3 +- .../parser/tests/jsx/basic/6/input.js.stdout | 3 +- .../parser/tests/jsx/basic/7/input.js.stdout | 3 +- .../parser/tests/jsx/basic/8/input.js.stdout | 3 +- .../tests/jsx/basic/asi/input.js.stdout | 3 +- .../tests/jsx/basic/custom/tpl-space/input.js | 1 + .../basic/custom/tpl-space/input.js.stdout | 131 ++++++++++++++++++ .../tests/jsx/basic/custom/tpl/input.js | 1 + .../basic/custom/unary-paren/input.js.stdout | 3 +- .../jsx/basic/custom/unary/input.js.stdout | 3 +- .../input.js.stdout | 3 +- .../tests/jsx/basic/entity/input.js.stdout | 3 +- .../jsx/basic/fragment-1/input.js.stdout | 3 +- .../jsx/basic/fragment-2/input.js.stdout | 3 +- .../jsx/basic/fragment-3/input.js.stdout | 3 +- .../jsx/basic/fragment-4/input.js.stdout | 3 +- .../jsx/basic/fragment-5/input.js.stdout | 3 +- .../jsx/basic/fragment-6/input.js.stdout | 3 +- .../jsx/basic/keyword-tag/input.js.stdout | 3 +- .../jsx/basic/namespace-tag/input.js.stdout | 3 +- .../basic/nonentity-decimal/input.js.stdout | 3 +- .../tests/jsx/basic/nonentity/input.js.stdout | 3 +- .../tests/jsx/basic/yield-tag/input.js.stdout | 3 +- .../arrow-function/annotated/input.ts.stdout | 3 +- .../async-await-null/input.ts.stdout | 3 +- .../input.ts.stdout | 3 +- .../async-generic/input.ts.stdout | 3 +- .../input.ts.stdout | 3 +- .../arrow-function/async-rest/input.ts.stdout | 3 +- .../arrow-function/async/input.ts.stdout | 3 +- .../default-parameter-values/input.ts.stdout | 3 +- .../destructuring/input.ts.stdout | 3 +- .../generic-tsx/input.ts.stdout | 3 +- .../arrow-function/generic/input.ts.stdout | 3 +- .../optional-parameter/input.ts.stdout | 3 +- .../predicate-types/input.ts.stdout | 3 +- .../tests/typescript/cast/as/input.ts.stdout | 3 +- .../cast/assert-and-assign/input.ts.stdout | 3 +- .../cast/false-positive/input.ts.stdout | 3 +- .../input.ts.stdout | 3 +- .../cast/need-parentheses/input.ts.stdout | 3 +- .../cast/null-assertion-2/input.ts.stdout | 3 +- .../cast/null-assertion-3/input.ts.stdout | 3 +- .../input.ts.stdout | 3 +- .../null-assertion-and-assign/input.ts.stdout | 3 +- .../input.ts.stdout | 3 +- .../input.ts.stdout | 3 +- .../cast/null-assertion/input.ts.stdout | 3 +- .../input.ts.stdout | 3 +- .../type-assertion-and-assign/input.ts.stdout | 3 +- .../input.ts.stdout | 3 +- .../cast/type-assertion/input.ts.stdout | 3 +- .../abstract-false-positive/input.ts.stdout | 3 +- .../typescript/class/abstract/input.ts.stdout | 3 +- .../input.ts.stdout | 3 +- .../class/constructor/input.ts.stdout | 3 +- .../typescript/class/declare/input.ts.stdout | 3 +- .../input.ts.stdout | 3 +- .../class/expression-extends/input.ts.stdout | 3 +- .../class/expression-generic/input.ts.stdout | 3 +- .../expression-implements/input.ts.stdout | 3 +- .../class/extends-implements/input.ts.stdout | 3 +- .../typescript/class/extends/input.ts.stdout | 3 +- .../typescript/class/generic/input.ts.stdout | 3 +- .../class/get-generic/input.ts.stdout | 3 +- .../class/implements/input.ts.stdout | 3 +- .../class/index-signature/input.ts.stdout | 3 +- .../input.ts.stdout | 3 +- .../input.ts.stdout | 3 +- .../class/method-computed/input.ts.stdout | 3 +- .../class/method-generic/input.ts.stdout | 3 +- .../class/method-no-body/input.ts.stdout | 3 +- .../class/method-optional/input.ts.stdout | 3 +- .../class/method-return-type/input.ts.stdout | 3 +- .../input.ts.stdout | 3 +- .../input.ts.stdout | 3 +- .../class/modifiers-accessors/input.ts.stdout | 3 +- .../modifiers-methods-async/input.ts.stdout | 3 +- .../modifiers-properties/input.ts.stdout | 3 +- .../parameter-properties/input.ts.stdout | 3 +- .../class/properties/input.ts.stdout | 3 +- .../class/property-computed/input.ts.stdout | 3 +- .../typescript/class/static/input.ts.stdout | 3 +- .../const/no-initializer/input.ts.stdout | 3 +- .../arrow/input.ts.stdout | 3 +- .../function/input.ts.stdout | 3 +- .../custom/ternary-paren/input.ts.stdout | 3 +- .../typescript/custom/ternary/input.ts.stdout | 3 +- .../custom/tsx-unary-paren/input.tsx.stdout | 3 +- .../custom/tsx-unary/input.tsx.stdout | 3 +- .../typescript/declare/const/input.ts.stdout | 3 +- .../declare/destructure/input.ts.stdout | 3 +- .../declare/interface/input.ts.stdout | 3 +- .../typescript/declare/let/input.ts.stdout | 3 +- .../typescript/declare/var/input.ts.stdout | 3 +- .../decorators/type-arguments/input.ts.stdout | 3 +- .../typescript/enum/const/input.ts.stdout | 3 +- .../enum/declare-const/input.ts.stdout | 3 +- .../typescript/enum/declare/input.ts.stdout | 3 +- .../enum/export-const/input.ts.stdout | 3 +- .../enum/export-declare-const/input.ts.stdout | 3 +- .../typescript/enum/export/input.ts.stdout | 3 +- .../members-reserved-words/input.ts.stdout | 3 +- .../enum/members-strings/input.ts.stdout | 3 +- .../input.ts.stdout | 3 +- .../members-trailing-comma/input.ts.stdout | 3 +- .../typescript/enum/members/input.ts.stdout | 3 +- .../shorthand-ambient-module/input.ts.stdout | 3 +- .../export/as-namespace/input.ts.stdout | 5 +- .../typescript/export/declare/input.ts.stdout | 3 +- .../typescript/export/equals/input.ts.stdout | 3 +- .../export/nested-same-name/input.ts.stdout | 3 +- .../function/annotated/input.ts.stdout | 3 +- .../function/anonymous/input.ts.stdout | 3 +- .../function/declare/input.ts.stdout | 3 +- .../function/export-default/input.ts.stdout | 3 +- .../function/overloads/input.ts.stdout | 3 +- .../function/predicate-types/input.ts.stdout | 3 +- .../import/equals-require/input.ts.stdout | 5 +- .../typescript/import/equals/input.ts.stdout | 5 +- .../export-import-require/input.ts.stdout | 5 +- .../import/export-import/input.ts.stdout | 5 +- .../import/not-top-level/input.ts.stdout | 3 +- .../interface/call-signature/input.ts.stdout | 3 +- .../construct-signature/input.ts.stdout | 3 +- .../interface/export/input.ts.stdout | 3 +- .../interface/extends/input.ts.stdout | 3 +- .../interface/generic/input.ts.stdout | 3 +- .../interface/index-signature/input.ts.stdout | 3 +- .../interface/method-computed/input.ts.stdout | 3 +- .../interface/method-generic/input.ts.stdout | 3 +- .../interface/method-optional/input.ts.stdout | 3 +- .../interface/method-plain/input.ts.stdout | 3 +- .../interface/modifiers/input.ts.stdout | 3 +- .../interface/properties/input.ts.stdout | 3 +- .../property-computed/input.ts.stdout | 3 +- .../property-named-public/input.ts.stdout | 3 +- .../reserved-method-name/input.ts.stdout | 3 +- .../interface/separators/input.ts.stdout | 3 +- .../body-declare/input.ts.stdout | 3 +- .../body-nested-declare/input.ts.stdout | 3 +- .../body-nested/input.ts.stdout | 3 +- .../module-namespace/body/input.ts.stdout | 3 +- .../declare-shorthand/input.ts.stdout | 3 +- .../global-in-module/input.ts.stdout | 3 +- .../head-declare/input.ts.stdout | 3 +- .../head-export/input.ts.stdout | 3 +- .../module-namespace/head/input.ts.stdout | 3 +- .../input.ts.stdout | 3 +- .../is-default-export/input.ts.stdout | 3 +- .../regression/tsx-issue-7742/input.ts.stdout | 3 +- .../tsx/brace-is-block/input.ts.stdout | 3 +- .../tsx/type-arguments/input.ts.stdout | 3 +- .../tsx/type-parameters/input.ts.stdout | 3 +- .../type-alias/declare/input.ts.stdout | 3 +- .../type-alias/export/input.ts.stdout | 3 +- .../generic-complex/input.ts.stdout | 3 +- .../type-alias/generic/input.ts.stdout | 3 +- .../type-alias/plain/input.ts.stdout | 3 +- .../type-arguments/call/input.ts.stdout | 3 +- .../new-false-positive/input.ts.stdout | 3 +- .../type-arguments/new/input.ts.stdout | 3 +- .../tagged-template-no-asi/input.ts.stdout | 3 +- .../tagged-template/input.ts.stdout | 3 +- .../type-arguments/tsx/input.ts.stdout | 3 +- .../type-arguments/whitespace/input.ts.stdout | 3 +- .../typescript/types/array/input.ts.stdout | 3 +- .../types/conditional-infer/input.ts.stdout | 3 +- .../types/conditional/input.ts.stdout | 3 +- .../types/function-generic/input.ts.stdout | 3 +- .../types/function-in-generic/input.ts.stdout | 3 +- .../types/function-with-this/input.ts.stdout | 3 +- .../typescript/types/function/input.ts.stdout | 3 +- .../typescript/types/indexed/input.ts.stdout | 3 +- .../typescript/types/keywords/input.ts.stdout | 3 +- .../types/literal-boolean/input.ts.stdout | 3 +- .../literal-number-negative/input.ts.stdout | 3 +- .../types/literal-number/input.ts.stdout | 3 +- .../types/literal-string/input.ts.stdout | 3 +- .../typescript/types/mapped/input.ts.stdout | 3 +- .../types/object-shorthand/input.ts.stdout | 3 +- .../types/parenthesized/input.ts.stdout | 3 +- .../reference-generic-nested/input.ts.stdout | 3 +- .../types/reference-generic/input.ts.stdout | 3 +- .../types/reference/input.ts.stdout | 3 +- .../types/tuple-empty/input.ts.stdout | 3 +- .../types/tuple-optional/input.ts.stdout | 3 +- .../tuple-rest-after-optional/input.ts.stdout | 3 +- .../types/tuple-rest/input.ts.stdout | 3 +- .../typescript/types/tuple/input.ts.stdout | 3 +- .../types/type-literal/input.ts.stdout | 3 +- .../types/type-operator/input.ts.stdout | 3 +- .../typescript/types/typeof/input.ts.stdout | 3 +- .../types/union-intersection/input.ts.stdout | 3 +- .../definite-assignment/input.ts.stdout | 3 +- .../src/compat/es2015/block_scoped_fn.rs | 7 +- .../src/compat/es2015/classes/tests.rs | 19 +++ .../src/compat/es2015/destructuring/mod.rs | 21 ++- .../src/compat/es2015/destructuring/tests.rs | 20 +++ .../transforms/src/compat/es2015/mod.rs | 66 ++++++--- ecmascript/transforms/src/fixer.rs | 17 +-- 228 files changed, 714 insertions(+), 270 deletions(-) create mode 100644 ecmascript/parser/tests/jsx/basic/custom/tpl-space/input.js create mode 100644 ecmascript/parser/tests/jsx/basic/custom/tpl-space/input.js.stdout create mode 100644 ecmascript/parser/tests/jsx/basic/custom/tpl/input.js diff --git a/ecmascript/codegen/tests/references/028846a58c67687f.js b/ecmascript/codegen/tests/references/028846a58c67687f.js index cc48ffbfdd9..cd51699e29d 100644 --- a/ecmascript/codegen/tests/references/028846a58c67687f.js +++ b/ecmascript/codegen/tests/references/028846a58c67687f.js @@ -1,16 +1,13 @@ { ; -} -a(); +}a(); { -} -; +}; { { } ; -} -; +}; b(); { } diff --git a/ecmascript/codegen/tests/references/29ef8a7a1cbfda7f.js b/ecmascript/codegen/tests/references/29ef8a7a1cbfda7f.js index 973fd282435..a7d1e52634e 100644 --- a/ecmascript/codegen/tests/references/29ef8a7a1cbfda7f.js +++ b/ecmascript/codegen/tests/references/29ef8a7a1cbfda7f.js @@ -1,4 +1,3 @@ a.in; { -} -/foo/; +}/foo/; diff --git a/ecmascript/codegen/tests/references/4b6559716b2f7b21.js b/ecmascript/codegen/tests/references/4b6559716b2f7b21.js index 218dcd61ffe..e329d2be0e3 100644 --- a/ecmascript/codegen/tests/references/4b6559716b2f7b21.js +++ b/ecmascript/codegen/tests/references/4b6559716b2f7b21.js @@ -1,4 +1,3 @@ a++; { -} -/foo/; +}/foo/; diff --git a/ecmascript/codegen/tests/references/5d687a45c607ea42.js b/ecmascript/codegen/tests/references/5d687a45c607ea42.js index f102a1f7090..0151a4097b5 100644 --- a/ecmascript/codegen/tests/references/5d687a45c607ea42.js +++ b/ecmascript/codegen/tests/references/5d687a45c607ea42.js @@ -2,7 +2,6 @@ { a; } -} -{ +}{ b; } diff --git a/ecmascript/codegen/tests/references/bc89b2b2f1e19f9e.js b/ecmascript/codegen/tests/references/bc89b2b2f1e19f9e.js index 1d8a470ca82..3b12aed0031 100644 --- a/ecmascript/codegen/tests/references/bc89b2b2f1e19f9e.js +++ b/ecmascript/codegen/tests/references/bc89b2b2f1e19f9e.js @@ -1,3 +1,2 @@ { -} -/foo/; +}/foo/; diff --git a/ecmascript/codegen/tests/references/cdca52810bbe4532.js b/ecmascript/codegen/tests/references/cdca52810bbe4532.js index dcac72a1013..a0a8623568e 100644 --- a/ecmascript/codegen/tests/references/cdca52810bbe4532.js +++ b/ecmascript/codegen/tests/references/cdca52810bbe4532.js @@ -3,7 +3,6 @@ function a() { } a(); { -} -function a() { +}function a() { b.c('e'); } diff --git a/ecmascript/codegen/tests/references/dec1ae80150e1664.js b/ecmascript/codegen/tests/references/dec1ae80150e1664.js index 270094bc6a3..f81e6a08953 100644 --- a/ecmascript/codegen/tests/references/dec1ae80150e1664.js +++ b/ecmascript/codegen/tests/references/dec1ae80150e1664.js @@ -1,3 +1,2 @@ { -} -/=/; +}/=/; diff --git a/ecmascript/codegen/tests/references/f3219596b50bb381.js b/ecmascript/codegen/tests/references/f3219596b50bb381.js index 55bca865077..71bfed6ec71 100644 --- a/ecmascript/codegen/tests/references/f3219596b50bb381.js +++ b/ecmascript/codegen/tests/references/f3219596b50bb381.js @@ -1,4 +1,3 @@ { [1]; -} -/foo/; +}/foo/; diff --git a/ecmascript/parser/src/lexer/state.rs b/ecmascript/parser/src/lexer/state.rs index 42bc9ed42ee..008441b3ac2 100644 --- a/ecmascript/parser/src/lexer/state.rs +++ b/ecmascript/parser/src/lexer/state.rs @@ -99,7 +99,7 @@ impl<'a, I: Input> Lexer<'a, I> { impl<'a, I: Input> Iterator for Lexer<'a, I> { type Item = TokenAndSpan; fn next(&mut self) -> Option { - let start = self.cur_pos(); + let mut start = self.cur_pos(); let res = (|| -> Result, _> { if self.state.is_first { @@ -119,6 +119,7 @@ impl<'a, I: Input> Iterator for Lexer<'a, I> { } _ => {} } + start = self.input.cur_pos(); }; let c = match self.input.cur() { @@ -311,7 +312,7 @@ impl State { // ${} in template if out == TokenContext::TplQuasi { - return true; + return false; } // expression cannot follow expression diff --git a/ecmascript/parser/src/lexer/tests.rs b/ecmascript/parser/src/lexer/tests.rs index 00ce2021653..d56567aad06 100644 --- a/ecmascript/parser/src/lexer/tests.rs +++ b/ecmascript/parser/src/lexer/tests.rs @@ -904,6 +904,36 @@ fn empty() { assert_eq!(lex_tokens(::Syntax::default(), "",), vec![]); } +#[test] +fn issue_191() { + assert_eq!( + lex_tokens( + ::Syntax::Es(::EsConfig { + jsx: true, + ..Default::default() + }), + "`${foo}`" + ), + vec![ + tok!('`'), + Token::Template { + raw: "".into(), + cooked: "".into(), + has_escape: false, + }, + tok!("${"), + Token::Word(Word::Ident("foo".into())), + tok!('}'), + Token::Template { + raw: "".into(), + cooked: "".into(), + has_escape: false, + }, + tok!('`') + ] + ); +} + #[bench] fn lex_colors_js(b: &mut Bencher) { b.bytes = include_str!("../../colors.js").len() as _; diff --git a/ecmascript/parser/tests/jsx.rs b/ecmascript/parser/tests/jsx.rs index ee51f87c658..4fb3d74f2c3 100644 --- a/ecmascript/parser/tests/jsx.rs +++ b/ecmascript/parser/tests/jsx.rs @@ -153,7 +153,7 @@ fn reference_tests(tests: &mut Vec) -> Result<(), io::Error> { let path = dir.join(&file_name); // Parse source - let module = parse_module(cm, handler, &path).expect("should be parsed"); + let module = parse_module(cm, handler, &path)?; if StdErr::from(format!("{:#?}", module)) .compare_to_file(format!("{}.stdout", path.display())) diff --git a/ecmascript/parser/tests/jsx/basic/1/input.js.stdout b/ecmascript/parser/tests/jsx/basic/1/input.js.stdout index 241fcb5683b..6fd6a4619c1 100644 --- a/ecmascript/parser/tests/jsx/basic/1/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/1/input.js.stdout @@ -58,5 +58,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/10/input.js.stdout b/ecmascript/parser/tests/jsx/basic/10/input.js.stdout index 26cff87c628..a8176f059d6 100644 --- a/ecmascript/parser/tests/jsx/basic/10/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/10/input.js.stdout @@ -104,5 +104,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/11/input.js.stdout b/ecmascript/parser/tests/jsx/basic/11/input.js.stdout index c54d062dca7..6b3ac1df8c0 100644 --- a/ecmascript/parser/tests/jsx/basic/11/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/11/input.js.stdout @@ -102,5 +102,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/12/input.js.stdout b/ecmascript/parser/tests/jsx/basic/12/input.js.stdout index 85ad3970877..47fe4f1a628 100644 --- a/ecmascript/parser/tests/jsx/basic/12/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/12/input.js.stdout @@ -147,5 +147,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/13/input.js.stdout b/ecmascript/parser/tests/jsx/basic/13/input.js.stdout index ec51ba4df66..297b473dd58 100644 --- a/ecmascript/parser/tests/jsx/basic/13/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/13/input.js.stdout @@ -255,5 +255,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/14/input.js.stdout b/ecmascript/parser/tests/jsx/basic/14/input.js.stdout index 2790b728f68..66829369bee 100644 --- a/ecmascript/parser/tests/jsx/basic/14/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/14/input.js.stdout @@ -122,5 +122,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/15/input.js.stdout b/ecmascript/parser/tests/jsx/basic/15/input.js.stdout index 1aafed0b456..b88d52d98c6 100644 --- a/ecmascript/parser/tests/jsx/basic/15/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/15/input.js.stdout @@ -158,5 +158,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/16/input.js.stdout b/ecmascript/parser/tests/jsx/basic/16/input.js.stdout index 3913408b435..cf43e08ce8a 100644 --- a/ecmascript/parser/tests/jsx/basic/16/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/16/input.js.stdout @@ -101,5 +101,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/17/input.js.stdout b/ecmascript/parser/tests/jsx/basic/17/input.js.stdout index a903b5a39d2..39f9b5c4a82 100644 --- a/ecmascript/parser/tests/jsx/basic/17/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/17/input.js.stdout @@ -88,5 +88,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/18/input.js.stdout b/ecmascript/parser/tests/jsx/basic/18/input.js.stdout index 15b5d9e660b..76284674849 100644 --- a/ecmascript/parser/tests/jsx/basic/18/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/18/input.js.stdout @@ -136,5 +136,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/19/input.js.stdout b/ecmascript/parser/tests/jsx/basic/19/input.js.stdout index 5a00a8ace42..3cb8235a8fe 100644 --- a/ecmascript/parser/tests/jsx/basic/19/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/19/input.js.stdout @@ -212,5 +212,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/2/input.js.stdout b/ecmascript/parser/tests/jsx/basic/2/input.js.stdout index 9362374cda8..a9077471a97 100644 --- a/ecmascript/parser/tests/jsx/basic/2/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/2/input.js.stdout @@ -121,5 +121,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/20/input.js.stdout b/ecmascript/parser/tests/jsx/basic/20/input.js.stdout index f0cbc372c12..bb79297361a 100644 --- a/ecmascript/parser/tests/jsx/basic/20/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/20/input.js.stdout @@ -438,5 +438,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/21/input.js.stdout b/ecmascript/parser/tests/jsx/basic/21/input.js.stdout index 7cf71bd42e2..084e0c83a14 100644 --- a/ecmascript/parser/tests/jsx/basic/21/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/21/input.js.stdout @@ -194,5 +194,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/3/input.js.stdout b/ecmascript/parser/tests/jsx/basic/3/input.js.stdout index 77b58f57b99..9f99651f3f6 100644 --- a/ecmascript/parser/tests/jsx/basic/3/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/3/input.js.stdout @@ -323,5 +323,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/4/input.js.stdout b/ecmascript/parser/tests/jsx/basic/4/input.js.stdout index 71ddf7d7120..a4c78324297 100644 --- a/ecmascript/parser/tests/jsx/basic/4/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/4/input.js.stdout @@ -251,5 +251,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/5/input.js.stdout b/ecmascript/parser/tests/jsx/basic/5/input.js.stdout index 241fcb5683b..6fd6a4619c1 100644 --- a/ecmascript/parser/tests/jsx/basic/5/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/5/input.js.stdout @@ -58,5 +58,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/6/input.js.stdout b/ecmascript/parser/tests/jsx/basic/6/input.js.stdout index b7cccf37bea..0ecc8d7bbe8 100644 --- a/ecmascript/parser/tests/jsx/basic/6/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/6/input.js.stdout @@ -86,5 +86,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/7/input.js.stdout b/ecmascript/parser/tests/jsx/basic/7/input.js.stdout index ea5269c75aa..a8a7e89e573 100644 --- a/ecmascript/parser/tests/jsx/basic/7/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/7/input.js.stdout @@ -163,5 +163,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/8/input.js.stdout b/ecmascript/parser/tests/jsx/basic/8/input.js.stdout index 0f331dc0ba6..3cce0ceae21 100644 --- a/ecmascript/parser/tests/jsx/basic/8/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/8/input.js.stdout @@ -209,5 +209,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/asi/input.js.stdout b/ecmascript/parser/tests/jsx/basic/asi/input.js.stdout index 1a04cfa2f97..ccea9ffd366 100644 --- a/ecmascript/parser/tests/jsx/basic/asi/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/asi/input.js.stdout @@ -159,5 +159,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/custom/tpl-space/input.js b/ecmascript/parser/tests/jsx/basic/custom/tpl-space/input.js new file mode 100644 index 00000000000..a04ecf1055c --- /dev/null +++ b/ecmascript/parser/tests/jsx/basic/custom/tpl-space/input.js @@ -0,0 +1 @@ +`${foo} ` \ No newline at end of file diff --git a/ecmascript/parser/tests/jsx/basic/custom/tpl-space/input.js.stdout b/ecmascript/parser/tests/jsx/basic/custom/tpl-space/input.js.stdout new file mode 100644 index 00000000000..1491f329025 --- /dev/null +++ b/ecmascript/parser/tests/jsx/basic/custom/tpl-space/input.js.stdout @@ -0,0 +1,131 @@ +Module { + span: Span { + lo: BytePos( + 0 + ), + hi: BytePos( + 14 + ), + ctxt: #0 + }, + body: [ + Stmt( + Expr( + Tpl( + Tpl { + span: Span { + lo: BytePos( + 0 + ), + hi: BytePos( + 14 + ), + ctxt: #0 + }, + exprs: [ + Ident( + Ident { + sym: foo, + span: Span { + lo: BytePos( + 3 + ), + hi: BytePos( + 6 + ), + ctxt: #0 + }, + type_ann: None, + optional: false + } + ) + ], + quasis: [ + TplElement { + span: Span { + lo: BytePos( + 1 + ), + hi: BytePos( + 1 + ), + ctxt: #0 + }, + tail: false, + cooked: Some( + Str { + span: Span { + lo: BytePos( + 1 + ), + hi: BytePos( + 1 + ), + ctxt: #0 + }, + value: Atom('' type=static), + has_escape: false + } + ), + raw: Str { + span: Span { + lo: BytePos( + 1 + ), + hi: BytePos( + 1 + ), + ctxt: #0 + }, + value: Atom('' type=static), + has_escape: false + } + }, + TplElement { + span: Span { + lo: BytePos( + 7 + ), + hi: BytePos( + 13 + ), + ctxt: #0 + }, + tail: true, + cooked: Some( + Str { + span: Span { + lo: BytePos( + 7 + ), + hi: BytePos( + 13 + ), + ctxt: #0 + }, + value: Atom(' ' type=inline), + has_escape: false + } + ), + raw: Str { + span: Span { + lo: BytePos( + 7 + ), + hi: BytePos( + 13 + ), + ctxt: #0 + }, + value: Atom(' ' type=inline), + has_escape: false + } + } + ] + } + ) + ) + ) + ], + shebang: None +} diff --git a/ecmascript/parser/tests/jsx/basic/custom/tpl/input.js b/ecmascript/parser/tests/jsx/basic/custom/tpl/input.js new file mode 100644 index 00000000000..47c85533493 --- /dev/null +++ b/ecmascript/parser/tests/jsx/basic/custom/tpl/input.js @@ -0,0 +1 @@ +`${foo}` \ No newline at end of file diff --git a/ecmascript/parser/tests/jsx/basic/custom/unary-paren/input.js.stdout b/ecmascript/parser/tests/jsx/basic/custom/unary-paren/input.js.stdout index fe2919d88e7..6bada534449 100644 --- a/ecmascript/parser/tests/jsx/basic/custom/unary-paren/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/custom/unary-paren/input.js.stdout @@ -693,5 +693,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/custom/unary/input.js.stdout b/ecmascript/parser/tests/jsx/basic/custom/unary/input.js.stdout index 719ebb2a701..4a60b9fd9fa 100644 --- a/ecmascript/parser/tests/jsx/basic/custom/unary/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/custom/unary/input.js.stdout @@ -667,5 +667,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/empty-expression-container/input.js.stdout b/ecmascript/parser/tests/jsx/basic/empty-expression-container/input.js.stdout index 800c3d878b6..a2ba13140b2 100644 --- a/ecmascript/parser/tests/jsx/basic/empty-expression-container/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/empty-expression-container/input.js.stdout @@ -104,5 +104,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/entity/input.js.stdout b/ecmascript/parser/tests/jsx/basic/entity/input.js.stdout index f88a4e95adb..5808682bd0c 100644 --- a/ecmascript/parser/tests/jsx/basic/entity/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/entity/input.js.stdout @@ -102,5 +102,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/fragment-1/input.js.stdout b/ecmascript/parser/tests/jsx/basic/fragment-1/input.js.stdout index 41f6dbd85e1..c256879b16d 100644 --- a/ecmascript/parser/tests/jsx/basic/fragment-1/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/fragment-1/input.js.stdout @@ -49,5 +49,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/fragment-2/input.js.stdout b/ecmascript/parser/tests/jsx/basic/fragment-2/input.js.stdout index 80b4dd10c61..be21186da5e 100644 --- a/ecmascript/parser/tests/jsx/basic/fragment-2/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/fragment-2/input.js.stdout @@ -65,5 +65,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/fragment-3/input.js.stdout b/ecmascript/parser/tests/jsx/basic/fragment-3/input.js.stdout index 316c76e6e16..ffb4461c59c 100644 --- a/ecmascript/parser/tests/jsx/basic/fragment-3/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/fragment-3/input.js.stdout @@ -293,5 +293,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/fragment-4/input.js.stdout b/ecmascript/parser/tests/jsx/basic/fragment-4/input.js.stdout index 85d93a5cba3..cfa37ab512f 100644 --- a/ecmascript/parser/tests/jsx/basic/fragment-4/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/fragment-4/input.js.stdout @@ -223,5 +223,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/fragment-5/input.js.stdout b/ecmascript/parser/tests/jsx/basic/fragment-5/input.js.stdout index 30aabab1cec..9c89ff1b3ab 100644 --- a/ecmascript/parser/tests/jsx/basic/fragment-5/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/fragment-5/input.js.stdout @@ -253,5 +253,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/fragment-6/input.js.stdout b/ecmascript/parser/tests/jsx/basic/fragment-6/input.js.stdout index 4e5b072dedc..bf5204af943 100644 --- a/ecmascript/parser/tests/jsx/basic/fragment-6/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/fragment-6/input.js.stdout @@ -177,5 +177,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/keyword-tag/input.js.stdout b/ecmascript/parser/tests/jsx/basic/keyword-tag/input.js.stdout index 8cd45681179..2339e650dec 100644 --- a/ecmascript/parser/tests/jsx/basic/keyword-tag/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/keyword-tag/input.js.stdout @@ -86,5 +86,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/namespace-tag/input.js.stdout b/ecmascript/parser/tests/jsx/basic/namespace-tag/input.js.stdout index 11a4d39adc0..33e5d61c0c1 100644 --- a/ecmascript/parser/tests/jsx/basic/namespace-tag/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/namespace-tag/input.js.stdout @@ -183,5 +183,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/nonentity-decimal/input.js.stdout b/ecmascript/parser/tests/jsx/basic/nonentity-decimal/input.js.stdout index 8e2325bdfc4..71767e56d15 100644 --- a/ecmascript/parser/tests/jsx/basic/nonentity-decimal/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/nonentity-decimal/input.js.stdout @@ -102,5 +102,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/nonentity/input.js.stdout b/ecmascript/parser/tests/jsx/basic/nonentity/input.js.stdout index 723a016e815..957331bbcb0 100644 --- a/ecmascript/parser/tests/jsx/basic/nonentity/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/nonentity/input.js.stdout @@ -102,5 +102,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/jsx/basic/yield-tag/input.js.stdout b/ecmascript/parser/tests/jsx/basic/yield-tag/input.js.stdout index b1a64ab76c0..24237d0c1d4 100644 --- a/ecmascript/parser/tests/jsx/basic/yield-tag/input.js.stdout +++ b/ecmascript/parser/tests/jsx/basic/yield-tag/input.js.stdout @@ -155,5 +155,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/arrow-function/annotated/input.ts.stdout b/ecmascript/parser/tests/typescript/arrow-function/annotated/input.ts.stdout index 1b5fb0d035a..55a6b29357c 100644 --- a/ecmascript/parser/tests/typescript/arrow-function/annotated/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/arrow-function/annotated/input.ts.stdout @@ -118,5 +118,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/arrow-function/async-await-null/input.ts.stdout b/ecmascript/parser/tests/typescript/arrow-function/async-await-null/input.ts.stdout index ba6dd6e9ef3..1dc651408e8 100644 --- a/ecmascript/parser/tests/typescript/arrow-function/async-await-null/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/arrow-function/async-await-null/input.ts.stdout @@ -102,5 +102,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/arrow-function/async-generic-false-positive/input.ts.stdout b/ecmascript/parser/tests/typescript/arrow-function/async-generic-false-positive/input.ts.stdout index 2223f50f684..58f8aaa2cd5 100644 --- a/ecmascript/parser/tests/typescript/arrow-function/async-generic-false-positive/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/arrow-function/async-generic-false-positive/input.ts.stdout @@ -170,5 +170,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/arrow-function/async-generic/input.ts.stdout b/ecmascript/parser/tests/typescript/arrow-function/async-generic/input.ts.stdout index 40abc280619..2f92725d74d 100644 --- a/ecmascript/parser/tests/typescript/arrow-function/async-generic/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/arrow-function/async-generic/input.ts.stdout @@ -191,5 +191,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/arrow-function/async-rest-optional-parameter/input.ts.stdout b/ecmascript/parser/tests/typescript/arrow-function/async-rest-optional-parameter/input.ts.stdout index db48cb7b9ef..b6307c778df 100644 --- a/ecmascript/parser/tests/typescript/arrow-function/async-rest-optional-parameter/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/arrow-function/async-rest-optional-parameter/input.ts.stdout @@ -141,5 +141,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/arrow-function/async-rest/input.ts.stdout b/ecmascript/parser/tests/typescript/arrow-function/async-rest/input.ts.stdout index 6b480544692..7f01665fce2 100644 --- a/ecmascript/parser/tests/typescript/arrow-function/async-rest/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/arrow-function/async-rest/input.ts.stdout @@ -141,5 +141,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/arrow-function/async/input.ts.stdout b/ecmascript/parser/tests/typescript/arrow-function/async/input.ts.stdout index a0ab10fd06e..55be000fc78 100644 --- a/ecmascript/parser/tests/typescript/arrow-function/async/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/arrow-function/async/input.ts.stdout @@ -118,5 +118,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/arrow-function/default-parameter-values/input.ts.stdout b/ecmascript/parser/tests/typescript/arrow-function/default-parameter-values/input.ts.stdout index e29c69c1870..5f767f823b1 100644 --- a/ecmascript/parser/tests/typescript/arrow-function/default-parameter-values/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/arrow-function/default-parameter-values/input.ts.stdout @@ -122,5 +122,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/arrow-function/destructuring/input.ts.stdout b/ecmascript/parser/tests/typescript/arrow-function/destructuring/input.ts.stdout index b3911535b83..50e0b24fbcf 100644 --- a/ecmascript/parser/tests/typescript/arrow-function/destructuring/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/arrow-function/destructuring/input.ts.stdout @@ -111,5 +111,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/arrow-function/generic-tsx/input.ts.stdout b/ecmascript/parser/tests/typescript/arrow-function/generic-tsx/input.ts.stdout index 2449a50d159..6aab3a2838d 100644 --- a/ecmascript/parser/tests/typescript/arrow-function/generic-tsx/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/arrow-function/generic-tsx/input.ts.stdout @@ -191,5 +191,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/arrow-function/generic/input.ts.stdout b/ecmascript/parser/tests/typescript/arrow-function/generic/input.ts.stdout index 8f8d2700dc7..3c5812f051f 100644 --- a/ecmascript/parser/tests/typescript/arrow-function/generic/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/arrow-function/generic/input.ts.stdout @@ -191,5 +191,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/arrow-function/optional-parameter/input.ts.stdout b/ecmascript/parser/tests/typescript/arrow-function/optional-parameter/input.ts.stdout index d53817524e6..754cf28a5fc 100644 --- a/ecmascript/parser/tests/typescript/arrow-function/optional-parameter/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/arrow-function/optional-parameter/input.ts.stdout @@ -118,5 +118,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/arrow-function/predicate-types/input.ts.stdout b/ecmascript/parser/tests/typescript/arrow-function/predicate-types/input.ts.stdout index 2ad837853dd..de4b104ec02 100644 --- a/ecmascript/parser/tests/typescript/arrow-function/predicate-types/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/arrow-function/predicate-types/input.ts.stdout @@ -158,5 +158,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/cast/as/input.ts.stdout b/ecmascript/parser/tests/typescript/cast/as/input.ts.stdout index 488805272be..1dc1d088933 100644 --- a/ecmascript/parser/tests/typescript/cast/as/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/cast/as/input.ts.stdout @@ -316,5 +316,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/cast/assert-and-assign/input.ts.stdout b/ecmascript/parser/tests/typescript/cast/assert-and-assign/input.ts.stdout index 3b899b8230d..7077a896ce6 100644 --- a/ecmascript/parser/tests/typescript/cast/assert-and-assign/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/cast/assert-and-assign/input.ts.stdout @@ -90,5 +90,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/cast/false-positive/input.ts.stdout b/ecmascript/parser/tests/typescript/cast/false-positive/input.ts.stdout index 497622694c6..4419f48ed36 100644 --- a/ecmascript/parser/tests/typescript/cast/false-positive/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/cast/false-positive/input.ts.stdout @@ -128,5 +128,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/cast/multiple-assert-and-assign/input.ts.stdout b/ecmascript/parser/tests/typescript/cast/multiple-assert-and-assign/input.ts.stdout index 885f5b3ccaa..c4fabc2a85d 100644 --- a/ecmascript/parser/tests/typescript/cast/multiple-assert-and-assign/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/cast/multiple-assert-and-assign/input.ts.stdout @@ -117,5 +117,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/cast/need-parentheses/input.ts.stdout b/ecmascript/parser/tests/typescript/cast/need-parentheses/input.ts.stdout index fad9dcb6bf2..aea50f8fc1d 100644 --- a/ecmascript/parser/tests/typescript/cast/need-parentheses/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/cast/need-parentheses/input.ts.stdout @@ -290,5 +290,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/cast/null-assertion-2/input.ts.stdout b/ecmascript/parser/tests/typescript/cast/null-assertion-2/input.ts.stdout index 06e8899bcc7..02c47f0c511 100644 --- a/ecmascript/parser/tests/typescript/cast/null-assertion-2/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/cast/null-assertion-2/input.ts.stdout @@ -72,5 +72,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/cast/null-assertion-3/input.ts.stdout b/ecmascript/parser/tests/typescript/cast/null-assertion-3/input.ts.stdout index 34309cb4ade..e528db957e5 100644 --- a/ecmascript/parser/tests/typescript/cast/null-assertion-3/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/cast/null-assertion-3/input.ts.stdout @@ -106,5 +106,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/cast/null-assertion-and-assign-2/input.ts.stdout b/ecmascript/parser/tests/typescript/cast/null-assertion-and-assign-2/input.ts.stdout index 78abfedb92c..ce3d15d3b77 100644 --- a/ecmascript/parser/tests/typescript/cast/null-assertion-and-assign-2/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/cast/null-assertion-and-assign-2/input.ts.stdout @@ -74,5 +74,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/cast/null-assertion-and-assign/input.ts.stdout b/ecmascript/parser/tests/typescript/cast/null-assertion-and-assign/input.ts.stdout index 1375499cc18..26aa7992b7e 100644 --- a/ecmascript/parser/tests/typescript/cast/null-assertion-and-assign/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/cast/null-assertion-and-assign/input.ts.stdout @@ -74,5 +74,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/cast/null-assertion-false-positive/input.ts.stdout b/ecmascript/parser/tests/typescript/cast/null-assertion-false-positive/input.ts.stdout index 20517025337..dc7b139d90f 100644 --- a/ecmascript/parser/tests/typescript/cast/null-assertion-false-positive/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/cast/null-assertion-false-positive/input.ts.stdout @@ -63,5 +63,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/cast/null-assertion-then-property-access/input.ts.stdout b/ecmascript/parser/tests/typescript/cast/null-assertion-then-property-access/input.ts.stdout index 6990d2c0274..90b99b66037 100644 --- a/ecmascript/parser/tests/typescript/cast/null-assertion-then-property-access/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/cast/null-assertion-then-property-access/input.ts.stdout @@ -74,5 +74,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/cast/null-assertion/input.ts.stdout b/ecmascript/parser/tests/typescript/cast/null-assertion/input.ts.stdout index 63749c52f91..3eeaa844454 100644 --- a/ecmascript/parser/tests/typescript/cast/null-assertion/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/cast/null-assertion/input.ts.stdout @@ -42,5 +42,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/cast/type-assertion-after-operator/input.ts.stdout b/ecmascript/parser/tests/typescript/cast/type-assertion-after-operator/input.ts.stdout index 59614438bf1..c07d797d0e6 100644 --- a/ecmascript/parser/tests/typescript/cast/type-assertion-after-operator/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/cast/type-assertion-after-operator/input.ts.stdout @@ -86,5 +86,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/cast/type-assertion-and-assign/input.ts.stdout b/ecmascript/parser/tests/typescript/cast/type-assertion-and-assign/input.ts.stdout index bf8c5fff7ee..827120afce8 100644 --- a/ecmascript/parser/tests/typescript/cast/type-assertion-and-assign/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/cast/type-assertion-and-assign/input.ts.stdout @@ -101,5 +101,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/cast/type-assertion-before-operator/input.ts.stdout b/ecmascript/parser/tests/typescript/cast/type-assertion-before-operator/input.ts.stdout index fa22ed57b6c..964de35032c 100644 --- a/ecmascript/parser/tests/typescript/cast/type-assertion-before-operator/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/cast/type-assertion-before-operator/input.ts.stdout @@ -86,5 +86,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/cast/type-assertion/input.ts.stdout b/ecmascript/parser/tests/typescript/cast/type-assertion/input.ts.stdout index 3710944d2e1..7cf80b80cce 100644 --- a/ecmascript/parser/tests/typescript/cast/type-assertion/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/cast/type-assertion/input.ts.stdout @@ -56,5 +56,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/abstract-false-positive/input.ts.stdout b/ecmascript/parser/tests/typescript/class/abstract-false-positive/input.ts.stdout index 0825eb0660b..4dda95a6a35 100644 --- a/ecmascript/parser/tests/typescript/class/abstract-false-positive/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/abstract-false-positive/input.ts.stdout @@ -29,5 +29,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/abstract/input.ts.stdout b/ecmascript/parser/tests/typescript/class/abstract/input.ts.stdout index 648cebcf4ea..92591b5e7bd 100644 --- a/ecmascript/parser/tests/typescript/class/abstract/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/abstract/input.ts.stdout @@ -201,5 +201,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/constructor-with-modifier-names/input.ts.stdout b/ecmascript/parser/tests/typescript/class/constructor-with-modifier-names/input.ts.stdout index ec4f6070ed2..e7858396d0d 100644 --- a/ecmascript/parser/tests/typescript/class/constructor-with-modifier-names/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/constructor-with-modifier-names/input.ts.stdout @@ -269,5 +269,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/constructor/input.ts.stdout b/ecmascript/parser/tests/typescript/class/constructor/input.ts.stdout index d3c86c6397f..c46fd0aef33 100644 --- a/ecmascript/parser/tests/typescript/class/constructor/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/constructor/input.ts.stdout @@ -430,5 +430,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/declare/input.ts.stdout b/ecmascript/parser/tests/typescript/class/declare/input.ts.stdout index c0eb554980d..a890aff4782 100644 --- a/ecmascript/parser/tests/typescript/class/declare/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/declare/input.ts.stdout @@ -370,5 +370,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/expression-extends-implements/input.ts.stdout b/ecmascript/parser/tests/typescript/class/expression-extends-implements/input.ts.stdout index e08d6a6180b..88bfa0be372 100644 --- a/ecmascript/parser/tests/typescript/class/expression-extends-implements/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/expression-extends-implements/input.ts.stdout @@ -442,5 +442,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/expression-extends/input.ts.stdout b/ecmascript/parser/tests/typescript/class/expression-extends/input.ts.stdout index 835d95729cc..5eec29ef45d 100644 --- a/ecmascript/parser/tests/typescript/class/expression-extends/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/expression-extends/input.ts.stdout @@ -260,5 +260,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/expression-generic/input.ts.stdout b/ecmascript/parser/tests/typescript/class/expression-generic/input.ts.stdout index 2ee03c429f0..062499bb2d0 100644 --- a/ecmascript/parser/tests/typescript/class/expression-generic/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/expression-generic/input.ts.stdout @@ -186,5 +186,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/expression-implements/input.ts.stdout b/ecmascript/parser/tests/typescript/class/expression-implements/input.ts.stdout index 11a8ae72550..21c73f61704 100644 --- a/ecmascript/parser/tests/typescript/class/expression-implements/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/expression-implements/input.ts.stdout @@ -286,5 +286,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/extends-implements/input.ts.stdout b/ecmascript/parser/tests/typescript/class/extends-implements/input.ts.stdout index 3651926dc43..7f7891479ee 100644 --- a/ecmascript/parser/tests/typescript/class/extends-implements/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/extends-implements/input.ts.stdout @@ -219,5 +219,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/extends/input.ts.stdout b/ecmascript/parser/tests/typescript/class/extends/input.ts.stdout index c873eed2294..748210fdfdd 100644 --- a/ecmascript/parser/tests/typescript/class/extends/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/extends/input.ts.stdout @@ -128,5 +128,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/generic/input.ts.stdout b/ecmascript/parser/tests/typescript/class/generic/input.ts.stdout index 1f408e57f25..4c313ca0525 100644 --- a/ecmascript/parser/tests/typescript/class/generic/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/generic/input.ts.stdout @@ -184,5 +184,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/get-generic/input.ts.stdout b/ecmascript/parser/tests/typescript/class/get-generic/input.ts.stdout index d047ea6282a..565bdbb4d5e 100644 --- a/ecmascript/parser/tests/typescript/class/get-generic/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/get-generic/input.ts.stdout @@ -170,5 +170,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/implements/input.ts.stdout b/ecmascript/parser/tests/typescript/class/implements/input.ts.stdout index 1d8f261dd5a..d09c29fa005 100644 --- a/ecmascript/parser/tests/typescript/class/implements/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/implements/input.ts.stdout @@ -141,5 +141,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/index-signature/input.ts.stdout b/ecmascript/parser/tests/typescript/class/index-signature/input.ts.stdout index e8b22504fdc..f34aaa67ca8 100644 --- a/ecmascript/parser/tests/typescript/class/index-signature/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/index-signature/input.ts.stdout @@ -221,5 +221,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/members-with-modifier-names/input.ts.stdout b/ecmascript/parser/tests/typescript/class/members-with-modifier-names/input.ts.stdout index fbe8322fd5a..291d19612f4 100644 --- a/ecmascript/parser/tests/typescript/class/members-with-modifier-names/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/members-with-modifier-names/input.ts.stdout @@ -384,5 +384,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/members-with-reserved-names/input.ts.stdout b/ecmascript/parser/tests/typescript/class/members-with-reserved-names/input.ts.stdout index 491ad51149c..8a76b1db7d9 100644 --- a/ecmascript/parser/tests/typescript/class/members-with-reserved-names/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/members-with-reserved-names/input.ts.stdout @@ -131,5 +131,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/method-computed/input.ts.stdout b/ecmascript/parser/tests/typescript/class/method-computed/input.ts.stdout index 8011d5d5f16..454d0e73e88 100644 --- a/ecmascript/parser/tests/typescript/class/method-computed/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/method-computed/input.ts.stdout @@ -275,5 +275,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/method-generic/input.ts.stdout b/ecmascript/parser/tests/typescript/class/method-generic/input.ts.stdout index 0c846bb2b5a..b0903033798 100644 --- a/ecmascript/parser/tests/typescript/class/method-generic/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/method-generic/input.ts.stdout @@ -583,5 +583,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/method-no-body/input.ts.stdout b/ecmascript/parser/tests/typescript/class/method-no-body/input.ts.stdout index 26a42e94b9d..e01ed82924e 100644 --- a/ecmascript/parser/tests/typescript/class/method-no-body/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/method-no-body/input.ts.stdout @@ -181,5 +181,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/method-optional/input.ts.stdout b/ecmascript/parser/tests/typescript/class/method-optional/input.ts.stdout index 830fab800b0..005d68c2376 100644 --- a/ecmascript/parser/tests/typescript/class/method-optional/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/method-optional/input.ts.stdout @@ -142,5 +142,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/method-return-type/input.ts.stdout b/ecmascript/parser/tests/typescript/class/method-return-type/input.ts.stdout index 21b9fe98b11..66eadaad393 100644 --- a/ecmascript/parser/tests/typescript/class/method-return-type/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/method-return-type/input.ts.stdout @@ -142,5 +142,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/method-with-newline-with-body/input.ts.stdout b/ecmascript/parser/tests/typescript/class/method-with-newline-with-body/input.ts.stdout index 6339b6e1e89..5e081a999c6 100644 --- a/ecmascript/parser/tests/typescript/class/method-with-newline-with-body/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/method-with-newline-with-body/input.ts.stdout @@ -116,5 +116,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/method-with-newline-without-body/input.ts.stdout b/ecmascript/parser/tests/typescript/class/method-with-newline-without-body/input.ts.stdout index a294eaaf250..f4a989c9ee3 100644 --- a/ecmascript/parser/tests/typescript/class/method-with-newline-without-body/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/method-with-newline-without-body/input.ts.stdout @@ -155,5 +155,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/modifiers-accessors/input.ts.stdout b/ecmascript/parser/tests/typescript/class/modifiers-accessors/input.ts.stdout index 64fbb590d2c..9d8c7f0fa78 100644 --- a/ecmascript/parser/tests/typescript/class/modifiers-accessors/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/modifiers-accessors/input.ts.stdout @@ -650,5 +650,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/modifiers-methods-async/input.ts.stdout b/ecmascript/parser/tests/typescript/class/modifiers-methods-async/input.ts.stdout index 30d8e194f2c..d4a5fba321e 100644 --- a/ecmascript/parser/tests/typescript/class/modifiers-methods-async/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/modifiers-methods-async/input.ts.stdout @@ -490,5 +490,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/modifiers-properties/input.ts.stdout b/ecmascript/parser/tests/typescript/class/modifiers-properties/input.ts.stdout index adc0c8e6b47..a30eda292da 100644 --- a/ecmascript/parser/tests/typescript/class/modifiers-properties/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/modifiers-properties/input.ts.stdout @@ -719,5 +719,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/parameter-properties/input.ts.stdout b/ecmascript/parser/tests/typescript/class/parameter-properties/input.ts.stdout index ea0dde0721d..19b70ca9a77 100644 --- a/ecmascript/parser/tests/typescript/class/parameter-properties/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/parameter-properties/input.ts.stdout @@ -470,5 +470,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/properties/input.ts.stdout b/ecmascript/parser/tests/typescript/class/properties/input.ts.stdout index 3737af89990..6e89e33a3d1 100644 --- a/ecmascript/parser/tests/typescript/class/properties/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/properties/input.ts.stdout @@ -380,5 +380,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/property-computed/input.ts.stdout b/ecmascript/parser/tests/typescript/class/property-computed/input.ts.stdout index 8b4e0df5f12..8297f43d98d 100644 --- a/ecmascript/parser/tests/typescript/class/property-computed/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/property-computed/input.ts.stdout @@ -245,5 +245,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/class/static/input.ts.stdout b/ecmascript/parser/tests/typescript/class/static/input.ts.stdout index b3966a09eac..6fc64451f21 100644 --- a/ecmascript/parser/tests/typescript/class/static/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/class/static/input.ts.stdout @@ -265,5 +265,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/const/no-initializer/input.ts.stdout b/ecmascript/parser/tests/typescript/const/no-initializer/input.ts.stdout index 6353a341541..fe499a374e8 100644 --- a/ecmascript/parser/tests/typescript/const/no-initializer/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/const/no-initializer/input.ts.stdout @@ -85,5 +85,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/custom/default-followed-by-type/arrow/input.ts.stdout b/ecmascript/parser/tests/typescript/custom/default-followed-by-type/arrow/input.ts.stdout index 5c31606345b..db6463e9ba1 100644 --- a/ecmascript/parser/tests/typescript/custom/default-followed-by-type/arrow/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/custom/default-followed-by-type/arrow/input.ts.stdout @@ -393,5 +393,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/custom/default-followed-by-type/function/input.ts.stdout b/ecmascript/parser/tests/typescript/custom/default-followed-by-type/function/input.ts.stdout index 4851ace85e1..d583450f937 100644 --- a/ecmascript/parser/tests/typescript/custom/default-followed-by-type/function/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/custom/default-followed-by-type/function/input.ts.stdout @@ -379,5 +379,6 @@ Module { } ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/custom/ternary-paren/input.ts.stdout b/ecmascript/parser/tests/typescript/custom/ternary-paren/input.ts.stdout index c6f9e56e5bd..8166d84c3cf 100644 --- a/ecmascript/parser/tests/typescript/custom/ternary-paren/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/custom/ternary-paren/input.ts.stdout @@ -87,5 +87,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/custom/ternary/input.ts.stdout b/ecmascript/parser/tests/typescript/custom/ternary/input.ts.stdout index df403ace5d8..d64289375d8 100644 --- a/ecmascript/parser/tests/typescript/custom/ternary/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/custom/ternary/input.ts.stdout @@ -74,5 +74,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/custom/tsx-unary-paren/input.tsx.stdout b/ecmascript/parser/tests/typescript/custom/tsx-unary-paren/input.tsx.stdout index db3662ab89b..d2e16c24fa3 100644 --- a/ecmascript/parser/tests/typescript/custom/tsx-unary-paren/input.tsx.stdout +++ b/ecmascript/parser/tests/typescript/custom/tsx-unary-paren/input.tsx.stdout @@ -377,5 +377,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/custom/tsx-unary/input.tsx.stdout b/ecmascript/parser/tests/typescript/custom/tsx-unary/input.tsx.stdout index 719ebb2a701..4a60b9fd9fa 100644 --- a/ecmascript/parser/tests/typescript/custom/tsx-unary/input.tsx.stdout +++ b/ecmascript/parser/tests/typescript/custom/tsx-unary/input.tsx.stdout @@ -667,5 +667,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/declare/const/input.ts.stdout b/ecmascript/parser/tests/typescript/declare/const/input.ts.stdout index 3903cab945e..d2045def03f 100644 --- a/ecmascript/parser/tests/typescript/declare/const/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/declare/const/input.ts.stdout @@ -140,5 +140,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/declare/destructure/input.ts.stdout b/ecmascript/parser/tests/typescript/declare/destructure/input.ts.stdout index 6b1d4299f09..292238402b1 100644 --- a/ecmascript/parser/tests/typescript/declare/destructure/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/declare/destructure/input.ts.stdout @@ -266,5 +266,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/declare/interface/input.ts.stdout b/ecmascript/parser/tests/typescript/declare/interface/input.ts.stdout index 0b184040df5..6a9f5059dd6 100644 --- a/ecmascript/parser/tests/typescript/declare/interface/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/declare/interface/input.ts.stdout @@ -55,5 +55,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/declare/let/input.ts.stdout b/ecmascript/parser/tests/typescript/declare/let/input.ts.stdout index 82b68f53b1a..6b13a93b038 100644 --- a/ecmascript/parser/tests/typescript/declare/let/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/declare/let/input.ts.stdout @@ -59,5 +59,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/declare/var/input.ts.stdout b/ecmascript/parser/tests/typescript/declare/var/input.ts.stdout index c4978d2a481..2317aeaa850 100644 --- a/ecmascript/parser/tests/typescript/declare/var/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/declare/var/input.ts.stdout @@ -135,5 +135,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/decorators/type-arguments/input.ts.stdout b/ecmascript/parser/tests/typescript/decorators/type-arguments/input.ts.stdout index 5b3b681ba1a..257a28e0d2b 100644 --- a/ecmascript/parser/tests/typescript/decorators/type-arguments/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/decorators/type-arguments/input.ts.stdout @@ -95,5 +95,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/enum/const/input.ts.stdout b/ecmascript/parser/tests/typescript/enum/const/input.ts.stdout index b61d3b78705..b5c9b35c677 100644 --- a/ecmascript/parser/tests/typescript/enum/const/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/enum/const/input.ts.stdout @@ -43,5 +43,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/enum/declare-const/input.ts.stdout b/ecmascript/parser/tests/typescript/enum/declare-const/input.ts.stdout index 9c1db1e0236..ff0e786453c 100644 --- a/ecmascript/parser/tests/typescript/enum/declare-const/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/enum/declare-const/input.ts.stdout @@ -43,5 +43,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/enum/declare/input.ts.stdout b/ecmascript/parser/tests/typescript/enum/declare/input.ts.stdout index addcaf523e4..11365f5eee3 100644 --- a/ecmascript/parser/tests/typescript/enum/declare/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/enum/declare/input.ts.stdout @@ -43,5 +43,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/enum/export-const/input.ts.stdout b/ecmascript/parser/tests/typescript/enum/export-const/input.ts.stdout index c5300f23a7b..ba911c5b760 100644 --- a/ecmascript/parser/tests/typescript/enum/export-const/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/enum/export-const/input.ts.stdout @@ -43,5 +43,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/enum/export-declare-const/input.ts.stdout b/ecmascript/parser/tests/typescript/enum/export-declare-const/input.ts.stdout index dee6907a9a7..25c201a497c 100644 --- a/ecmascript/parser/tests/typescript/enum/export-declare-const/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/enum/export-declare-const/input.ts.stdout @@ -43,5 +43,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/enum/export/input.ts.stdout b/ecmascript/parser/tests/typescript/enum/export/input.ts.stdout index fc51a7d54f3..3e30e720b9a 100644 --- a/ecmascript/parser/tests/typescript/enum/export/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/enum/export/input.ts.stdout @@ -43,5 +43,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/enum/members-reserved-words/input.ts.stdout b/ecmascript/parser/tests/typescript/enum/members-reserved-words/input.ts.stdout index 06ca0bd8477..6ae74400476 100644 --- a/ecmascript/parser/tests/typescript/enum/members-reserved-words/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/enum/members-reserved-words/input.ts.stdout @@ -100,5 +100,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/enum/members-strings/input.ts.stdout b/ecmascript/parser/tests/typescript/enum/members-strings/input.ts.stdout index 50bc9d618af..23d870945bb 100644 --- a/ecmascript/parser/tests/typescript/enum/members-strings/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/enum/members-strings/input.ts.stdout @@ -115,5 +115,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/enum/members-trailing-comma-with-initializer/input.ts.stdout b/ecmascript/parser/tests/typescript/enum/members-trailing-comma-with-initializer/input.ts.stdout index 06e5e1baedf..2f8bd556eda 100644 --- a/ecmascript/parser/tests/typescript/enum/members-trailing-comma-with-initializer/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/enum/members-trailing-comma-with-initializer/input.ts.stdout @@ -89,5 +89,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/enum/members-trailing-comma/input.ts.stdout b/ecmascript/parser/tests/typescript/enum/members-trailing-comma/input.ts.stdout index e8eb37c5176..b3bfe4de97d 100644 --- a/ecmascript/parser/tests/typescript/enum/members-trailing-comma/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/enum/members-trailing-comma/input.ts.stdout @@ -72,5 +72,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/enum/members/input.ts.stdout b/ecmascript/parser/tests/typescript/enum/members/input.ts.stdout index 53005147f2c..4f86f1ae656 100644 --- a/ecmascript/parser/tests/typescript/enum/members/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/enum/members/input.ts.stdout @@ -117,5 +117,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/estree-compat/shorthand-ambient-module/input.ts.stdout b/ecmascript/parser/tests/typescript/estree-compat/shorthand-ambient-module/input.ts.stdout index 1e9c568f18d..cec108444d5 100644 --- a/ecmascript/parser/tests/typescript/estree-compat/shorthand-ambient-module/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/estree-compat/shorthand-ambient-module/input.ts.stdout @@ -44,5 +44,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/export/as-namespace/input.ts.stdout b/ecmascript/parser/tests/typescript/export/as-namespace/input.ts.stdout index 25bb357f086..62be7ad7782 100644 --- a/ecmascript/parser/tests/typescript/export/as-namespace/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/export/as-namespace/input.ts.stdout @@ -10,7 +10,7 @@ Module { }, body: [ ModuleDecl( - TsNamespaceExportDecl( + TsNamespaceExport( TsNamespaceExportDecl { span: Span { lo: BytePos( @@ -38,5 +38,6 @@ Module { } ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/export/declare/input.ts.stdout b/ecmascript/parser/tests/typescript/export/declare/input.ts.stdout index 3a4f5b31d40..e0f3f736def 100644 --- a/ecmascript/parser/tests/typescript/export/declare/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/export/declare/input.ts.stdout @@ -388,5 +388,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/export/equals/input.ts.stdout b/ecmascript/parser/tests/typescript/export/equals/input.ts.stdout index 7abb504d015..b282d1f88ac 100644 --- a/ecmascript/parser/tests/typescript/export/equals/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/export/equals/input.ts.stdout @@ -40,5 +40,6 @@ Module { } ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/export/nested-same-name/input.ts.stdout b/ecmascript/parser/tests/typescript/export/nested-same-name/input.ts.stdout index 36aa64d813b..2ab47fccb48 100644 --- a/ecmascript/parser/tests/typescript/export/nested-same-name/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/export/nested-same-name/input.ts.stdout @@ -195,5 +195,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/function/annotated/input.ts.stdout b/ecmascript/parser/tests/typescript/function/annotated/input.ts.stdout index 0c700507c57..7d864d70626 100644 --- a/ecmascript/parser/tests/typescript/function/annotated/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/function/annotated/input.ts.stdout @@ -205,5 +205,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/function/anonymous/input.ts.stdout b/ecmascript/parser/tests/typescript/function/anonymous/input.ts.stdout index cfd8bb35df8..81c45a78294 100644 --- a/ecmascript/parser/tests/typescript/function/anonymous/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/function/anonymous/input.ts.stdout @@ -238,5 +238,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/function/declare/input.ts.stdout b/ecmascript/parser/tests/typescript/function/declare/input.ts.stdout index 78fb30566c3..9667f0c7b81 100644 --- a/ecmascript/parser/tests/typescript/function/declare/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/function/declare/input.ts.stdout @@ -200,5 +200,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/function/export-default/input.ts.stdout b/ecmascript/parser/tests/typescript/function/export-default/input.ts.stdout index bf691343adb..495d7cdb992 100644 --- a/ecmascript/parser/tests/typescript/function/export-default/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/function/export-default/input.ts.stdout @@ -105,5 +105,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/function/overloads/input.ts.stdout b/ecmascript/parser/tests/typescript/function/overloads/input.ts.stdout index a1ecf683a9b..97d1855ab94 100644 --- a/ecmascript/parser/tests/typescript/function/overloads/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/function/overloads/input.ts.stdout @@ -229,5 +229,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/function/predicate-types/input.ts.stdout b/ecmascript/parser/tests/typescript/function/predicate-types/input.ts.stdout index 68a0034dec3..08525aa558b 100644 --- a/ecmascript/parser/tests/typescript/function/predicate-types/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/function/predicate-types/input.ts.stdout @@ -334,5 +334,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/import/equals-require/input.ts.stdout b/ecmascript/parser/tests/typescript/import/equals-require/input.ts.stdout index a5c02ab9524..38123ab88ef 100644 --- a/ecmascript/parser/tests/typescript/import/equals-require/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/import/equals-require/input.ts.stdout @@ -10,7 +10,7 @@ Module { }, body: [ ModuleDecl( - TsImportEqualsDecl( + TsImportEquals( TsImportEqualsDecl { span: Span { lo: BytePos( @@ -66,5 +66,6 @@ Module { } ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/import/equals/input.ts.stdout b/ecmascript/parser/tests/typescript/import/equals/input.ts.stdout index e580220b512..a12f3a70c22 100644 --- a/ecmascript/parser/tests/typescript/import/equals/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/import/equals/input.ts.stdout @@ -10,7 +10,7 @@ Module { }, body: [ ModuleDecl( - TsImportEqualsDecl( + TsImportEquals( TsImportEqualsDecl { span: Span { lo: BytePos( @@ -76,5 +76,6 @@ Module { } ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/import/export-import-require/input.ts.stdout b/ecmascript/parser/tests/typescript/import/export-import-require/input.ts.stdout index a5e9eb735aa..bc1dbc10248 100644 --- a/ecmascript/parser/tests/typescript/import/export-import-require/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/import/export-import-require/input.ts.stdout @@ -10,7 +10,7 @@ Module { }, body: [ ModuleDecl( - TsImportEqualsDecl( + TsImportEquals( TsImportEqualsDecl { span: Span { lo: BytePos( @@ -66,5 +66,6 @@ Module { } ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/import/export-import/input.ts.stdout b/ecmascript/parser/tests/typescript/import/export-import/input.ts.stdout index 8089c6bf56c..4a847da2987 100644 --- a/ecmascript/parser/tests/typescript/import/export-import/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/import/export-import/input.ts.stdout @@ -10,7 +10,7 @@ Module { }, body: [ ModuleDecl( - TsImportEqualsDecl( + TsImportEquals( TsImportEqualsDecl { span: Span { lo: BytePos( @@ -76,5 +76,6 @@ Module { } ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/import/not-top-level/input.ts.stdout b/ecmascript/parser/tests/typescript/import/not-top-level/input.ts.stdout index a569b67b991..ea4da3235f5 100644 --- a/ecmascript/parser/tests/typescript/import/not-top-level/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/import/not-top-level/input.ts.stdout @@ -117,5 +117,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/interface/call-signature/input.ts.stdout b/ecmascript/parser/tests/typescript/interface/call-signature/input.ts.stdout index 9a5a807815c..2736bc6bbbb 100644 --- a/ecmascript/parser/tests/typescript/interface/call-signature/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/interface/call-signature/input.ts.stdout @@ -141,5 +141,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/interface/construct-signature/input.ts.stdout b/ecmascript/parser/tests/typescript/interface/construct-signature/input.ts.stdout index 0db715698e2..6a893aed452 100644 --- a/ecmascript/parser/tests/typescript/interface/construct-signature/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/interface/construct-signature/input.ts.stdout @@ -141,5 +141,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/interface/export/input.ts.stdout b/ecmascript/parser/tests/typescript/interface/export/input.ts.stdout index 01e5d1fe2fd..a2cd8c3cb68 100644 --- a/ecmascript/parser/tests/typescript/interface/export/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/interface/export/input.ts.stdout @@ -101,5 +101,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/interface/extends/input.ts.stdout b/ecmascript/parser/tests/typescript/interface/extends/input.ts.stdout index c3ad71eefad..2029aba3cd2 100644 --- a/ecmascript/parser/tests/typescript/interface/extends/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/interface/extends/input.ts.stdout @@ -146,5 +146,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/interface/generic/input.ts.stdout b/ecmascript/parser/tests/typescript/interface/generic/input.ts.stdout index 919b15d09fb..d03b7a5f1fb 100644 --- a/ecmascript/parser/tests/typescript/interface/generic/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/interface/generic/input.ts.stdout @@ -189,5 +189,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/interface/index-signature/input.ts.stdout b/ecmascript/parser/tests/typescript/interface/index-signature/input.ts.stdout index 2ae454ad99d..e747e8d99e6 100644 --- a/ecmascript/parser/tests/typescript/interface/index-signature/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/interface/index-signature/input.ts.stdout @@ -141,5 +141,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/interface/method-computed/input.ts.stdout b/ecmascript/parser/tests/typescript/interface/method-computed/input.ts.stdout index 7832c1fe646..202a2bd41b5 100644 --- a/ecmascript/parser/tests/typescript/interface/method-computed/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/interface/method-computed/input.ts.stdout @@ -242,5 +242,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/interface/method-generic/input.ts.stdout b/ecmascript/parser/tests/typescript/interface/method-generic/input.ts.stdout index 596ca932442..6fa94efa11c 100644 --- a/ecmascript/parser/tests/typescript/interface/method-generic/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/interface/method-generic/input.ts.stdout @@ -267,5 +267,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/interface/method-optional/input.ts.stdout b/ecmascript/parser/tests/typescript/interface/method-optional/input.ts.stdout index 51234ad54c4..de2d7dc76e0 100644 --- a/ecmascript/parser/tests/typescript/interface/method-optional/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/interface/method-optional/input.ts.stdout @@ -117,5 +117,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/interface/method-plain/input.ts.stdout b/ecmascript/parser/tests/typescript/interface/method-plain/input.ts.stdout index b57e96beb71..b50757827bc 100644 --- a/ecmascript/parser/tests/typescript/interface/method-plain/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/interface/method-plain/input.ts.stdout @@ -264,5 +264,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/interface/modifiers/input.ts.stdout b/ecmascript/parser/tests/typescript/interface/modifiers/input.ts.stdout index e3b563962fe..61e99cfeae7 100644 --- a/ecmascript/parser/tests/typescript/interface/modifiers/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/interface/modifiers/input.ts.stdout @@ -118,5 +118,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/interface/properties/input.ts.stdout b/ecmascript/parser/tests/typescript/interface/properties/input.ts.stdout index 7de0f3ed389..b9e48de77ec 100644 --- a/ecmascript/parser/tests/typescript/interface/properties/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/interface/properties/input.ts.stdout @@ -216,5 +216,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/interface/property-computed/input.ts.stdout b/ecmascript/parser/tests/typescript/interface/property-computed/input.ts.stdout index 7fb30b84e81..4003455c624 100644 --- a/ecmascript/parser/tests/typescript/interface/property-computed/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/interface/property-computed/input.ts.stdout @@ -244,5 +244,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/interface/property-named-public/input.ts.stdout b/ecmascript/parser/tests/typescript/interface/property-named-public/input.ts.stdout index 797260f9035..6c8461dac07 100644 --- a/ecmascript/parser/tests/typescript/interface/property-named-public/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/interface/property-named-public/input.ts.stdout @@ -118,5 +118,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/interface/reserved-method-name/input.ts.stdout b/ecmascript/parser/tests/typescript/interface/reserved-method-name/input.ts.stdout index 1ceaaf043de..03953da6b9e 100644 --- a/ecmascript/parser/tests/typescript/interface/reserved-method-name/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/interface/reserved-method-name/input.ts.stdout @@ -117,5 +117,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/interface/separators/input.ts.stdout b/ecmascript/parser/tests/typescript/interface/separators/input.ts.stdout index 02bcd0244a7..f7a22a872eb 100644 --- a/ecmascript/parser/tests/typescript/interface/separators/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/interface/separators/input.ts.stdout @@ -522,5 +522,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/module-namespace/body-declare/input.ts.stdout b/ecmascript/parser/tests/typescript/module-namespace/body-declare/input.ts.stdout index f0015a6aec1..fefc19ab74c 100644 --- a/ecmascript/parser/tests/typescript/module-namespace/body-declare/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/module-namespace/body-declare/input.ts.stdout @@ -137,5 +137,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/module-namespace/body-nested-declare/input.ts.stdout b/ecmascript/parser/tests/typescript/module-namespace/body-nested-declare/input.ts.stdout index 25207bf490a..3aa39f813f7 100644 --- a/ecmascript/parser/tests/typescript/module-namespace/body-nested-declare/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/module-namespace/body-nested-declare/input.ts.stdout @@ -189,5 +189,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/module-namespace/body-nested/input.ts.stdout b/ecmascript/parser/tests/typescript/module-namespace/body-nested/input.ts.stdout index e3125076509..f865fbf64e3 100644 --- a/ecmascript/parser/tests/typescript/module-namespace/body-nested/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/module-namespace/body-nested/input.ts.stdout @@ -112,5 +112,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/module-namespace/body/input.ts.stdout b/ecmascript/parser/tests/typescript/module-namespace/body/input.ts.stdout index e3e3d821ab0..2afb5b97740 100644 --- a/ecmascript/parser/tests/typescript/module-namespace/body/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/module-namespace/body/input.ts.stdout @@ -128,5 +128,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/module-namespace/declare-shorthand/input.ts.stdout b/ecmascript/parser/tests/typescript/module-namespace/declare-shorthand/input.ts.stdout index d0f3e155de5..c0af5e5e73a 100644 --- a/ecmascript/parser/tests/typescript/module-namespace/declare-shorthand/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/module-namespace/declare-shorthand/input.ts.stdout @@ -44,5 +44,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/module-namespace/global-in-module/input.ts.stdout b/ecmascript/parser/tests/typescript/module-namespace/global-in-module/input.ts.stdout index d47f7756841..5e15383977a 100644 --- a/ecmascript/parser/tests/typescript/module-namespace/global-in-module/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/module-namespace/global-in-module/input.ts.stdout @@ -188,5 +188,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/module-namespace/head-declare/input.ts.stdout b/ecmascript/parser/tests/typescript/module-namespace/head-declare/input.ts.stdout index 521d30abeaf..565cc44ef97 100644 --- a/ecmascript/parser/tests/typescript/module-namespace/head-declare/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/module-namespace/head-declare/input.ts.stdout @@ -241,5 +241,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/module-namespace/head-export/input.ts.stdout b/ecmascript/parser/tests/typescript/module-namespace/head-export/input.ts.stdout index daa8033c13a..ddd6f224071 100644 --- a/ecmascript/parser/tests/typescript/module-namespace/head-export/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/module-namespace/head-export/input.ts.stdout @@ -140,5 +140,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/module-namespace/head/input.ts.stdout b/ecmascript/parser/tests/typescript/module-namespace/head/input.ts.stdout index 4188f85c1be..15e70a2a38b 100644 --- a/ecmascript/parser/tests/typescript/module-namespace/head/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/module-namespace/head/input.ts.stdout @@ -270,5 +270,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/regression/destructuring-in-function-type/input.ts.stdout b/ecmascript/parser/tests/typescript/regression/destructuring-in-function-type/input.ts.stdout index ab2be0fbe50..a0b45f83f18 100644 --- a/ecmascript/parser/tests/typescript/regression/destructuring-in-function-type/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/regression/destructuring-in-function-type/input.ts.stdout @@ -155,5 +155,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/regression/is-default-export/input.ts.stdout b/ecmascript/parser/tests/typescript/regression/is-default-export/input.ts.stdout index 8b648dc5109..f0fde4dd8e7 100644 --- a/ecmascript/parser/tests/typescript/regression/is-default-export/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/regression/is-default-export/input.ts.stdout @@ -136,5 +136,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/regression/tsx-issue-7742/input.ts.stdout b/ecmascript/parser/tests/typescript/regression/tsx-issue-7742/input.ts.stdout index 3fba0cbc116..daeabb14bb8 100644 --- a/ecmascript/parser/tests/typescript/regression/tsx-issue-7742/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/regression/tsx-issue-7742/input.ts.stdout @@ -255,5 +255,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/tsx/brace-is-block/input.ts.stdout b/ecmascript/parser/tests/typescript/tsx/brace-is-block/input.ts.stdout index 90a880925f3..665a1b3d695 100644 --- a/ecmascript/parser/tests/typescript/tsx/brace-is-block/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/tsx/brace-is-block/input.ts.stdout @@ -160,5 +160,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/tsx/type-arguments/input.ts.stdout b/ecmascript/parser/tests/typescript/tsx/type-arguments/input.ts.stdout index 39ef8fdc3c9..bbed6b25482 100644 --- a/ecmascript/parser/tests/typescript/tsx/type-arguments/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/tsx/type-arguments/input.ts.stdout @@ -278,5 +278,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/tsx/type-parameters/input.ts.stdout b/ecmascript/parser/tests/typescript/tsx/type-parameters/input.ts.stdout index b6d807bc8b5..fae596ab6ab 100644 --- a/ecmascript/parser/tests/typescript/tsx/type-parameters/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/tsx/type-parameters/input.ts.stdout @@ -158,5 +158,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/type-alias/declare/input.ts.stdout b/ecmascript/parser/tests/typescript/type-alias/declare/input.ts.stdout index c3185790c44..ddd62b7a754 100644 --- a/ecmascript/parser/tests/typescript/type-alias/declare/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/type-alias/declare/input.ts.stdout @@ -56,5 +56,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/type-alias/export/input.ts.stdout b/ecmascript/parser/tests/typescript/type-alias/export/input.ts.stdout index a2c3a5c6d06..32f40cf8eeb 100644 --- a/ecmascript/parser/tests/typescript/type-alias/export/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/type-alias/export/input.ts.stdout @@ -56,5 +56,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/type-alias/generic-complex/input.ts.stdout b/ecmascript/parser/tests/typescript/type-alias/generic-complex/input.ts.stdout index 4799cf014c1..70fc067cbfe 100644 --- a/ecmascript/parser/tests/typescript/type-alias/generic-complex/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/type-alias/generic-complex/input.ts.stdout @@ -250,5 +250,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/type-alias/generic/input.ts.stdout b/ecmascript/parser/tests/typescript/type-alias/generic/input.ts.stdout index 05af3c9d3f8..fce76e05214 100644 --- a/ecmascript/parser/tests/typescript/type-alias/generic/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/type-alias/generic/input.ts.stdout @@ -113,5 +113,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/type-alias/plain/input.ts.stdout b/ecmascript/parser/tests/typescript/type-alias/plain/input.ts.stdout index df2c1eab362..a564557b24f 100644 --- a/ecmascript/parser/tests/typescript/type-alias/plain/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/type-alias/plain/input.ts.stdout @@ -56,5 +56,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/type-arguments/call/input.ts.stdout b/ecmascript/parser/tests/typescript/type-arguments/call/input.ts.stdout index 35f8f7d9360..d8ced44c593 100644 --- a/ecmascript/parser/tests/typescript/type-arguments/call/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/type-arguments/call/input.ts.stdout @@ -201,5 +201,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/type-arguments/new-false-positive/input.ts.stdout b/ecmascript/parser/tests/typescript/type-arguments/new-false-positive/input.ts.stdout index cfe1ff53d57..08c98a004c3 100644 --- a/ecmascript/parser/tests/typescript/type-arguments/new-false-positive/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/type-arguments/new-false-positive/input.ts.stdout @@ -74,5 +74,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/type-arguments/new/input.ts.stdout b/ecmascript/parser/tests/typescript/type-arguments/new/input.ts.stdout index bd5e88cc754..b4c0c871240 100644 --- a/ecmascript/parser/tests/typescript/type-arguments/new/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/type-arguments/new/input.ts.stdout @@ -201,5 +201,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/type-arguments/tagged-template-no-asi/input.ts.stdout b/ecmascript/parser/tests/typescript/type-arguments/tagged-template-no-asi/input.ts.stdout index 40cc6918cd6..b718a033b15 100644 --- a/ecmascript/parser/tests/typescript/type-arguments/tagged-template-no-asi/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/type-arguments/tagged-template-no-asi/input.ts.stdout @@ -145,5 +145,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/type-arguments/tagged-template/input.ts.stdout b/ecmascript/parser/tests/typescript/type-arguments/tagged-template/input.ts.stdout index edf3f378ac0..7f37a4e2e8e 100644 --- a/ecmascript/parser/tests/typescript/type-arguments/tagged-template/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/type-arguments/tagged-template/input.ts.stdout @@ -130,5 +130,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/type-arguments/tsx/input.ts.stdout b/ecmascript/parser/tests/typescript/type-arguments/tsx/input.ts.stdout index 643d110c112..254990cd33e 100644 --- a/ecmascript/parser/tests/typescript/type-arguments/tsx/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/type-arguments/tsx/input.ts.stdout @@ -191,5 +191,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/type-arguments/whitespace/input.ts.stdout b/ecmascript/parser/tests/typescript/type-arguments/whitespace/input.ts.stdout index 93706dffe13..1115a4d5278 100644 --- a/ecmascript/parser/tests/typescript/type-arguments/whitespace/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/type-arguments/whitespace/input.ts.stdout @@ -104,5 +104,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/types/array/input.ts.stdout b/ecmascript/parser/tests/typescript/types/array/input.ts.stdout index 1a55084166c..43bc4fadc6a 100644 --- a/ecmascript/parser/tests/typescript/types/array/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/types/array/input.ts.stdout @@ -111,5 +111,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/types/conditional-infer/input.ts.stdout b/ecmascript/parser/tests/typescript/types/conditional-infer/input.ts.stdout index 71b5977badb..fb61a05b896 100644 --- a/ecmascript/parser/tests/typescript/types/conditional-infer/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/types/conditional-infer/input.ts.stdout @@ -252,5 +252,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/types/conditional/input.ts.stdout b/ecmascript/parser/tests/typescript/types/conditional/input.ts.stdout index 7ba43e0889f..7a4ae7c86c0 100644 --- a/ecmascript/parser/tests/typescript/types/conditional/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/types/conditional/input.ts.stdout @@ -140,5 +140,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/types/function-generic/input.ts.stdout b/ecmascript/parser/tests/typescript/types/function-generic/input.ts.stdout index b325a6b1773..e39b049060b 100644 --- a/ecmascript/parser/tests/typescript/types/function-generic/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/types/function-generic/input.ts.stdout @@ -229,5 +229,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/types/function-in-generic/input.ts.stdout b/ecmascript/parser/tests/typescript/types/function-in-generic/input.ts.stdout index e8fde43bc57..7495be93f7f 100644 --- a/ecmascript/parser/tests/typescript/types/function-in-generic/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/types/function-in-generic/input.ts.stdout @@ -157,5 +157,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/types/function-with-this/input.ts.stdout b/ecmascript/parser/tests/typescript/types/function-with-this/input.ts.stdout index 89f331a0752..11079d68367 100644 --- a/ecmascript/parser/tests/typescript/types/function-with-this/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/types/function-with-this/input.ts.stdout @@ -156,5 +156,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/types/function/input.ts.stdout b/ecmascript/parser/tests/typescript/types/function/input.ts.stdout index 8613e61881d..b6f435a7373 100644 --- a/ecmascript/parser/tests/typescript/types/function/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/types/function/input.ts.stdout @@ -267,5 +267,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/types/indexed/input.ts.stdout b/ecmascript/parser/tests/typescript/types/indexed/input.ts.stdout index cbb7e96adfb..b95838b37ce 100644 --- a/ecmascript/parser/tests/typescript/types/indexed/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/types/indexed/input.ts.stdout @@ -144,5 +144,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/types/keywords/input.ts.stdout b/ecmascript/parser/tests/typescript/types/keywords/input.ts.stdout index 73d8d060418..a0e1d84629c 100644 --- a/ecmascript/parser/tests/typescript/types/keywords/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/types/keywords/input.ts.stdout @@ -937,5 +937,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/types/literal-boolean/input.ts.stdout b/ecmascript/parser/tests/typescript/types/literal-boolean/input.ts.stdout index 4ecbf7bd6c9..e5dc8a5fc6b 100644 --- a/ecmascript/parser/tests/typescript/types/literal-boolean/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/types/literal-boolean/input.ts.stdout @@ -187,5 +187,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/types/literal-number-negative/input.ts.stdout b/ecmascript/parser/tests/typescript/types/literal-number-negative/input.ts.stdout index 11eeb7c1bc8..5d2b2803564 100644 --- a/ecmascript/parser/tests/typescript/types/literal-number-negative/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/types/literal-number-negative/input.ts.stdout @@ -98,5 +98,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/types/literal-number/input.ts.stdout b/ecmascript/parser/tests/typescript/types/literal-number/input.ts.stdout index c033e4b7d96..5638c2638c2 100644 --- a/ecmascript/parser/tests/typescript/types/literal-number/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/types/literal-number/input.ts.stdout @@ -98,5 +98,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/types/literal-string/input.ts.stdout b/ecmascript/parser/tests/typescript/types/literal-string/input.ts.stdout index 951d35d873a..b04f47fbb96 100644 --- a/ecmascript/parser/tests/typescript/types/literal-string/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/types/literal-string/input.ts.stdout @@ -99,5 +99,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/types/mapped/input.ts.stdout b/ecmascript/parser/tests/typescript/types/mapped/input.ts.stdout index 318282e136a..d1668298abb 100644 --- a/ecmascript/parser/tests/typescript/types/mapped/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/types/mapped/input.ts.stdout @@ -561,5 +561,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/types/object-shorthand/input.ts.stdout b/ecmascript/parser/tests/typescript/types/object-shorthand/input.ts.stdout index 269f58b47ff..3201b71a860 100644 --- a/ecmascript/parser/tests/typescript/types/object-shorthand/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/types/object-shorthand/input.ts.stdout @@ -306,5 +306,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/types/parenthesized/input.ts.stdout b/ecmascript/parser/tests/typescript/types/parenthesized/input.ts.stdout index 22678fd6a7a..7587b9f4f3b 100644 --- a/ecmascript/parser/tests/typescript/types/parenthesized/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/types/parenthesized/input.ts.stdout @@ -69,5 +69,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/types/reference-generic-nested/input.ts.stdout b/ecmascript/parser/tests/typescript/types/reference-generic-nested/input.ts.stdout index c4a8812591c..b762f88fd58 100644 --- a/ecmascript/parser/tests/typescript/types/reference-generic-nested/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/types/reference-generic-nested/input.ts.stdout @@ -173,5 +173,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/types/reference-generic/input.ts.stdout b/ecmascript/parser/tests/typescript/types/reference-generic/input.ts.stdout index b9814234f84..a3b05b467b8 100644 --- a/ecmascript/parser/tests/typescript/types/reference-generic/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/types/reference-generic/input.ts.stdout @@ -129,5 +129,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/types/reference/input.ts.stdout b/ecmascript/parser/tests/typescript/types/reference/input.ts.stdout index 0e13b50f7e3..fc87b1dc045 100644 --- a/ecmascript/parser/tests/typescript/types/reference/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/types/reference/input.ts.stdout @@ -101,5 +101,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/types/tuple-empty/input.ts.stdout b/ecmascript/parser/tests/typescript/types/tuple-empty/input.ts.stdout index 91476d53e0d..c3d9efc1c22 100644 --- a/ecmascript/parser/tests/typescript/types/tuple-empty/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/types/tuple-empty/input.ts.stdout @@ -85,5 +85,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/types/tuple-optional/input.ts.stdout b/ecmascript/parser/tests/typescript/types/tuple-optional/input.ts.stdout index 023cbcbd2d0..0896968436e 100644 --- a/ecmascript/parser/tests/typescript/types/tuple-optional/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/types/tuple-optional/input.ts.stdout @@ -198,5 +198,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/types/tuple-rest-after-optional/input.ts.stdout b/ecmascript/parser/tests/typescript/types/tuple-rest-after-optional/input.ts.stdout index c0582de1032..e743836ec1b 100644 --- a/ecmascript/parser/tests/typescript/types/tuple-rest-after-optional/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/types/tuple-rest-after-optional/input.ts.stdout @@ -202,5 +202,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/types/tuple-rest/input.ts.stdout b/ecmascript/parser/tests/typescript/types/tuple-rest/input.ts.stdout index 5597236e987..22b12dbf38e 100644 --- a/ecmascript/parser/tests/typescript/types/tuple-rest/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/types/tuple-rest/input.ts.stdout @@ -140,5 +140,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/types/tuple/input.ts.stdout b/ecmascript/parser/tests/typescript/types/tuple/input.ts.stdout index 0fbaae50c66..476fa5f6315 100644 --- a/ecmascript/parser/tests/typescript/types/tuple/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/types/tuple/input.ts.stdout @@ -128,5 +128,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/types/type-literal/input.ts.stdout b/ecmascript/parser/tests/typescript/types/type-literal/input.ts.stdout index 692ae4db6ba..2c17c44c6a2 100644 --- a/ecmascript/parser/tests/typescript/types/type-literal/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/types/type-literal/input.ts.stdout @@ -148,5 +148,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/types/type-operator/input.ts.stdout b/ecmascript/parser/tests/typescript/types/type-operator/input.ts.stdout index eb001202bae..104f968acb2 100644 --- a/ecmascript/parser/tests/typescript/types/type-operator/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/types/type-operator/input.ts.stdout @@ -205,5 +205,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/types/typeof/input.ts.stdout b/ecmascript/parser/tests/typescript/types/typeof/input.ts.stdout index 35a9fec64e3..5014569e241 100644 --- a/ecmascript/parser/tests/typescript/types/typeof/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/types/typeof/input.ts.stdout @@ -118,5 +118,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/types/union-intersection/input.ts.stdout b/ecmascript/parser/tests/typescript/types/union-intersection/input.ts.stdout index f71d8aee936..bea09ac3a7e 100644 --- a/ecmascript/parser/tests/typescript/types/union-intersection/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/types/union-intersection/input.ts.stdout @@ -529,5 +529,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/parser/tests/typescript/variable-declarator/definite-assignment/input.ts.stdout b/ecmascript/parser/tests/typescript/variable-declarator/definite-assignment/input.ts.stdout index a79279f059b..79905777798 100644 --- a/ecmascript/parser/tests/typescript/variable-declarator/definite-assignment/input.ts.stdout +++ b/ecmascript/parser/tests/typescript/variable-declarator/definite-assignment/input.ts.stdout @@ -85,5 +85,6 @@ Module { ) ) ) - ] + ], + shebang: None } diff --git a/ecmascript/transforms/src/compat/es2015/block_scoped_fn.rs b/ecmascript/transforms/src/compat/es2015/block_scoped_fn.rs index 3c21856d2e0..827d139d826 100644 --- a/ecmascript/transforms/src/compat/es2015/block_scoped_fn.rs +++ b/ecmascript/transforms/src/compat/es2015/block_scoped_fn.rs @@ -1,11 +1,16 @@ use ast::*; -use swc_common::{Fold, FoldWith, DUMMY_SP}; +use swc_common::{Fold, FoldWith, Spanned, DUMMY_SP}; #[derive(Clone, Copy)] pub struct BlockScopedFns; impl Fold for BlockScopedFns { fn fold(&mut self, stmt: Stmt) -> Stmt { + // This is to preserve function Class() + if stmt.span().is_dummy() { + return stmt; + } + match stmt { Stmt::Decl(Decl::Fn(decl)) => { return Stmt::Decl(Decl::Var(VarDecl { diff --git a/ecmascript/transforms/src/compat/es2015/classes/tests.rs b/ecmascript/transforms/src/compat/es2015/classes/tests.rs index 3d41d8f6d0a..4e1f00a421b 100644 --- a/ecmascript/transforms/src/compat/es2015/classes/tests.rs +++ b/ecmascript/transforms/src/compat/es2015/classes/tests.rs @@ -17,6 +17,25 @@ fn spec_tr() -> impl Fold { chain!(resolver(), Classes, Spread, block_scoping(),) } +test!( + syntax(), + |_| tr(), + issue_189, + r#" +class HomePage extends React.Component {} +"#, + r#" +let HomePage = function(_Component) { + _inherits(HomePage, _Component); + function HomePage() { + _classCallCheck(this, HomePage); + return _possibleConstructorReturn(this, _getPrototypeOf(HomePage).apply(this, arguments)); + } + return HomePage; +}(React.Component); +"# +); + test!( syntax(), |_| tr(), diff --git a/ecmascript/transforms/src/compat/es2015/destructuring/mod.rs b/ecmascript/transforms/src/compat/es2015/destructuring/mod.rs index a1996c207e5..c639ca73dc8 100644 --- a/ecmascript/transforms/src/compat/es2015/destructuring/mod.rs +++ b/ecmascript/transforms/src/compat/es2015/destructuring/mod.rs @@ -545,6 +545,7 @@ impl Fold for AssignFolder { impl> Fold> for Destructuring where Vec: FoldWith, + T: FoldWith, { fn fold(&mut self, stmts: Vec) -> Vec { // fast path @@ -557,10 +558,26 @@ where let mut buf = Vec::with_capacity(stmts.len()); for stmt in stmts { + let mut folder = AssignFolder::default(); + match stmt.try_into_stmt() { - Err(module_item) => buf.push(module_item), + Err(item) => { + let item = item.fold_with(&mut folder); + + // Add variable declaration + // e.g. var ref + if !folder.vars.is_empty() { + buf.push(T::from_stmt(Stmt::Decl(Decl::Var(VarDecl { + span: DUMMY_SP, + kind: VarDeclKind::Var, + decls: folder.vars, + declare: false, + })))); + } + + buf.push(item) + } Ok(stmt) => { - let mut folder = AssignFolder::default(); let stmt = stmt.fold_with(&mut folder); // Add variable declaration diff --git a/ecmascript/transforms/src/compat/es2015/destructuring/tests.rs b/ecmascript/transforms/src/compat/es2015/destructuring/tests.rs index e60c41cd736..36a312b82f8 100644 --- a/ecmascript/transforms/src/compat/es2015/destructuring/tests.rs +++ b/ecmascript/transforms/src/compat/es2015/destructuring/tests.rs @@ -4,6 +4,26 @@ fn tr() -> impl Fold { Destructuring } +test!( + ::swc_ecma_parser::Syntax::default(), + |_| tr(), + issue_169, + "export class Foo { + func(a, b = Date.now()) { + return {a}; + } +}", + "export class Foo{ + func(a, ref) { + let tmp = ref, b = tmp === void 0 ? Date.now() : tmp; + return { + a + }; + } +} +" +); + test!( ::swc_ecma_parser::Syntax::default(), |_| tr(), diff --git a/ecmascript/transforms/src/compat/es2015/mod.rs b/ecmascript/transforms/src/compat/es2015/mod.rs index 86c5b3ac1a1..ef6c0fc8653 100644 --- a/ecmascript/transforms/src/compat/es2015/mod.rs +++ b/ecmascript/transforms/src/compat/es2015/mod.rs @@ -27,26 +27,26 @@ mod sticky_regex; mod template_literal; mod typeof_symbol; +fn exprs() -> impl Pass + Clone { + chain_at!( + Expr, + arrow(), + duplicate_keys(), + Spread, + StickyRegex, + InstanceOf, + TypeOfSymbol, + TemplateLiteral, + Shorthand, + ) +} + +fn stmts() -> impl Pass + Clone { + chain_at!(Stmt, function_name(), exprs(), BlockScopedFns, parameters(),) +} + /// Compiles es2015 to es5. pub fn es2015() -> impl Pass + Clone { - fn exprs() -> impl Pass + Clone { - chain_at!( - Expr, - arrow(), - duplicate_keys(), - Spread, - StickyRegex, - InstanceOf, - TypeOfSymbol, - TemplateLiteral, - Shorthand, - ) - } - - fn stmts() -> impl Pass + Clone { - chain_at!(Stmt, function_name(), exprs(), BlockScopedFns, parameters(),) - } - chain_at!( Module, resolver(), @@ -61,24 +61,25 @@ pub fn es2015() -> impl Pass + Clone { #[cfg(test)] mod tests { - use super::es2015; + use super::*; test!( ::swc_ecma_parser::Syntax::default(), |_| es2015(), issue_169, r#" -class Foo { +export class Foo { func(a, b = Date.now()) { return {a}; } } "#, r#" -var Foo = function() { - var Foo = function Foo() { +export var Foo = function() { + function Foo() { _classCallCheck(this, Foo); - }; + } + _createClass(Foo, [{ key: 'func', value: function func(a, param) { @@ -90,6 +91,25 @@ var Foo = function() { }]); return Foo; }(); +"# + ); + + test!( + ::swc_ecma_parser::Syntax::default(), + |_| es2015(), + issue_189, + r#" +class HomePage extends React.Component {} +"#, + r#" +var HomePage = function(_Component) { + _inherits(HomePage, _Component); + function HomePage() { + _classCallCheck(this, HomePage); + return _possibleConstructorReturn(this, _getPrototypeOf(HomePage).apply(this, arguments)); + } + return HomePage; +}(React.Component); "# ); } diff --git a/ecmascript/transforms/src/fixer.rs b/ecmascript/transforms/src/fixer.rs index a56a5a22719..712f2bd9257 100644 --- a/ecmascript/transforms/src/fixer.rs +++ b/ecmascript/transforms/src/fixer.rs @@ -283,7 +283,12 @@ impl Fold for Fixer { } } - Expr::Bin(expr) => { + Expr::Bin(mut expr) => { + expr.right = match *expr.right { + e @ Expr::Assign(..) => box e.wrap_with_paren(), + _ => expr.right, + }; + match *expr.left { // While simplifying, (1 + x) * Nan becomes `1 + x * Nan`. // But it should be `(1 + x) * Nan` @@ -305,13 +310,7 @@ impl Fold for Fixer { left: box left.wrap_with_paren(), ..expr }), - _ => match *expr.right { - e @ Expr::Assign(..) => Expr::Bin(BinExpr { - right: box e.wrap_with_paren(), - ..expr - }), - _ => Expr::Bin(expr), - }, + _ => Expr::Bin(expr), } } @@ -450,4 +449,6 @@ const _ref = {}, { c =( _tmp = {}, d = _extends({}, _tmp), _tmp) } = _ref;" identical!(regression_12, "(function(){})()"); identical!(regression_13, "a || (a = 1);"); + + identical!(issue_192, "a === true && (a = true)"); }