fix(odin): updates queries from upstream (#6425)

This commit is contained in:
Laytan 2024-04-10 12:46:25 +02:00 committed by GitHub
parent 8253aac419
commit 2bad828b48
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 37 additions and 9 deletions

View file

@ -24,6 +24,7 @@
"map" "map"
"bit_set" "bit_set"
"matrix" "matrix"
"bit_field"
] @keyword ] @keyword
"proc" @keyword.function "proc" @keyword.function
@ -151,6 +152,10 @@
(identifier) @type (identifier) @type
"::") "::")
(bit_field_declaration
(identifier) @type
"::")
(const_declaration (const_declaration
(identifier) @type (identifier) @type
"::" "::"

View file

@ -1,24 +1,43 @@
[ [
(block) (block)
(procedure_declaration)
(overloaded_procedure_declaration)
(enum_declaration) (enum_declaration)
(union_declaration) (union_declaration)
(if_statement) (bit_field_declaration)
(else_if_clause) (struct_declaration)
(else_clause) (struct)
(when_statement) (parameters)
(else_when_clause) (tuple_type)
(for_statement) (call_expression)
(switch_case) (switch_case)
] @indent.begin ] @indent.begin
; hello(
((identifier)
.
(ERROR
"(" @indent.begin))
[ [
"}"
")" ")"
"]" "]"
] @indent.branch @indent.end ] @indent.branch @indent.end
; Have to do all closing brackets separately because the one for switch statements shouldn't end.
(block
"}" @indent.branch @indent.end)
(enum_declaration
"}" @indent.branch @indent.end)
(union_declaration
"}" @indent.branch @indent.end)
(struct_declaration
"}" @indent.branch @indent.end)
(struct
"}" @indent.branch @indent.end)
[ [
(comment) (comment)
(block_comment) (block_comment)

View file

@ -30,6 +30,10 @@
(identifier) @local.definition.type (identifier) @local.definition.type
"::") "::")
(bit_field_declaration
(identifier) @local.definition.type
"::")
(variable_declaration (variable_declaration
(identifier) @local.definition.var (identifier) @local.definition.var
":=") ":=")