-
-
Notifications
You must be signed in to change notification settings - Fork 471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TakeIn
trait to replace AstBuilder::move_*
methods
#5888
Comments
Actually, since purpose of So If we can avoid an allocation side effect for at least some |
As part of adding node IDs to AST types, we added If we implement our own
Or, if we don't make We can generate Probably we should only implement
|
Take
trait to replace AstBuilder::move_*
methodsTakeIn
trait to replace AstBuilder::move_*
methods
@Boshen May I self-assign this issue? |
I will speak for Boshen: Yes please! |
Currently
AstBuilder
hasmove_expression
,move_statement
,move_assignment_target
,move_declaration
andmove_vec
methods.Combine them into a single
AstBuilder::take
method with a newTake
trait:Usage:
NB: Reason why
Take::replacement
takes anAstBuilder<'a>
instead of an&'a Allocator
is to be forwards compatible with when all AST nodes need an ID andAstBuilder
is stateful.Related to oxc-project/backlog#101.
The text was updated successfully, but these errors were encountered: