emacs-tree-sitter / elisp-tree-sitter

Emacs Lisp bindings for tree-sitter
https://emacs-tree-sitter.github.io
MIT License
815 stars 73 forks source link

Repetitions and Predicate Problems #269

Open avlec opened 4 months ago

avlec commented 4 months ago

Building queries like the following example which is for C++. Where the storage_class_specifier has zero or one (?) OR zero or more (*) matches throws a rust panic. Error: (rust-panic "Any { .. }") Note that one or more (+) works. I have only tested it for this case where there will be either one or none.

(
    (declaration (storage_class_specifier)? @storage) @test
    (.not-eq? @storage "")
)