; Scopes

[
  (source_file)
  (circuit)
  (module)

  (else)
  (when)
] @scope

; References

(identifier) @reference

; Definitions

(port (identifier) @definition.field)

(wire (identifier) @definition.field)

(cmem (identifier) @definition.field)

(smem (identifier) @definition.field)

(memory (identifier) @definition.field)

(register (identifier) @definition.field)

(circuit (identifier) @definition.namespace)

(module (identifier) @definition.namespace)

(parameter (identifier) @definition.parameter)

(rdwr (identifier) @definition.var)

(node (identifier) @definition.var)
