-
Notifications
You must be signed in to change notification settings - Fork 0
Proposal for nesting query predicate operator #1
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -255,76 +255,16 @@ | |
;;! ^^^^^^ | ||
;;! xxxxxxx | ||
;;! ---------------- | ||
(apply_expression | ||
[ | ||
(apply_expression | ||
function: (variable_expression | ||
name: (identifier) @functionCallee | ||
) | ||
) | ||
(apply_expression | ||
[ | ||
(apply_expression | ||
function: (variable_expression | ||
name: (identifier) @functionCallee | ||
) | ||
) | ||
(apply_expression | ||
[ | ||
(apply_expression | ||
function: (variable_expression | ||
name: (identifier) @functionCallee | ||
) | ||
) | ||
(apply_expression | ||
(apply_expression | ||
function: (variable_expression | ||
name: (identifier) @functionCallee | ||
) | ||
) | ||
) | ||
] | ||
) | ||
] | ||
) | ||
] | ||
) @functionCall @_.domain | ||
( | ||
(apply_expression | ||
function: (_) @functionCallee | ||
) @functionCallee.domain @functionCall | ||
(#not-type? @functionCallee apply_expression) | ||
) | ||
|
||
;; Similar to above, but sometimes the function calls are in select_expression | ||
(apply_expression | ||
[ | ||
(select_expression | ||
expression: (variable_expression | ||
name: (identifier) | ||
) | ||
) @functionCallee | ||
(apply_expression | ||
[ | ||
(select_expression | ||
expression: (variable_expression | ||
name: (identifier) | ||
) | ||
) @functionCallee | ||
(apply_expression | ||
[ | ||
(select_expression | ||
expression: (variable_expression | ||
name: (identifier) | ||
) | ||
) @functionCallee | ||
(apply_expression | ||
(select_expression | ||
expression: (variable_expression | ||
name: (identifier) | ||
) | ||
) @functionCallee | ||
) | ||
] | ||
) | ||
] | ||
) | ||
] | ||
) @functionCall @_.domain | ||
function: (apply_expression) @functionCallee.domain.input @functionCall.input | ||
) @functionCallee.domain.output @functionCall.output | ||
Comment on lines
265
to
+267
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. then each step goes from an |
||
|
||
;; Args: | ||
;;!! mkHost a | ||
|
@@ -337,14 +277,12 @@ | |
;;! xxxxxx | ||
;;! -------- | ||
(apply_expression | ||
function: (variable_expression | ||
name: (identifier) @functionCallee | ||
) | ||
argument: (_) @argumentOrParameter | ||
) @functionCall @_.domain | ||
) | ||
|
||
(apply_expression | ||
argument: (_) @argumentOrParameter | ||
( | ||
(apply_expression) @argumentOrParameter.iteration | ||
(#not-parent-type? @argumentOrParameter.iteration apply_expression) | ||
) | ||
Comment on lines
+283
to
286
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @fidgetingbits this isn't entirely related, but note that we can simply define iteration scope for arg like this, and then "first arg" etc should just work |
||
|
||
;; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This matches the innermost function call, which is why we use the
not-type
here