mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 11:58:17 +00:00
build(deps): bump tree-sitter-c to v0.20.5
also update highlight queries and test fixup: tests
This commit is contained in:
@@ -13,7 +13,8 @@
|
||||
(preproc_else)
|
||||
(preproc_ifdef)
|
||||
(initializer_list)
|
||||
(gnu_asm_expression)
|
||||
] @fold
|
||||
|
||||
(compound_statement
|
||||
(compound_statement
|
||||
(compound_statement) @fold)
|
||||
|
@@ -1,5 +1,6 @@
|
||||
; Lower priority to prefer @parameter when identifier appears in parameter_declaration.
|
||||
((identifier) @variable (#set! "priority" 95))
|
||||
(preproc_def (preproc_arg) @variable)
|
||||
|
||||
[
|
||||
"default"
|
||||
@@ -8,9 +9,14 @@
|
||||
"typedef"
|
||||
"union"
|
||||
"goto"
|
||||
"asm"
|
||||
"__asm__"
|
||||
] @keyword
|
||||
|
||||
"sizeof" @keyword.operator
|
||||
[
|
||||
"sizeof"
|
||||
"offsetof"
|
||||
] @keyword.operator
|
||||
|
||||
"return" @keyword.return
|
||||
|
||||
@@ -36,6 +42,8 @@
|
||||
"#else"
|
||||
"#elif"
|
||||
"#endif"
|
||||
"#elifdef"
|
||||
"#elifndef"
|
||||
(preproc_directive)
|
||||
] @preproc
|
||||
|
||||
@@ -43,7 +51,7 @@
|
||||
|
||||
"#include" @include
|
||||
|
||||
[ ";" ":" "," ] @punctuation.delimiter
|
||||
[ ";" ":" "," "::" ] @punctuation.delimiter
|
||||
|
||||
"..." @punctuation.special
|
||||
|
||||
@@ -98,8 +106,8 @@
|
||||
(comma_expression [ "," ] @operator)
|
||||
|
||||
[
|
||||
(true)
|
||||
(false)
|
||||
(true)
|
||||
(false)
|
||||
] @boolean
|
||||
|
||||
(conditional_expression [ "?" ":" ] @conditional.ternary)
|
||||
@@ -112,10 +120,17 @@
|
||||
(number_literal) @number
|
||||
(char_literal) @character
|
||||
|
||||
[
|
||||
(preproc_arg)
|
||||
(preproc_defined)
|
||||
] @function.macro
|
||||
((preproc_arg) @function.macro (#set! "priority" 90))
|
||||
(preproc_defined) @function.macro
|
||||
|
||||
(((field_expression
|
||||
(field_identifier) @property)) @_parent
|
||||
(#not-has-parent? @_parent template_method function_declarator call_expression))
|
||||
|
||||
(field_designator) @property
|
||||
(((field_identifier) @property)
|
||||
(#has-ancestor? @property field_declaration)
|
||||
(#not-has-ancestor? @property function_declarator))
|
||||
|
||||
(statement_identifier) @label
|
||||
|
||||
@@ -126,7 +141,10 @@
|
||||
|
||||
(storage_class_specifier) @storageclass
|
||||
|
||||
(type_qualifier) @type.qualifier
|
||||
[
|
||||
(type_qualifier)
|
||||
(gnu_asm_qualifier)
|
||||
] @type.qualifier
|
||||
|
||||
(linkage_specification
|
||||
"extern" @storageclass)
|
||||
@@ -140,6 +158,8 @@
|
||||
|
||||
((identifier) @constant
|
||||
(#lua-match? @constant "^[A-Z][A-Z0-9_]+$"))
|
||||
(preproc_def (preproc_arg) @constant
|
||||
(#lua-match? @constant "^[A-Z][A-Z0-9_]+$"))
|
||||
(enumerator
|
||||
name: (identifier) @constant)
|
||||
(case_statement
|
||||
@@ -147,6 +167,8 @@
|
||||
|
||||
((identifier) @constant.builtin
|
||||
(#any-of? @constant.builtin "stderr" "stdin" "stdout"))
|
||||
(preproc_def (preproc_arg) @constant.builtin
|
||||
(#any-of? @constant.builtin "stderr" "stdin" "stdout"))
|
||||
|
||||
;; Preproc def / undef
|
||||
(preproc_def
|
||||
@@ -179,6 +201,9 @@
|
||||
(parameter_declaration
|
||||
declarator: (identifier) @parameter)
|
||||
|
||||
(parameter_declaration
|
||||
declarator: (array_declarator) @parameter)
|
||||
|
||||
(parameter_declaration
|
||||
declarator: (pointer_declarator) @parameter)
|
||||
|
||||
@@ -186,15 +211,15 @@
|
||||
|
||||
[
|
||||
"__attribute__"
|
||||
"__declspec"
|
||||
"__based"
|
||||
"__cdecl"
|
||||
"__clrcall"
|
||||
"__stdcall"
|
||||
"__fastcall"
|
||||
"__thiscall"
|
||||
"__vectorcall"
|
||||
"_unaligned"
|
||||
"__unaligned"
|
||||
"__declspec"
|
||||
(ms_pointer_modifier)
|
||||
(attribute_declaration)
|
||||
] @attribute
|
||||
|
||||
|
Reference in New Issue
Block a user