Skip to content

Conversation

@zharinov
Copy link
Member

@zharinov zharinov commented Jan 6, 2026

Summary

  • Tree-sitter style ((a) (b)) now parses as Seq node instead of wildcard Tree with children
  • Fixes ((x)) being interpreted as "any node containing x as child" instead of "sequence containing x"
  • Adds regression tests for tree-sitter sequence parsing

Why

Pattern ((expression_statement) @s)* @outer was returning empty results because ((x)) was parsed as a wildcard node match + descend, rather than a single-item sequence. This broke tree-sitter compatibility for users migrating queries.

@zharinov zharinov enabled auto-merge (squash) January 6, 2026 00:49
@zharinov zharinov merged commit e32b509 into master Jan 6, 2026
4 checks passed
@zharinov zharinov deleted the fix/treesitter-sequence-parsing branch January 6, 2026 00:49
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