New issue
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
[feature] support quantity/order rule #676
Comments
I want to try to implement this feature, but I'm unsure if it will be part of the |
Hi @alexzhang1030, thanks for your interest in ast-grep. I am not 100% sure of the quantity rule's behavior at the moment. If you wanna grab this issue. Would you like to first write a RFC in this issue? We can discuss the behavior of the rule. Once the behavior is well-defined, we can discuss about how to implement it. Thanks |
❓Problem Now
It is hard to find nodes without children or nodes appearing in specific positions.
For example, user may want to match the first/last argument of an argument list, or to find a node with more than three children (e.g. too many arguments or too many statements).
Though it is possible to use
precedes/follows
and recursivematches
to emulate node position rules, the procedure is definitely excruciating. (I can testify this as the author).⭐ Suggestion
Support one additional rule:
💻 Use Cases
Related issue #675
The text was updated successfully, but these errors were encountered: