You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like the named nodes within the options field of bit_string_segment to be a little more generic so I can capture them in a highlight query and give them a special highlight. Something like
; captures unit, "size", "utf8", "int", etc.
(bit_string_segment_option) @function.builtin
I waffled on this for a bit, but I think this change is fine. As you mentioned, since the queries capture the text of the node I don't think we're actually losing information here, just storing it differently. So long as the options can be determined one way or another, it's fine 👍 Besides, the new AST looks much cleaner 😅
With some code like so
which gives
I'd like the named nodes within the
options
field ofbit_string_segment
to be a little more generic so I can capture them in a highlight query and give them a special highlight. Something like; captures unit, "size", "utf8", "int", etc. (bit_string_segment_option) @function.builtin
so it might be parsed like so instead:
The nodes come out to be less specific than they are currently, but I think that's ok because you could do something like:
((bit_string_segment_option) @utf8 (#eq? @utf8 "utf8"))
What do you think, would you be open to a PR that makes a refactor like this?
The text was updated successfully, but these errors were encountered: