mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
parent
cb2fa4924e
commit
2477330440
7 changed files with 13 additions and 6 deletions
|
|
@ -381,6 +381,7 @@ impl<'a> AstKind<'a> {
|
|||
Self::TSMappedType(_) => "TSMappedType".into(),
|
||||
Self::TSConstructSignatureDeclaration(_) => "TSConstructSignatureDeclaration".into(),
|
||||
Self::TSModuleReference(_) => "TSModuleReference".into(),
|
||||
Self::TSExportAssignment(_) => "TSExportAssignment".into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -159,6 +159,7 @@ pub enum AstType {
|
|||
TSExternalModuleReference,
|
||||
TSNonNullExpression,
|
||||
Decorator,
|
||||
TSExportAssignment,
|
||||
TSInstantiationExpression,
|
||||
JSXElement,
|
||||
JSXOpeningElement,
|
||||
|
|
@ -332,6 +333,7 @@ pub enum AstKind<'a> {
|
|||
TSExternalModuleReference(&'a TSExternalModuleReference<'a>),
|
||||
TSNonNullExpression(&'a TSNonNullExpression<'a>),
|
||||
Decorator(&'a Decorator<'a>),
|
||||
TSExportAssignment(&'a TSExportAssignment<'a>),
|
||||
TSInstantiationExpression(&'a TSInstantiationExpression<'a>),
|
||||
JSXElement(&'a JSXElement<'a>),
|
||||
JSXOpeningElement(&'a JSXOpeningElement<'a>),
|
||||
|
|
@ -506,6 +508,7 @@ impl<'a> GetSpan for AstKind<'a> {
|
|||
Self::TSExternalModuleReference(it) => it.span(),
|
||||
Self::TSNonNullExpression(it) => it.span(),
|
||||
Self::Decorator(it) => it.span(),
|
||||
Self::TSExportAssignment(it) => it.span(),
|
||||
Self::TSInstantiationExpression(it) => it.span(),
|
||||
Self::JSXElement(it) => it.span(),
|
||||
Self::JSXOpeningElement(it) => it.span(),
|
||||
|
|
|
|||
|
|
@ -4207,8 +4207,10 @@ pub mod walk {
|
|||
visitor: &mut V,
|
||||
it: &TSExportAssignment<'a>,
|
||||
) {
|
||||
// NOTE: AstKind doesn't exists!
|
||||
let kind = AstKind::TSExportAssignment(visitor.alloc(it));
|
||||
visitor.enter_node(kind);
|
||||
visitor.visit_expression(&it.expression);
|
||||
visitor.leave_node(kind);
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
|
|||
|
|
@ -4452,8 +4452,10 @@ pub mod walk_mut {
|
|||
visitor: &mut V,
|
||||
it: &mut TSExportAssignment<'a>,
|
||||
) {
|
||||
// NOTE: AstType doesn't exists!
|
||||
let kind = AstType::TSExportAssignment;
|
||||
visitor.enter_node(kind);
|
||||
visitor.visit_expression(&mut it.expression);
|
||||
visitor.leave_node(kind);
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/export/equals1.
|
|||
"flag": "ReferenceFlag(Read)",
|
||||
"id": 0,
|
||||
"name": "x",
|
||||
"node_id": 6
|
||||
"node_id": 7
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/export/equals4-
|
|||
"flag": "ReferenceFlag(Type)",
|
||||
"id": 0,
|
||||
"name": "T",
|
||||
"node_id": 10
|
||||
"node_id": 11
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ use super::generated_header;
|
|||
|
||||
pub struct AstKindGenerator;
|
||||
|
||||
pub const BLACK_LIST: [&str; 62] = [
|
||||
pub const BLACK_LIST: [&str; 61] = [
|
||||
"Expression",
|
||||
"ObjectPropertyKind",
|
||||
"TemplateElement",
|
||||
|
|
@ -62,7 +62,6 @@ pub const BLACK_LIST: [&str; 62] = [
|
|||
"TSImportAttributeName",
|
||||
"TSFunctionType",
|
||||
"TSConstructorType",
|
||||
"TSExportAssignment",
|
||||
"TSNamespaceExportDeclaration",
|
||||
"JSDocNullableType",
|
||||
"JSDocNonNullableType",
|
||||
|
|
|
|||
Loading…
Reference in a new issue