refactor(es/ast): Change TaggedTpl to have a Tpl (#1114)

swc_ecma_ast:
 - Make `TaggedTpl` have `Tpl`.

Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
This commit is contained in:
David Sherret 2021-03-25 07:09:36 -04:00 committed by GitHub
parent df3f3106df
commit da62c73239
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
70 changed files with 28447 additions and 26657 deletions

View File

@ -11,7 +11,7 @@ edition = "2018"
license = "Apache-2.0/MIT" license = "Apache-2.0/MIT"
name = "swc" name = "swc"
repository = "https://github.com/swc-project/swc.git" repository = "https://github.com/swc-project/swc.git"
version = "0.11.0" version = "0.12.0"
[lib] [lib]
name = "swc" name = "swc"
@ -29,12 +29,12 @@ serde_json = "1"
sourcemap = "6" sourcemap = "6"
swc_atoms = {version = "0.2", path = "./atoms"} swc_atoms = {version = "0.2", path = "./atoms"}
swc_common = {version = "0.10.10", path = "./common", features = ["sourcemap", "concurrent"]} swc_common = {version = "0.10.10", path = "./common", features = ["sourcemap", "concurrent"]}
swc_ecma_ast = {version = "0.40.0", path = "./ecmascript/ast"} swc_ecma_ast = {version = "0.41.0", path = "./ecmascript/ast"}
swc_ecma_codegen = {version = "0.48.0", path = "./ecmascript/codegen"} swc_ecma_codegen = {version = "0.49.0", path = "./ecmascript/codegen"}
swc_ecma_ext_transforms = {version = "0.8.0", path = "./ecmascript/ext-transforms"} swc_ecma_ext_transforms = {version = "0.9.0", path = "./ecmascript/ext-transforms"}
swc_ecma_parser = {version = "0.50.0", path = "./ecmascript/parser"} swc_ecma_parser = {version = "0.51.0", path = "./ecmascript/parser"}
swc_ecma_preset_env = {version = "0.11.0", path = "./ecmascript/preset_env"} swc_ecma_preset_env = {version = "0.12.0", path = "./ecmascript/preset_env"}
swc_ecma_transforms = {version = "0.41.0", path = "./ecmascript/transforms", features = [ swc_ecma_transforms = {version = "0.42.0", path = "./ecmascript/transforms", features = [
"compat", "compat",
"module", "module",
"optimization", "optimization",
@ -42,8 +42,8 @@ swc_ecma_transforms = {version = "0.41.0", path = "./ecmascript/transforms", fea
"react", "react",
"typescript", "typescript",
]} ]}
swc_ecma_utils = {version = "0.31.0", path = "./ecmascript/utils"} swc_ecma_utils = {version = "0.32.0", path = "./ecmascript/utils"}
swc_ecma_visit = {version = "0.26.0", path = "./ecmascript/visit"} swc_ecma_visit = {version = "0.27.0", path = "./ecmascript/visit"}
swc_visit = {version = "0.2.3", path = "./visit"} swc_visit = {version = "0.2.3", path = "./visit"}
[dev-dependencies] [dev-dependencies]

View File

@ -9,7 +9,7 @@ include = ["Cargo.toml", "build.rs", "src/**/*.rs", "src/**/*.js"]
license = "Apache-2.0/MIT" license = "Apache-2.0/MIT"
name = "swc_bundler" name = "swc_bundler"
repository = "https://github.com/swc-project/swc.git" repository = "https://github.com/swc-project/swc.git"
version = "0.28.1" version = "0.29.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features] [features]
@ -32,19 +32,19 @@ relative-path = "1.2"
retain_mut = "0.1.2" retain_mut = "0.1.2"
swc_atoms = {version = "0.2.4", path = "../atoms"} swc_atoms = {version = "0.2.4", path = "../atoms"}
swc_common = {version = "0.10.10", path = "../common"} swc_common = {version = "0.10.10", path = "../common"}
swc_ecma_ast = {version = "0.40.0", path = "../ecmascript/ast"} swc_ecma_ast = {version = "0.41.0", path = "../ecmascript/ast"}
swc_ecma_codegen = {version = "0.48.0", path = "../ecmascript/codegen"} swc_ecma_codegen = {version = "0.49.0", path = "../ecmascript/codegen"}
swc_ecma_parser = {version = "0.50.0", path = "../ecmascript/parser"} swc_ecma_parser = {version = "0.51.0", path = "../ecmascript/parser"}
swc_ecma_transforms = {version = "0.41.0", path = "../ecmascript/transforms", features = ["optimization"]} swc_ecma_transforms = {version = "0.42.0", path = "../ecmascript/transforms", features = ["optimization"]}
swc_ecma_utils = {version = "0.31.0", path = "../ecmascript/utils"} swc_ecma_utils = {version = "0.32.0", path = "../ecmascript/utils"}
swc_ecma_visit = {version = "0.26.0", path = "../ecmascript/visit"} swc_ecma_visit = {version = "0.27.0", path = "../ecmascript/visit"}
[dev-dependencies] [dev-dependencies]
hex = "0.4" hex = "0.4"
ntest = "0.7.2" ntest = "0.7.2"
reqwest = {version = "0.10.8", features = ["blocking"]} reqwest = {version = "0.10.8", features = ["blocking"]}
sha-1 = "0.9" sha-1 = "0.9"
swc_ecma_transforms = {version = "0.41.0", path = "../ecmascript/transforms", features = ["react", "typescript"]} swc_ecma_transforms = {version = "0.42.0", path = "../ecmascript/transforms", features = ["react", "typescript"]}
tempfile = "3.1.0" tempfile = "3.1.0"
testing = {version = "0.10.3", path = "../testing"} testing = {version = "0.10.3", path = "../testing"}
url = "2.1.1" url = "2.1.1"

View File

@ -6,7 +6,7 @@ edition = "2018"
license = "Apache-2.0/MIT" license = "Apache-2.0/MIT"
name = "swc_ecmascript" name = "swc_ecmascript"
repository = "https://github.com/swc-project/swc.git" repository = "https://github.com/swc-project/swc.git"
version = "0.27.0" version = "0.28.0"
[package.metadata.docs.rs] [package.metadata.docs.rs]
all-features = true all-features = true
@ -27,12 +27,12 @@ react = ["swc_ecma_transforms/react"]
typescript = ["swc_ecma_transforms/typescript"] typescript = ["swc_ecma_transforms/typescript"]
[dependencies] [dependencies]
swc_ecma_ast = {version = "0.40.0", path = "./ast"} swc_ecma_ast = {version = "0.41.0", path = "./ast"}
swc_ecma_codegen = {version = "0.48.0", path = "./codegen", optional = true} swc_ecma_codegen = {version = "0.49.0", path = "./codegen", optional = true}
swc_ecma_dep_graph = {version = "0.18.0", path = "./dep-graph", optional = true} swc_ecma_dep_graph = {version = "0.19.0", path = "./dep-graph", optional = true}
swc_ecma_parser = {version = "0.50.0", path = "./parser", optional = true} swc_ecma_parser = {version = "0.51.0", path = "./parser", optional = true}
swc_ecma_transforms = {version = "0.41.0", path = "./transforms", optional = true} swc_ecma_transforms = {version = "0.42.0", path = "./transforms", optional = true}
swc_ecma_utils = {version = "0.31.0", path = "./utils", optional = true} swc_ecma_utils = {version = "0.32.0", path = "./utils", optional = true}
swc_ecma_visit = {version = "0.26.0", path = "./visit", optional = true} swc_ecma_visit = {version = "0.27.0", path = "./visit", optional = true}
[dev-dependencies] [dev-dependencies]

View File

@ -6,7 +6,7 @@ edition = "2018"
license = "Apache-2.0/MIT" license = "Apache-2.0/MIT"
name = "swc_ecma_ast" name = "swc_ecma_ast"
repository = "https://github.com/swc-project/swc.git" repository = "https://github.com/swc-project/swc.git"
version = "0.40.0" version = "0.41.0"
[features] [features]
default = [] default = []

View File

@ -439,12 +439,11 @@ pub struct TaggedTpl {
pub tag: Box<Expr>, pub tag: Box<Expr>,
#[serde(rename = "expressions")]
pub exprs: Vec<Box<Expr>>,
pub quasis: Vec<TplElement>,
#[serde(default, rename = "typeParameters")] #[serde(default, rename = "typeParameters")]
pub type_params: Option<TsTypeParamInstantiation>, pub type_params: Option<TsTypeParamInstantiation>,
#[serde(rename = "template")]
pub tpl: Tpl,
} }
#[ast_node("TemplateElement")] #[ast_node("TemplateElement")]

View File

@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"]
license = "Apache-2.0/MIT" license = "Apache-2.0/MIT"
name = "swc_ecma_codegen" name = "swc_ecma_codegen"
repository = "https://github.com/swc-project/swc.git" repository = "https://github.com/swc-project/swc.git"
version = "0.48.0" version = "0.49.0"
[dependencies] [dependencies]
bitflags = "1" bitflags = "1"
@ -15,9 +15,9 @@ num-bigint = {version = "0.2", features = ["serde"]}
sourcemap = "6" sourcemap = "6"
swc_atoms = {version = "0.2", path = "../../atoms"} swc_atoms = {version = "0.2", path = "../../atoms"}
swc_common = {version = "0.10.10", path = "../../common"} swc_common = {version = "0.10.10", path = "../../common"}
swc_ecma_ast = {version = "0.40.0", path = "../ast"} swc_ecma_ast = {version = "0.41.0", path = "../ast"}
swc_ecma_codegen_macros = {version = "0.5.2", path = "./macros"} swc_ecma_codegen_macros = {version = "0.5.2", path = "./macros"}
swc_ecma_parser = {version = "0.50.0", path = "../parser"} swc_ecma_parser = {version = "0.51.0", path = "../parser"}
[dev-dependencies] [dev-dependencies]
swc_common = {version = "0.10.10", path = "../../common", features = ["sourcemap"]} swc_common = {version = "0.10.10", path = "../../common", features = ["sourcemap"]}

View File

@ -1192,26 +1192,11 @@ impl<'a> Emitter<'a> {
#[emitter] #[emitter]
fn emit_tagged_tpl_lit(&mut self, node: &TaggedTpl) -> Result { fn emit_tagged_tpl_lit(&mut self, node: &TaggedTpl) -> Result {
debug_assert!(node.quasis.len() == node.exprs.len() + 1);
self.emit_leading_comments_of_pos(node.span().lo())?; self.emit_leading_comments_of_pos(node.span().lo())?;
emit!(node.tag); emit!(node.tag);
emit!(node.type_params); emit!(node.type_params);
punct!("`"); emit!(node.tpl);
let i = 0;
for i in 0..(node.quasis.len() + node.exprs.len()) {
if i % 2 == 0 {
emit!(node.quasis[i / 2]);
} else {
punct!("${");
emit!(node.exprs[i / 2]);
punct!("}");
}
}
punct!("`");
} }
#[emitter] #[emitter]

View File

@ -6,14 +6,14 @@ edition = "2018"
license = "Apache-2.0/MIT" license = "Apache-2.0/MIT"
name = "swc_ecma_dep_graph" name = "swc_ecma_dep_graph"
repository = "https://github.com/swc-project/swc.git" repository = "https://github.com/swc-project/swc.git"
version = "0.18.0" version = "0.19.0"
[dependencies] [dependencies]
swc_atoms = {version = "0.2", path = "../../atoms"} swc_atoms = {version = "0.2", path = "../../atoms"}
swc_common = {version = "0.10.10", path = "../../common"} swc_common = {version = "0.10.10", path = "../../common"}
swc_ecma_ast = {version = "0.40.0", path = "../ast"} swc_ecma_ast = {version = "0.41.0", path = "../ast"}
swc_ecma_visit = {version = "0.26.0", path = "../visit"} swc_ecma_visit = {version = "0.27.0", path = "../visit"}
[dev-dependencies] [dev-dependencies]
swc_ecma_parser = {version = "0.50.0", path = "../parser"} swc_ecma_parser = {version = "0.51.0", path = "../parser"}
testing = {version = "0.10.3", path = "../../testing"} testing = {version = "0.10.3", path = "../../testing"}

View File

@ -5,7 +5,7 @@ documentation = "https://swc.rs/rustdoc/swc_ecma_ext_transforms/"
edition = "2018" edition = "2018"
license = "Apache-2.0/MIT" license = "Apache-2.0/MIT"
name = "swc_ecma_ext_transforms" name = "swc_ecma_ext_transforms"
version = "0.8.0" version = "0.9.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@ -13,7 +13,7 @@ version = "0.8.0"
phf = {version = "0.8.0", features = ["macros"]} phf = {version = "0.8.0", features = ["macros"]}
swc_atoms = {version = "0.2", path = "../../atoms"} swc_atoms = {version = "0.2", path = "../../atoms"}
swc_common = {version = "0.10.10", path = "../../common"} swc_common = {version = "0.10.10", path = "../../common"}
swc_ecma_ast = {version = "0.40.0", path = "../ast"} swc_ecma_ast = {version = "0.41.0", path = "../ast"}
swc_ecma_parser = {version = "0.50.0", path = "../parser"} swc_ecma_parser = {version = "0.51.0", path = "../parser"}
swc_ecma_utils = {version = "0.31.0", path = "../utils"} swc_ecma_utils = {version = "0.32.0", path = "../utils"}
swc_ecma_visit = {version = "0.26.0", path = "../visit"} swc_ecma_visit = {version = "0.27.0", path = "../visit"}

View File

@ -5,7 +5,7 @@ documentation = "https://swc.rs/rustdoc/jsdoc/"
edition = "2018" edition = "2018"
license = "Apache-2.0/MIT" license = "Apache-2.0/MIT"
name = "jsdoc" name = "jsdoc"
version = "0.18.0" version = "0.19.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@ -18,7 +18,7 @@ swc_common = {version = "0.10.10", path = "../../common"}
[dev-dependencies] [dev-dependencies]
anyhow = "1" anyhow = "1"
dashmap = "3" dashmap = "3"
swc_ecma_ast = {version = "0.40.0", path = "../ast"} swc_ecma_ast = {version = "0.41.0", path = "../ast"}
swc_ecma_parser = {version = "0.50.0", path = "../parser"} swc_ecma_parser = {version = "0.51.0", path = "../parser"}
testing = {version = "0.10.3", path = "../../testing"} testing = {version = "0.10.3", path = "../../testing"}
walkdir = "2" walkdir = "2"

View File

@ -6,15 +6,15 @@ edition = "2018"
license = "Apache-2.0/MIT" license = "Apache-2.0/MIT"
name = "swc_ecma_loader" name = "swc_ecma_loader"
repository = "https://github.com/swc-project/swc.git" repository = "https://github.com/swc-project/swc.git"
version = "0.1.0" version = "0.2.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
swc_atoms = {version = "0.2.3", path = "../../atoms"} swc_atoms = {version = "0.2.3", path = "../../atoms"}
swc_common = {version = "0.10.10", path = "../../common"} swc_common = {version = "0.10.10", path = "../../common"}
swc_ecma_ast = {version = "0.40.0", path = "../ast"} swc_ecma_ast = {version = "0.41.0", path = "../ast"}
swc_ecma_visit = {version = "0.26.0", path = "../visit"} swc_ecma_visit = {version = "0.27.0", path = "../visit"}
[dev-dependencies] [dev-dependencies]
testing = {version = "0.10.3", path = "../../testing"} testing = {version = "0.10.3", path = "../../testing"}

View File

@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "examples/**/*.rs"]
license = "Apache-2.0/MIT" license = "Apache-2.0/MIT"
name = "swc_ecma_parser" name = "swc_ecma_parser"
repository = "https://github.com/swc-project/swc.git" repository = "https://github.com/swc-project/swc.git"
version = "0.50.0" version = "0.51.0"
[features] [features]
default = [] default = []
@ -22,8 +22,8 @@ serde = {version = "1", features = ["derive"]}
smallvec = "1" smallvec = "1"
swc_atoms = {version = "0.2.3", path = "../../atoms"} swc_atoms = {version = "0.2.3", path = "../../atoms"}
swc_common = {version = "0.10.10", path = "../../common"} swc_common = {version = "0.10.10", path = "../../common"}
swc_ecma_ast = {version = "0.40.0", path = "../ast"} swc_ecma_ast = {version = "0.41.0", path = "../ast"}
swc_ecma_visit = {version = "0.26.0", path = "../visit"} swc_ecma_visit = {version = "0.27.0", path = "../visit"}
unicode-xid = "0.2" unicode-xid = "0.2"
[dev-dependencies] [dev-dependencies]

View File

@ -773,15 +773,12 @@ impl<'a, I: Tokens> Parser<I> {
} }
#[allow(clippy::vec_box)] #[allow(clippy::vec_box)]
fn parse_tpl_elements( fn parse_tpl_elements(&mut self) -> PResult<(Vec<Box<Expr>>, Vec<TplElement>)> {
&mut self,
is_tagged: bool,
) -> PResult<(Vec<Box<Expr>>, Vec<TplElement>)> {
trace_cur!(self, parse_tpl_elements); trace_cur!(self, parse_tpl_elements);
let mut exprs = vec![]; let mut exprs = vec![];
let cur_elem = self.parse_tpl_element(is_tagged)?; let cur_elem = self.parse_tpl_element()?;
let mut is_tail = cur_elem.tail; let mut is_tail = cur_elem.tail;
let mut quasis = vec![cur_elem]; let mut quasis = vec![cur_elem];
@ -789,7 +786,7 @@ impl<'a, I: Tokens> Parser<I> {
expect!(self, "${"); expect!(self, "${");
exprs.push(self.include_in_expr(true).parse_expr()?); exprs.push(self.include_in_expr(true).parse_expr()?);
expect!(self, '}'); expect!(self, '}');
let elem = self.parse_tpl_element(is_tagged)?; let elem = self.parse_tpl_element()?;
is_tail = elem.tail; is_tail = elem.tail;
quasis.push(elem); quasis.push(elem);
} }
@ -805,19 +802,14 @@ impl<'a, I: Tokens> Parser<I> {
let tagged_tpl_start = tag.span().lo(); let tagged_tpl_start = tag.span().lo();
trace_cur!(self, parse_tagged_tpl); trace_cur!(self, parse_tagged_tpl);
assert_and_bump!(self, '`'); let tpl = self.parse_tpl()?;
let (exprs, quasis) = self.parse_tpl_elements(false)?;
expect!(self, '`');
let span = span!(self, tagged_tpl_start); let span = span!(self, tagged_tpl_start);
Ok(TaggedTpl { Ok(TaggedTpl {
span, span,
tag, tag,
exprs,
type_params, type_params,
quasis, tpl,
}) })
} }
@ -827,7 +819,7 @@ impl<'a, I: Tokens> Parser<I> {
assert_and_bump!(self, '`'); assert_and_bump!(self, '`');
let (exprs, quasis) = self.parse_tpl_elements(false)?; let (exprs, quasis) = self.parse_tpl_elements()?;
expect!(self, '`'); expect!(self, '`');
@ -839,7 +831,7 @@ impl<'a, I: Tokens> Parser<I> {
}) })
} }
pub(super) fn parse_tpl_element(&mut self, is_tagged: bool) -> PResult<TplElement> { pub(super) fn parse_tpl_element(&mut self) -> PResult<TplElement> {
let start = cur_pos!(self); let start = cur_pos!(self);
let (raw, cooked) = match *cur!(self, true)? { let (raw, cooked) = match *cur!(self, true)? {

View File

@ -1672,7 +1672,7 @@ impl<I: Tokens> Parser<I> {
let mut types = vec![]; let mut types = vec![];
let cur_elem = self.parse_tpl_element(false)?; let cur_elem = self.parse_tpl_element()?;
let mut is_tail = cur_elem.tail; let mut is_tail = cur_elem.tail;
let mut quasis = vec![cur_elem]; let mut quasis = vec![cur_elem];
@ -1680,7 +1680,7 @@ impl<I: Tokens> Parser<I> {
expect!(self, "${"); expect!(self, "${");
types.push(self.parse_ts_type()?); types.push(self.parse_ts_type()?);
expect!(self, '}'); expect!(self, '}');
let elem = self.parse_tpl_element(false)?; let elem = self.parse_tpl_element()?;
is_tail = elem.tail; is_tail = elem.tail;
quasis.push(elem); quasis.push(elem);
} }

View File

@ -46,6 +46,12 @@ warning: Ident
1 | tag`foo` 1 | tag`foo`
| ^^^ | ^^^
warning: Tpl
--> $DIR/tests/span/js/expr/tagged-tpl.js:1:4
|
1 | tag`foo`
| ^^^^^
warning: TplElement warning: TplElement
--> $DIR/tests/span/js/expr/tagged-tpl.js:1:5 --> $DIR/tests/span/js/expr/tagged-tpl.js:1:5
| |

View File

@ -62,47 +62,55 @@
"computed": false "computed": false
} }
}, },
"expressions": [], "typeParameters": null,
"quasis": [ "template": {
{ "type": "TemplateLiteral",
"type": "TemplateElement", "span": {
"span": { "start": 4,
"start": 5, "end": 9,
"end": 8, "ctxt": 0
"ctxt": 0 },
}, "expressions": [],
"tail": true, "quasis": [
"cooked": { {
"type": "StringLiteral", "type": "TemplateElement",
"span": { "span": {
"start": 5, "start": 5,
"end": 8, "end": 8,
"ctxt": 0 "ctxt": 0
}, },
"value": "foo", "tail": true,
"hasEscape": false, "cooked": {
"kind": { "type": "StringLiteral",
"type": "normal", "span": {
"containsQuote": false "start": 5,
} "end": 8,
}, "ctxt": 0
"raw": { },
"type": "StringLiteral", "value": "foo",
"span": { "hasEscape": false,
"start": 5, "kind": {
"end": 8, "type": "normal",
"ctxt": 0 "containsQuote": false
}
}, },
"value": "foo", "raw": {
"hasEscape": false, "type": "StringLiteral",
"kind": { "span": {
"type": "normal", "start": 5,
"containsQuote": false "end": 8,
"ctxt": 0
},
"value": "foo",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
} }
} ]
], }
"typeParameters": null
} }
} }
], ],

