-
-
Notifications
You must be signed in to change notification settings - Fork 932
Closed
Labels
A-astArea - ASTArea - ASTC-cleanupCategory - technical debt or refactoring. Solution not expected to change behaviorCategory - technical debt or refactoring. Solution not expected to change behavior
Description
Currently:
#[visited_node]
pub enum Expression<'a> {
#[visit_args(flags = ScopeFlags::Function)]
FunctionExpression(Box<'a, Function<'a>>),
/* ... */
}
#[visited_node]
pub struct TryStatement<'a> {
/* ... */
#[visit_as(FinallyClause)]
pub finalizer: Option<Box<'a, BlockStatement<'a>>>,
}Could we reduce the number of "special" attrs by changing visit_args(...) / visit_as(...) to visit(args(...)) / visit(as(...))?
#[visited_node]
pub enum Expression<'a> {
#[visit(args(flags = ScopeFlags::Function))]
FunctionExpression(Box<'a, Function<'a>>),
/* ... */
}
#[visited_node]
pub struct TryStatement<'a> {
/* ... */
#[visit(as(FinallyClause))]
pub finalizer: Option<Box<'a, BlockStatement<'a>>>,
}@rzvxa What do you think? Not a big deal, but I think it'd be neater. I suspect we may end up adding more attrs later on (it may be useful, for instance, to tag all TS-only fields #[typescript]) and it could get out of hand.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-astArea - ASTArea - ASTC-cleanupCategory - technical debt or refactoring. Solution not expected to change behaviorCategory - technical debt or refactoring. Solution not expected to change behavior
Type
Fields
Give feedbackPriority
None yet