mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 20:32:10 +00:00
refactor(ast): remove inherit_variants! from TSEnumMemberName (#7248)
#7219 removed all variants of `TSEnumMemberName` except `IdentifierName` and `StringLiteral`. It no longer inherits variants from `Expression`, so we can remove the `inherit_variants!` macro wrapper. The discriminants no longer need to avoid clashes with `Expression`'s, so they can start at 0.
This commit is contained in:
parent
62b6327879
commit
d3d58f8ace
1 changed files with 2 additions and 9 deletions
|
|
@ -102,20 +102,13 @@ pub struct TSEnumMember<'a> {
|
||||||
pub initializer: Option<Expression<'a>>,
|
pub initializer: Option<Expression<'a>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
inherit_variants! {
|
|
||||||
/// TS Enum Member Name
|
/// TS Enum Member Name
|
||||||
///
|
|
||||||
/// Used in [`TSEnumMember`]. Inherits variants from [`Expression`]. See [`ast` module docs] for
|
|
||||||
/// explanation of inheritance.
|
|
||||||
///
|
|
||||||
/// [`ast` module docs]: `super`
|
|
||||||
#[ast(visit)]
|
#[ast(visit)]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
#[generate_derive(CloneIn, GetSpan, GetSpanMut, ContentEq, ContentHash, ESTree)]
|
#[generate_derive(CloneIn, GetSpan, GetSpanMut, ContentEq, ContentHash, ESTree)]
|
||||||
pub enum TSEnumMemberName<'a> {
|
pub enum TSEnumMemberName<'a> {
|
||||||
StaticIdentifier(Box<'a, IdentifierName<'a>>) = 64,
|
StaticIdentifier(Box<'a, IdentifierName<'a>>) = 0,
|
||||||
StaticStringLiteral(Box<'a, StringLiteral<'a>>) = 65,
|
StaticStringLiteral(Box<'a, StringLiteral<'a>>) = 1,
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// TypeScript Type Annotation
|
/// TypeScript Type Annotation
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue