mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
Implement GetSpan for JSXChild (#487)
This commit is contained in:
parent
0a76483907
commit
780e17707b
1 changed files with 12 additions and 0 deletions
|
|
@ -336,3 +336,15 @@ impl GetSpan for ImportDeclarationSpecifier {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> GetSpan for JSXChild<'a> {
|
||||
fn span(&self) -> Span {
|
||||
match self {
|
||||
Self::Element(element) => element.span,
|
||||
Self::ExpressionContainer(container) => container.span,
|
||||
Self::Text(text) => text.span,
|
||||
Self::Fragment(fragment) => fragment.span,
|
||||
Self::Spread(spread) => spread.span,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue