-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathhighlights.scm
More file actions
96 lines (85 loc) · 1.67 KB
/
highlights.scm
File metadata and controls
96 lines (85 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
[ "." ";" ":" "," ] @punctuation.delimiter
[ "(" ")" "[" "]" "{" "}" ] @punctuation.bracket
; Keywords
"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
"goto" @keyword
; Operators
[
"--"
"-"
"-="
"->"
"="
"!="
"*"
"&"
"&&"
"+"
"++"
"+="
"<"
"=="
">"
"||"
"<="
">="
"<<"
">>"
"~"
"!"
"."
":"
] @operator
(conditional_expression "?" @operator ":" @operator)
"." @punctuation.delimiter
";" @punctuation.delimiter
; Literals
(string_literal) @string
(system_lib_string) @string
(null) @value.null
(number_literal) @value.number
(char_literal) @value.number
(escape_sequence) @value.number
[
(true)
(false)
] @value.boolean
; Identifiers
(call_expression
function: (identifier) @identifier.function)
(call_expression
function: (field_expression
field: (field_identifier) @identifier.function))
(function_declarator
declarator: (identifier) @identifier.function)
(statement_identifier) @identifier.label
(type_identifier) @identifier.type
(primitive_type) @identifier.type
(sized_type_specifier) @identifier.type
; Declarations
(struct_specifier name: (type_identifier) @identifier.type.declare)
(union_specifier name: (type_identifier) @identifier.type.declare)
(enum_specifier name: (type_identifier) @identifier.type.declare)
(type_definition declarator: (type_identifier) @identifier.type.declare)
; Comments
(comment) @comment