Skip to content

Conversation

@zharinov
Copy link
Member

Summary

  • Add 7 predicate operators for node text filtering: ==, !=, ^=, $=, *=, =~, !~
  • Compile regex predicates to sparse DFAs via regex-automata
  • Validate regex patterns for unsupported features (backreferences, lookaround, named captures)

Why

Predicates enable filtering nodes by their text content, a key feature for precise code queries. String predicates handle common cases efficiently, while regex predicates provide full Unicode pattern matching.

Syntax

(identifier == "foo")           ; equals
(identifier ^= "get")           ; starts with
(identifier =~ /^test_/)        ; regex match

@zharinov zharinov force-pushed the feat/predicates branch 2 times, most recently from 441b97c to 9293a70 Compare January 15, 2026 02:51
@zharinov zharinov merged commit 6c1c3fb into master Jan 15, 2026
3 checks passed
@zharinov zharinov deleted the feat/predicates branch January 15, 2026 03:16
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