Implement GetSpan for ImportDeclarationSpecifier (#483)

This commit is contained in:
u9g 2023-06-27 05:33:08 -04:00 committed by GitHub
parent defba1567e
commit 4d1863a954
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -326,3 +326,13 @@ impl<'a> GetSpan for ExportDefaultDeclarationKind<'a> {
}
}
}
impl GetSpan for ImportDeclarationSpecifier {
fn span(&self) -> Span {
match self {
Self::ImportSpecifier(specifier) => specifier.span,
Self::ImportDefaultSpecifier(specifier) => specifier.span,
Self::ImportNamespaceSpecifier(specifier) => specifier.span,
}
}
}