File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 305
305
; Functions
306
306
; -------
307
307
308
+ ; highlight `baz` in `any_function(foo: :bar: :baz)` as function
309
+ ; This generically works for an unlimited number of path segments:
310
+ ;
311
+ ; - `f(foo: :bar)`
312
+ ; - `f(foo: :bar: :baz)`
313
+ ; - `f(foo: :bar: :baz: :quux)`
314
+ ;
315
+ ; We know that in the above examples, the last component of each path is a function
316
+ ; as the only other valid thing (following Rust naming conventions) would be a module at
317
+ ; that position, however you cannot pass modules as arguments
318
+ (call_expression
319
+ function: _
320
+ arguments: (arguments
321
+ (scoped_identifier
322
+ path: _
323
+ name: (identifier) @function )))
324
+
308
325
(call_expression
309
326
function: [
310
327
((identifier) @function )
You can’t perform that action at this time.
0 commit comments