View File

@ -874,140 +874,148 @@
}, },
"computed": false "computed": false
}, },
"expressions": [ "typeParameters": null,
{ "template": {
"type": "NumericLiteral", "type": "TemplateLiteral",
"span": { "span": {
"start": 420, "start": 413,
"end": 421, "end": 437,
"ctxt": 0 "ctxt": 0
},
"value": 1.0
}, },
{ "expressions": [
"type": "NumericLiteral", {
"span": { "type": "NumericLiteral",
"start": 430, "span": {
"end": 431, "start": 420,
"ctxt": 0 "end": 421,
"ctxt": 0
},
"value": 1.0
}, },
"value": 2.0 {
} "type": "NumericLiteral",
], "span": {
"quasis": [ "start": 430,
{ "end": 431,
"type": "TemplateElement", "ctxt": 0
"span": { },
"start": 414, "value": 2.0
"end": 418, }
"ctxt": 0 ],
}, "quasis": [
"tail": false, {
"cooked": { "type": "TemplateElement",
"type": "StringLiteral",
"span": { "span": {
"start": 414, "start": 414,
"end": 418, "end": 418,
"ctxt": 0 "ctxt": 0
}, },
"value": "head", "tail": false,
"hasEscape": false, "cooked": {
"kind": { "type": "StringLiteral",
"type": "normal", "span": {
"containsQuote": false "start": 414,
} "end": 418,
}, "ctxt": 0
"raw": { },
"type": "StringLiteral", "value": "head",
"span": { "hasEscape": false,
"start": 414, "kind": {
"end": 418, "type": "normal",
"ctxt": 0 "containsQuote": false
}
}, },
"value": "head", "raw": {
"hasEscape": false, "type": "StringLiteral",
"kind": { "span": {
"type": "normal", "start": 414,
"containsQuote": false "end": 418,
"ctxt": 0
},
"value": "head",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
}
},
{
"type": "TemplateElement",
"span": {
"start": 422,
"end": 428,
"ctxt": 0
}, },
"tail": false, {
"cooked": { "type": "TemplateElement",
"type": "StringLiteral",
"span": { "span": {
"start": 422, "start": 422,
"end": 428, "end": 428,
"ctxt": 0 "ctxt": 0
}, },
"value": "middle", "tail": false,
"hasEscape": false, "cooked": {
"kind": { "type": "StringLiteral",
"type": "normal", "span": {
"containsQuote": false "start": 422,
} "end": 428,
}, "ctxt": 0
"raw": { },
"type": "StringLiteral", "value": "middle",
"span": { "hasEscape": false,
"start": 422, "kind": {
"end": 428, "type": "normal",
"ctxt": 0 "containsQuote": false
}
}, },
"value": "middle", "raw": {
"hasEscape": false, "type": "StringLiteral",
"kind": { "span": {
"type": "normal", "start": 422,
"containsQuote": false "end": 428,
"ctxt": 0
},
"value": "middle",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
}
},
{
"type": "TemplateElement",
"span": {
"start": 432,
"end": 436,
"ctxt": 0
}, },
"tail": true, {
"cooked": { "type": "TemplateElement",
"type": "StringLiteral",
"span": { "span": {
"start": 432, "start": 432,
"end": 436, "end": 436,
"ctxt": 0 "ctxt": 0
}, },
"value": "tail", "tail": true,
"hasEscape": false, "cooked": {
"kind": { "type": "StringLiteral",
"type": "normal", "span": {
"containsQuote": false "start": 432,
} "end": 436,
}, "ctxt": 0
"raw": { },
"type": "StringLiteral", "value": "tail",
"span": { "hasEscape": false,
"start": 432, "kind": {
"end": 436, "type": "normal",
"ctxt": 0 "containsQuote": false
}
}, },
"value": "tail", "raw": {
"hasEscape": false, "type": "StringLiteral",
"kind": { "span": {
"type": "normal", "start": 432,
"containsQuote": false "end": 436,
"ctxt": 0
},
"value": "tail",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
} }
} ]
], }
"typeParameters": null
}, },
"definite": false "definite": false
} }
@ -1091,140 +1099,148 @@
}, },
"computed": false "computed": false
}, },
"expressions": [ "typeParameters": null,
{ "template": {
"type": "NumericLiteral", "type": "TemplateLiteral",
"span": { "span": {
"start": 484, "start": 477,
"end": 485, "end": 494,
"ctxt": 0 "ctxt": 0
},
"value": 1.0
}, },
{ "expressions": [
"type": "NumericLiteral", {
"span": { "type": "NumericLiteral",
"start": 491, "span": {
"end": 492, "start": 484,
"ctxt": 0 "end": 485,
"ctxt": 0
},
"value": 1.0
}, },
"value": 2.0 {
} "type": "NumericLiteral",
], "span": {
"quasis": [ "start": 491,
{ "end": 492,
"type": "TemplateElement", "ctxt": 0
"span": { },
"start": 478, "value": 2.0
"end": 482, }
"ctxt": 0 ],
}, "quasis": [
"tail": false, {
"cooked": { "type": "TemplateElement",
"type": "StringLiteral",
"span": { "span": {
"start": 478, "start": 478,
"end": 482, "end": 482,
"ctxt": 0 "ctxt": 0
}, },
"value": "test", "tail": false,
"hasEscape": false, "cooked": {
"kind": { "type": "StringLiteral",
"type": "normal", "span": {
"containsQuote": false "start": 478,
} "end": 482,
}, "ctxt": 0
"raw": { },
"type": "StringLiteral", "value": "test",
"span": { "hasEscape": false,
"start": 478, "kind": {
"end": 482, "type": "normal",
"ctxt": 0 "containsQuote": false
}
}, },
"value": "test", "raw": {
"hasEscape": false, "type": "StringLiteral",
"kind": { "span": {
"type": "normal", "start": 478,
"containsQuote": false "end": 482,
"ctxt": 0
},
"value": "test",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
}
},
{
"type": "TemplateElement",
"span": {
"start": 486,
"end": 489,
"ctxt": 0
}, },
"tail": false, {
"cooked": { "type": "TemplateElement",
"type": "StringLiteral",
"span": { "span": {
"start": 486, "start": 486,
"end": 489, "end": 489,
"ctxt": 0 "ctxt": 0
}, },
"value": "and", "tail": false,
"hasEscape": false, "cooked": {
"kind": { "type": "StringLiteral",
"type": "normal", "span": {
"containsQuote": false "start": 486,
} "end": 489,
}, "ctxt": 0
"raw": { },
"type": "StringLiteral", "value": "and",
"span": { "hasEscape": false,
"start": 486, "kind": {
"end": 489, "type": "normal",
"ctxt": 0 "containsQuote": false
}
}, },
"value": "and", "raw": {
"hasEscape": false, "type": "StringLiteral",
"kind": { "span": {
"type": "normal", "start": 486,
"containsQuote": false "end": 489,
"ctxt": 0
},
"value": "and",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
}
},
{
"type": "TemplateElement",
"span": {
"start": 493,
"end": 493,
"ctxt": 0
}, },
"tail": true, {
"cooked": { "type": "TemplateElement",
"type": "StringLiteral",
"span": { "span": {
"start": 493, "start": 493,
"end": 493, "end": 493,
"ctxt": 0 "ctxt": 0
}, },
"value": "", "tail": true,
"hasEscape": false, "cooked": {
"kind": { "type": "StringLiteral",
"type": "normal", "span": {
"containsQuote": false "start": 493,
} "end": 493,
}, "ctxt": 0
"raw": { },
"type": "StringLiteral", "value": "",
"span": { "hasEscape": false,
"start": 493, "kind": {
"end": 493, "type": "normal",
"ctxt": 0 "containsQuote": false
}
}, },
"value": "", "raw": {
"hasEscape": false, "type": "StringLiteral",
"kind": { "span": {
"type": "normal", "start": 493,
"containsQuote": false "end": 493,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
} }
} ]
], }
"typeParameters": null
} }
} }
] ]

View File

@ -123,47 +123,55 @@
"value": "f", "value": "f",
"optional": false "optional": false
}, },
"expressions": [], "typeParameters": null,
"quasis": [ "template": {
{ "type": "TemplateLiteral",
"type": "TemplateElement", "span": {
"span": { "start": 34,
"start": 35, "end": 115,
"end": 114, "ctxt": 0
"ctxt": 0 },
}, "expressions": [],
"tail": true, "quasis": [
"cooked": { {
"type": "StringLiteral", "type": "TemplateElement",
"span": { "span": {
"start": 35, "start": 35,
"end": 114, "end": 114,
"ctxt": 0 "ctxt": 0
}, },
"value": "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2028 2029 0085 t v f b r n", "tail": true,
"hasEscape": false, "cooked": {
"kind": { "type": "StringLiteral",
"type": "normal", "span": {
"containsQuote": false "start": 35,
} "end": 114,
}, "ctxt": 0
"raw": { },
"type": "StringLiteral", "value": "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2028 2029 0085 t v f b r n",
"span": { "hasEscape": false,
"start": 35, "kind": {
"end": 114, "type": "normal",
"ctxt": 0 "containsQuote": false
}
}, },
"value": "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2028 2029 0085 t v f b r n", "raw": {
"hasEscape": false, "type": "StringLiteral",
"kind": { "span": {
"type": "normal", "start": 35,
"containsQuote": false "end": 114,
"ctxt": 0
},
"value": "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2028 2029 0085 t v f b r n",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
} }
} ]
], }
"typeParameters": null
} }
} }
], ],

