We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This pattern:
language js `switch(a){ }`
matches only the second line:
switch(a){} // 1: no match switch(a){ } // 2: match switch(a){ } // 3: no match
Which is highly inconvenient when doing multi-line migrations as rules need to have precisely the same indentations as the code.
As I can see, this happen for node types that capture their descendants via "children" rather than "fields". E.g. it's an issue for switch_body:
"children"
"fields"
switch_body
gritql/resources/node-types/javascript-node-types.json
Lines 3157 to 3175 in 5af841f
But it's not an issue for, e.g., an array:
array
Lines 308 to 331 in 5af841f
In the meantime, what workaround/quick fixes available to run multi-line migrations? I need some guidance.
grammar.js
*-node-types.json
The text was updated successfully, but these errors were encountered:
The easiest solution is changing grammar.js but ideally we would fix spacing for children as well.
Sorry, something went wrong.
No branches or pull requests
Example
This pattern:
matches only the second line:
Which is highly inconvenient when doing multi-line migrations as rules need to have precisely the same indentations as the code.
Clue
As I can see, this happen for node types that capture their descendants via
"children"
rather than"fields"
. E.g. it's an issue forswitch_body
:gritql/resources/node-types/javascript-node-types.json
Lines 3157 to 3175 in 5af841f
But it's not an issue for, e.g., an
array
:gritql/resources/node-types/javascript-node-types.json
Lines 308 to 331 in 5af841f
Workaround?
In the meantime, what workaround/quick fixes available to run multi-line migrations? I need some guidance.
grammar.js
and*-node-types.json
to use"fields"
?"children"
?The text was updated successfully, but these errors were encountered: