2024-09-26 03:45:49 +08:00
|
|
|
;; Capture top-level functions and struct definitions
|
2024-09-27 22:23:45 +08:00
|
|
|
(source_file
|
|
|
|
(var_declaration
|
|
|
|
(var_spec) @variable
|
|
|
|
)
|
2024-09-26 03:45:49 +08:00
|
|
|
)
|
2024-09-27 22:23:45 +08:00
|
|
|
(source_file
|
|
|
|
(const_declaration
|
|
|
|
(const_spec) @variable
|
|
|
|
)
|
2024-09-26 03:45:49 +08:00
|
|
|
)
|
2024-09-27 22:23:45 +08:00
|
|
|
(source_file
|
|
|
|
(function_declaration) @function
|
2024-09-26 03:45:49 +08:00
|
|
|
)
|
2024-09-27 22:23:45 +08:00
|
|
|
(source_file
|
|
|
|
(type_declaration
|
|
|
|
(type_spec (struct_type)) @class
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(source_file
|
|
|
|
(type_declaration
|
|
|
|
(type_spec
|
|
|
|
(struct_type
|
|
|
|
(field_declaration_list
|
|
|
|
(field_declaration) @class_variable)))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(source_file
|
|
|
|
(method_declaration) @method
|
2024-09-26 03:45:49 +08:00
|
|
|
)
|