Skip to content
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): add a dummy node_id field to all visitable AST types. #5775

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update docs.
  • Loading branch information
rzvxa committed Sep 14, 2024
commit 00ce823767ee95ec84dd481577845f01d5877c3c
2 changes: 1 addition & 1 deletion tasks/ast_tools/src/generators/ast_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ fn generate_struct_builder_fn(ty: &StructDef, ctx: &LateCtx) -> TokenStream {
fn default_field(param: &Param) -> TokenStream {
debug_assert!(param.is_default);
let ident = &param.ident;
// HACK: remove this condition when `node_id`s are added manually
// HACK: remove this condition after making types `non_exhaustive`!
if param.ident == "node_id" {
quote!(#ident: NodeId::DUMMY)
} else {
Expand Down