Querying assembly sibling nodes #3187
Unanswered
WillLillis
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! I'm having trouble writing a query for a new feature in asm-lsp. I'd like to be able to capture every piece of "data" underneath a given label. For example, with
I would like to capture
some_label:
along with.long 1, 2, 3
. Using the tree-sitter-asm grammar,some_label:
could be captured as alabel
node, and.long 1, 2, 3
could be captured using the query(meta (int)+)
. I've been running into issues capturing multiple data nodes under a label reliably, while also avoiding data nodes captures crossing over labels as well. To give a slightly longer example, I tried the following codewith this query:
This yields the following captures, missing the
.asciz "hello", " ", "world!"
:Any help would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions