mirror of
https://github.com/swc-project/swc.git
synced 2024-12-25 06:36:08 +03:00
Fix span of the ExportNamespaceSpecifer (#651)
This commit is contained in:
parent
8fb7c516d7
commit
1bf81c6e85
@ -224,6 +224,7 @@ impl<'a, I: Tokens> Parser<'a, I> {
|
||||
|
||||
let mut has_star = false;
|
||||
let mut export_ns = None;
|
||||
let ns_export_specifier_start = cur_pos!();
|
||||
|
||||
if eat!('*') {
|
||||
has_star = true;
|
||||
@ -242,7 +243,7 @@ impl<'a, I: Tokens> Parser<'a, I> {
|
||||
|
||||
let name = self.parse_ident_name()?;
|
||||
export_ns = Some(ExportSpecifier::Namespace(NamespaceExportSpecifier {
|
||||
span: span!(start),
|
||||
span: span!(ns_export_specifier_start),
|
||||
name,
|
||||
}));
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
{
|
||||
"type": "ExportNamespaceSpecifer",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"start": 7,
|
||||
"end": 14,
|
||||
"ctxt": 0
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user