View File

@ -123,47 +123,55 @@
"value": "f", "value": "f",
"optional": false "optional": false
}, },
"expressions": [], "typeParameters": null,
"quasis": [ "template": {
{ "type": "TemplateLiteral",
"type": "TemplateElement", "span": {
"span": { "start": 49,
"start": 50, "end": 130,
"end": 129, "ctxt": 0
"ctxt": 0 },
}, "expressions": [],
"tail": true, "quasis": [
"cooked": { {
"type": "StringLiteral", "type": "TemplateElement",
"span": { "span": {
"start": 50, "start": 50,
"end": 129, "end": 129,
"ctxt": 0 "ctxt": 0
}, },
"value": "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2028 2029 0085 t v f b r n", "tail": true,
"hasEscape": false, "cooked": {
"kind": { "type": "StringLiteral",
"type": "normal", "span": {
"containsQuote": false "start": 50,
} "end": 129,
}, "ctxt": 0
"raw": { },
"type": "StringLiteral", "value": "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2028 2029 0085 t v f b r n",
"span": { "hasEscape": false,
"start": 50, "kind": {
"end": 129, "type": "normal",
"ctxt": 0 "containsQuote": false
}
}, },
"value": "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2028 2029 0085 t v f b r n", "raw": {
"hasEscape": false, "type": "StringLiteral",
"kind": { "span": {
"type": "normal", "start": 50,
"containsQuote": false "end": 129,
"ctxt": 0
},
"value": "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2028 2029 0085 t v f b r n",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
} }
} ]
], }
"typeParameters": null
} }
} }
], ],

View File

