Unnamed repository; edit this file 'description' to name the repository.
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
; Scopes

[
  (subprogram_definition)
  (process_statement)
] @local.scope

; Definitions

; Subprogram parameters: each interface declaration's identifier_list holds the
; parameter name(s), reachable regardless of the constant:/generic: field label.
(parameter_list_specification
  (interface_list
    (_
      (identifier_list
        (identifier) @local.definition.variable.parameter))))

; Locally declared signals/variables/constants.
(signal_declaration
  (identifier_list
    (identifier) @local.definition.variable))
(variable_declaration
  (identifier_list
    (identifier) @local.definition.variable))
(constant_declaration
  (identifier_list
    (identifier) @local.definition.constant))

; References

; A use of a name is `(name (identifier) ...)`; the base identifier may resolve.
; Member identifiers live inside (selection ...) and are excluded by this shape.
(name
  (identifier) @local.reference)