-
-
Notifications
You must be signed in to change notification settings - Fork 472
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
feat(ast, syntax, ast_tools): Introduce GetNodeId
trait.
#5776
base: 09-15-feat_ast_add_a_dummy_node_id_field_to_all_visitable_ast_types
Are you sure you want to change the base?
Conversation
Your org has enabled the Graphite merge queue for merging into mainAdd the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
CodSpeed Performance ReportMerging #5776 will not alter performanceComparing Summary
|
crates/oxc_syntax/src/node.rs
Outdated
@@ -7,6 +7,11 @@ use oxc_span::{cmp::ContentEq, hash::ContentHash}; | |||
#[cfg(feature = "serialize")] | |||
use serde::{Serialize, Serializer}; | |||
|
|||
pub trait GetNodeId { | |||
fn node_id(&self) -> NodeId; | |||
fn node_id_mut(&mut self) -> &mut NodeId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned in previous PR, I'm not sure we should make node_id
fields mutable, so I'd suggest removing this method.
Also, possibly we want to implement GetNodeId
on AstKind
, which won't be possible if GetNodeId::node_id_mut
exists.
ccc4a6a
to
97285a5
Compare
Part of #5689