@ -482,94 +482,102 @@
"value": "f", "value": "f",
"optional": false "optional": false
}, },
"expressions": [ "typeParameters": null,
{ "template": {
"type": "NumericLiteral", "type": "TemplateLiteral",
"span": { "span": {
"start": 248, "start": 241,
"end": 249, "end": 255,
"ctxt": 0 "ctxt": 0
},
"value": 0.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 242,
"end": 245,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 242,
"end": 245,
"ctxt": 0
},
"value": "abc",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 242,
"end": 245,
"ctxt": 0
},
"value": "abc",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
}, },
{ "expressions": [
"type": "TemplateElement", {
"span": { "type": "NumericLiteral",
"start": 251,
"end": 254,
"ctxt": 0
},
"tail": true,
"cooked": {
"type": "StringLiteral",
"span": { "span": {
"start": 251, "start": 248,
"end": 254, "end": 249,
"ctxt": 0 "ctxt": 0
}, },
"value": "def", "value": 0.0
"hasEscape": false, }
"kind": { ],
"type": "normal", "quasis": [
"containsQuote": false {
"type": "TemplateElement",
"span": {
"start": 242,
"end": 245,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 242,
"end": 245,
"ctxt": 0
},
"value": "abc",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 242,
"end": 245,
"ctxt": 0
},
"value": "abc",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
}, },
"raw": { {
"type": "StringLiteral", "type": "TemplateElement",
"span": { "span": {
"start": 251, "start": 251,
"end": 254, "end": 254,
"ctxt": 0 "ctxt": 0
}, },
"value": "def", "tail": true,
"hasEscape": false, "cooked": {
"kind": { "type": "StringLiteral",
"type": "normal", "span": {
"containsQuote": false "start": 251,
"end": 254,
"ctxt": 0
},
"value": "def",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 251,
"end": 254,
"ctxt": 0
},
"value": "def",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
} }
} ]
], }
"typeParameters": null
}, },
"property": { "property": {
"type": "Identifier", "type": "Identifier",

View File

@ -482,94 +482,102 @@
"value": "f", "value": "f",
"optional": false "optional": false
}, },
"expressions": [ "typeParameters": null,
{ "template": {
"type": "NumericLiteral", "type": "TemplateLiteral",
"span": { "span": {
"start": 264, "start": 257,
"end": 265, "end": 271,
"ctxt": 0 "ctxt": 0
},
"value": 0.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 258,
"end": 261,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 258,
"end": 261,
"ctxt": 0
},
"value": "abc",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 258,
"end": 261,
"ctxt": 0
},
"value": "abc",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
}, },
{ "expressions": [
"type": "TemplateElement", {
"span": { "type": "NumericLiteral",
"start": 267,
"end": 270,
"ctxt": 0
},
"tail": true,
"cooked": {
"type": "StringLiteral",
"span": { "span": {
"start": 267, "start": 264,
"end": 270, "end": 265,
"ctxt": 0 "ctxt": 0
}, },
"value": "def", "value": 0.0
"hasEscape": false, }
"kind": { ],
"type": "normal", "quasis": [
"containsQuote": false {
"type": "TemplateElement",
"span": {
"start": 258,
"end": 261,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 258,
"end": 261,
"ctxt": 0
},
"value": "abc",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 258,
"end": 261,
"ctxt": 0
},
"value": "abc",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
}, },
"raw": { {
"type": "StringLiteral", "type": "TemplateElement",
"span": { "span": {
"start": 267, "start": 267,
"end": 270, "end": 270,
"ctxt": 0 "ctxt": 0
}, },
"value": "def", "tail": true,
"hasEscape": false, "cooked": {
"kind": { "type": "StringLiteral",
"type": "normal", "span": {
"containsQuote": false "start": 267,
"end": 270,
"ctxt": 0
},
"value": "def",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 267,
"end": 270,
"ctxt": 0
},
"value": "def",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
} }
} ]
], }
"typeParameters": null
}, },
"property": { "property": {
"type": "Identifier", "type": "Identifier",

View File

@ -427,94 +427,102 @@
"value": "foo1", "value": "foo1",
"optional": false "optional": false
}, },
"expressions": [ "typeParameters": null,
{ "template": {
"type": "NumericLiteral", "type": "TemplateLiteral",
"span": { "span": {
"start": 192, "start": 189,
"end": 193, "end": 195,
"ctxt": 0 "ctxt": 0
},
"value": 1.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 190,
"end": 190,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 190,
"end": 190,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 190,
"end": 190,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
}, },
{ "expressions": [
"type": "TemplateElement", {
"span": { "type": "NumericLiteral",
"start": 194,
"end": 194,
"ctxt": 0
},
"tail": true,
"cooked": {
"type": "StringLiteral",
"span": { "span": {
"start": 194, "start": 192,
"end": 194, "end": 193,
"ctxt": 0 "ctxt": 0
}, },
"value": "", "value": 1.0
"hasEscape": false, }
"kind": { ],
"type": "normal", "quasis": [
"containsQuote": false {
"type": "TemplateElement",
"span": {
"start": 190,
"end": 190,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 190,
"end": 190,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 190,
"end": 190,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
}, },
"raw": { {
"type": "StringLiteral", "type": "TemplateElement",
"span": { "span": {
"start": 194, "start": 194,
"end": 194, "end": 194,
"ctxt": 0 "ctxt": 0
}, },
"value": "", "tail": true,
"hasEscape": false, "cooked": {
"kind": { "type": "StringLiteral",
"type": "normal", "span": {
"containsQuote": false "start": 194,
"end": 194,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 194,
"end": 194,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
} }
} ]
], }
"typeParameters": null
}, },
"definite": false "definite": false
} }
@ -1018,94 +1026,102 @@
"value": "foo2", "value": "foo2",
"optional": false "optional": false
}, },
"expressions": [ "typeParameters": null,
{ "template": {
"type": "NumericLiteral", "type": "TemplateLiteral",
"span": { "span": {
"start": 410, "start": 407,
"end": 411, "end": 413,
"ctxt": 0 "ctxt": 0
},
"value": 1.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 408,
"end": 408,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 408,
"end": 408,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 408,
"end": 408,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
}, },
{ "expressions": [
"type": "TemplateElement", {
"span": { "type": "NumericLiteral",
"start": 412,
"end": 412,
"ctxt": 0
},
"tail": true,
"cooked": {
"type": "StringLiteral",
"span": { "span": {
"start": 412, "start": 410,
"end": 412, "end": 411,
"ctxt": 0 "ctxt": 0
}, },
"value": "", "value": 1.0
"hasEscape": false, }
"kind": { ],
"type": "normal", "quasis": [
"containsQuote": false {
"type": "TemplateElement",
"span": {
"start": 408,
"end": 408,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 408,
"end": 408,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 408,
"end": 408,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
}, },
"raw": { {
"type": "StringLiteral", "type": "TemplateElement",
"span": { "span": {
"start": 412, "start": 412,
"end": 412, "end": 412,
"ctxt": 0 "ctxt": 0
}, },
"value": "", "tail": true,
"hasEscape": false, "cooked": {
"kind": { "type": "StringLiteral",
"type": "normal", "span": {
"containsQuote": false "start": 412,
"end": 412,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 412,
"end": 412,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
} }
} ]
], }
"typeParameters": null
}, },
"definite": false "definite": false
} }

View File

@ -427,94 +427,102 @@
"value": "foo1", "value": "foo1",
"optional": false "optional": false
}, },
"expressions": [ "typeParameters": null,
{ "template": {
"type": "NumericLiteral", "type": "TemplateLiteral",
"span": { "span": {
"start": 206, "start": 203,
"end": 207, "end": 209,
"ctxt": 0 "ctxt": 0
},
"value": 1.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 204,
"end": 204,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 204,
"end": 204,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 204,
"end": 204,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
}, },
{ "expressions": [
"type": "TemplateElement", {
"span": { "type": "NumericLiteral",
"start": 208,
"end": 208,
"ctxt": 0
},
"tail": true,
"cooked": {
"type": "StringLiteral",
"span": { "span": {
"start": 208, "start": 206,
"end": 208, "end": 207,
"ctxt": 0 "ctxt": 0
}, },
"value": "", "value": 1.0
"hasEscape": false, }
"kind": { ],
"type": "normal", "quasis": [
"containsQuote": false {
"type": "TemplateElement",
"span": {
"start": 204,
"end": 204,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 204,
"end": 204,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 204,
"end": 204,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
}, },
"raw": { {
"type": "StringLiteral", "type": "TemplateElement",
"span": { "span": {
"start": 208, "start": 208,
"end": 208, "end": 208,
"ctxt": 0 "ctxt": 0
}, },
"value": "", "tail": true,
"hasEscape": false, "cooked": {
"kind": { "type": "StringLiteral",
"type": "normal", "span": {
"containsQuote": false "start": 208,
"end": 208,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 208,
"end": 208,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
} }
} ]
], }
"typeParameters": null
}, },
"definite": false "definite": false
} }
@ -1018,94 +1026,102 @@
"value": "foo2", "value": "foo2",
"optional": false "optional": false
}, },
"expressions": [ "typeParameters": null,
{ "template": {
"type": "NumericLiteral", "type": "TemplateLiteral",
"span": { "span": {
"start": 424, "start": 421,
"end": 425, "end": 427,
"ctxt": 0 "ctxt": 0
},
"value": 1.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 422,
"end": 422,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 422,
"end": 422,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 422,
"end": 422,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
}, },
{ "expressions": [
"type": "TemplateElement", {
"span": { "type": "NumericLiteral",
"start": 426,
"end": 426,
"ctxt": 0
},
"tail": true,
"cooked": {
"type": "StringLiteral",
"span": { "span": {
"start": 426, "start": 424,
"end": 426, "end": 425,
"ctxt": 0 "ctxt": 0
}, },
"value": "", "value": 1.0
"hasEscape": false, }
"kind": { ],
"type": "normal", "quasis": [
"containsQuote": false {
"type": "TemplateElement",
"span": {
"start": 422,
"end": 422,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 422,
"end": 422,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 422,
"end": 422,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
}, },
"raw": { {
"type": "StringLiteral", "type": "TemplateElement",
"span": { "span": {
"start": 426, "start": 426,
"end": 426, "end": 426,
"ctxt": 0 "ctxt": 0
}, },
"value": "", "tail": true,
"hasEscape": false, "cooked": {
"kind": { "type": "StringLiteral",
"type": "normal", "span": {
"containsQuote": false "start": 426,
"end": 426,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 426,
"end": 426,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
} }
} ]
], }
"typeParameters": null
}, },
"definite": false "definite": false
} }

View File

@ -159,94 +159,102 @@
"value": "declare", "value": "declare",
"optional": false "optional": false
}, },
"expressions": [ "typeParameters": null,
{ "template": {
"type": "NumericLiteral", "type": "TemplateLiteral",
"span": { "span": {
"start": 63, "start": 54,
"end": 64, "end": 73,
"ctxt": 0 "ctxt": 0
},
"value": 0.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 55,
"end": 61,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 55,
"end": 61,
"ctxt": 0
},
"value": "Hello ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 55,
"end": 61,
"ctxt": 0
},
"value": "Hello ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
}, },
{ "expressions": [
"type": "TemplateElement", {
"span": { "type": "NumericLiteral",
"start": 65,
"end": 72,
"ctxt": 0
},
"tail": true,
"cooked": {
"type": "StringLiteral",
"span": { "span": {
"start": 65, "start": 63,
"end": 72, "end": 64,
"ctxt": 0 "ctxt": 0
}, },
"value": " world!", "value": 0.0
"hasEscape": false, }
"kind": { ],
"type": "normal", "quasis": [
"containsQuote": false {
"type": "TemplateElement",
"span": {
"start": 55,
"end": 61,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 55,
"end": 61,
"ctxt": 0
},
"value": "Hello ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 55,
"end": 61,
"ctxt": 0
},
"value": "Hello ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
}, },
"raw": { {
"type": "StringLiteral", "type": "TemplateElement",
"span": { "span": {
"start": 65, "start": 65,
"end": 72, "end": 72,
"ctxt": 0 "ctxt": 0
}, },
"value": " world!", "tail": true,
"hasEscape": false, "cooked": {
"kind": { "type": "StringLiteral",
"type": "normal", "span": {
"containsQuote": false "start": 65,
"end": 72,
"ctxt": 0
},
"value": " world!",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 65,
"end": 72,
"ctxt": 0
},
"value": " world!",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
} }
} ]
], }
"typeParameters": null
} }
} }
], ],

View File

@ -159,94 +159,102 @@
"value": "declare", "value": "declare",
"optional": false "optional": false
}, },
"expressions": [ "typeParameters": null,
{ "template": {
"type": "NumericLiteral", "type": "TemplateLiteral",
"span": { "span": {
"start": 77, "start": 68,
"end": 78, "end": 87,
"ctxt": 0 "ctxt": 0
},
"value": 0.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 69,
"end": 75,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 69,
"end": 75,
"ctxt": 0
},
"value": "Hello ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 69,
"end": 75,
"ctxt": 0
},
"value": "Hello ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
}, },
{ "expressions": [
"type": "TemplateElement", {
"span": { "type": "NumericLiteral",
"start": 79,
"end": 86,
"ctxt": 0
},
"tail": true,
"cooked": {
"type": "StringLiteral",
"span": { "span": {
"start": 79, "start": 77,
"end": 86, "end": 78,
"ctxt": 0 "ctxt": 0
}, },
"value": " world!", "value": 0.0
"hasEscape": false, }
"kind": { ],
"type": "normal", "quasis": [
"containsQuote": false {
"type": "TemplateElement",
"span": {
"start": 69,
"end": 75,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 69,
"end": 75,
"ctxt": 0
},
"value": "Hello ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 69,
"end": 75,
"ctxt": 0
},
"value": "Hello ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
}, },
"raw": { {
"type": "StringLiteral", "type": "TemplateElement",
"span": { "span": {
"start": 79, "start": 79,
"end": 86, "end": 86,
"ctxt": 0 "ctxt": 0
}, },
"value": " world!", "tail": true,
"hasEscape": false, "cooked": {
"kind": { "type": "StringLiteral",
"type": "normal", "span": {
"containsQuote": false "start": 79,
"end": 86,
"ctxt": 0
},
"value": " world!",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 79,
"end": 86,
"ctxt": 0
},
"value": " world!",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
} }
} ]
], }
"typeParameters": null
} }
} }
], ],

View File

