Debian Codegraph @

runtime/queries/vala/locals.scm

raw symbols SCIP
1 ; Scopes
2
3 [
4 (method_declaration)
5 (creation_method_declaration)
6 (constructor_declaration)
7 (destructor_declaration)
8 (local_function_declaration)
9 (lambda_expression)
10 (block)
11 (for_statement)
12 (foreach_statement)
13 ] @local.scope
14
15 ; Definitions
16
17 (parameter
18 (identifier) @local.definition.variable.parameter)
19
20 (lambda_expression
21 (identifier) @local.definition.variable.parameter)
22
23 ; `foreach (Type x in ...)` — the identifier after the element type.
24 (foreach_statement
25 .
26 (type)
27 .
28 (identifier) @local.definition.variable)
29
30 ; `Type x = ...;` — first identifier of each assignment in a local declaration.
31 (local_declaration
32 (assignment
33 .
34 (identifier) @local.definition.variable))
35
36 ; References
37
38 (identifier) @local.reference
39
40 ; In `a.b`, `b` is a member access rather than a variable reference. A bare name
41 ; is a single-child member_access_expression, so only discard the trailing
42 ; identifier when it follows a receiver expression.
43 (member_access_expression
44 (_)
45 .
46 (identifier) @_)