Skip to content

fix: Preserve named and anonymous node type identity#408

Merged
zharinov merged 1 commit into
masterfrom
fix-node-type-identity-collisions
Jun 10, 2026
Merged

fix: Preserve named and anonymous node type identity#408
zharinov merged 1 commit into
masterfrom
fix-node-type-identity-collisions

Conversation

@zharinov

Copy link
Copy Markdown
Member

Summary

  • Preserve named vs anonymous node type identity through linking, compilation, and grammar constraints
  • Resolve node ids with node-type-aware keys instead of string-only lookup
  • Add regression coverage for same-spelling named and anonymous node kinds

Why

Tree-sitter grammars can expose named and anonymous nodes with the same spelling. Collapsing them to a string key makes resolution order-dependent and can link or execute the wrong node kind.

Notes

The VM exact-match path now checks namedness in addition to kind id.

@zharinov zharinov changed the title Preserve named and anonymous node type identity fix: Preserve named and anonymous node type identity Jun 10, 2026
@zharinov
zharinov merged commit ad7653d into master Jun 10, 2026
4 of 5 checks passed
@zharinov
zharinov deleted the fix-node-type-identity-collisions branch June 10, 2026 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant