2024-10-21 02:20:18 -07:00
|
|
|
;; Capture functions, variables, nammespaces, classes, methods, and enums
|
|
|
|
(namespace_definition) @namespace
|
|
|
|
(function_definition) @function
|
|
|
|
(class_specifier) @class
|
2024-09-26 03:45:49 +08:00
|
|
|
(class_specifier
|
2024-10-21 02:20:18 -07:00
|
|
|
body: (field_declaration_list
|
|
|
|
(declaration
|
|
|
|
declarator: (function_declarator))? @method
|
|
|
|
(field_declaration
|
|
|
|
declarator: (function_declarator))? @method
|
|
|
|
(function_definition)? @method
|
|
|
|
(function_declarator)? @method
|
|
|
|
(field_declaration
|
|
|
|
declarator: (field_identifier))? @class_variable
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(struct_specifier) @struct
|
|
|
|
(struct_specifier
|
|
|
|
body: (field_declaration_list
|
|
|
|
(declaration
|
|
|
|
declarator: (function_declarator))? @method
|
|
|
|
(field_declaration
|
|
|
|
declarator: (function_declarator))? @method
|
|
|
|
(function_definition)? @method
|
|
|
|
(function_declarator)? @method
|
|
|
|
(field_declaration
|
|
|
|
declarator: (field_identifier))? @class_variable
|
|
|
|
)
|
|
|
|
)
|
|
|
|
((declaration type: (_))) @variable
|
|
|
|
(enumerator_list ((enumerator) @enum_item))
|