summaryrefslogtreecommitdiffstats
path: root/misc/syntax/swift.syntax
blob: 7f804bdff55f057a9be7517d74e72468552a3d9a (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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
define keywords yellow
define attributes yellow
define operators brightcyan
define comments red
define strings green
define escapedchars brightgreen
define interpolation brightgreen
define unicode brightgreen
define brackets brightcyan
define punctuation brightcyan
define range brightcyan
define semicolon brightmagenta
define compilerstatements brightred

context default
    keyword whole associatedtype keywords
    keyword whole class keywords
    keyword whole deinit keywords
    keyword whole enum keywords
    keyword whole extension keywords
    keyword whole fileprivate keywords
    keyword whole func keywords
    keyword whole import keywords
    keyword whole init keywords
    keyword whole inout keywords
    keyword whole internal keywords
    keyword whole let keywords
    keyword whole open keywords
    keyword whole operator keywords
    keyword whole private keywords
    keyword whole protocol keywords
    keyword whole public keywords
    keyword whole rethrows keywords
    keyword whole static keywords
    keyword whole struct keywords
    keyword whole subscript keywords
    keyword whole typealias keywords
    keyword whole var keywords

    keyword whole break keywords
    keyword whole case keywords
    keyword whole continue keywords
    keyword whole default keywords
    keyword whole defer keywords
    keyword whole do keywords
    keyword whole else keywords
    keyword whole fallthrough keywords
    keyword whole for keywords
    keyword whole guard keywords
    keyword whole if keywords
    keyword whole in keywords
    keyword whole repeat keywords
    keyword whole return keywords
    keyword whole switch keywords
    keyword whole where keywords
    keyword whole while keywords

    keyword whole as keywords
    keyword whole catch keywords
    keyword whole false keywords
    keyword whole is keywords
    keyword whole nil keywords
    keyword whole self keywords
    keyword whole Self keywords
    keyword whole super keywords
    keyword whole throws keywords
    keyword whole throw keywords
    keyword whole true keywords
    keyword whole try keywords

    keyword whole associativity keywords
    keyword whole convenience keywords
    keyword whole didSet keywords
    keyword whole dynamic keywords
    keyword whole final keywords
    keyword whole get keywords
    keyword whole indirect keywords
    keyword whole infix keywords
    keyword whole lazy keywords
    keyword whole left keywords
    keyword whole mutating keywords
    keyword whole none keywords
    keyword whole nonmutating keywords
    keyword whole optional keywords
    keyword whole override keywords
    keyword whole postfix keywords
    keyword whole precedence keywords
    keyword whole prefix keywords
    keyword whole Protocol keywords
    keyword whole required keywords
    keyword whole right keywords
    keyword whole set keywords
    keyword whole Type keywords
    keyword whole unowned keywords
    keyword whole weak keywords
    keyword whole willSet keywords

    keyword whole Any keywords
    keyword whole Bool keywords
    keyword whole Double keywords
    keyword whole Float keywords
    keyword whole Character keywords
    keyword whole Int keywords
    keyword whole Int16 keywords
    keyword whole Int32 keywords
    keyword whole Int64 keywords
    keyword whole Int8 keywords
    keyword whole String keywords
    keyword whole UInt keywords
    keyword whole UInt16 keywords
    keyword whole UInt32 keywords
    keyword whole UInt64 keywords
    keyword whole UInt8 keywords

    keyword whole assert keywords
    keyword whole precondition keywords

    keyword // comments
    keyword /\* comments
    keyword *\*/ comments

    keyword > operators
    keyword < operators
    keyword \+ operators
    keyword - operators
    keyword \* operators
    keyword / operators
    keyword % operators
    keyword = operators
    keyword != operators
    keyword == operators
    keyword | operators
    keyword & operators
    keyword ^ operators
    keyword ~ operators
    keyword ! operators
    keyword whole _ operators
    keyword { brackets
    keyword } brackets
    keyword ( brackets
    keyword ) brackets
    keyword [ brackets
    keyword ] brackets
    keyword . punctuation
    keyword , punctuation
    keyword : punctuation
    keyword ? punctuation
    keyword ... range
    keyword ..< range
    keyword ; semicolon

    keyword `*` base

    keyword whole @available attributes
    keyword whole @escaping attributes
    keyword whole @unavailable attributes
    keyword whole @introduced attributes
    keyword whole @deprecated attributes
    keyword whole @obsolete attributes
    keyword whole @message attributes
    keyword whole @main attributes
    keyword whole @renamed attributes
    keyword whole @discardableResult attributes
    keyword whole @dynamicCallable attributes
    keyword whole @dynamicMemberLookup attributes
    keyword whole @frozen attributes
    keyword whole @GKInspectable attributes
    keyword whole @inlinable attributes
    keyword whole @nonobjc attributes
    keyword whole @NSApplicationMain attributes
    keyword whole @NSCopying attributes
    keyword whole @objc attributes
    keyword whole @NSManaged attributes
    keyword whole @objcMembers attributes
    keyword whole @propertyWrapper attributes
    keyword whole @requires_stored_property_inits attributes
    keyword whole @testable attributes
    keyword whole @UIApplicationMain attributes
    keyword whole @usableFromInline attributes
    keyword whole @warn_unqualified_access attributes
    keyword whole @autoclosure attributes
    keyword whole @convention attributes
    keyword whole @escaping attributes
    keyword whole @unknown attributes


context exclusive /\* \*/ comments
    spellcheck


context exclusive // \n comments
    spellcheck


context linestart # \n compilerstatements


context #""" """# string
    spellcheck
    keyword \\(*) interpolation
    keyword \\\{0tnr"'\\\} escapedchars
    keyword \\u{*} unicode


context """ """ string
    spellcheck
    keyword \\(*) interpolation
    keyword \\\{0tnr"'\\\} escapedchars
    keyword \\u{*} unicode


context #" "# string
    spellcheck
    keyword \\(*) interpolation
    keyword \\\{0tnr"'\\\} escapedchars
    keyword \\u{*} unicode


context " " string
    spellcheck
    keyword \\(*) interpolation
    keyword \\\{0tnr"'\\\} escapedchars
    keyword \\u{*} unicode