(struct_specifier name: (type_identifier) @name body:(_)) @definition.class

(declaration type: (union_specifier name: (type_identifier) @name)) @definition.class

(function_declarator declarator: (identifier) @name) @definition.function

(type_definition declarator: (type_identifier) @name) @definition.type

(enum_specifier name: (type_identifier) @name) @definition.type

(parameter_declaration
  declarator: (identifier) @name) @definition.parameter

(declaration
  declarator: (init_declarator
    declarator: (identifier) @name)) @definition.variable

(preproc_include
  path: (string_literal) @name) @reference.module

(call_expression
  function: (identifier) @name) @reference.call

(type_identifier) @name @reference.type

[
  (binary_expression left: (identifier) @name)
  (binary_expression right: (identifier) @name)
  (return_statement (identifier) @name)
  (argument_list (identifier) @name)
  (assignment_expression right: (identifier) @name)
] @reference.variable
