aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/queries/ada/locals.scm
blob: bdfc38be8e0fe2449986c7436bf6162378940335 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
;  Better highlighting by referencing to the definition, for variable
;  references. However, this is not yet supported by neovim
;  See https://tree-sitter.github.io/tree-sitter/syntax-highlighting#local-variables
(compilation) @local.scope

(package_declaration) @local.scope

(package_body) @local.scope

(subprogram_declaration) @local.scope

(subprogram_body) @local.scope

(block_statement) @local.scope

(with_clause
  (identifier) @local.definition.import)

(procedure_specification
  name: (_) @local.definition.function)

(function_specification
  name: (_) @local.definition.function)

(package_declaration
  name: (_) @local.definition.var)

(package_body
  name: (_) @local.definition.var)

(generic_instantiation
  .
  name: (_) @local.definition.var)

(component_declaration
  .
  (identifier) @local.definition.var)

(exception_declaration
  .
  (identifier) @local.definition.var)

(formal_object_declaration
  .
  (identifier) @local.definition.var)

(object_declaration
  .
  (identifier) @local.definition.var)

(parameter_specification
  .
  (identifier) @local.definition.var)

(full_type_declaration
  .
  (identifier) @local.definition.type)

(private_type_declaration
  .
  (identifier) @local.definition.type)

(private_extension_declaration
  .
  (identifier) @local.definition.type)

(incomplete_type_declaration
  .
  (identifier) @local.definition.type)

(protected_type_declaration
  .
  (identifier) @local.definition.type)

(formal_complete_type_declaration
  .
  (identifier) @local.definition.type)

(formal_incomplete_type_declaration
  .
  (identifier) @local.definition.type)

(task_type_declaration
  .
  (identifier) @local.definition.type)

(subtype_declaration
  .
  (identifier) @local.definition.type)

(identifier) @local.reference