Implement GetSpan for JSXExpression

This commit is contained in:
u9g 2023-07-06 00:27:57 -04:00 committed by GitHub
parent be13f980bb
commit 974dfa027f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -366,3 +366,12 @@ impl<'a> GetSpan for JSXAttributeItem<'a> {
}
}
}
impl<'a> GetSpan for JSXExpression<'a> {
fn span(&self) -> Span {
match &self {
JSXExpression::Expression(expr) => expr.span(),
JSXExpression::EmptyExpression(exmpty_expr) => exmpty_expr.span,
}
}
}