@ -123,189 +123,197 @@
"value": "foo", "value": "foo",
"optional": false "optional": false
}, },
"expressions": [ "typeParameters": null,
{ "template": {
"type": "FunctionExpression", "type": "TemplateLiteral",
"identifier": null, "span": {
"params": [ "start": 40,
{ "end": 81,
"type": "Parameter", "ctxt": 0
"span": { },
"start": 53, "expressions": [
"end": 62, {
"ctxt": 0 "type": "FunctionExpression",
}, "identifier": null,
"decorators": [], "params": [
"pat": { {
"type": "Identifier", "type": "Parameter",
"span": { "span": {
"start": 53, "start": 53,
"end": 62, "end": 62,
"ctxt": 0 "ctxt": 0
}, },
"value": "x", "decorators": [],
"optional": false, "pat": {
"typeAnnotation": { "type": "Identifier",
"type": "TsTypeAnnotation",
"span": { "span": {
"start": 54, "start": 53,
"end": 62, "end": 62,
"ctxt": 0 "ctxt": 0
}, },
"value": "x",
"optional": false,
"typeAnnotation": { "typeAnnotation": {
"type": "TsKeywordType", "type": "TsTypeAnnotation",
"span": { "span": {
"start": 56, "start": 54,
"end": 62, "end": 62,
"ctxt": 0 "ctxt": 0
}, },
"kind": "number" "typeAnnotation": {
} "type": "TsKeywordType",
} "span": {
} "start": 56,
} "end": 62,
], "ctxt": 0
"decorators": [], },
"span": { "kind": "number"
"start": 43,
"end": 78,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 64,
"end": 78,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 66,
"end": 76,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 66,
"end": 75,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 66,
"end": 67,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "StringLiteral",
"span": {
"start": 70,
"end": 75,
"ctxt": 0
},
"value": "bad",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
} }
} }
} }
} }
] ],
}, "decorators": [],
"generator": false, "span": {
"async": false, "start": 43,
"typeParameters": null, "end": 78,
"returnType": null "ctxt": 0
} },
], "body": {
"quasis": [ "type": "BlockStatement",
{ "span": {
"type": "TemplateElement", "start": 64,
"span": { "end": 78,
"start": 41, "ctxt": 0
"end": 41, },
"ctxt": 0 "stmts": [
}, {
"tail": false, "type": "ExpressionStatement",
"cooked": { "span": {
"type": "StringLiteral", "start": 66,
"end": 76,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 66,
"end": 75,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 66,
"end": 67,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "StringLiteral",
"span": {
"start": 70,
"end": 75,
"ctxt": 0
},
"value": "bad",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
],
"quasis": [
{
"type": "TemplateElement",
"span": { "span": {
"start": 41, "start": 41,
"end": 41, "end": 41,
"ctxt": 0 "ctxt": 0
}, },
"value": "", "tail": false,
"hasEscape": false, "cooked": {
"kind": { "type": "StringLiteral",
"type": "normal", "span": {
"containsQuote": false "start": 41,
} "end": 41,
}, "ctxt": 0
"raw": { },
"type": "StringLiteral", "value": "",
"span": { "hasEscape": false,
"start": 41, "kind": {
"end": 41, "type": "normal",
"ctxt": 0 "containsQuote": false
}
}, },
"value": "", "raw": {
"hasEscape": false, "type": "StringLiteral",
"kind": { "span": {
"type": "normal", "start": 41,
"containsQuote": false "end": 41,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
}
},
{
"type": "TemplateElement",
"span": {
"start": 80,
"end": 80,
"ctxt": 0
}, },
"tail": true, {
"cooked": { "type": "TemplateElement",
"type": "StringLiteral",
"span": { "span": {
"start": 80, "start": 80,
"end": 80, "end": 80,
"ctxt": 0 "ctxt": 0
}, },
"value": "", "tail": true,
"hasEscape": false, "cooked": {
"kind": { "type": "StringLiteral",
"type": "normal", "span": {
"containsQuote": false "start": 80,
} "end": 80,
}, "ctxt": 0
"raw": { },
"type": "StringLiteral", "value": "",
"span": { "hasEscape": false,
"start": 80, "kind": {
"end": 80, "type": "normal",
"ctxt": 0 "containsQuote": false
}
}, },
"value": "", "raw": {
"hasEscape": false, "type": "StringLiteral",
"kind": { "span": {
"type": "normal", "start": 80,
"containsQuote": false "end": 80,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
} }
} ]
], }
"typeParameters": null
} }
} }
], ],

View File

@ -123,189 +123,197 @@
"value": "foo", "value": "foo",
"optional": false "optional": false
}, },
"expressions": [ "typeParameters": null,
{ "template": {
"type": "FunctionExpression", "type": "TemplateLiteral",
"identifier": null, "span": {
"params": [ "start": 54,
{ "end": 95,
"type": "Parameter", "ctxt": 0
"span": { },
"start": 67, "expressions": [
"end": 76, {
"ctxt": 0 "type": "FunctionExpression",
}, "identifier": null,
"decorators": [], "params": [
"pat": { {
"type": "Identifier", "type": "Parameter",
"span": { "span": {
"start": 67, "start": 67,
"end": 76, "end": 76,
"ctxt": 0 "ctxt": 0
}, },
"value": "x", "decorators": [],
"optional": false, "pat": {
"typeAnnotation": { "type": "Identifier",
"type": "TsTypeAnnotation",
"span": { "span": {
"start": 68, "start": 67,
"end": 76, "end": 76,
"ctxt": 0 "ctxt": 0
}, },
"value": "x",
"optional": false,
"typeAnnotation": { "typeAnnotation": {
"type": "TsKeywordType", "type": "TsTypeAnnotation",
"span": { "span": {
"start": 70, "start": 68,
"end": 76, "end": 76,
"ctxt": 0 "ctxt": 0
}, },
"kind": "number" "typeAnnotation": {
} "type": "TsKeywordType",
} "span": {
} "start": 70,
} "end": 76,
], "ctxt": 0
"decorators": [], },
"span": { "kind": "number"
"start": 57,
"end": 92,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 78,
"end": 92,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 80,
"end": 90,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 80,
"end": 89,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 80,
"end": 81,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "StringLiteral",
"span": {
"start": 84,
"end": 89,
"ctxt": 0
},
"value": "bad",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
} }
} }
} }
} }
] ],
}, "decorators": [],
"generator": false, "span": {
"async": false, "start": 57,
"typeParameters": null, "end": 92,
"returnType": null "ctxt": 0
} },
], "body": {
"quasis": [ "type": "BlockStatement",
{ "span": {
"type": "TemplateElement", "start": 78,
"span": { "end": 92,
"start": 55, "ctxt": 0
"end": 55, },
"ctxt": 0 "stmts": [
}, {
"tail": false, "type": "ExpressionStatement",
"cooked": { "span": {
"type": "StringLiteral", "start": 80,
"end": 90,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 80,
"end": 89,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 80,
"end": 81,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "StringLiteral",
"span": {
"start": 84,
"end": 89,
"ctxt": 0
},
"value": "bad",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
],
"quasis": [
{
"type": "TemplateElement",
"span": { "span": {
"start": 55, "start": 55,
"end": 55, "end": 55,
"ctxt": 0 "ctxt": 0
}, },
"value": "", "tail": false,
"hasEscape": false, "cooked": {
"kind": { "type": "StringLiteral",
"type": "normal", "span": {
"containsQuote": false "start": 55,
} "end": 55,
}, "ctxt": 0
"raw": { },
"type": "StringLiteral", "value": "",
"span": { "hasEscape": false,
"start": 55, "kind": {
"end": 55, "type": "normal",
"ctxt": 0 "containsQuote": false
}
}, },
"value": "", "raw": {
"hasEscape": false, "type": "StringLiteral",
"kind": { "span": {
"type": "normal", "start": 55,
"containsQuote": false "end": 55,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
}
},
{
"type": "TemplateElement",
"span": {
"start": 94,
"end": 94,
"ctxt": 0
}, },
"tail": true, {
"cooked": { "type": "TemplateElement",
"type": "StringLiteral",
"span": { "span": {
"start": 94, "start": 94,
"end": 94, "end": 94,
"ctxt": 0 "ctxt": 0
}, },
"value": "", "tail": true,
"hasEscape": false, "cooked": {
"kind": { "type": "StringLiteral",
"type": "normal", "span": {
"containsQuote": false "start": 94,
} "end": 94,
}, "ctxt": 0
"raw": { },
"type": "StringLiteral", "value": "",
"span": { "hasEscape": false,
"start": 94, "kind": {
"end": 94, "type": "normal",
"ctxt": 0 "containsQuote": false
}
}, },
"value": "", "raw": {
"hasEscape": false, "type": "StringLiteral",
"kind": { "span": {
"type": "normal", "start": 94,
"containsQuote": false "end": 94,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
} }
} ]
], }
"typeParameters": null
} }
} }
], ],

View File

@ -89,47 +89,55 @@
"value": "tag", "value": "tag",
"optional": false "optional": false
}, },
"expressions": [], "typeParameters": null,
"quasis": [ "template": {
{ "type": "TemplateLiteral",
"type": "TemplateElement", "span": {
"span": { "start": 23,
"start": 24, "end": 37,
"end": 36, "ctxt": 0
"ctxt": 0 },
}, "expressions": [],
"tail": true, "quasis": [
"cooked": { {
"type": "StringLiteral", "type": "TemplateElement",
"span": { "span": {
"start": 24, "start": 24,
"end": 36, "end": 36,
"ctxt": 0 "ctxt": 0
}, },
"value": "Hello world!", "tail": true,
"hasEscape": false, "cooked": {
"kind": { "type": "StringLiteral",
"type": "normal", "span": {
"containsQuote": false "start": 24,
} "end": 36,
}, "ctxt": 0
"raw": { },
"type": "StringLiteral", "value": "Hello world!",
"span": { "hasEscape": false,
"start": 24, "kind": {
"end": 36, "type": "normal",
"ctxt": 0 "containsQuote": false
}
}, },
"value": "Hello world!", "raw": {
"hasEscape": false, "type": "StringLiteral",
"kind": { "span": {
"type": "normal", "start": 24,
"containsQuote": false "end": 36,
"ctxt": 0
},
"value": "Hello world!",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
} }
} ]
], }
"typeParameters": null
} }
} }
], ],

View File

@ -56,47 +56,55 @@
"value": "CtorTag", "value": "CtorTag",
"optional": false "optional": false
}, },
"expressions": [], "typeParameters": null,
"quasis": [ "template": {
{ "type": "TemplateLiteral",
"type": "TemplateElement", "span": {
"span": { "start": 27,
"start": 28, "end": 41,
"end": 40, "ctxt": 0
"ctxt": 0 },
}, "expressions": [],
"tail": true, "quasis": [
"cooked": { {
"type": "StringLiteral", "type": "TemplateElement",
"span": { "span": {
"start": 28, "start": 28,
"end": 40, "end": 40,
"ctxt": 0 "ctxt": 0
}, },
"value": "Hello world!", "tail": true,
"hasEscape": false, "cooked": {
"kind": { "type": "StringLiteral",
"type": "normal", "span": {
"containsQuote": false "start": 28,
} "end": 40,
}, "ctxt": 0
"raw": { },
"type": "StringLiteral", "value": "Hello world!",
"span": { "hasEscape": false,
"start": 28, "kind": {
"end": 40, "type": "normal",
"ctxt": 0 "containsQuote": false
}
}, },
"value": "Hello world!", "raw": {
"hasEscape": false, "type": "StringLiteral",
"kind": { "span": {
"type": "normal", "start": 28,
"containsQuote": false "end": 40,
"ctxt": 0
},
"value": "Hello world!",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
} }
} ]
], }
"typeParameters": null
} }
} }
], ],

View File

@ -224,47 +224,55 @@
"value": "tag", "value": "tag",
"optional": false "optional": false
}, },
"expressions": [], "typeParameters": null,
"quasis": [ "template": {
{ "type": "TemplateLiteral",
"type": "TemplateElement", "span": {
"span": { "start": 86,
"start": 87, "end": 100,
"end": 99, "ctxt": 0
"ctxt": 0 },
}, "expressions": [],
"tail": true, "quasis": [
"cooked": { {
"type": "StringLiteral", "type": "TemplateElement",
"span": { "span": {
"start": 87, "start": 87,
"end": 99, "end": 99,
"ctxt": 0 "ctxt": 0
}, },
"value": "Hello world!", "tail": true,
"hasEscape": false, "cooked": {
"kind": { "type": "StringLiteral",
"type": "normal", "span": {
"containsQuote": false "start": 87,
} "end": 99,
}, "ctxt": 0
"raw": { },
"type": "StringLiteral", "value": "Hello world!",
"span": { "hasEscape": false,
"start": 87, "kind": {
"end": 99, "type": "normal",
"ctxt": 0 "containsQuote": false
}
}, },
"value": "Hello world!", "raw": {
"hasEscape": false, "type": "StringLiteral",
"kind": { "span": {
"type": "normal", "start": 87,
"containsQuote": false "end": 99,
"ctxt": 0
},
"value": "Hello world!",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
} }
} ]
], }
"typeParameters": null
} }
} }
], ],

View File

@ -240,99 +240,107 @@
} }
] ]
}, },
"expressions": [ "typeParameters": null,
{ "template": {
"type": "StringLiteral", "type": "TemplateLiteral",
"span": { "span": {
"start": 47, "start": 41,
"end": 51, "end": 75,
"ctxt": 0 "ctxt": 0
},
"value": "AM",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 42,
"end": 44,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 42,
"end": 44,
"ctxt": 0
},
"value": "I ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 42,
"end": 44,
"ctxt": 0
},
"value": "I ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
}, },
{ "expressions": [
"type": "TemplateElement", {
"span": {
"start": 53,
"end": 74,
"ctxt": 0
},
"tail": true,
"cooked": {
"type": "StringLiteral", "type": "StringLiteral",
"span": { "span": {
"start": 53, "start": 47,
"end": 74, "end": 51,
"ctxt": 0 "ctxt": 0
}, },
"value": " THE TEMPLATE PORTION", "value": "AM",
"hasEscape": false, "hasEscape": false,
"kind": { "kind": {
"type": "normal", "type": "normal",
"containsQuote": false "containsQuote": true
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 53,
"end": 74,
"ctxt": 0
},
"value": " THE TEMPLATE PORTION",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
} }
} }
} ],
], "quasis": [
"typeParameters": null {
"type": "TemplateElement",
"span": {
"start": 42,
"end": 44,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 42,
"end": 44,
"ctxt": 0
},
"value": "I ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 42,
"end": 44,
"ctxt": 0
},
"value": "I ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
},
{
"type": "TemplateElement",
"span": {
"start": 53,
"end": 74,
"ctxt": 0
},
"tail": true,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 53,
"end": 74,
"ctxt": 0
},
"value": " THE TEMPLATE PORTION",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 53,
"end": 74,
"ctxt": 0
},
"value": " THE TEMPLATE PORTION",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
}
]
}
} }
} }
], ],

