feat(c3)!: update parser and highlights (#8477)

Breaking: `(import_declaration (path_ident))` changed to `(import_path (path_ident))`
This commit is contained in:
Christian Buttner 2026-01-29 11:02:30 +01:00 committed by GitHub
parent cc12e37e5b
commit 04ab807f8e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 4 deletions

View file

@ -166,7 +166,7 @@ return {
}, },
c3 = { c3 = {
install_info = { install_info = {
revision = '2c04e7858d63497152d42f08d3067972618aeedc', revision = '7ef54adef1008ce7d943c2cca03aee93a79b2252',
url = 'https://github.com/c3lang/tree-sitter-c3', url = 'https://github.com/c3lang/tree-sitter-c3',
}, },
maintainers = { '@cbuttner' }, maintainers = { '@cbuttner' },

View file

@ -106,6 +106,7 @@
"$if" "$if"
"$include" "$include"
"$is_const" "$is_const"
"$kindof"
"$nameof" "$nameof"
"$offsetof" "$offsetof"
"$qnameof" "$qnameof"
@ -218,6 +219,8 @@
"&&&" "&&&"
"+++" "+++"
"|||" "|||"
"???"
"+++="
] @operator ] @operator
(range_expr (range_expr
@ -232,6 +235,7 @@
(ternary_expr (ternary_expr
[ [
"?" "?"
"???"
":" ":"
] @keyword.conditional.ternary) ] @keyword.conditional.ternary)
@ -268,8 +272,8 @@
(#any-of? @variable.builtin (#any-of? @variable.builtin
"alignof" "associated" "elements" "extnameof" "from_ordinal" "get" "inf" "is_eq" "is_ordered" "alignof" "associated" "elements" "extnameof" "from_ordinal" "get" "inf" "is_eq" "is_ordered"
"is_substruct" "len" "lookup" "lookup_field" "max" "membersof" "methodsof" "min" "nan" "inner" "is_substruct" "len" "lookup" "lookup_field" "max" "membersof" "methodsof" "min" "nan" "inner"
"kindof" "names" "nameof" "params" "paramsof" "parentof" "qnameof" "returns" "sizeof" "tagof" "kindof" "names" "nameof" "params" "paramsof" "parentof" "qnameof" "returns" "sizeof" "set"
"has_tagof" "values" "typeid"))) "tagof" "has_tagof" "values" "typeid")))
; Label ; Label
[ [
@ -285,7 +289,7 @@
(path_ident (path_ident
(ident) @module)) (ident) @module))
(import_declaration (import_path
(path_ident (path_ident
(ident) @module)) (ident) @module))
@ -298,6 +302,9 @@
(call_inline_attributes (call_inline_attributes
(at_ident) @attribute) (at_ident) @attribute)
(type_suffix
(at_ident) @attribute)
(asm_block_stmt (asm_block_stmt
(at_ident) @attribute) (at_ident) @attribute)