summaryrefslogtreecommitdiffstats
path: root/misc/syntax/kotlin.syntax
blob: 74792bd9117cbcd235136c609ae4e3dad3122a0c (plain)
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
# kotlin.syntax
#
# URL: https://github.com/anvabr/kotlin.syntax
#
# License: GNU General Public License v3.0

context default

# hard keywords
	keyword whole as yellow
	keyword whole as? yellow
	keyword whole break yellow
	keyword whole class yellow
	keyword whole continue yellow
	keyword whole do yellow
	keyword whole else yellow
	keyword whole false yellow
	keyword whole for yellow
	keyword whole fun yellow
	keyword whole if yellow
	keyword whole in yellow
	keyword whole !in yellow
	keyword whole interface yellow
	keyword whole is yellow
	keyword whole !is yellow
	keyword whole null yellow
	keyword whole object yellow
	keyword whole package brown
	keyword whole return yellow
	keyword whole super yellow
	keyword whole this yellow
	keyword whole throw yellow
	keyword whole true yellow
	keyword whole try yellow
	keyword whole typealias yellow
	keyword whole val yellow
	keyword whole var yellow
	keyword whole when yellow
	keyword whole while yellow	

# soft keywords
	keyword whole by brightgreen
	keyword whole catch yellow
	keyword whole constructor brightgreen
	keyword whole delegate brightgreen
	keyword whole dynamic brightgreen
#	keyword whole field brightgreen
	keyword whole file brightgreen
	keyword whole finally brightgreen
	keyword whole get brightgreen
	keyword whole import brown
	keyword whole init brightgreen
	keyword whole param brightgreen
	keyword whole property brightgreen
	keyword whole reciever brightgreen
	keyword whole set brightgreen
	keyword whole setparam brightgreen
	keyword whole where brightgreen

# modifier keywords
	keyword whole abstract brightmagenta
	keyword whole annotation brightmagenta
	keyword whole companion brightmagenta
	keyword whole const brightmagenta
	keyword whole crossinline brightmagenta
	keyword whole data brightmagenta
	keyword whole enum brightmagenta
	keyword whole external brightmagenta
	keyword whole final brightmagenta
	keyword whole infix brightmagenta
	keyword whole inline brightmagenta
	keyword whole inner brightmagenta
	keyword whole internal brightmagenta
	keyword whole lateinit brightmagenta
	keyword whole noinline brightmagenta
	keyword whole open brightmagenta
	keyword whole operator brightmagenta
	keyword whole out brightmagenta
	keyword whole override brightmagenta
	keyword whole private brightmagenta
	keyword whole protected brightmagenta
	keyword whole public brightmagenta
	keyword whole reified brightmagenta
	keyword whole sealed brightmagenta
	keyword whole suspend brightmagenta
	keyword whole tailrec brightmagenta
	keyword whole vararg brightmagenta

# special identifiers
	keyword whole field brightgreen
	keyword whole it brightgreen

	keyword @\[ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz\] brightcyan	
	keyword \[ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz\]@ brightcyan

# operators and special symbols
	keyword \+ brightcyan
	keyword - brightcyan
	keyword \* brightcyan
	keyword / brightcyan
	keyword % brightcyan
	keyword = brightcyan
	keyword \+= brightcyan
	keyword -= brightcyan
	keyword \*= brightcyan
	keyword /= brightcyan
	keyword %= brightcyan
	keyword \+\+ brightcyan
	keyword -- brightcyan
	keyword && brightcyan
	keyword || brightcyan
	keyword ! brightcyan
	keyword == brightcyan
	keyword != brightcyan
	keyword === brightcyan
	keyword !== brightcyan
	keyword > brightcyan
	keyword < brightcyan
	keyword >= brightcyan
	keyword <= brightcyan
	keyword [ brightcyan
	keyword ] brightcyan
	keyword !! brightcyan
	keyword ?. brightcyan
	keyword ?: brightcyan
	keyword :: brightcyan
	keyword .. brightcyan
	keyword : brightcyan
	keyword ? brightcyan
	keyword -> brightcyan
	keyword @ brightcyan
	keyword ; brightcyan
	keyword $ brightcyan
	keyword _ brightcyan

# built-in types
	keyword whole Double brightred
	keyword whole Float brightred
	keyword whole Long brightred
	keyword whole Int brightred
	keyword whole Short brightred
	keyword whole Byte brightred
	keyword whole Char brightred
	keyword whole Boolean brightred
	keyword whole Array brightred
	keyword whole String brightred
	keyword whole ByteArray brightred
	keyword whole ByteSequence brightred

# comment
context exclusive /\* \*/ gray
context exclusive // \n gray

context """ """ green
    spellcheck
    keyword \\" brightgreen
    keyword %% brightgreen
    keyword %\[#0\s-\+,\]\[0123456789\*\]\[.\]\[0123456789\*\]\[L\]\{eEfgGoxX\} brightgreen
    keyword %\[0\s-\+,\]\[0123456789\*\]\[.\]\[0123456789\*\]\[hl\]\{diuxX\} brightgreen
    keyword %\[hl\]n brightgreen
    keyword %\[-\]\[0123456789\*\]\[.\]\[0123456789\*\]s brightgreen
    keyword %[*] brightgreen
    keyword %c brightgreen
    keyword %p brightgreen
    keyword $\[0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz\] brightgreen
    keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen
    keyword \\\\ brightgreen
    keyword \\' brightgreen
    keyword \\\{abtnvfr\} brightgreen

context ' ' green

context " " green
    spellcheck
    keyword \\" brightgreen
    keyword %% brightgreen
    keyword %\[#0\s-\+,\]\[0123456789\*\]\[.\]\[0123456789\*\]\[L\]\{eEfgGoxX\} brightgreen
    keyword %\[0\s-\+,\]\[0123456789\*\]\[.\]\[0123456789\*\]\[hl\]\{diuxX\} brightgreen
    keyword %\[hl\]n brightgreen
    keyword %\[-\]\[0123456789\*\]\[.\]\[0123456789\*\]s brightgreen
    keyword %[*] brightgreen
    keyword %c brightgreen
    keyword %p brightgreen
    keyword $\[0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz\] brightgreen
    keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen
    keyword \\\\ brightgreen
    keyword \\' brightgreen
    keyword \\\{abtnvfr\} brightgreen