View File

@ -240,99 +240,107 @@
} }
] ]
}, },
"expressions": [ "typeParameters": null,
{ "template": {
"type": "StringLiteral", "type": "TemplateLiteral",
"span": { "span": {
"start": 63, "start": 57,
"end": 67, "end": 91,
"ctxt": 0 "ctxt": 0
},
"value": "AM",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 58,
"end": 60,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 58,
"end": 60,
"ctxt": 0
},
"value": "I ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 58,
"end": 60,
"ctxt": 0
},
"value": "I ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
}, },
{ "expressions": [
"type": "TemplateElement", {
"span": {
"start": 69,
"end": 90,
"ctxt": 0
},
"tail": true,
"cooked": {
"type": "StringLiteral", "type": "StringLiteral",
"span": { "span": {
"start": 69, "start": 63,
"end": 90, "end": 67,
"ctxt": 0 "ctxt": 0
}, },
"value": " THE TEMPLATE PORTION", "value": "AM",
"hasEscape": false, "hasEscape": false,
"kind": { "kind": {
"type": "normal", "type": "normal",
"containsQuote": false "containsQuote": true
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 69,
"end": 90,
"ctxt": 0
},
"value": " THE TEMPLATE PORTION",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
} }
} }
} ],
], "quasis": [
"typeParameters": null {
"type": "TemplateElement",
"span": {
"start": 58,
"end": 60,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 58,
"end": 60,
"ctxt": 0
},
"value": "I ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 58,
"end": 60,
"ctxt": 0
},
"value": "I ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
},
{
"type": "TemplateElement",
"span": {
"start": 69,
"end": 90,
"ctxt": 0
},
"tail": true,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 69,
"end": 90,
"ctxt": 0
},
"value": " THE TEMPLATE PORTION",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 69,
"end": 90,
"ctxt": 0
},
"value": " THE TEMPLATE PORTION",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
}
]
}
} }
} }
], ],

View File

@ -1048,94 +1048,102 @@
"value": "tag", "value": "tag",
"optional": false "optional": false
}, },
"expressions": [ "typeParameters": null,
{ "template": {
"type": "NumericLiteral", "type": "TemplateLiteral",
"span": { "span": {
"start": 292, "start": 283,
"end": 295, "end": 303,
"ctxt": 0 "ctxt": 0
},
"value": 123.0
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 284,
"end": 290,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 284,
"end": 290,
"ctxt": 0
},
"value": "Hello ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 284,
"end": 290,
"ctxt": 0
},
"value": "Hello ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
}, },
{ "expressions": [
"type": "TemplateElement", {
"span": { "type": "NumericLiteral",
"start": 296,
"end": 302,
"ctxt": 0
},
"tail": true,
"cooked": {
"type": "StringLiteral",
"span": { "span": {
"start": 296, "start": 292,
"end": 302, "end": 295,
"ctxt": 0 "ctxt": 0
}, },
"value": " World", "value": 123.0
"hasEscape": false, }
"kind": { ],
"type": "normal", "quasis": [
"containsQuote": false {
"type": "TemplateElement",
"span": {
"start": 284,
"end": 290,
"ctxt": 0
},
"tail": false,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 284,
"end": 290,
"ctxt": 0
},
"value": "Hello ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 284,
"end": 290,
"ctxt": 0
},
"value": "Hello ",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
}, },
"raw": { {
"type": "StringLiteral", "type": "TemplateElement",
"span": { "span": {
"start": 296, "start": 296,
"end": 302, "end": 302,
"ctxt": 0 "ctxt": 0
}, },
"value": " World", "tail": true,
"hasEscape": false, "cooked": {
"kind": { "type": "StringLiteral",
"type": "normal", "span": {
"containsQuote": false "start": 296,
"end": 302,
"ctxt": 0
},
"value": " World",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 296,
"end": 302,
"ctxt": 0
},
"value": " World",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
} }
} ]
], }
"typeParameters": null
}, },
"typeAnnotation": { "typeAnnotation": {
"type": "TsKeywordType", "type": "TsKeywordType",
@ -1203,47 +1211,55 @@
"value": "tag", "value": "tag",
"optional": false "optional": false
}, },
"expressions": [], "typeParameters": null,
"quasis": [ "template": {
{ "type": "TemplateLiteral",
"type": "TemplateElement", "span": {
"span": { "start": 327,
"start": 328, "end": 334,
"end": 333, "ctxt": 0
"ctxt": 0 },
}, "expressions": [],
"tail": true, "quasis": [
"cooked": { {
"type": "StringLiteral", "type": "TemplateElement",
"span": { "span": {
"start": 328, "start": 328,
"end": 333, "end": 333,
"ctxt": 0 "ctxt": 0
}, },
"value": "Hello", "tail": true,
"hasEscape": false, "cooked": {
"kind": { "type": "StringLiteral",
"type": "normal", "span": {
"containsQuote": false "start": 328,
} "end": 333,
}, "ctxt": 0
"raw": { },
"type": "StringLiteral", "value": "Hello",
"span": { "hasEscape": false,
"start": 328, "kind": {
"end": 333, "type": "normal",
"ctxt": 0 "containsQuote": false
}
}, },
"value": "Hello", "raw": {
"hasEscape": false, "type": "StringLiteral",
"kind": { "span": {
"type": "normal", "start": 328,
"containsQuote": false "end": 333,
"ctxt": 0
},
"value": "Hello",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
} }
} ]
], }
"typeParameters": null
}, },
"typeAnnotation": { "typeAnnotation": {
"type": "TsKeywordType", "type": "TsKeywordType",

View File

@ -182,47 +182,55 @@
"value": "as", "value": "as",
"optional": false "optional": false
}, },
"expressions": [], "typeParameters": null,
"quasis": [ "template": {
{ "type": "TemplateLiteral",
"type": "TemplateElement", "span": {
"span": { "start": 79,
"start": 80, "end": 92,
"end": 91, "ctxt": 0
"ctxt": 0 },
}, "expressions": [],
"tail": true, "quasis": [
"cooked": { {
"type": "StringLiteral", "type": "TemplateElement",
"span": { "span": {
"start": 80, "start": 80,
"end": 91, "end": 91,
"ctxt": 0 "ctxt": 0
}, },
"value": "Hello world", "tail": true,
"hasEscape": false, "cooked": {
"kind": { "type": "StringLiteral",
"type": "normal", "span": {
"containsQuote": false "start": 80,
} "end": 91,
}, "ctxt": 0
"raw": { },
"type": "StringLiteral", "value": "Hello world",
"span": { "hasEscape": false,
"start": 80, "kind": {
"end": 91, "type": "normal",
"ctxt": 0 "containsQuote": false
}
}, },
"value": "Hello world", "raw": {
"hasEscape": false, "type": "StringLiteral",
"kind": { "span": {
"type": "normal", "start": 80,
"containsQuote": false "end": 91,
"ctxt": 0
},
"value": "Hello world",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
} }
} }
} ]
], }
"typeParameters": null
} }
}, },
{ {

View File

@ -37,46 +37,6 @@
"value": "C", "value": "C",
"optional": false "optional": false
}, },
"expressions": [],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 10,
"end": 10,
"ctxt": 0
},
"tail": true,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 10,
"end": 10,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 10,
"end": 10,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
}
],
"typeParameters": { "typeParameters": {
"type": "TsTypeParameterInstantiation", "type": "TsTypeParameterInstantiation",
"span": { "span": {
@ -105,6 +65,54 @@
"typeParams": null "typeParams": null
} }
] ]
},
"template": {
"type": "TemplateLiteral",
"span": {
"start": 9,
"end": 11,
"ctxt": 0
},
"expressions": [],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 10,
"end": 10,
"ctxt": 0
},
"tail": true,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 10,
"end": 10,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 10,
"end": 10,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
}
]
} }
}, },
"arguments": null, "arguments": null,

View File

@ -30,46 +30,6 @@
"value": "f", "value": "f",
"optional": false "optional": false
}, },
"expressions": [],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 5,
"end": 5,
"ctxt": 0
},
"tail": true,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 5,
"end": 5,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 5,
"end": 5,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
}
],
"typeParameters": { "typeParameters": {
"type": "TsTypeParameterInstantiation", "type": "TsTypeParameterInstantiation",
"span": { "span": {
@ -98,6 +58,54 @@
"typeParams": null "typeParams": null
} }
] ]
},
"template": {
"type": "TemplateLiteral",
"span": {
"start": 4,
"end": 6,
"ctxt": 0
},
"expressions": [],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 5,
"end": 5,
"ctxt": 0
},
"tail": true,
"cooked": {
"type": "StringLiteral",
"span": {
"start": 5,
"end": 5,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
},
"raw": {
"type": "StringLiteral",
"span": {
"start": 5,
"end": 5,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": false
}
}
}
]
} }
} }
} }

View File

@ -5,7 +5,7 @@ documentation = "https://swc.rs/rustdoc/swc_ecma_preset_env/"
edition = "2018" edition = "2018"
license = "Apache-2.0/MIT" license = "Apache-2.0/MIT"
name = "swc_ecma_preset_env" name = "swc_ecma_preset_env"
version = "0.11.0" version = "0.12.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@ -20,14 +20,14 @@ st-map = "0.1.2"
string_enum = {version = "0.3.1", path = "../../macros/string_enum"} string_enum = {version = "0.3.1", path = "../../macros/string_enum"}
swc_atoms = {version = "0.2", path = "../../atoms"} swc_atoms = {version = "0.2", path = "../../atoms"}
swc_common = {version = "0.10.10", path = "../../common"} swc_common = {version = "0.10.10", path = "../../common"}
swc_ecma_ast = {version = "0.40.0", path = "../ast"} swc_ecma_ast = {version = "0.41.0", path = "../ast"}
swc_ecma_transforms = {version = "0.41.0", path = "../transforms", features = ["compat", "proposal"]} swc_ecma_transforms = {version = "0.42.0", path = "../transforms", features = ["compat", "proposal"]}
swc_ecma_utils = {version = "0.31.0", path = "../utils"} swc_ecma_utils = {version = "0.32.0", path = "../utils"}
swc_ecma_visit = {version = "0.26.0", path = "../visit"} swc_ecma_visit = {version = "0.27.0", path = "../visit"}
walkdir = "2" walkdir = "2"
[dev-dependencies] [dev-dependencies]
pretty_assertions = "0.6" pretty_assertions = "0.6"
swc_ecma_codegen = {version = "0.48.0", path = "../codegen"} swc_ecma_codegen = {version = "0.49.0", path = "../codegen"}
swc_ecma_parser = {version = "0.50.0", path = "../parser"} swc_ecma_parser = {version = "0.51.0", path = "../parser"}
testing = {version = "0.10.3", path = "../../testing"} testing = {version = "0.10.3", path = "../../testing"}

View File

