feat(wit)! update parser and queries to 1.2.0 (#8199)

This commit is contained in:
Mikhail Katychev 2025-11-17 04:06:00 -06:00 committed by GitHub
parent 0cfa599474
commit 69c76488f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 53 additions and 14 deletions

View file

@ -6,6 +6,32 @@
(version) @string.special
(use_path
[
"@"
"/"
] @punctuation.delimiter)
(package_decl
[
"@"
"/"
] @punctuation.delimiter)
; feature gates with leading `@`
(_
.
"@" @punctuation.special
.
[
"since"
"unstable"
"deprecated"
] @attribute.builtin)
(unstable_gate
feature: (id) @string)
(world_item
name: (id) @module)
@ -53,8 +79,7 @@
(flags_items
name: (id) @type)
(body
(id) @variable.member)
(flags_field) @variable.member
(variant_items
name: (id) @type)
@ -65,8 +90,7 @@
(enum_items
name: (id) @type)
(enum_case
name: (id) @constant)
(enum_case) @constant
(resource_item
name: (id) @type)
@ -89,6 +113,9 @@
(use_path
(id) @module)
(alias_item
(id) @module)
(use_names_item
(id) @module)
@ -108,11 +135,16 @@
"static" @keyword.modifier
"async" @keyword.coroutine
(uint) @constant
[
"include"
"import"
"export"
"as"
"with"
] @keyword.import
[
@ -129,20 +161,21 @@
"char"
"bool"
"string"
] @type.builtin
[
"tuple"
"list"
"option"
"result"
"borrow"
] @type.builtin
"future"
"stream"
] @type
"_" @variable.parameter.builtin
[
"@"
"_"
] @punctuation.special
[
"/"
";"
":"
","
@ -150,6 +183,9 @@
"->"
] @punctuation.delimiter
(use_path
"/" @punctuation.delimiter)
[
"{"
"}"
@ -159,6 +195,8 @@
"<"
] @punctuation.bracket
"=" @operator
[
(line_comment)
(block_comment)