Skip to content

Commit

Permalink
feat(ast): add AstKind::TSExprotAssignment
Browse files Browse the repository at this point in the history
  • Loading branch information
Dunqing committed Jul 27, 2024
1 parent 78110a0 commit d6fd06c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions crates/oxc_ast/src/ast_kind_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ impl<'a> AstKind<'a> {
Self::TSMappedType(_) => "TSMappedType".into(),
Self::TSConstructSignatureDeclaration(_) => "TSConstructSignatureDeclaration".into(),
Self::TSModuleReference(_) => "TSModuleReference".into(),
Self::TSExportAssignment(_) => "TSExportAssignment".into(),
}
}
}
3 changes: 3 additions & 0 deletions crates/oxc_ast/src/generated/ast_kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ pub enum AstType {
TSExternalModuleReference,
TSNonNullExpression,
Decorator,
TSExportAssignment,
TSInstantiationExpression,
JSXElement,
JSXOpeningElement,
Expand Down Expand Up @@ -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>),
Expand Down Expand Up @@ -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(),
Expand Down
4 changes: 3 additions & 1 deletion crates/oxc_ast/src/generated/visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 3 additions & 1 deletion crates/oxc_ast/src/generated/visit_mut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
3 changes: 1 addition & 2 deletions tasks/ast_codegen/src/generators/ast_kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -62,7 +62,6 @@ pub const BLACK_LIST: [&str; 62] = [
"TSImportAttributeName",
"TSFunctionType",
"TSConstructorType",
"TSExportAssignment",
"TSNamespaceExportDeclaration",
"JSDocNullableType",
"JSDocNonNullableType",
Expand Down

0 comments on commit d6fd06c

Please sign in to comment.