highlights(zig): function return type, var decl type

This commit is contained in:
maxxnino 2021-08-04 17:20:00 +09:00 committed by Thomas Vigouroux
parent cb5059e68f
commit d5116feefd

View file

@ -15,7 +15,8 @@
name: (identifier) @function)
(function_declaration
name: (identifier) @function)
name: (identifier) @function
return: (identifier) @type)
; Function calls
(call_expression
@ -29,9 +30,11 @@
function: ((identifier) @include
(#any-of? @include "@import" "@cImport"))
)
(struct_construction
(type_identifier) @constructor
)
;; other identifiers
(type_identifier) @type
(custom_number_type) @type.builtin
@ -41,6 +44,16 @@
(union_identifier) @field
(error_identifier) @field
(assignment_statement
name: (identifier) @type
expression: [
(enum_expression)
(union_expression)
(error_expression)
(struct_expression)
]
)
(line_comment) @comment
(doc_comment) @comment