@ -1,26 +1,80 @@
( comment ) @comment
( module_clause
( identifier ) @namespace )
( import_path
( import_name ) @namespace )
( import_alias
( import_name ) @namespace )
( enum_fetch
( reference_expression ) @constant )
( enum_field_definition
( identifier ) @constant )
( global_var_definition
( identifier ) @constant )
( compile_time_if_expression
condition: ( reference_expression ) @constant )
( compile_time_if_expression
condition: ( binary_expression
left: ( reference_expression ) @constant
right: ( reference_expression ) @constant ) )
( compile_time_if_expression
condition: ( binary_expression
left: ( reference_expression ) @constant
right: ( unary_expression ( reference_expression ) @constant ) ) )
( label_reference ) @label
( parameter_declaration
( parameter_declaration
name: ( identifier ) @variable . parameter )
name: ( identifier ) @variable . parameter )
( receiver
name: ( identifier ) @variable . parameter )
( function_declaration
( function_declaration
name: ( identifier ) @function )
name: ( identifier ) @function )
( function_declaration
( function_declaration
receiver: ( parameter_list )
receiver: ( receiver )
name: ( identifier ) @function . method )
( interface_method_definition
name: ( identifier ) @function . method )
name: ( identifier ) @function . method )
( call_expression
( call_expression
function: ( identifier ) @function )
name: ( selector_expression
field: ( reference_expression ) @function . method ) )
( call_expression
( call_expression
function: ( selector_expression
name: ( reference_expression ) @function )
field: ( identifier ) @function . method ) )
( struct_declaration
name: ( identifier ) @type )
( enum_declaration
name: ( identifier ) @type )
( interface_declaration
name: ( identifier ) @type )
( type_declaration
name: ( identifier ) @type )
( struct_field_declaration
name: ( identifier ) @variable . other . member )
( field_name ) @variable . other . member
( field_identifier ) @variable . other . member
( selector_expression
( selector_expression
operand: ( identifier ) @variable
field: ( reference_expression ) @variable . other . member )
field: ( identifier ) @variable . other . member )
( int_literal ) @constant . numeric . integer
( int_literal ) @constant . numeric . integer
( escape_sequence ) @constant . character . escape
( attribute_declaration ) @attribute
( comment ) @comment
[
[
( c_string_literal )
( c_string_literal )
( raw_string_literal )
( raw_string_literal )
@ -29,55 +83,30 @@
( rune_literal )
( rune_literal )
] @string
] @string
( escape_sequence ) @constant . character . escape
( string_interpolation
( braced_interpolation_opening ) @punctuation . bracket
[
( interpolated_expression ) @embedded
( pointer_type )
( braced_interpolation_closing ) @punctuation . bracket )
( array_type )
] @type
( const_spec name: ( identifier ) @constant )
( global_var_type_initializer name: ( identifier ) @constant )
( global_var_spec name: ( identifier ) @constant )
( ( identifier ) @constant ( # match? @constant "^[A-Z][A-Z\\d_]*$" ) )
( attribute ) @attribute
[
[
( generic_type )
( type_reference_expression )
( type_identifier )
] @type
] @constructor
( builtin_type ) @type . builtin
[
[
( true )
( true )
( false )
( false )
] @constant . builtin . boolean
] @constant . builtin . boolean
[
( module_identifier )
( import_path )
] @namespace
[
( pseudo_comptime_identifier )
( label_name )
] @label
[
( identifier )
] @variable
[
[
"pub"
"pub"
"assert"
"assert"
"go"
"asm"
"asm"
"defer"
"defer"
"unsafe"
"unsafe"
"sql"
"sql"
( nil )
( none )
( none )
] @keyword
] @keyword
@ -105,12 +134,17 @@
"lock"
"lock"
"rlock"
"rlock"
"spawn"
"spawn"
"break"
"continue"
"go"
] @keyword . control
] @keyword . control
[
[
"if"
"if"
"$if"
"select"
"select"
"else"
"else"
"$else"
"match"
"match"
] @keyword . control . conditional
] @keyword . control . conditional
@ -155,7 +189,7 @@
"]"
"]"
] @punctuation . bracket
] @punctuation . bracket
( array ) @punctuation . bracket
( array _creation ) @punctuation . bracket
[
[
"++"
"++"