Skip to content

Commit

Permalink
feat(rust): Add macro_invocation as a type of @call.outer. (#535)
Browse files Browse the repository at this point in the history
* feat(rust): Add `macro_invocation` as a type of `@call.outer`.

* feat: Add `@call.inner` as well.
  • Loading branch information
kylechui authored Dec 24, 2023
1 parent 4de2749 commit bb020f6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions queries/rust/textobjects.scm
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@
(unsafe_block (_)? @block.inner) @block.outer

;; calls
(macro_invocation) @call.outer
(macro_invocation (token_tree . "(" . (_) @_start (_)? @_end . ")"
(#make-range! "call.inner" @_start @_end)))
(call_expression) @call.outer
(call_expression
arguments: (arguments . "(" . (_) @_start (_)? @_end . ")"
Expand Down

0 comments on commit bb020f6

Please sign in to comment.