-
-
Notifications
You must be signed in to change notification settings - Fork 833
Closed
Labels
A-ast-toolsArea - AST toolsArea - AST toolsC-enhancementCategory - New feature or requestCategory - New feature or request
Description
oxc_ast_tools recognises #[scope(enter_before)] to mark a field as the start of the scope in a type. We also need #[scope(exit_before)] for #6270.
Note: I think #[scope(exit_before)] is better than #[scope(exit_after)] because attributes go before fields, so it reads more clearly:
pub struct TSConditionalType<'a> {
pub span: Span,
pub check_type: TSType<'a>,
#[scope(enter_before)]
pub extends_type: TSType<'a>,
pub true_type: TSType<'a>,
#[scope(exit_before)]
pub false_type: TSType<'a>,
pub scope_id: Cell<Option<ScopeId>>,
}We will need to build support for this into both:
oxc_ast_toolsand theVisit/VisitMutgenerator.oxc_traverse's codegen.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-ast-toolsArea - AST toolsArea - AST toolsC-enhancementCategory - New feature or requestCategory - New feature or request