Skip to content

Conversation

@zharinov
Copy link
Member

@zharinov zharinov commented Jan 5, 2026

Summary

  • (_) wildcard was matching anonymous nodes (like "return" keyword) when it should only match named nodes
  • Added NAMED_WILDCARD sentinel value (0xFFFF) to distinguish (_) from _ in bytecode
  • VM now checks is_named() when matching (_)

Why

The docs specify (_) matches "any named node" while _ matches "any node (named or anonymous)". The implementation was treating both as identical wildcards.

@zharinov zharinov enabled auto-merge (squash) January 5, 2026 18:45
@zharinov zharinov merged commit 777ab6f into master Jan 5, 2026
4 checks passed
@zharinov zharinov deleted the fix/named-wildcard branch January 5, 2026 18:46
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.

2 participants