diff options
author | Blaž Hrastnik | 2021-04-08 14:18:25 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-04-08 14:25:35 +0000 |
commit | 71c06c11cb2f3831326ec10035b66ac6df075c8a (patch) | |
tree | 96ae0b2a88a393bbbe75a2fc56ccb1aedb9a05d7 /runtime/queries/c | |
parent | 52da68e49a582f960ebf3ec26ae3279b102b01f2 (diff) |
Import tree sitter queries.
Diffstat (limited to 'runtime/queries/c')
-rw-r--r-- | runtime/queries/c/highlights.scm | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/runtime/queries/c/highlights.scm b/runtime/queries/c/highlights.scm new file mode 100644 index 00000000..04d9a04f --- /dev/null +++ b/runtime/queries/c/highlights.scm @@ -0,0 +1,81 @@ +"break" @keyword +"case" @keyword +"const" @keyword +"continue" @keyword +"default" @keyword +"do" @keyword +"else" @keyword +"enum" @keyword +"extern" @keyword +"for" @keyword +"if" @keyword +"inline" @keyword +"return" @keyword +"sizeof" @keyword +"static" @keyword +"struct" @keyword +"switch" @keyword +"typedef" @keyword +"union" @keyword +"volatile" @keyword +"while" @keyword + +"#define" @keyword +"#elif" @keyword +"#else" @keyword +"#endif" @keyword +"#if" @keyword +"#ifdef" @keyword +"#ifndef" @keyword +"#include" @keyword +(preproc_directive) @keyword + +"--" @operator +"-" @operator +"-=" @operator +"->" @operator +"=" @operator +"!=" @operator +"*" @operator +"&" @operator +"&&" @operator +"+" @operator +"++" @operator +"+=" @operator +"<" @operator +"==" @operator +">" @operator +"||" @operator + +"." @delimiter +";" @delimiter + +(string_literal) @string +(system_lib_string) @string + +(null) @constant +(number_literal) @number +(char_literal) @number + +(call_expression + function: (identifier) @function) +(call_expression + function: (field_expression + field: (field_identifier) @function)) +(function_declarator + declarator: (identifier) @function) +(preproc_function_def + name: (identifier) @function.special) + +(field_identifier) @property +(statement_identifier) @label +(type_identifier) @type +(primitive_type) @type +(sized_type_specifier) @type + +((identifier) @constant + (#match? @constant "^[A-Z][A-Z\\d_]*$")) + +(identifier) @variable + +(comment) @comment |