Fix span of the ExportNamespaceSpecifer (#651)

This commit is contained in:
David Sherret 2020-02-10 21:02:37 -05:00 committed by GitHub
parent 8fb7c516d7
commit 1bf81c6e85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -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,
}));
}

View File

@ -17,7 +17,7 @@
{
"type": "ExportNamespaceSpecifer",
"span": {
"start": 0,
"start": 7,
"end": 14,
"ctxt": 0
},