mirror of
https://github.com/swc-project/swc.git
synced 2024-11-28 02:29:04 +03:00
Fix tagged template start to include tag (#714)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
This commit is contained in:
parent
6f4e534c88
commit
2f47d41f2b
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "swc_ecma_parser"
|
name = "swc_ecma_parser"
|
||||||
version = "0.21.1"
|
version = "0.21.2"
|
||||||
authors = ["강동윤 <kdy1997.dev@gmail.com>"]
|
authors = ["강동윤 <kdy1997.dev@gmail.com>"]
|
||||||
license = "Apache-2.0/MIT"
|
license = "Apache-2.0/MIT"
|
||||||
repository = "https://github.com/swc-project/swc.git"
|
repository = "https://github.com/swc-project/swc.git"
|
||||||
|
@ -776,9 +776,8 @@ impl<'a, I: Tokens> Parser<'a, I> {
|
|||||||
tag: Box<Expr>,
|
tag: Box<Expr>,
|
||||||
type_params: Option<TsTypeParamInstantiation>,
|
type_params: Option<TsTypeParamInstantiation>,
|
||||||
) -> PResult<'a, TaggedTpl> {
|
) -> PResult<'a, TaggedTpl> {
|
||||||
let start = tag.span().lo();
|
let tagged_tpl_start = tag.span().lo();
|
||||||
trace_cur!(parse_tagged_tpl);
|
trace_cur!(parse_tagged_tpl);
|
||||||
let start = cur_pos!();
|
|
||||||
|
|
||||||
assert_and_bump!('`');
|
assert_and_bump!('`');
|
||||||
|
|
||||||
@ -786,7 +785,7 @@ impl<'a, I: Tokens> Parser<'a, I> {
|
|||||||
|
|
||||||
expect!('`');
|
expect!('`');
|
||||||
|
|
||||||
let span = span!(start);
|
let span = span!(tagged_tpl_start);
|
||||||
Ok(TaggedTpl {
|
Ok(TaggedTpl {
|
||||||
span,
|
span,
|
||||||
tag,
|
tag,
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
"callee": {
|
"callee": {
|
||||||
"type": "TaggedTemplateExpression",
|
"type": "TaggedTemplateExpression",
|
||||||
"span": {
|
"span": {
|
||||||
"start": 9,
|
"start": 4,
|
||||||
"end": 11,
|
"end": 11,
|
||||||
"ctxt": 0
|
"ctxt": 0
|
||||||
},
|
},
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
"expression": {
|
"expression": {
|
||||||
"type": "TaggedTemplateExpression",
|
"type": "TaggedTemplateExpression",
|
||||||
"span": {
|
"span": {
|
||||||
"start": 4,
|
"start": 0,
|
||||||
"end": 6,
|
"end": 6,
|
||||||
"ctxt": 0
|
"ctxt": 0
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user