Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/c/highlights.scm')
-rw-r--r--runtime/queries/c/highlights.scm46
1 files changed, 11 insertions, 35 deletions
diff --git a/runtime/queries/c/highlights.scm b/runtime/queries/c/highlights.scm
index 8e499dd6..e48e45ab 100644
--- a/runtime/queries/c/highlights.scm
+++ b/runtime/queries/c/highlights.scm
@@ -14,6 +14,8 @@
] @keyword.storage.type
[
+ "extern"
+ "register"
(type_qualifier)
(storage_class_specifier)
] @keyword.storage.modifier
@@ -53,11 +55,8 @@
(preproc_directive)
] @keyword.directive
-"..." @punctuation
-
-["," "." ":" "::" ";" "->"] @punctuation.delimiter
-
-["(" ")" "[" "]" "{" "}" "[[" "]]"] @punctuation.bracket
+(pointer_declarator "*" @type.builtin)
+(abstract_pointer_declarator "*" @type.builtin)
[
"+"
@@ -96,11 +95,13 @@
"?"
] @operator
-(conditional_expression ":" @operator) ; After punctuation
+(conditional_expression ":" @operator)
-(pointer_declarator "*" @type.builtin) ; After Operators
-(abstract_pointer_declarator "*" @type.builtin)
+"..." @punctuation
+
+["," "." ":" ";" "->" "::"] @punctuation.delimiter
+["(" ")" "[" "]" "{" "}"] @punctuation.bracket
[(true) (false)] @constant.builtin.boolean
@@ -128,36 +129,11 @@
(call_expression (argument_list (identifier) @variable))
(function_declarator
declarator: [(identifier) (field_identifier)] @function)
-
-; Up to 6 layers of declarators
(parameter_declaration
declarator: (identifier) @variable.parameter)
(parameter_declaration
- (_
- (identifier) @variable.parameter))
-(parameter_declaration
- (_
- (_
- (identifier) @variable.parameter)))
-(parameter_declaration
- (_
- (_
- (_
- (identifier) @variable.parameter))))
-(parameter_declaration
- (_
- (_
- (_
- (_
- (identifier) @variable.parameter)))))
-(parameter_declaration
- (_
- (_
- (_
- (_
- (_
- (identifier) @variable.parameter))))))
-
+ (pointer_declarator
+ declarator: (identifier) @variable.parameter))
(preproc_function_def
name: (identifier) @function.special)