Need help understanding predicate usage #373
-
Hello, I have the following query (I am working with SystemVerilog)
Note the #eq predicate - trying to ONLY return the node that matches "i_my_module". Then I return the list of captures:
when I run my script, however, I get a list of ALL the simple_identifier nodes, not just the one node with 'i_my_module'. I am very new to using tree-sitter so help and patience is very appreciated. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
((simple_identifier) @id (#eq? @id "i_my_module")) |
Beta Was this translation helpful? Give feedback.
-
@ObserverOfTime - my goodness. I have been struggling for an hour. Stupid LISP!! Appreciate your help! |
Beta Was this translation helpful? Give feedback.
((simple_identifier) @id (#eq? @id "i_my_module"))