| 1 |
|
| 2 |
|
| 3 |
( |
| 4 |
(comment)* @doc |
| 5 |
. |
| 6 |
[ |
| 7 |
(method |
| 8 |
name: (_) @name) @definition.method |
| 9 |
(singleton_method |
| 10 |
name: (_) @name) @definition.method |
| 11 |
] |
| 12 |
(#strip! @doc "^#\\s*") |
| 13 |
(#select-adjacent! @doc @definition.method) |
| 14 |
) |
| 15 |
|
| 16 |
(alias |
| 17 |
name: (_) @name) @definition.method |
| 18 |
|
| 19 |
(setter |
| 20 |
(identifier) @_ignore) |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
( |
| 25 |
(comment)* @doc |
| 26 |
. |
| 27 |
[ |
| 28 |
(class |
| 29 |
name: [ |
| 30 |
(constant) @name |
| 31 |
(scope_resolution |
| 32 |
name: (_) @name) |
| 33 |
]) @definition.class |
| 34 |
(singleton_class |
| 35 |
value: [ |
| 36 |
(constant) @name |
| 37 |
(scope_resolution |
| 38 |
name: (_) @name) |
| 39 |
]) @definition.class |
| 40 |
] |
| 41 |
(#strip! @doc "^#\\s*") |
| 42 |
(#select-adjacent! @doc @definition.class) |
| 43 |
) |
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
( |
| 48 |
(module |
| 49 |
name: [ |
| 50 |
(constant) @name |
| 51 |
(scope_resolution |
| 52 |
name: (_) @name) |
| 53 |
]) @definition.module |
| 54 |
) |
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
(call method: (identifier) @name) @reference.call |
| 59 |
|
| 60 |
( |
| 61 |
[(identifier) (constant)] @name @reference.call |
| 62 |
(#is-not? local) |
| 63 |
(#not-match? @name "^(lambda|load|require|require_relative|__FILE__|__LINE__)$") |
| 64 |
) |