; Scopes

[
  (document)
  (definition)
] @scope

; References

(identifier) @reference

; Definitions

(annotation_identifier) @definition

(const_definition (identifier) @definition.constant)

(enum_definition "enum"
  . (identifier) @definition.enum
  "{" (identifier) @definition.constant "}")

(senum_definition "senum"
  . (identifier) @definition.enum)

(field (identifier) @definition.field)

(function_definition (identifier) @definition.function)

(namespace_declaration
  "namespace" (namespace_scope)
  . (_) @definition.namespace
  (namespace_uri)?)

(parameter (identifier) @definition.parameter)

(struct_definition
  "struct" . (identifier) @definition.type)

(union_definition
  "union" . (identifier) @definition.type)

(exception_definition
  "exception" . (identifier) @definition.type)

(service_definition
  "service" . (identifier) @definition.type)

(interaction_definition
  "interaction" . (identifier) @definition.type)

(typedef_identifier) @definition.type
