Closed the-mikedavis closed 2 years ago
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 :+1: Besides, the new AST looks much cleaner :sweat_smile:
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 likeso 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:
What do you think, would you be open to a PR that makes a refactor like this?