@ -6,7 +6,7 @@ edition = "2018"
license = "Apache-2.0/MIT" license = "Apache-2.0/MIT"
name = "swc_ecma_transforms" name = "swc_ecma_transforms"
repository = "https://github.com/swc-project/swc.git" repository = "https://github.com/swc-project/swc.git"
version = "0.41.0" version = "0.42.0"
[package.metadata.docs.rs] [package.metadata.docs.rs]
all-features = true all-features = true
@ -23,24 +23,24 @@ typescript = ["swc_ecma_transforms_typescript"]
[dependencies] [dependencies]
swc_atoms = {version = "0.2.0", path = "../../atoms"} swc_atoms = {version = "0.2.0", path = "../../atoms"}
swc_common = {version = "0.10.10", path = "../../common"} swc_common = {version = "0.10.10", path = "../../common"}
swc_ecma_ast = {version = "0.40.0", path = "../ast"} swc_ecma_ast = {version = "0.41.0", path = "../ast"}
swc_ecma_parser = {version = "0.50.0", path = "../parser"} swc_ecma_parser = {version = "0.51.0", path = "../parser"}
swc_ecma_transforms_base = {version = "0.8.0", path = "./base"} swc_ecma_transforms_base = {version = "0.9.0", path = "./base"}
swc_ecma_transforms_compat = {version = "0.9.0", path = "./compat", optional = true} swc_ecma_transforms_compat = {version = "0.10.0", path = "./compat", optional = true}
swc_ecma_transforms_module = {version = "0.9.0", path = "./module", optional = true} swc_ecma_transforms_module = {version = "0.10.0", path = "./module", optional = true}
swc_ecma_transforms_optimization = {version = "0.11.0", path = "./optimization", optional = true} swc_ecma_transforms_optimization = {version = "0.12.0", path = "./optimization", optional = true}
swc_ecma_transforms_proposal = {version = "0.9.0", path = "./proposal", optional = true} swc_ecma_transforms_proposal = {version = "0.10.0", path = "./proposal", optional = true}
swc_ecma_transforms_react = {version = "0.10.0", path = "./react", optional = true} swc_ecma_transforms_react = {version = "0.11.0", path = "./react", optional = true}
swc_ecma_transforms_typescript = {version = "0.10.0", path = "./typescript", optional = true} swc_ecma_transforms_typescript = {version = "0.11.0", path = "./typescript", optional = true}
swc_ecma_utils = {version = "0.31.0", path = "../utils"} swc_ecma_utils = {version = "0.32.0", path = "../utils"}
swc_ecma_visit = {version = "0.26.0", path = "../visit"} swc_ecma_visit = {version = "0.27.0", path = "../visit"}
unicode-xid = "0.2" unicode-xid = "0.2"
[dev-dependencies] [dev-dependencies]
pretty_assertions = "0.6" pretty_assertions = "0.6"
sourcemap = "6" sourcemap = "6"
swc_ecma_codegen = {version = "0.48.0", path = "../codegen"} swc_ecma_codegen = {version = "0.49.0", path = "../codegen"}
swc_ecma_transforms_testing = {version = "0.8.0", path = "./testing"} swc_ecma_transforms_testing = {version = "0.9.0", path = "./testing"}
tempfile = "3" tempfile = "3"
testing = {version = "0.10.3", path = "../../testing"} testing = {version = "0.10.3", path = "../../testing"}
walkdir = "2" walkdir = "2"

View File

@ -6,7 +6,7 @@ edition = "2018"
license = "Apache-2.0/MIT" license = "Apache-2.0/MIT"
name = "swc_ecma_transforms_base" name = "swc_ecma_transforms_base"
repository = "https://github.com/swc-project/swc.git" repository = "https://github.com/swc-project/swc.git"
version = "0.8.1" version = "0.9.0"
[dependencies] [dependencies]
fxhash = "0.2.1" fxhash = "0.2.1"
@ -16,11 +16,11 @@ scoped-tls = "1.0.0"
smallvec = "1.6.0" smallvec = "1.6.0"
swc_atoms = {version = "0.2", path = "../../../atoms"} swc_atoms = {version = "0.2", path = "../../../atoms"}
swc_common = {version = "0.10.10", path = "../../../common"} swc_common = {version = "0.10.10", path = "../../../common"}
swc_ecma_ast = {version = "0.40.0", path = "../../ast"} swc_ecma_ast = {version = "0.41.0", path = "../../ast"}
swc_ecma_parser = {version = "0.50.0", path = "../../parser"} swc_ecma_parser = {version = "0.51.0", path = "../../parser"}
swc_ecma_utils = {version = "0.31.0", path = "../../utils"} swc_ecma_utils = {version = "0.32.0", path = "../../utils"}
swc_ecma_visit = {version = "0.26.0", path = "../../visit"} swc_ecma_visit = {version = "0.27.0", path = "../../visit"}
[dev-dependencies] [dev-dependencies]
swc_ecma_codegen = {version = "0.48.0", path = "../../codegen"} swc_ecma_codegen = {version = "0.49.0", path = "../../codegen"}
testing = {version = "0.10.3", path = "../../../testing"} testing = {version = "0.10.3", path = "../../../testing"}

View File

@ -6,7 +6,7 @@ edition = "2018"
license = "Apache-2.0/MIT" license = "Apache-2.0/MIT"
name = "swc_ecma_transforms_compat" name = "swc_ecma_transforms_compat"
repository = "https://github.com/swc-project/swc.git" repository = "https://github.com/swc-project/swc.git"
version = "0.9.0" version = "0.10.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
@ -20,13 +20,13 @@ serde = {version = "1.0.118", features = ["derive"]}
smallvec = "1.6.0" smallvec = "1.6.0"
swc_atoms = {version = "0.2.5", path = "../../../atoms"} swc_atoms = {version = "0.2.5", path = "../../../atoms"}
swc_common = {version = "0.10.10", path = "../../../common"} swc_common = {version = "0.10.10", path = "../../../common"}
swc_ecma_ast = {version = "0.40.0", path = "../../ast"} swc_ecma_ast = {version = "0.41.0", path = "../../ast"}
swc_ecma_transforms_base = {version = "0.8.0", path = "../base"} swc_ecma_transforms_base = {version = "0.9.0", path = "../base"}
swc_ecma_transforms_macros = {version = "0.2.1", path = "../macros"} swc_ecma_transforms_macros = {version = "0.2.1", path = "../macros"}
swc_ecma_utils = {version = "0.31.0", path = "../../utils"} swc_ecma_utils = {version = "0.32.0", path = "../../utils"}
swc_ecma_visit = {version = "0.26.0", path = "../../visit"} swc_ecma_visit = {version = "0.27.0", path = "../../visit"}
[dev-dependencies] [dev-dependencies]
swc_ecma_parser = {version = "0.50.0", path = "../../parser"} swc_ecma_parser = {version = "0.51.0", path = "../../parser"}
swc_ecma_transforms_testing = {version = "0.8.0", path = "../testing"} swc_ecma_transforms_testing = {version = "0.9.0", path = "../testing"}
testing = {version = "0.10.3", path = "../../../testing"} testing = {version = "0.10.3", path = "../../../testing"}

View File

@ -90,16 +90,19 @@ impl Fold for TemplateLiteralCaching {
let template = TaggedTpl { let template = TaggedTpl {
span: DUMMY_SP, span: DUMMY_SP,
tag: Box::new(Expr::Ident(helper_ident.clone())), tag: Box::new(Expr::Ident(helper_ident.clone())),
quasis: n.quasis, tpl: Tpl {
exprs: (&n.exprs) span: DUMMY_SP,
.into_iter() quasis: n.tpl.quasis,
.map(|_| { exprs: (&n.tpl.exprs)
Box::new(Expr::Lit(Lit::Num(Number { .into_iter()
span: DUMMY_SP, .map(|_| {
value: 0.0, Box::new(Expr::Lit(Lit::Num(Number {
}))) span: DUMMY_SP,
}) value: 0.0,
.collect(), })))
})
.collect(),
},
type_params: None, type_params: None,
}; };
@ -132,7 +135,8 @@ impl Fold for TemplateLiteralCaching {
}] }]
.into_iter() .into_iter()
.chain( .chain(
n.exprs n.tpl
.exprs
.into_iter() .into_iter()
.map(|expr| ExprOrSpread { expr, spread: None }), .map(|expr| ExprOrSpread { expr, spread: None }),
) )

View File

@ -189,7 +189,9 @@ impl Fold for TemplateLiteral {
} }
Expr::TaggedTpl(TaggedTpl { Expr::TaggedTpl(TaggedTpl {
tag, exprs, quasis, .. tag,
tpl: Tpl { exprs, quasis, .. },
..
}) => { }) => {
assert_eq!(quasis.len(), exprs.len() + 1); assert_eq!(quasis.len(), exprs.len() + 1);

View File

@ -6,7 +6,7 @@ edition = "2018"
license = "Apache-2.0/MIT" license = "Apache-2.0/MIT"
name = "swc_ecma_transforms_module" name = "swc_ecma_transforms_module"
repository = "https://github.com/swc-project/swc.git" repository = "https://github.com/swc-project/swc.git"
version = "0.9.0" version = "0.10.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
@ -16,13 +16,13 @@ indexmap = "1.6.1"
serde = {version = "1.0.118", features = ["derive"]} serde = {version = "1.0.118", features = ["derive"]}
swc_atoms = {version = "0.2", path = "../../../atoms"} swc_atoms = {version = "0.2", path = "../../../atoms"}
swc_common = {version = "0.10.10", path = "../../../common"} swc_common = {version = "0.10.10", path = "../../../common"}
swc_ecma_ast = {version = "0.40.0", path = "../../ast"} swc_ecma_ast = {version = "0.41.0", path = "../../ast"}
swc_ecma_parser = {version = "0.50.0", path = "../../parser"} swc_ecma_parser = {version = "0.51.0", path = "../../parser"}
swc_ecma_transforms_base = {version = "0.8.0", path = "../base"} swc_ecma_transforms_base = {version = "0.9.0", path = "../base"}
swc_ecma_utils = {version = "0.31.0", path = "../../utils"} swc_ecma_utils = {version = "0.32.0", path = "../../utils"}
swc_ecma_visit = {version = "0.26.0", path = "../../visit"} swc_ecma_visit = {version = "0.27.0", path = "../../visit"}
[dev-dependencies] [dev-dependencies]
swc_ecma_transforms_compat = {version = "0.9.0", path = "../compat"} swc_ecma_transforms_compat = {version = "0.10.0", path = "../compat"}
swc_ecma_transforms_testing = {version = "0.8.0", path = "../testing/"} swc_ecma_transforms_testing = {version = "0.9.0", path = "../testing/"}
testing = {version = "0.10.3", path = "../../../testing/"} testing = {version = "0.10.3", path = "../../../testing/"}

View File

@ -6,7 +6,7 @@ edition = "2018"
license = "Apache-2.0/MIT" license = "Apache-2.0/MIT"
name = "swc_ecma_transforms_optimization" name = "swc_ecma_transforms_optimization"
repository = "https://github.com/swc-project/swc.git" repository = "https://github.com/swc-project/swc.git"
version = "0.11.0" version = "0.12.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
@ -19,17 +19,17 @@ retain_mut = "0.1.2"
serde_json = "1.0.61" serde_json = "1.0.61"
swc_atoms = {version = "0.2", path = "../../../atoms"} swc_atoms = {version = "0.2", path = "../../../atoms"}
swc_common = {version = "0.10.10", path = "../../../common"} swc_common = {version = "0.10.10", path = "../../../common"}
swc_ecma_ast = {version = "0.40.0", path = "../../ast"} swc_ecma_ast = {version = "0.41.0", path = "../../ast"}
swc_ecma_parser = {version = "0.50.0", path = "../../parser"} swc_ecma_parser = {version = "0.51.0", path = "../../parser"}
swc_ecma_transforms_base = {version = "0.8.0", path = "../base"} swc_ecma_transforms_base = {version = "0.9.0", path = "../base"}
swc_ecma_utils = {version = "0.31.0", path = "../../utils"} swc_ecma_utils = {version = "0.32.0", path = "../../utils"}
swc_ecma_visit = {version = "0.26.0", path = "../../visit"} swc_ecma_visit = {version = "0.27.0", path = "../../visit"}
[dev-dependencies] [dev-dependencies]
swc_ecma_transforms_compat = {version = "0.9.0", path = "../compat"} swc_ecma_transforms_compat = {version = "0.10.0", path = "../compat"}
swc_ecma_transforms_module = {version = "0.9.0", path = "../module"} swc_ecma_transforms_module = {version = "0.10.0", path = "../module"}
swc_ecma_transforms_proposal = {version = "0.9.0", path = "../proposal"} swc_ecma_transforms_proposal = {version = "0.10.0", path = "../proposal"}
swc_ecma_transforms_react = {version = "0.10.0", path = "../react"} swc_ecma_transforms_react = {version = "0.11.0", path = "../react"}
swc_ecma_transforms_testing = {version = "0.8.0", path = "../testing"} swc_ecma_transforms_testing = {version = "0.9.0", path = "../testing"}
swc_ecma_transforms_typescript = {version = "0.10.0", path = "../typescript"} swc_ecma_transforms_typescript = {version = "0.11.0", path = "../typescript"}
testing = {version = "0.10.0", path = "../../../testing"} testing = {version = "0.10.0", path = "../../../testing"}

View File

@ -1281,7 +1281,10 @@ fn ignore_result(e: Expr) -> Option<Expr> {
} }
Expr::TaggedTpl(TaggedTpl { Expr::TaggedTpl(TaggedTpl {
span, tag, exprs, .. span,
tag,
tpl: Tpl { exprs, .. },
..
}) if tag.is_pure_callee() => { }) if tag.is_pure_callee() => {
ignore_result(preserve_effects(span, *undefined(span), exprs)) ignore_result(preserve_effects(span, *undefined(span), exprs))
} }

View File

@ -811,7 +811,7 @@ impl VisitMut for Dce<'_> {
normal!(visit_mut_rest_pat, RestPat, arg); normal!(visit_mut_rest_pat, RestPat, arg);
normal!(visit_mut_seq_expr, SeqExpr, [], [exprs]); normal!(visit_mut_seq_expr, SeqExpr, [], [exprs]);
normal!(visit_mut_setter_prop, SetterProp, key, param, body); normal!(visit_mut_setter_prop, SetterProp, key, param, body);
normal!(visit_mut_tagged_tpl, TaggedTpl, [tag], [exprs]); normal!(visit_mut_tagged_tpl, TaggedTpl, tag, tpl);
normal!(visit_mut_tpl, Tpl, [], [exprs]); normal!(visit_mut_tpl, Tpl, [], [exprs]);
normal!(visit_mut_yield_expr, YieldExpr, arg); normal!(visit_mut_yield_expr, YieldExpr, arg);
} }

