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
how do I set the style of a s expression? E.g. I want to catch all the if statements, I use a query like this:(if_statement(condition_clause(_)) @condition_clause.inner) to get them. So lets say I matched on this line of code in c++
if (x==2) {doSomething}
--> (condition clause value (binary_expression left: (identifier) right: (number_literal)))
However, i'd rather like this style:
if (x==2) {doSomething}
--> (condition clause value (binary_expression "=="( (identifier) (number_literal)))
where we drop left/right and get more detail on the actual binary_expression, i.e. what kind of expression, etc. Can this be done without parsing the result again?
The text was updated successfully, but these errors were encountered:
Hey forum,
how do I set the style of a s expression? E.g. I want to catch all the if statements, I use a query like this:
(if_statement(condition_clause(_)) @condition_clause.inner)
to get them. So lets say I matched on this line of code in c++if (x==2) {doSomething}
--> (condition clause value (binary_expression left: (identifier) right: (number_literal)))
However, i'd rather like this style:
if (x==2) {doSomething}
--> (condition clause value (binary_expression "=="( (identifier) (number_literal)))
where we drop left/right and get more detail on the actual binary_expression, i.e. what kind of expression, etc. Can this be done without parsing the result again?
The text was updated successfully, but these errors were encountered: