diff options
| author | David Czihak <git@dcz.at> | 2026-05-07 14:33:19 +0200 |
|---|---|---|
| committer | David Czihak <git@dcz.at> | 2026-05-07 14:33:19 +0200 |
| commit | ddf2de739068b5ff0866ccb1d067f3cb53a4fc55 (patch) | |
| tree | 1a77efe9d73a6172be3c37d29b321eadd4efe379 /Queries/symbols.scm | |
Initial commitv0.1.7
Diffstat (limited to 'Queries/symbols.scm')
| -rw-r--r-- | Queries/symbols.scm | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/Queries/symbols.scm b/Queries/symbols.scm new file mode 100644 index 0000000..5f903cb --- /dev/null +++ b/Queries/symbols.scm | |||
| @@ -0,0 +1,74 @@ | |||
| 1 | ( | ||
| 2 | (function_declaration | ||
| 3 | name: (identifier) @name | ||
| 4 | (parameters) @arguments.target) @subtree | ||
| 5 | (#set! role function-or-method) | ||
| 6 | (#set! arguments.query "arguments.scm") | ||
| 7 | ) | ||
| 8 | |||
| 9 | ( | ||
| 10 | (variable_declaration | ||
| 11 | (identifier) @name | ||
| 12 | (struct_declaration)) @subtree | ||
| 13 | (#set! role struct) | ||
| 14 | ) | ||
| 15 | |||
| 16 | ( | ||
| 17 | (variable_declaration | ||
| 18 | (identifier) @name | ||
| 19 | (enum_declaration)) @subtree | ||
| 20 | (#set! role enum) | ||
| 21 | ) | ||
| 22 | |||
| 23 | ( | ||
| 24 | (variable_declaration | ||
| 25 | (identifier) @name | ||
| 26 | (union_declaration)) @subtree | ||
| 27 | (#set! role struct) | ||
| 28 | ) | ||
| 29 | |||
| 30 | ( | ||
| 31 | (variable_declaration | ||
| 32 | (identifier) @name | ||
| 33 | (opaque_declaration)) @subtree | ||
| 34 | (#set! role struct) | ||
| 35 | ) | ||
| 36 | |||
| 37 | ( | ||
| 38 | (variable_declaration | ||
| 39 | (identifier) @name | ||
| 40 | (error_set_declaration)) @subtree | ||
| 41 | (#set! role enum) | ||
| 42 | ) | ||
| 43 | |||
| 44 | ( | ||
| 45 | (container_field | ||
| 46 | name: (identifier) @name) @subtree | ||
| 47 | (#set! role property) | ||
| 48 | ) | ||
| 49 | |||
| 50 | ( | ||
| 51 | (container_field | ||
| 52 | name: (primary_type_expression | ||
| 53 | (identifier) @name)) @subtree | ||
| 54 | (#set! role property) | ||
| 55 | ) | ||
| 56 | |||
| 57 | ( | ||
| 58 | (test_declaration | ||
| 59 | (string) @name @displayname) @subtree | ||
| 60 | (#set! role function) | ||
| 61 | ) | ||
| 62 | |||
| 63 | ( | ||
| 64 | (test_declaration | ||
| 65 | (identifier) @name @displayname) @subtree | ||
| 66 | (#set! role function) | ||
| 67 | ) | ||
| 68 | |||
| 69 | ( | ||
| 70 | (block | ||
| 71 | (variable_declaration | ||
| 72 | (identifier) @name) @subtree) | ||
| 73 | (#set! role variable) | ||
| 74 | ) | ||
