-
Notifications
You must be signed in to change notification settings - Fork 88
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
"Child in specific slot" selector? #72
Comments
Oh, turns out this is exactly what the "field" selector is supposed to do. I didn't understand that when I first tried because the subject indicator bug (#60) caused me to get the wrong nodes. I tried switching to jupenur's fork, and now everything seems to work as described. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I'm thinking about using esquery for matching some pretty deeply nested constructs. I need to differentiate between eg. the
object
andproperty
of aMemberExpression
, so I cannot use the child selector, as it will match a child in either position:I know that I drop into "attribute mode" and achieve what I need using a query like:
... but since the asts I need to match are much deeper than that, it would be really awkward to have to spell out the rest of the subtree like that with lots of repeated
[property.foo.bar=123][property.foo.quux=abc]
. It would be much nicer if I could use something like the>
selector to cover the nesting aspects.Am I overlooking a nice way to achieve that?
The text was updated successfully, but these errors were encountered: