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]
|
||||
name = "swc_ecma_parser"
|
||||
version = "0.21.1"
|
||||
version = "0.21.2"
|
||||
authors = ["강동윤 <kdy1997.dev@gmail.com>"]
|
||||
license = "Apache-2.0/MIT"
|
||||
repository = "https://github.com/swc-project/swc.git"
|
||||
|
@ -776,9 +776,8 @@ impl<'a, I: Tokens> Parser<'a, I> {
|
||||
tag: Box<Expr>,
|
||||
type_params: Option<TsTypeParamInstantiation>,
|
||||
) -> PResult<'a, TaggedTpl> {
|
||||
let start = tag.span().lo();
|
||||
let tagged_tpl_start = tag.span().lo();
|
||||
trace_cur!(parse_tagged_tpl);
|
||||
let start = cur_pos!();
|
||||
|
||||
assert_and_bump!('`');
|
||||
|
||||
@ -786,7 +785,7 @@ impl<'a, I: Tokens> Parser<'a, I> {
|
||||
|
||||
expect!('`');
|
||||
|
||||
let span = span!(start);
|
||||
let span = span!(tagged_tpl_start);
|
||||
Ok(TaggedTpl {
|
||||
span,
|
||||
tag,
|
||||
|
@ -23,7 +23,7 @@
|
||||
"callee": {
|
||||
"type": "TaggedTemplateExpression",
|
||||
"span": {
|
||||
"start": 9,
|
||||
"start": 4,
|
||||
"end": 11,
|
||||
"ctxt": 0
|
||||
},
|
||||
|
@ -16,7 +16,7 @@
|
||||
"expression": {
|
||||
"type": "TaggedTemplateExpression",
|
||||
"span": {
|
||||
"start": 4,
|
||||
"start": 0,
|
||||
"end": 6,
|
||||
"ctxt": 0
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user