View File

@ -6,7 +6,7 @@ edition = "2018"
license = "Apache-2.0/MIT" license = "Apache-2.0/MIT"
name = "swc_ecma_transforms_proposal" name = "swc_ecma_transforms_proposal"
repository = "https://github.com/swc-project/swc.git" repository = "https://github.com/swc-project/swc.git"
version = "0.9.0" version = "0.10.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@ -21,14 +21,14 @@ serde = {version = "1.0.118", features = ["derive"]}
smallvec = "1.6.0" smallvec = "1.6.0"
swc_atoms = {version = "0.2", path = "../../../atoms"} swc_atoms = {version = "0.2", path = "../../../atoms"}
swc_common = {version = "0.10.10", path = "../../../common"} swc_common = {version = "0.10.10", path = "../../../common"}
swc_ecma_ast = {version = "0.40.0", path = "../../ast"} swc_ecma_ast = {version = "0.41.0", path = "../../ast"}
swc_ecma_loader = {version = "0.1.0", path = "../../loader", optional = true} swc_ecma_loader = {version = "0.2.0", path = "../../loader", optional = true}
swc_ecma_parser = {version = "0.50.0", path = "../../parser"} swc_ecma_parser = {version = "0.51.0", path = "../../parser"}
swc_ecma_transforms_base = {version = "0.8.0", path = "../base"} swc_ecma_transforms_base = {version = "0.9.0", path = "../base"}
swc_ecma_utils = {version = "0.31.0", path = "../../utils"} swc_ecma_utils = {version = "0.32.0", path = "../../utils"}
swc_ecma_visit = {version = "0.26.0", path = "../../visit"} swc_ecma_visit = {version = "0.27.0", path = "../../visit"}
[dev-dependencies] [dev-dependencies]
swc_ecma_transforms_compat = {version = "0.9.0", path = "../compat"} swc_ecma_transforms_compat = {version = "0.10.0", path = "../compat"}
swc_ecma_transforms_module = {version = "0.9.0", path = "../module"} swc_ecma_transforms_module = {version = "0.10.0", path = "../module"}
swc_ecma_transforms_testing = {version = "0.8.0", path = "../testing"} swc_ecma_transforms_testing = {version = "0.9.0", path = "../testing"}

View File

@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"]
license = "Apache-2.0/MIT" license = "Apache-2.0/MIT"
name = "swc_ecma_transforms_react" name = "swc_ecma_transforms_react"
repository = "https://github.com/swc-project/swc.git" repository = "https://github.com/swc-project/swc.git"
version = "0.10.0" version = "0.11.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
@ -18,14 +18,14 @@ serde = {version = "1.0.118", features = ["derive"]}
string_enum = {version = "0.3.1", path = "../../../macros/string_enum"} string_enum = {version = "0.3.1", path = "../../../macros/string_enum"}
swc_atoms = {version = "0.2", path = "../../../atoms"} swc_atoms = {version = "0.2", path = "../../../atoms"}
swc_common = {version = "0.10.10", path = "../../../common"} swc_common = {version = "0.10.10", path = "../../../common"}
swc_ecma_ast = {version = "0.40.0", path = "../../ast"} swc_ecma_ast = {version = "0.41.0", path = "../../ast"}
swc_ecma_parser = {version = "0.50.0", path = "../../parser"} swc_ecma_parser = {version = "0.51.0", path = "../../parser"}
swc_ecma_transforms_base = {version = "0.8.0", path = "../base"} swc_ecma_transforms_base = {version = "0.9.0", path = "../base"}
swc_ecma_utils = {version = "0.31.0", path = "../../utils"} swc_ecma_utils = {version = "0.32.0", path = "../../utils"}
swc_ecma_visit = {version = "0.26.0", path = "../../visit"} swc_ecma_visit = {version = "0.27.0", path = "../../visit"}
[dev-dependencies] [dev-dependencies]
swc_ecma_transforms_compat = {version = "0.9.0", path = "../compat/"} swc_ecma_transforms_compat = {version = "0.10.0", path = "../compat/"}
swc_ecma_transforms_module = {version = "0.9.0", path = "../module"} swc_ecma_transforms_module = {version = "0.10.0", path = "../module"}
swc_ecma_transforms_testing = {version = "0.8.0", path = "../testing/"} swc_ecma_transforms_testing = {version = "0.9.0", path = "../testing/"}
testing = {version = "0.10.3", path = "../../../testing"} testing = {version = "0.10.3", path = "../../../testing"}

View File

@ -6,7 +6,7 @@ edition = "2018"
license = "Apache-2.0/MIT" license = "Apache-2.0/MIT"
name = "swc_ecma_transforms_testing" name = "swc_ecma_transforms_testing"
repository = "https://github.com/swc-project/swc.git" repository = "https://github.com/swc-project/swc.git"
version = "0.8.0" version = "0.9.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@ -15,11 +15,11 @@ ansi_term = "0.12.1"
serde = "1" serde = "1"
serde_json = "1" serde_json = "1"
swc_common = {version = "0.10.10", path = "../../../common"} swc_common = {version = "0.10.10", path = "../../../common"}
swc_ecma_ast = {version = "0.40.0", path = "../../ast"} swc_ecma_ast = {version = "0.41.0", path = "../../ast"}
swc_ecma_codegen = {version = "0.48.0", path = "../../codegen"} swc_ecma_codegen = {version = "0.49.0", path = "../../codegen"}
swc_ecma_parser = {version = "0.50.0", path = "../../parser"} swc_ecma_parser = {version = "0.51.0", path = "../../parser"}
swc_ecma_transforms_base = {version = "0.8.0", path = "../base"} swc_ecma_transforms_base = {version = "0.9.0", path = "../base"}
swc_ecma_utils = {version = "0.31.0", path = "../../utils"} swc_ecma_utils = {version = "0.32.0", path = "../../utils"}
swc_ecma_visit = {version = "0.26.0", path = "../../visit"} swc_ecma_visit = {version = "0.27.0", path = "../../visit"}
tempfile = "3.1.0" tempfile = "3.1.0"
testing = {version = "0.10.3", path = "../../../testing"} testing = {version = "0.10.3", path = "../../../testing"}

View File

@ -6,7 +6,7 @@ edition = "2018"
license = "Apache-2.0/MIT" license = "Apache-2.0/MIT"
name = "swc_ecma_transforms_typescript" name = "swc_ecma_transforms_typescript"
repository = "https://github.com/swc-project/swc.git" repository = "https://github.com/swc-project/swc.git"
version = "0.10.0" version = "0.11.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
@ -14,17 +14,17 @@ fxhash = "0.2.1"
serde = {version = "1.0.118", features = ["derive"]} serde = {version = "1.0.118", features = ["derive"]}
swc_atoms = {version = "0.2", path = "../../../atoms"} swc_atoms = {version = "0.2", path = "../../../atoms"}
swc_common = {version = "0.10.10", path = "../../../common"} swc_common = {version = "0.10.10", path = "../../../common"}
swc_ecma_ast = {version = "0.40.0", path = "../../ast"} swc_ecma_ast = {version = "0.41.0", path = "../../ast"}
swc_ecma_parser = {version = "0.50.0", path = "../../parser"} swc_ecma_parser = {version = "0.51.0", path = "../../parser"}
swc_ecma_transforms_base = {version = "0.8.0", path = "../base"} swc_ecma_transforms_base = {version = "0.9.0", path = "../base"}
swc_ecma_utils = {version = "0.31.0", path = "../../utils"} swc_ecma_utils = {version = "0.32.0", path = "../../utils"}
swc_ecma_visit = {version = "0.26.0", path = "../../visit"} swc_ecma_visit = {version = "0.27.0", path = "../../visit"}
[dev-dependencies] [dev-dependencies]
swc_ecma_codegen = {version = "0.48.0", path = "../../codegen"} swc_ecma_codegen = {version = "0.49.0", path = "../../codegen"}
swc_ecma_transforms_compat = {version = "0.9.0", path = "../compat"} swc_ecma_transforms_compat = {version = "0.10.0", path = "../compat"}
swc_ecma_transforms_module = {version = "0.9.0", path = "../module"} swc_ecma_transforms_module = {version = "0.10.0", path = "../module"}
swc_ecma_transforms_proposal = {version = "0.9.0", path = "../proposal/"} swc_ecma_transforms_proposal = {version = "0.10.0", path = "../proposal/"}
swc_ecma_transforms_testing = {version = "0.8.0", path = "../testing"} swc_ecma_transforms_testing = {version = "0.9.0", path = "../testing"}
testing = {version = "0.10.3", path = "../../../testing"} testing = {version = "0.10.3", path = "../../../testing"}
walkdir = "2.3.1" walkdir = "2.3.1"

View File

@ -6,7 +6,7 @@ edition = "2018"
license = "Apache-2.0/MIT" license = "Apache-2.0/MIT"
name = "swc_ecma_utils" name = "swc_ecma_utils"
repository = "https://github.com/swc-project/swc.git" repository = "https://github.com/swc-project/swc.git"
version = "0.31.0" version = "0.32.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@ -15,8 +15,8 @@ once_cell = "1"
scoped-tls = "1" scoped-tls = "1"
swc_atoms = {version = "0.2.0", path = "../../atoms"} swc_atoms = {version = "0.2.0", path = "../../atoms"}
swc_common = {version = "0.10.10", path = "../../common"} swc_common = {version = "0.10.10", path = "../../common"}
swc_ecma_ast = {version = "0.40.0", path = "../ast"} swc_ecma_ast = {version = "0.41.0", path = "../ast"}
swc_ecma_visit = {version = "0.26.0", path = "../visit"} swc_ecma_visit = {version = "0.27.0", path = "../visit"}
unicode-xid = "0.2" unicode-xid = "0.2"
[dev-dependencies] [dev-dependencies]

View File

@ -6,11 +6,11 @@ edition = "2018"
license = "Apache-2.0/MIT" license = "Apache-2.0/MIT"
name = "swc_ecma_visit" name = "swc_ecma_visit"
repository = "https://github.com/swc-project/swc.git" repository = "https://github.com/swc-project/swc.git"
version = "0.26.0" version = "0.27.0"
[dependencies] [dependencies]
num-bigint = {version = "0.2", features = ["serde"]} num-bigint = {version = "0.2", features = ["serde"]}
swc_atoms = {version = "0.2", path = "../../atoms"} swc_atoms = {version = "0.2", path = "../../atoms"}
swc_common = {version = "0.10.10", path = "../../common"} swc_common = {version = "0.10.10", path = "../../common"}
swc_ecma_ast = {version = "0.40.0", path = "../ast"} swc_ecma_ast = {version = "0.41.0", path = "../ast"}
swc_visit = {version = "0.2.3", path = "../../visit"} swc_visit = {version = "0.2.3", path = "../../visit"}

View File

@ -683,9 +683,8 @@ define!({
pub struct TaggedTpl { pub struct TaggedTpl {
pub span: Span, pub span: Span,
pub tag: Box<Expr>, pub tag: Box<Expr>,
pub exprs: Vec<Box<Expr>>,
pub quasis: Vec<TplElement>,
pub type_params: Option<TsTypeParamInstantiation>, pub type_params: Option<TsTypeParamInstantiation>,
pub tpl: Tpl,
} }
pub struct TplElement { pub struct TplElement {
pub span: Span, pub span: Span,