github-linguist 4.8.3 → 4.8.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/grammars/source.autoit.json +169 -0
- data/grammars/source.c.json +1 -1
- data/grammars/source.coffee.json +16 -16
- data/grammars/source.fsharp.fsi.json +1 -1
- data/grammars/source.fsharp.fsl.json +1 -1
- data/grammars/source.fsharp.fsx.json +1 -1
- data/grammars/source.fsharp.json +9 -6
- data/grammars/source.gfm.json +1 -1
- data/grammars/source.js.json +110 -59
- data/grammars/source.js.jsx.json +138 -43
- data/grammars/source.litcoffee.json +2 -2
- data/grammars/source.papyrus.fallout4.json +1510 -0
- data/grammars/source.pascal.json +1 -1
- data/grammars/source.pawn.json +1092 -519
- data/grammars/source.stylus.json +15 -7
- data/grammars/source.yaml.json +13 -0
- data/grammars/text.jade.json +9 -70
- data/lib/linguist/heuristics.rb +8 -0
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +17 -1
- data/lib/linguist/samples.json +335 -161
- data/lib/linguist/version.rb +1 -1
- metadata +4 -2
data/grammars/source.pascal.json
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
"name": "Pascal",
|
8
8
|
"patterns": [
|
9
9
|
{
|
10
|
-
"match": "\\b(?i:(absolute|abstract|all|and|and_then|array|as|asm|attribute|begin|bindable|case|class|const|constructor|destructor|div|do|
|
10
|
+
"match": "\\b(?i:(absolute|abstract|all|and|and_then|array|as|asm|attribute|begin|bindable|case|class|const|constructor|destructor|div|do|downto|else|end|except|export|exports|external|far|file|finalization|finally|for|forward|generic|goto|helper|if|implementation|import|in|inherited|initialization|interface|interrupt|is|label|library|mod|module|name|near|nil|not|object|of|only|operator|or|or_else|otherwise|packed|pow|private|program|property|protected|public|published|qualified|record|repeat|resident|restricted|segment|set|specialize|shl|shr|then|to|try|type|unit|until|uses|value|var|view|virtual|while|with|xor))\\b",
|
11
11
|
"name": "keyword.control.pascal"
|
12
12
|
},
|
13
13
|
{
|
data/grammars/source.pawn.json
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
{
|
2
|
+
"comment": "\n\t\t\thttps://github.com/abusalimov/SublimeCImproved\n\n\t\t\tDerived from C.tmLanguage - the original TextMate and Sublime Text\n\t\t\tsyntax definition.\n\n\t\t\tThe MIT License (MIT)\n\n\t\t\tCopyright (c) 2013-2014 Eldar Abusalimov\n\t\t\tModified for the Pawn Language by Sergei Marochkin 2016\n\n\t\t\tPermission is hereby granted, free of charge, to any person obtaining a copy of\n\t\t\tthis software and associated documentation files (the \"Software\"), to deal in\n\t\t\tthe Software without restriction, including without limitation the rights to\n\t\t\tuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n\t\t\tthe Software, and to permit persons to whom the Software is furnished to do so,\n\t\t\tsubject to the following conditions:\n\n\t\t\tThe above copyright notice and this permission notice shall be included in all\n\t\t\tcopies or substantial portions of the Software.\n\n\t\t\tTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t\t\tIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n\t\t\tFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n\t\t\tCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n\t\t\tIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n\t\t\tCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\t",
|
2
3
|
"fileTypes": [
|
4
|
+
"p",
|
3
5
|
"pwn",
|
4
6
|
"inc"
|
5
7
|
],
|
@@ -10,702 +12,1273 @@
|
|
10
12
|
"name": "Pawn",
|
11
13
|
"patterns": [
|
12
14
|
{
|
13
|
-
"include": "#
|
14
|
-
}
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
{
|
19
|
-
"include": "#preprocessor-rule-other"
|
20
|
-
},
|
21
|
-
{
|
22
|
-
"include": "#comments"
|
23
|
-
},
|
24
|
-
{
|
25
|
-
"include": "#operators"
|
26
|
-
},
|
27
|
-
{
|
28
|
-
"match": "\\b(assert|break|case|continue|default|do|else|exit|for|foreach|goto|if|return|sleep|state|switch|while)\\b",
|
29
|
-
"name": "keyword.control.c"
|
30
|
-
},
|
31
|
-
{
|
32
|
-
"match": "\\b(new|char|enum)\\b",
|
33
|
-
"name": "storage.type.c"
|
34
|
-
},
|
35
|
-
{
|
36
|
-
"match": "\\b(public|forward|native|hook|const|static|stock|inline)\\b",
|
37
|
-
"name": "storage.modifier.c"
|
38
|
-
},
|
39
|
-
{
|
40
|
-
"match": "\\b([A-Za-z_][A-Za-z0-9_]*)\\:\\s*\\b",
|
41
|
-
"name": "storage.modifier.c"
|
42
|
-
},
|
43
|
-
{
|
44
|
-
"comment": "common C constant naming idiom -- kConstantVariable",
|
45
|
-
"match": "\\bk[A-Z]\\w*\\b",
|
46
|
-
"name": "constant.other.variable.mac-classic.c"
|
47
|
-
},
|
48
|
-
{
|
49
|
-
"match": "\\bg[A-Z]\\w*\\b",
|
50
|
-
"name": "variable.other.readwrite.global.mac-classic.c"
|
51
|
-
},
|
52
|
-
{
|
53
|
-
"match": "\\bs[A-Z]\\w*\\b",
|
54
|
-
"name": "variable.other.readwrite.static.mac-classic.c"
|
55
|
-
},
|
56
|
-
{
|
57
|
-
"match": "\\b(true|false|TRUE|FALSE)\\b",
|
58
|
-
"name": "constant.language.c"
|
59
|
-
},
|
60
|
-
{
|
61
|
-
"include": "#sizeof"
|
62
|
-
},
|
63
|
-
{
|
64
|
-
"match": "\\b((0(x|X)[0-9a-fA-F\\_]*)|(0(b|B)[0-1\\_]*)|(([0-9\\_]+\\.?[0-9\\_]*)|(\\.[0-9\\_]+))?)?\\b",
|
65
|
-
"name": "constant.numeric.c"
|
66
|
-
},
|
67
|
-
{
|
68
|
-
"begin": "\"",
|
69
|
-
"beginCaptures": {
|
70
|
-
"0": {
|
71
|
-
"name": "punctuation.definition.string.begin.c"
|
72
|
-
}
|
73
|
-
},
|
74
|
-
"end": "\"",
|
75
|
-
"endCaptures": {
|
76
|
-
"0": {
|
77
|
-
"name": "punctuation.definition.string.end.c"
|
78
|
-
}
|
79
|
-
},
|
80
|
-
"name": "string.quoted.double.c",
|
15
|
+
"include": "#translation_unit"
|
16
|
+
}
|
17
|
+
],
|
18
|
+
"repository": {
|
19
|
+
"translation_unit": {
|
81
20
|
"patterns": [
|
82
21
|
{
|
83
|
-
"include": "#
|
22
|
+
"include": "#lex"
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"include": "#function"
|
26
|
+
},
|
27
|
+
{
|
28
|
+
"include": "#support"
|
29
|
+
},
|
30
|
+
{
|
31
|
+
"include": "#block"
|
84
32
|
},
|
85
33
|
{
|
86
|
-
"include": "#
|
34
|
+
"include": "#parens"
|
87
35
|
}
|
88
36
|
]
|
89
37
|
},
|
90
|
-
{
|
91
|
-
"begin": "
|
92
|
-
"
|
93
|
-
"0": {
|
94
|
-
"name": "punctuation.definition.string.begin.c"
|
95
|
-
}
|
96
|
-
},
|
97
|
-
"end": "'",
|
98
|
-
"endCaptures": {
|
99
|
-
"0": {
|
100
|
-
"name": "punctuation.definition.string.end.c"
|
101
|
-
}
|
102
|
-
},
|
103
|
-
"name": "string.quoted.single.c",
|
38
|
+
"block": {
|
39
|
+
"begin": "(?=\\{)",
|
40
|
+
"end": "\\}",
|
104
41
|
"patterns": [
|
105
42
|
{
|
106
|
-
"include": "#
|
43
|
+
"include": "#block-lookahead-end"
|
107
44
|
}
|
108
45
|
]
|
109
46
|
},
|
110
|
-
{
|
111
|
-
"
|
112
|
-
"
|
113
|
-
|
114
|
-
|
47
|
+
"block-lookahead-end": {
|
48
|
+
"begin": "\\{",
|
49
|
+
"end": "(?=\\})",
|
50
|
+
"name": "meta.block.c",
|
51
|
+
"patterns": [
|
52
|
+
{
|
53
|
+
"include": "#lex"
|
115
54
|
},
|
116
|
-
|
117
|
-
"
|
55
|
+
{
|
56
|
+
"include": "#call"
|
118
57
|
},
|
119
|
-
|
120
|
-
"
|
58
|
+
{
|
59
|
+
"include": "#support"
|
121
60
|
},
|
122
|
-
|
123
|
-
"
|
61
|
+
{
|
62
|
+
"include": "#function"
|
63
|
+
},
|
64
|
+
{
|
65
|
+
"include": "$base"
|
124
66
|
}
|
125
|
-
|
67
|
+
]
|
126
68
|
},
|
127
|
-
{
|
128
|
-
"begin": "(
|
129
|
-
"
|
130
|
-
|
131
|
-
|
69
|
+
"parens": {
|
70
|
+
"begin": "(?=\\()",
|
71
|
+
"end": "\\)",
|
72
|
+
"patterns": [
|
73
|
+
{
|
74
|
+
"include": "#parens-lookahead-end"
|
75
|
+
}
|
76
|
+
]
|
77
|
+
},
|
78
|
+
"parens-lookahead-end": {
|
79
|
+
"begin": "\\(",
|
80
|
+
"end": "(?=\\))",
|
81
|
+
"name": "meta.parens.c",
|
82
|
+
"patterns": [
|
83
|
+
{
|
84
|
+
"include": "#lex"
|
132
85
|
},
|
133
|
-
|
134
|
-
"
|
86
|
+
{
|
87
|
+
"include": "#call"
|
135
88
|
},
|
136
|
-
|
137
|
-
"
|
89
|
+
{
|
90
|
+
"include": "#support"
|
138
91
|
},
|
139
|
-
|
140
|
-
"
|
92
|
+
{
|
93
|
+
"include": "$base"
|
94
|
+
}
|
95
|
+
]
|
96
|
+
},
|
97
|
+
"function": {
|
98
|
+
"patterns": [
|
99
|
+
{
|
100
|
+
"include": "#function-fixup-macro"
|
141
101
|
},
|
142
|
-
|
143
|
-
"
|
102
|
+
{
|
103
|
+
"include": "#function-declaration"
|
144
104
|
},
|
145
|
-
|
146
|
-
"
|
105
|
+
{
|
106
|
+
"include": "#function-definition"
|
147
107
|
}
|
148
|
-
|
149
|
-
|
150
|
-
|
108
|
+
]
|
109
|
+
},
|
110
|
+
"function-fixup-macro": {
|
111
|
+
"begin": "(?x)\n\t\t\t\t^ # Begin of line, capital letters: most probably it is a macro\n\t\t\t\t\\s*\\b\n\t\t\t\t([A-Z0-9_]++)\n\t\t\t\t\\b\n\t\t\t\t(?= (?:\\s|/\\*.*?\\*/)*+ \\( )\n\t\t\t",
|
112
|
+
"end": "\\)",
|
151
113
|
"patterns": [
|
152
114
|
{
|
153
|
-
"
|
154
|
-
"name": "punctuation.separator.continuation.c"
|
115
|
+
"include": "#lex"
|
155
116
|
},
|
156
117
|
{
|
157
|
-
"include": "
|
118
|
+
"include": "#parens-lookahead-end"
|
158
119
|
}
|
159
120
|
]
|
160
121
|
},
|
161
|
-
{
|
162
|
-
"
|
122
|
+
"function-declaration": {
|
123
|
+
"name": "meta.function.c",
|
124
|
+
"begin": "(?x)\n\t\t\t\t(?: ^\n\t\t\t\t | (?<! (?<!\\w) new\n\t\t\t\t | (?<!\\w) (?:else|enum) | (?<!\\w) (?:class|union)\n\t\t\t\t | (?<!\\w) (?:struct|return|sizeof|typeof)\n\t\t\t\t | (?<!\\w) __typeof | (?<!\\w) __typeof__ )\n\t\t\t\t (?<= \\w ) \\s\n\n\t\t\t\t | # or type modifier / closing bracket before name\n\t\t\t\t (?<= [^&]& | [*>)}\\]] ) ) \\s*\n\n\t\t\t\t( (?: [A-Za-z_]\\w*+ | ::[^:] )++\n\t\t\t\t (?: (?<= ^ operator | \\W operator ) # C++ operator?\n\t\t\t\t (?: [-*&<>=+!]+ | \\(\\) | \\[\\] ) )? )\n\n\t\t\t\t(?= (?:\\s|/\\*.*?\\*/)*+ (?'parens' \\(\n\t\t\t\t (?> \\g'parens' |\n\t\t\t\t \t\"(\\\\.|[^\"])*\" | '(\\\\.|[^'])*' | /\\*.*?\\*/ |\n\t\t\t\t \t(?! /[/*] | [()] ) . )*\n\t\t\t\t \\) ) \\s* ; )\n\t\t\t",
|
125
|
+
"beginCaptures": {
|
163
126
|
"1": {
|
164
|
-
"name": "
|
127
|
+
"name": "entity.name.function.declaration.c"
|
165
128
|
}
|
166
129
|
},
|
167
|
-
"end": "
|
168
|
-
"name": "meta.preprocessor.diagnostic.c",
|
130
|
+
"end": ";",
|
169
131
|
"patterns": [
|
170
132
|
{
|
171
|
-
"
|
172
|
-
|
133
|
+
"include": "#lex"
|
134
|
+
},
|
135
|
+
{
|
136
|
+
"include": "#parens"
|
173
137
|
}
|
174
138
|
]
|
175
139
|
},
|
176
|
-
{
|
177
|
-
"
|
178
|
-
"
|
140
|
+
"function-definition": {
|
141
|
+
"name": "meta.function.c",
|
142
|
+
"begin": "(?x)\n\t\t\t\t(?: ^\n\t\t\t\t | (?<! (?<!\\w) new\n\t\t\t\t | (?<!\\w) (?:else|enum) | (?<!\\w) (?:class|union)\n\t\t\t\t | (?<!\\w) (?:struct|return|sizeof|typeof)\n\t\t\t\t | (?<!\\w) __typeof | (?<!\\w) __typeof__ )\n\t\t\t\t (?<= \\w ) \\s\n\n\t\t\t\t | # or type modifier / closing bracket before name\n\t\t\t\t (?<= [^&]& | [*>)}\\]\\:] ) ) \\s*\n\n\t\t\t\t( (?: [A-Za-z_]\\w*+ | ::[^:] )++\n\t\t\t\t (?: (?<= ^ operator | \\W operator ) # C++ operator?\n\t\t\t\t (?: [-*&<>=+!]+ | \\(\\) | \\[\\] ) )? )\n\n\t\t\t\t(?= (?:\\s|/\\*.*?\\*/)*+ \\( )\n\t\t\t",
|
143
|
+
"beginCaptures": {
|
179
144
|
"1": {
|
180
|
-
"name": "
|
145
|
+
"name": "entity.name.function.definition.c"
|
181
146
|
}
|
182
147
|
},
|
183
|
-
"end": "
|
184
|
-
"name": "meta.preprocessor.macro.c",
|
148
|
+
"end": "\\}|;",
|
185
149
|
"patterns": [
|
186
150
|
{
|
187
|
-
"
|
188
|
-
"name": "punctuation.separator.continuation.c"
|
151
|
+
"include": "#lex"
|
189
152
|
},
|
190
153
|
{
|
191
|
-
"
|
192
|
-
"beginCaptures": {
|
193
|
-
"0": {
|
194
|
-
"name": "punctuation.definition.string.begin.c"
|
195
|
-
}
|
196
|
-
},
|
197
|
-
"end": "\"",
|
198
|
-
"endCaptures": {
|
199
|
-
"0": {
|
200
|
-
"name": "punctuation.definition.string.end.c"
|
201
|
-
}
|
202
|
-
},
|
203
|
-
"name": "string.quoted.double.include.c"
|
154
|
+
"include": "#parens"
|
204
155
|
},
|
205
156
|
{
|
206
|
-
"
|
207
|
-
"
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
},
|
212
|
-
"end": ">",
|
213
|
-
"endCaptures": {
|
214
|
-
"0": {
|
215
|
-
"name": "punctuation.definition.string.end.c"
|
216
|
-
}
|
217
|
-
},
|
218
|
-
"name": "string.quoted.other.lt-gt.include.c"
|
157
|
+
"match": "\\s*\\b(const|override)\\b",
|
158
|
+
"name": "storage.modifier.c"
|
159
|
+
},
|
160
|
+
{
|
161
|
+
"include": "#block-lookahead-end"
|
219
162
|
}
|
220
163
|
]
|
221
164
|
},
|
222
|
-
{
|
223
|
-
"
|
224
|
-
|
225
|
-
|
226
|
-
"begin": "^\\s*#\\s*(assert|endinput|file|else|line|section)\\b",
|
227
|
-
"captures": {
|
228
|
-
"1": {
|
229
|
-
"name": "keyword.control.import.c"
|
230
|
-
}
|
231
|
-
},
|
232
|
-
"end": "(?=(?://|/\\*))|$",
|
233
|
-
"name": "meta.preprocessor.macro.c",
|
165
|
+
"call": {
|
166
|
+
"name": "meta.function-call.c",
|
167
|
+
"begin": "(?x)\n\t\t\t\t\\s*\n\t\t\t\t(?= # don't consume to recognize support functions\n\t\t\t\t (?: [A-Za-z_]\\w*+ | ::[^:] )++\n\t\t\t\t (?:\\s|/\\*.*?\\*/)*+ \\( )\n\t\t\t",
|
168
|
+
"end": "\\)",
|
234
169
|
"patterns": [
|
235
170
|
{
|
236
|
-
"
|
237
|
-
|
171
|
+
"include": "#lex"
|
172
|
+
},
|
173
|
+
{
|
174
|
+
"match": "(?:(?<=\\.)|(?<=->))\\b([A-Za-z_]\\w*+)\\b",
|
175
|
+
"name": "variable.other.dot-access.c support.function.any-method.c"
|
176
|
+
},
|
177
|
+
{
|
178
|
+
"match": "(?:[A-Za-z_]\\w*+|::[^:])++",
|
179
|
+
"name": "support.function.any-method.c"
|
180
|
+
},
|
181
|
+
{
|
182
|
+
"include": "#parens-lookahead-end"
|
238
183
|
}
|
239
184
|
]
|
240
185
|
},
|
241
|
-
{
|
242
|
-
"begin": "
|
243
|
-
"
|
244
|
-
|
245
|
-
|
186
|
+
"preprocessor": {
|
187
|
+
"begin": "(?=^\\s*(#))",
|
188
|
+
"end": "(?!^\\s*(#))",
|
189
|
+
"patterns": [
|
190
|
+
{
|
191
|
+
"include": "#ppline-directive-invalid-usage"
|
246
192
|
},
|
247
|
-
|
248
|
-
"
|
193
|
+
{
|
194
|
+
"include": "#ppline-macro"
|
195
|
+
},
|
196
|
+
{
|
197
|
+
"include": "#ppline-undef"
|
198
|
+
},
|
199
|
+
{
|
200
|
+
"include": "#ppline-pragma-mark"
|
201
|
+
},
|
202
|
+
{
|
203
|
+
"include": "#ppline-include"
|
204
|
+
},
|
205
|
+
{
|
206
|
+
"include": "#ppline-error"
|
207
|
+
},
|
208
|
+
{
|
209
|
+
"include": "#ppline-directive"
|
210
|
+
},
|
211
|
+
{
|
212
|
+
"include": "#ppline-directive-obsolete"
|
213
|
+
},
|
214
|
+
{
|
215
|
+
"include": "#ppline-directive-emit"
|
216
|
+
},
|
217
|
+
{
|
218
|
+
"include": "#ppline-invalid"
|
219
|
+
},
|
220
|
+
{
|
221
|
+
"include": "#ppline-any"
|
249
222
|
}
|
250
|
-
|
251
|
-
|
252
|
-
|
223
|
+
]
|
224
|
+
},
|
225
|
+
"preprocessor-lex": {
|
253
226
|
"patterns": [
|
254
227
|
{
|
255
|
-
"
|
256
|
-
|
228
|
+
"include": "#comments"
|
229
|
+
},
|
230
|
+
{
|
231
|
+
"include": "#lex-continuation"
|
232
|
+
},
|
233
|
+
{
|
234
|
+
"include": "#lex-newline"
|
257
235
|
}
|
258
236
|
]
|
259
237
|
},
|
260
|
-
{
|
261
|
-
"begin": "^\\s
|
262
|
-
"
|
263
|
-
"
|
264
|
-
"name": "keyword.
|
265
|
-
},
|
266
|
-
"2": {
|
267
|
-
"name": "string.quoted.double.c"
|
238
|
+
"ppline-macro": {
|
239
|
+
"begin": "^\\s*(#)(?=\\s*(define)\\s+[a-zA-Z_]\\w*+)",
|
240
|
+
"beginCaptures": {
|
241
|
+
"0": {
|
242
|
+
"name": "keyword.other.preprocessor.c"
|
268
243
|
}
|
269
244
|
},
|
270
|
-
"end": "(
|
245
|
+
"end": "(?<=$\\n)(?<!\\\\$\\n)",
|
271
246
|
"name": "meta.preprocessor.macro.c",
|
272
247
|
"patterns": [
|
273
248
|
{
|
274
|
-
"match": "(
|
275
|
-
"
|
249
|
+
"match": "\\s*(##)",
|
250
|
+
"captures": {
|
251
|
+
"1": {
|
252
|
+
"name": "keyword.other.preprocessor.c"
|
253
|
+
}
|
254
|
+
}
|
255
|
+
},
|
256
|
+
{
|
257
|
+
"match": "\\s*(#)\\s*([a-zA-Z_]\\w*+)",
|
258
|
+
"captures": {
|
259
|
+
"1": {
|
260
|
+
"name": "keyword.other.preprocessor.c"
|
261
|
+
},
|
262
|
+
"2": {
|
263
|
+
"name": "string.macro.stringify.c"
|
264
|
+
}
|
265
|
+
}
|
266
|
+
},
|
267
|
+
{
|
268
|
+
"include": "#ppline-macro-head-function"
|
269
|
+
},
|
270
|
+
{
|
271
|
+
"include": "#ppline-macro-head-object"
|
272
|
+
},
|
273
|
+
{
|
274
|
+
"include": "#lex-in-preprocessor"
|
275
|
+
},
|
276
|
+
{
|
277
|
+
"include": "#support"
|
276
278
|
}
|
277
279
|
]
|
278
280
|
},
|
279
|
-
{
|
280
|
-
"
|
281
|
+
"ppline-macro-head-object": {
|
282
|
+
"match": "(?<!##)(?<=#)(\\s*define)\\s+([a-zA-Z_]\\w*+)(?!\\()[\\s&&[^\\n]]*",
|
283
|
+
"captures": {
|
284
|
+
"1": {
|
285
|
+
"name": "keyword.other.preprocessor.define.c"
|
286
|
+
},
|
287
|
+
"2": {
|
288
|
+
"name": "entity.name.constant.preprocessor.c"
|
289
|
+
}
|
290
|
+
}
|
281
291
|
},
|
282
|
-
{
|
283
|
-
"begin": "(
|
292
|
+
"ppline-macro-head-function": {
|
293
|
+
"begin": "(?<!##)(?<=#)(\\s*define)\\s+([a-zA-Z_]\\w*+)(\\()",
|
284
294
|
"beginCaptures": {
|
285
295
|
"1": {
|
286
|
-
"name": "
|
296
|
+
"name": "keyword.other.preprocessor.define.c"
|
297
|
+
},
|
298
|
+
"2": {
|
299
|
+
"name": "entity.name.function.preprocessor.c"
|
287
300
|
},
|
288
301
|
"3": {
|
289
|
-
"name": "
|
302
|
+
"name": "meta.preprocessor.macro.parameters.c"
|
303
|
+
}
|
304
|
+
},
|
305
|
+
"end": "(?<=\\))|(?<=^|[^\\\\])\\s*(\\n)",
|
306
|
+
"endCaptures": {
|
307
|
+
"1": {
|
308
|
+
"name": "invalid.illegal.unexpected-end-of-line.c"
|
309
|
+
}
|
310
|
+
},
|
311
|
+
"contentName": "meta.preprocessor.macro.parameters.c",
|
312
|
+
"patterns": [
|
313
|
+
{
|
314
|
+
"match": "\\)"
|
315
|
+
},
|
316
|
+
{
|
317
|
+
"begin": "(%[0-9]+)",
|
318
|
+
"beginCaptures": {
|
319
|
+
"1": {
|
320
|
+
"name": "variable.parameter.c"
|
321
|
+
}
|
322
|
+
},
|
323
|
+
"end": "(?<=\\))|(?=(?<=^|[^\\\\])\\s*(\\n))",
|
324
|
+
"patterns": [
|
325
|
+
{
|
326
|
+
"match": "\\)"
|
327
|
+
},
|
328
|
+
{
|
329
|
+
"include": "#ppline-macro-param-next"
|
330
|
+
},
|
331
|
+
{
|
332
|
+
"include": "#ppline-macro-param-vararg"
|
333
|
+
},
|
334
|
+
{
|
335
|
+
"include": "#ppline-macro-param-lex"
|
336
|
+
},
|
337
|
+
{
|
338
|
+
"include": "#ppline-macro-param-lex-invalid"
|
339
|
+
}
|
340
|
+
]
|
341
|
+
},
|
342
|
+
{
|
343
|
+
"include": "#ppline-macro-param-vararg"
|
344
|
+
},
|
345
|
+
{
|
346
|
+
"include": "#ppline-macro-param-lex"
|
347
|
+
},
|
348
|
+
{
|
349
|
+
"include": "#ppline-macro-param-lex-invalid"
|
350
|
+
}
|
351
|
+
]
|
352
|
+
},
|
353
|
+
"ppline-macro-param-next": {
|
354
|
+
"begin": "(,)",
|
355
|
+
"beginCaptures": {
|
356
|
+
"1": {
|
357
|
+
"name": "punctuation.separator.parameter.c"
|
358
|
+
}
|
359
|
+
},
|
360
|
+
"end": "(%[0-9]+)|(?=\\.\\.\\.)|(\\))|(?=(?<=^|[^\\\\])\\s*(\\n))",
|
361
|
+
"endCaptures": {
|
362
|
+
"1": {
|
363
|
+
"name": "variable.parameter.c"
|
364
|
+
},
|
365
|
+
"2": {
|
366
|
+
"name": "invalid.illegal.unexpected-closing-paren.c"
|
367
|
+
}
|
368
|
+
},
|
369
|
+
"patterns": [
|
370
|
+
{
|
371
|
+
"include": "#ppline-macro-param-lex"
|
372
|
+
},
|
373
|
+
{
|
374
|
+
"match": "(?x)\n\t\t\t\t\t\t(?: (?! (?:\\s|/\\*.*?\\*/)*+\n\t\t\t\t\t\t\t (?: (%[0-9]+) | \\.\\.\\. | \\) | (?>(?:\\\\\\s*)?$\\n?) | /[/*] ) )\n\t\t\t\t\t\t .)*\n\t\t\t\t\t",
|
375
|
+
"name": "invalid.illegal.unexpected-character.c"
|
376
|
+
}
|
377
|
+
]
|
378
|
+
},
|
379
|
+
"ppline-macro-param-vararg": {
|
380
|
+
"begin": "(\\.\\.\\.)",
|
381
|
+
"beginCaptures": {
|
382
|
+
"1": {
|
383
|
+
"name": "punctuation.definition.ellipsis.c"
|
384
|
+
}
|
385
|
+
},
|
386
|
+
"end": "(\\))|(?=(?<=^|[^\\\\])\\s*(\\n))",
|
387
|
+
"patterns": [
|
388
|
+
{
|
389
|
+
"include": "#ppline-macro-param-lex"
|
390
|
+
},
|
391
|
+
{
|
392
|
+
"match": "(?x)\n\t\t\t\t\t\t(?: (?! (?:\\s|/\\*.*?\\*/)*+\n\t\t\t\t\t\t\t (?: \\) | (?>(?:\\\\\\s*)?$\\n?) | /[/*] ) )\n\t\t\t\t\t\t .)*\n\t\t\t\t\t",
|
393
|
+
"name": "invalid.illegal.unexpected-character.c"
|
394
|
+
}
|
395
|
+
]
|
396
|
+
},
|
397
|
+
"ppline-macro-param-lex": {
|
398
|
+
"patterns": [
|
399
|
+
{
|
400
|
+
"match": "\\s*"
|
401
|
+
},
|
402
|
+
{
|
403
|
+
"begin": "\\s*//",
|
404
|
+
"beginCaptures": {
|
405
|
+
"0": {
|
406
|
+
"name": "punctuation.definition.comment.c"
|
407
|
+
}
|
408
|
+
},
|
409
|
+
"end": "(?<=^|[^\\\\])\\s*(?=\\n)$",
|
410
|
+
"name": "invalid.illegal.unexpected-end-of-line.c",
|
411
|
+
"patterns": [
|
412
|
+
{
|
413
|
+
"include": "#lex-continuation"
|
414
|
+
}
|
415
|
+
]
|
416
|
+
},
|
417
|
+
{
|
418
|
+
"include": "#preprocessor-lex"
|
419
|
+
}
|
420
|
+
]
|
421
|
+
},
|
422
|
+
"ppline-macro-param-lex-invalid": {
|
423
|
+
"patterns": [
|
424
|
+
{
|
425
|
+
"match": "(?x)\n\t\t\t\t\t\t(?: (?! (?:\\s|/\\*.*?\\*/)*+\n\t\t\t\t\t\t (?: \\) | (?>(?:\\\\\\s*)?$\\n?) | /[/*] ) )\n\t\t\t\t\t\t .) # no star unlike its friends in arg/vararg\n\t\t\t\t\t",
|
426
|
+
"name": "invalid.illegal.unexpected-character.c"
|
427
|
+
}
|
428
|
+
]
|
429
|
+
},
|
430
|
+
"ppline-undef": {
|
431
|
+
"begin": "(^\\s*(#)\\s*(undef))\\s+([a-zA-Z_]\\w*+)",
|
432
|
+
"beginCaptures": {
|
433
|
+
"1": {
|
434
|
+
"name": "keyword.other.preprocessor.c"
|
435
|
+
},
|
436
|
+
"4": {
|
437
|
+
"name": "variable.macro.undef.c"
|
438
|
+
}
|
439
|
+
},
|
440
|
+
"end": "(?<=$\\n)(?<!\\\\$\\n)",
|
441
|
+
"name": "meta.preprocessor.undef.c",
|
442
|
+
"patterns": [
|
443
|
+
|
444
|
+
]
|
445
|
+
},
|
446
|
+
"ppline-include": {
|
447
|
+
"begin": "^\\s*(#)\\s*(include|tryinclude)\\b",
|
448
|
+
"beginCaptures": {
|
449
|
+
"0": {
|
450
|
+
"name": "keyword.other.preprocessor.include.c"
|
451
|
+
}
|
452
|
+
},
|
453
|
+
"end": "(?:(\"[^\"]*?)|(<[^>]*?))(\\n)|(?<=$\\n)(?<!\\\\$\\n)",
|
454
|
+
"endCaptures": {
|
455
|
+
"1": {
|
456
|
+
"name": "string.quoted.double.include.c"
|
457
|
+
},
|
458
|
+
"2": {
|
459
|
+
"name": "string.quoted.other.lt-gt.include.c"
|
460
|
+
},
|
461
|
+
"3": {
|
462
|
+
"name": "invalid.illegal.unexpected-end-of-line.c"
|
463
|
+
}
|
464
|
+
},
|
465
|
+
"name": "meta.preprocessor.include.c meta.preprocessor.c.include",
|
466
|
+
"patterns": [
|
467
|
+
{
|
468
|
+
"include": "#ppline-include-innards"
|
469
|
+
}
|
470
|
+
]
|
471
|
+
},
|
472
|
+
"ppline-include-innards": {
|
473
|
+
"patterns": [
|
474
|
+
{
|
475
|
+
"include": "#preprocessor-lex"
|
476
|
+
},
|
477
|
+
{
|
478
|
+
"begin": "\"|(?=.*?\")",
|
479
|
+
"beginCaptures": {
|
480
|
+
"0": {
|
481
|
+
"name": "punctuation.definition.string.begin.c"
|
482
|
+
}
|
483
|
+
},
|
484
|
+
"end": "\"|(?<=^|[^\\\\])(?=\\s*\\n)",
|
485
|
+
"endCaptures": {
|
486
|
+
"0": {
|
487
|
+
"name": "punctuation.definition.string.end.c"
|
488
|
+
}
|
489
|
+
},
|
490
|
+
"name": "string.quoted.double.include.c"
|
491
|
+
},
|
492
|
+
{
|
493
|
+
"begin": "<(?=.*?>)",
|
494
|
+
"beginCaptures": {
|
495
|
+
"0": {
|
496
|
+
"name": "punctuation.definition.string.begin.c"
|
497
|
+
}
|
498
|
+
},
|
499
|
+
"end": ">|(?<=^|[^\\\\])(?=\\s*\\n)",
|
500
|
+
"endCaptures": {
|
501
|
+
"0": {
|
502
|
+
"name": "punctuation.definition.string.end.c"
|
503
|
+
}
|
504
|
+
},
|
505
|
+
"name": "string.quoted.other.lt-gt.include.c"
|
506
|
+
},
|
507
|
+
{
|
508
|
+
"begin": "\\(",
|
509
|
+
"end": "\\)|(?<=^|[^\\\\])(?=\\s*\\n)",
|
510
|
+
"name": "meta.parens.c",
|
511
|
+
"patterns": [
|
512
|
+
{
|
513
|
+
"include": "#ppline-include-innards"
|
514
|
+
}
|
515
|
+
]
|
516
|
+
}
|
517
|
+
]
|
518
|
+
},
|
519
|
+
"ppline-error": {
|
520
|
+
"begin": "^\\s*(#)\\s*(error|warning)\\b",
|
521
|
+
"beginCaptures": {
|
522
|
+
"0": {
|
523
|
+
"name": "keyword.other.preprocessor.include.c"
|
524
|
+
}
|
525
|
+
},
|
526
|
+
"end": "(.*)|(?<=$\\n)(?<!\\\\$\\n)",
|
527
|
+
"endCaptures": {
|
528
|
+
"1": {
|
529
|
+
"name": "string.quoted.double.c"
|
530
|
+
}
|
531
|
+
},
|
532
|
+
"name": "meta.preprocessor.include.c meta.preprocessor.c.include"
|
533
|
+
},
|
534
|
+
"ppline-pragma-mark": {
|
535
|
+
"begin": "(^\\s*(#)\\s*(pragma\\s+(align|amxlimit|amxram|codepage|compress|ctrlchar|deprecated|dynamic|library|overlay|pack|rational|semicolon|tabsize|unused))\\b)[\\s&&[^\\n]]*",
|
536
|
+
"beginCaptures": {
|
537
|
+
"1": {
|
538
|
+
"name": "keyword.other.preprocessor.pragma.c"
|
539
|
+
}
|
540
|
+
},
|
541
|
+
"end": "(?<=$\\n)(?<!\\\\$\\n)",
|
542
|
+
"name": "meta.preprocessor.directive.c",
|
543
|
+
"patterns": [
|
544
|
+
{
|
545
|
+
"include": "#lex-core"
|
546
|
+
}
|
547
|
+
]
|
548
|
+
},
|
549
|
+
"ppline-directive": {
|
550
|
+
"begin": "^\\s*(#)\\s*(if|elseif|else|endif|pragma|line|define|undef|section|assert|file|endinput)\\b",
|
551
|
+
"beginCaptures": {
|
552
|
+
"0": {
|
553
|
+
"name": "keyword.other.preprocessor.c"
|
554
|
+
}
|
555
|
+
},
|
556
|
+
"end": "(?<=$\\n)(?<!\\\\$\\n)",
|
557
|
+
"name": "meta.preprocessor.directive.c",
|
558
|
+
"patterns": [
|
559
|
+
{
|
560
|
+
"include": "#lex-core"
|
561
|
+
},
|
562
|
+
{
|
563
|
+
"include": "#lex-in-preprocessor"
|
564
|
+
}
|
565
|
+
]
|
566
|
+
},
|
567
|
+
"ppline-directive-emit": {
|
568
|
+
"begin": "(?x)\n\t\t\t\t^\\s*(\\#|@)\\s*(emit) #pre-processor directive\n\t\t\t\t(\\s+\n\t\t\t\t\t([A-Z0-9a-z]+)\n\t\t\t\t\t(\n\t\t\t\t\t\t(\\.)([A-Za-z]+)\n\t\t\t\t\t\t((\\.)([A-Za-z]+))?\n\t\t\t\t\t)?\n\t\t\t\t|\\s*)\n\t\t\t",
|
569
|
+
"beginCaptures": {
|
570
|
+
"1": {
|
571
|
+
"name": "keyword.other.preprocessor.c"
|
572
|
+
},
|
573
|
+
"2": {
|
574
|
+
"name": "keyword.control.import.c"
|
575
|
+
},
|
576
|
+
"4": {
|
577
|
+
"name": "entity.name.function.preprocessor.c"
|
578
|
+
},
|
579
|
+
"6": {
|
580
|
+
"name": "punctuation.separator.parameters.c"
|
581
|
+
},
|
582
|
+
"7": {
|
583
|
+
"name": "entity.name.function.preprocessor.c"
|
584
|
+
}
|
585
|
+
},
|
586
|
+
"end": "(?<=$\\n)(?<!\\\\$\\n)",
|
587
|
+
"name": "meta.preprocessor.directive.emit.c",
|
588
|
+
"patterns": [
|
589
|
+
{
|
590
|
+
"include": "#lex-core"
|
591
|
+
},
|
592
|
+
{
|
593
|
+
"include": "#lex-in-preprocessor"
|
594
|
+
}
|
595
|
+
]
|
596
|
+
},
|
597
|
+
"ppline-directive-invalid-usage": {
|
598
|
+
"match": "(^\\s*(#)\\s*(if|elseif|pragma|define|undef|include|tryinclude)\\b)\\s*?(\\n|$)",
|
599
|
+
"captures": {
|
600
|
+
"1": {
|
601
|
+
"name": "keyword.other.preprocessor.c"
|
602
|
+
},
|
603
|
+
"4": {
|
604
|
+
"name": "invalid.illegal.invalid-usage-of-preprocessor-directive.c"
|
605
|
+
}
|
606
|
+
},
|
607
|
+
"name": "meta.preprocessor.directive.c"
|
608
|
+
},
|
609
|
+
"ppline-invalid": {
|
610
|
+
"begin": "^\\s*(#)(?!\\s*(?=/[/*]|(?>\\\\\\s*\\n)|\\n|$))\\s*(\\w*)",
|
611
|
+
"end": "(?<=$\\n)(?<!\\\\$\\n)",
|
612
|
+
"beginCaptures": {
|
613
|
+
"1": {
|
614
|
+
"name": "keyword.other.preprocessor.c"
|
615
|
+
},
|
616
|
+
"2": {
|
617
|
+
"name": "invalid.illegal.preprocessor.c"
|
618
|
+
}
|
619
|
+
},
|
620
|
+
"name": "meta.preprocessor.directive.illegal.c"
|
621
|
+
},
|
622
|
+
"ppline-any": {
|
623
|
+
"begin": "^\\s*(#)",
|
624
|
+
"beginCaptures": {
|
625
|
+
"0": {
|
626
|
+
"name": "keyword.other.preprocessor.c"
|
627
|
+
}
|
628
|
+
},
|
629
|
+
"end": "(?<=$\\n)(?<!\\\\$\\n)",
|
630
|
+
"name": "meta.preprocessor.directive.null-directive.c",
|
631
|
+
"patterns": [
|
632
|
+
{
|
633
|
+
"include": "#lex-core"
|
634
|
+
}
|
635
|
+
]
|
636
|
+
},
|
637
|
+
"support": {
|
638
|
+
"patterns": [
|
639
|
+
{
|
640
|
+
"include": "#support-modifier"
|
641
|
+
},
|
642
|
+
{
|
643
|
+
"include": "#support-keyword"
|
644
|
+
}
|
645
|
+
]
|
646
|
+
},
|
647
|
+
"support-modifier": {
|
648
|
+
"patterns": [
|
649
|
+
{
|
650
|
+
"match": "\\s*\\b(inline|using)\\b",
|
651
|
+
"captures": {
|
652
|
+
"1": {
|
653
|
+
"name": "storage.modifier.c"
|
654
|
+
}
|
655
|
+
}
|
656
|
+
}
|
657
|
+
]
|
658
|
+
},
|
659
|
+
"support-keyword": {
|
660
|
+
"patterns": [
|
661
|
+
{
|
662
|
+
"match": "\\s*\\b(foreach)\\b",
|
663
|
+
"captures": {
|
664
|
+
"1": {
|
665
|
+
"name": "keyword.control.c"
|
666
|
+
}
|
667
|
+
}
|
668
|
+
}
|
669
|
+
]
|
670
|
+
},
|
671
|
+
"comments": {
|
672
|
+
"patterns": [
|
673
|
+
{
|
674
|
+
"begin": "\\s*(/\\*)",
|
675
|
+
"captures": {
|
676
|
+
"1": {
|
677
|
+
"name": "punctuation.definition.comment.block.c"
|
678
|
+
}
|
679
|
+
},
|
680
|
+
"end": "(\\*/)(\\n?)",
|
681
|
+
"endCaptures": {
|
682
|
+
"2": {
|
683
|
+
"name": "punctuation.whitespace.newline.c"
|
684
|
+
}
|
685
|
+
},
|
686
|
+
"name": "comment.block.c",
|
687
|
+
"patterns": [
|
688
|
+
{
|
689
|
+
"include": "#comment-innards"
|
690
|
+
}
|
691
|
+
]
|
692
|
+
},
|
693
|
+
{
|
694
|
+
"match": "\\*/(?![/*])",
|
695
|
+
"name": "invalid.illegal.stray-comment-end.c"
|
696
|
+
},
|
697
|
+
{
|
698
|
+
"begin": "\\s*(//)",
|
699
|
+
"beginCaptures": {
|
700
|
+
"1": {
|
701
|
+
"name": "punctuation.definition.comment.line.double-slash.c++"
|
702
|
+
}
|
703
|
+
},
|
704
|
+
"end": "(?<=$\\n)(?<!\\\\$\\n)",
|
705
|
+
"name": "comment.line.double-slash.c++",
|
706
|
+
"patterns": [
|
707
|
+
{
|
708
|
+
"include": "#comment-innards"
|
709
|
+
}
|
710
|
+
]
|
711
|
+
}
|
712
|
+
]
|
713
|
+
},
|
714
|
+
"comment-innards": {
|
715
|
+
"patterns": [
|
716
|
+
{
|
717
|
+
"include": "#comment-banner-line"
|
718
|
+
},
|
719
|
+
{
|
720
|
+
"include": "#comment-task-tag-line"
|
721
|
+
},
|
722
|
+
{
|
723
|
+
"include": "#lex-continuation"
|
724
|
+
},
|
725
|
+
{
|
726
|
+
"include": "#lex-newline"
|
727
|
+
}
|
728
|
+
]
|
729
|
+
},
|
730
|
+
"comment-banner-line": {
|
731
|
+
"match": "(?:(?<=//)|(?<=/\\*)|^)[\\s/*]*(=+\\s*(.*?)\\s*=+(?:(?=[\\s/*+\\-]*\\*/)|$(\\n?)))",
|
732
|
+
"captures": {
|
733
|
+
"1": {
|
734
|
+
"name": "meta.toc-list.banner.c"
|
735
|
+
},
|
736
|
+
"3": {
|
737
|
+
"name": "punctuation.whitespace.newline.c"
|
738
|
+
}
|
739
|
+
}
|
740
|
+
},
|
741
|
+
"comment-task-tag-line": {
|
742
|
+
"patterns": [
|
743
|
+
{
|
744
|
+
"begin": "(?ix)\n\t\t\t\t\t (?= (?-i: @[a-zA-Z_]++ | \\b [A-Z_]++) \\b) @? \\b (?:\n\t\t\t\t\t (FIXME) | (XXX) | (WTF)\n\t\t\t\t\t ) \\b\n\t\t\t\t\t",
|
745
|
+
"beginCaptures": {
|
746
|
+
"0": {
|
747
|
+
"name": "keyword.other.task-tag.prio-high.c"
|
748
|
+
},
|
749
|
+
"1": {
|
750
|
+
"name": "storage.type.class.fixme.c"
|
751
|
+
},
|
752
|
+
"2": {
|
753
|
+
"name": "storage.type.class.xxx.c"
|
754
|
+
},
|
755
|
+
"3": {
|
756
|
+
"name": "storage.type.class.wtf.c"
|
757
|
+
}
|
758
|
+
},
|
759
|
+
"end": "(?=[\\s/*]*\\*/)|(?<=$\\n)",
|
760
|
+
"name": "meta.toc-list.task-tag.prio-high.c",
|
761
|
+
"patterns": [
|
762
|
+
{
|
763
|
+
"include": "#comment-task-tag-line-innards"
|
764
|
+
}
|
765
|
+
]
|
766
|
+
},
|
767
|
+
{
|
768
|
+
"begin": "(?ix)\n\t\t\t\t\t (?= (?-i: @[a-zA-Z_]++ | \\b [A-Z_]++) \\b) @? \\b (?:\n\t\t\t\t\t (TODO)\n\t\t\t\t\t ) \\b\n\t\t\t\t\t",
|
769
|
+
"beginCaptures": {
|
770
|
+
"0": {
|
771
|
+
"name": "keyword.other.task-tag.prio-normal.c"
|
772
|
+
},
|
773
|
+
"1": {
|
774
|
+
"name": "storage.type.class.todo.c"
|
775
|
+
}
|
776
|
+
},
|
777
|
+
"end": "(?=[\\s/*]*\\*/)|(?<=$\\n)",
|
778
|
+
"name": "meta.toc-list.task-tag.prio-normal.c",
|
779
|
+
"patterns": [
|
780
|
+
{
|
781
|
+
"include": "#comment-task-tag-line-innards"
|
782
|
+
}
|
783
|
+
]
|
784
|
+
},
|
785
|
+
{
|
786
|
+
"begin": "(?ix)\n\t\t\t\t\t (?= (?-i: @[a-zA-Z_]++ | \\b [A-Z_]++) \\b) @? \\b (?:\n\t\t\t\t\t (TBD) | (REVIEW)\n\t\t\t\t\t ) \\b\n\t\t\t\t\t",
|
787
|
+
"beginCaptures": {
|
788
|
+
"0": {
|
789
|
+
"name": "keyword.other.task-tag.prio-low.c"
|
790
|
+
},
|
791
|
+
"1": {
|
792
|
+
"name": "storage.type.class.tbd.c"
|
793
|
+
},
|
794
|
+
"2": {
|
795
|
+
"name": "storage.type.class.review.c"
|
796
|
+
}
|
797
|
+
},
|
798
|
+
"end": "(?=[\\s/*]*\\*/)|(?<=$\\n)",
|
799
|
+
"name": "meta.toc-list.task-tag.prio-low.c",
|
800
|
+
"patterns": [
|
801
|
+
{
|
802
|
+
"include": "#comment-task-tag-line-innards"
|
803
|
+
}
|
804
|
+
]
|
805
|
+
},
|
806
|
+
{
|
807
|
+
"begin": "(?ix)\n\t\t\t\t\t (?= (?-i: @[a-zA-Z_]++ | \\b [A-Z_]++) \\b) @? \\b (?:\n\t\t\t\t\t (NOTE) | (NB) | (CHANGED) | (IDEA) | (IMPORTANT) | (HACK) | (BUG)\n\t\t\t\t\t ) \\b\n\t\t\t\t\t",
|
808
|
+
"beginCaptures": {
|
809
|
+
"0": {
|
810
|
+
"name": "keyword.other.task-tag.note.c"
|
811
|
+
},
|
812
|
+
"1": {
|
813
|
+
"name": "storage.type.class.note.c"
|
814
|
+
},
|
815
|
+
"2": {
|
816
|
+
"name": "storage.type.class.nb.c"
|
817
|
+
},
|
818
|
+
"3": {
|
819
|
+
"name": "storage.type.class.changed.c"
|
820
|
+
},
|
821
|
+
"4": {
|
822
|
+
"name": "storage.type.class.idea.c"
|
823
|
+
},
|
824
|
+
"5": {
|
825
|
+
"name": "storage.type.class.important.c"
|
826
|
+
},
|
827
|
+
"6": {
|
828
|
+
"name": "storage.type.class.hack.c"
|
829
|
+
},
|
830
|
+
"7": {
|
831
|
+
"name": "storage.type.class.bug.c"
|
832
|
+
}
|
833
|
+
},
|
834
|
+
"end": "(?=[\\s/*]*\\*/)|(?<=$\\n)",
|
835
|
+
"name": "meta.toc-list.task-tag.note.c",
|
836
|
+
"patterns": [
|
837
|
+
{
|
838
|
+
"include": "#comment-task-tag-line-innards"
|
839
|
+
}
|
840
|
+
]
|
841
|
+
}
|
842
|
+
]
|
843
|
+
},
|
844
|
+
"comment-task-tag-line-innards": {
|
845
|
+
"patterns": [
|
846
|
+
{
|
847
|
+
"include": "#comment-task-tag-line"
|
848
|
+
},
|
849
|
+
{
|
850
|
+
"include": "#lex-continuation"
|
851
|
+
},
|
852
|
+
{
|
853
|
+
"include": "#lex-newline"
|
854
|
+
}
|
855
|
+
]
|
856
|
+
},
|
857
|
+
"lex": {
|
858
|
+
"patterns": [
|
859
|
+
{
|
860
|
+
"include": "#lex-in-preprocessor"
|
861
|
+
},
|
862
|
+
{
|
863
|
+
"include": "#preprocessor"
|
864
|
+
}
|
865
|
+
]
|
866
|
+
},
|
867
|
+
"lex-in-preprocessor": {
|
868
|
+
"patterns": [
|
869
|
+
{
|
870
|
+
"include": "#lex-core"
|
871
|
+
},
|
872
|
+
{
|
873
|
+
"include": "#lex-keyword"
|
874
|
+
},
|
875
|
+
{
|
876
|
+
"include": "#support-keyword"
|
877
|
+
},
|
878
|
+
{
|
879
|
+
"include": "#lex-constant"
|
880
|
+
}
|
881
|
+
]
|
882
|
+
},
|
883
|
+
"lex-core": {
|
884
|
+
"patterns": [
|
885
|
+
{
|
886
|
+
"include": "#comments"
|
887
|
+
},
|
888
|
+
{
|
889
|
+
"include": "#lex-continuation"
|
890
|
+
},
|
891
|
+
{
|
892
|
+
"include": "#lex-newline"
|
893
|
+
},
|
894
|
+
{
|
895
|
+
"include": "#lex-number"
|
896
|
+
},
|
897
|
+
{
|
898
|
+
"include": "#lex-string"
|
899
|
+
}
|
900
|
+
]
|
901
|
+
},
|
902
|
+
"lex-continuation": {
|
903
|
+
"patterns": [
|
904
|
+
{
|
905
|
+
"match": "(\\\\)$(\\n?)",
|
906
|
+
"name": "punctuation.separator.continuation.c",
|
907
|
+
"captures": {
|
908
|
+
"1": {
|
909
|
+
"name": "keyword.other.line-continuation.c"
|
910
|
+
},
|
911
|
+
"2": {
|
912
|
+
"name": "punctuation.whitespace.newline.c"
|
913
|
+
}
|
914
|
+
}
|
915
|
+
},
|
916
|
+
{
|
917
|
+
"match": "\\\\(\\s+?)(?=\\n)$",
|
918
|
+
"captures": {
|
919
|
+
"1": {
|
920
|
+
"name": "invalid.deprecated.space-after-continuation.c"
|
921
|
+
}
|
922
|
+
}
|
923
|
+
}
|
924
|
+
]
|
925
|
+
},
|
926
|
+
"lex-newline": {
|
927
|
+
"match": "$\\n",
|
928
|
+
"name": "punctuation.whitespace.newline.c"
|
929
|
+
},
|
930
|
+
"lex-keyword": {
|
931
|
+
"patterns": [
|
932
|
+
{
|
933
|
+
"match": "\\s*\\b(defined)\\b",
|
934
|
+
"captures": {
|
935
|
+
"1": {
|
936
|
+
"name": "keyword.other.preprocessor.c"
|
937
|
+
}
|
938
|
+
}
|
939
|
+
},
|
940
|
+
{
|
941
|
+
"match": "\\s*\\b(sizeof|tagof)\\b",
|
942
|
+
"captures": {
|
943
|
+
"1": {
|
944
|
+
"name": "keyword.operator.c"
|
945
|
+
}
|
946
|
+
}
|
947
|
+
},
|
948
|
+
{
|
949
|
+
"match": "(Iterator:)(\\t)",
|
950
|
+
"captures": {
|
951
|
+
"2": {
|
952
|
+
"name": "invalid.illegal.invalid-indentation"
|
953
|
+
}
|
954
|
+
}
|
955
|
+
},
|
956
|
+
{
|
957
|
+
"begin": "^\\s*(case)\\s+",
|
958
|
+
"beginCaptures": {
|
959
|
+
"1": {
|
960
|
+
"name": "keyword.control.c"
|
961
|
+
}
|
962
|
+
},
|
963
|
+
"end": "(:)|(?<=^|[^\\\\])\\s*(\\n)",
|
964
|
+
"endCaptures": {
|
965
|
+
"1": {
|
966
|
+
"name": "keyword.operator.ternary.c"
|
967
|
+
}
|
968
|
+
},
|
969
|
+
"patterns": [
|
970
|
+
{
|
971
|
+
"include": "#lex-core"
|
972
|
+
}
|
973
|
+
]
|
974
|
+
},
|
975
|
+
{
|
976
|
+
"match": "\\s*\\b(assert|break|case|continue|default|do|else|exit|for|goto|if|return|sleep|state|switch|while)\\b",
|
977
|
+
"captures": {
|
978
|
+
"1": {
|
979
|
+
"name": "keyword.control.c"
|
980
|
+
}
|
981
|
+
}
|
982
|
+
},
|
983
|
+
{
|
984
|
+
"match": "\\s*\\b(new|enum)\\b",
|
985
|
+
"captures": {
|
986
|
+
"1": {
|
987
|
+
"name": "storage.type.c"
|
988
|
+
}
|
989
|
+
}
|
990
|
+
},
|
991
|
+
{
|
992
|
+
"match": "\\s*\\b(public|forward|native|char|const|static|stock|hook|task|ptask)\\b",
|
993
|
+
"captures": {
|
994
|
+
"1": {
|
995
|
+
"name": "storage.modifier.c"
|
996
|
+
}
|
997
|
+
}
|
998
|
+
},
|
999
|
+
{
|
1000
|
+
"match": "([A-Za-z_]\\w*)\\:",
|
1001
|
+
"name": "storage.modifier.c"
|
1002
|
+
},
|
1003
|
+
{
|
1004
|
+
"match": "(\\-|\\+|\\*|\\/|%|&|\\||\\^|<<|>>)?=",
|
1005
|
+
"name": "keyword.operator.assignment.c"
|
1006
|
+
},
|
1007
|
+
{
|
1008
|
+
"match": "(==|!=|<=|>=|<>|<|>)",
|
1009
|
+
"name": "keyword.operator.comparison.c"
|
1010
|
+
},
|
1011
|
+
{
|
1012
|
+
"match": "(\\-\\-|\\+\\+)",
|
1013
|
+
"name": "keyword.operator.increment-decrement.c"
|
290
1014
|
},
|
291
|
-
"4": {
|
292
|
-
"name": "punctuation.definition.parameters.c"
|
293
|
-
}
|
294
|
-
},
|
295
|
-
"end": "(?<=\\})|(?=#)|(;)",
|
296
|
-
"name": "meta.function.c",
|
297
|
-
"patterns": [
|
298
1015
|
{
|
299
|
-
"
|
1016
|
+
"match": "(\\?|:)",
|
1017
|
+
"name": "keyword.operator.ternary.c"
|
300
1018
|
},
|
301
1019
|
{
|
302
|
-
"
|
1020
|
+
"match": "(\\-|\\+|\\*|\\/|%)",
|
1021
|
+
"name": "keyword.operator.arithmetic.c"
|
303
1022
|
},
|
304
1023
|
{
|
305
|
-
"match": "
|
306
|
-
"name": "
|
1024
|
+
"match": "(!|&&|\\|\\|)",
|
1025
|
+
"name": "keyword.operator.logical.c"
|
307
1026
|
},
|
308
1027
|
{
|
309
|
-
"
|
1028
|
+
"match": "(~|&|\\||\\^|<<|>>)",
|
1029
|
+
"name": "keyword.operator.bitwise.c"
|
310
1030
|
}
|
311
1031
|
]
|
312
|
-
}
|
313
|
-
|
314
|
-
"repository": {
|
315
|
-
"block": {
|
316
|
-
"begin": "\\{",
|
317
|
-
"end": "\\}",
|
318
|
-
"name": "meta.block.c",
|
1032
|
+
},
|
1033
|
+
"lex-constant": {
|
319
1034
|
"patterns": [
|
320
1035
|
{
|
321
|
-
"
|
1036
|
+
"match": "\\s*\\b(true|false|TRUE|FALSE)\\b",
|
1037
|
+
"captures": {
|
1038
|
+
"1": {
|
1039
|
+
"name": "constant.language.c"
|
1040
|
+
}
|
1041
|
+
}
|
322
1042
|
}
|
323
1043
|
]
|
324
1044
|
},
|
325
|
-
"
|
1045
|
+
"lex-number": {
|
326
1046
|
"patterns": [
|
327
1047
|
{
|
328
|
-
"
|
329
|
-
},
|
330
|
-
{
|
331
|
-
"include": "#preprocessor-rule-disabled-block"
|
332
|
-
},
|
333
|
-
{
|
334
|
-
"include": "#preprocessor-rule-other-block"
|
335
|
-
},
|
336
|
-
{
|
337
|
-
"include": "#sizeof"
|
338
|
-
},
|
339
|
-
{
|
340
|
-
"include": "#access"
|
341
|
-
},
|
342
|
-
{
|
1048
|
+
"match": "([0-9]+)(\\.{2})([0-9]+)",
|
343
1049
|
"captures": {
|
344
1050
|
"1": {
|
345
|
-
"name": "
|
1051
|
+
"name": "constant.numeric.integer.decimal.c"
|
346
1052
|
},
|
347
1053
|
"2": {
|
348
|
-
"name": "
|
1054
|
+
"name": "keyword.operator.switch-range.c"
|
1055
|
+
},
|
1056
|
+
"3": {
|
1057
|
+
"name": "constant.numeric.integer.decimal.c"
|
349
1058
|
}
|
350
1059
|
}
|
351
1060
|
},
|
352
1061
|
{
|
1062
|
+
"match": "(?ix) # hexadecimal float\n\t\t\t\t\t\t(?<!\\.) \\b\n\n\t\t\t\t\t\t(0x)\n\n\t\t\t\t\t\t# significand\n\t\t\t\t\t\t(?: (\\.) (?=p) # invalid\n\t\t\t\t\t\t | [0-9a-f]*+ ([0-9a-z]*?) [0-9a-f]*+\n\t\t\t\t\t\t (?: \\. [0-9a-f]*+ ([0-9a-z.]*?) [0-9a-f]*+ )? )\n\n\t\t\t\t\t\t# exponent (required)\n\t\t\t\t\t\t(?: (p) (?: [+\\-] [0-9]++ ([0-9a-z]*?)\n\t\t\t\t\t\t | (?=[0-9a-z.]) [0-9]*+ ([0-9a-z.]*?) )\n\t\t\t\t\t\t | (p) )\n\n\t\t\t\t\t\t# remaining valid chars and type\n\t\t\t\t\t\t[0-9]*+ ([fl]?)\n\n\t\t\t\t\t\t\\b (?!\\.)\n\t\t\t\t\t",
|
1063
|
+
"name": "constant.numeric.float.hexadecimal.c",
|
353
1064
|
"captures": {
|
354
1065
|
"1": {
|
355
|
-
"name": "
|
1066
|
+
"name": "storage.type.number.prefix.hexadecimal.c"
|
356
1067
|
},
|
357
1068
|
"2": {
|
358
|
-
"name": "
|
1069
|
+
"name": "invalid.illegal.number.missing-fragment.significand.c"
|
359
1070
|
},
|
360
1071
|
"3": {
|
361
|
-
"name": "
|
1072
|
+
"name": "invalid.illegal.numeric-literal-character.float.whole-number.c"
|
1073
|
+
},
|
1074
|
+
"4": {
|
1075
|
+
"name": "invalid.illegal.numeric-literal-character.float.fraction.c"
|
1076
|
+
},
|
1077
|
+
"5": {
|
1078
|
+
"name": "keyword.other.exponent.hexadecimal.c"
|
1079
|
+
},
|
1080
|
+
"6": {
|
1081
|
+
"name": "invalid.illegal.numeric-literal-character.float.exponent.c"
|
1082
|
+
},
|
1083
|
+
"7": {
|
1084
|
+
"name": "invalid.illegal.numeric-literal-character.float.exponent.c"
|
1085
|
+
},
|
1086
|
+
"8": {
|
1087
|
+
"name": "invalid.illegal.number.missing-fragment.exponent.c"
|
1088
|
+
},
|
1089
|
+
"9": {
|
1090
|
+
"name": "storage.type.number.suffix.float.c"
|
362
1091
|
}
|
363
|
-
}
|
364
|
-
"match": "(?x) (?: (?= \\s ) (?:(?<=else|new|return) | (?<!\\w)) (\\s+))?\n\t\t\t(\\b\n\t\t\t\t(?!(assert|break|case|continue|default|do|else|exit|for|foreach|goto|if|return|sleep|state|switch|while)\\s*\\()(?:(?!NS)[A-Za-z_][A-Za-z0-9_]*+\\b | :: )++ # actual name\n\t\t\t)\n\t\t\t \\s*(\\()",
|
365
|
-
"name": "meta.function-call.c"
|
1092
|
+
}
|
366
1093
|
},
|
367
1094
|
{
|
1095
|
+
"match": "(?ix) # hexadecimal float without required exponent\n\t\t\t\t\t\t(?<!\\.) \\b\n\n\t\t\t\t\t\t(0x)\n\n\t\t\t\t\t\t# significand (at least a period)\n\t\t\t\t\t\t [0-9a-f]*+ ([0-9a-z&&[^p]]*?) [0-9a-f]*+\n\t\t\t\t\t\t(\\.) [0-9a-f]*+ ([0-9a-z.&&[^p]]*?) [0-9a-f]*+\n\n\t\t\t\t\t\t# type\n\t\t\t\t\t\t(l?)\n\n\t\t\t\t\t\t(?:(?<=\\.)|\\b) (?!\\.)\n\t\t\t\t\t",
|
1096
|
+
"name": "constant.numeric.float.hexadecimal.c",
|
368
1097
|
"captures": {
|
369
1098
|
"1": {
|
370
|
-
"name": "
|
1099
|
+
"name": "storage.type.number.prefix.hexadecimal.c"
|
371
1100
|
},
|
372
1101
|
"2": {
|
373
|
-
"name": "
|
1102
|
+
"name": "invalid.illegal.numeric-literal-character.float.whole-number.c"
|
1103
|
+
},
|
1104
|
+
"3": {
|
1105
|
+
"name": "invalid.illegal.number.hexadecimal-float-requires-exponent.c"
|
1106
|
+
},
|
1107
|
+
"4": {
|
1108
|
+
"name": "invalid.illegal.numeric-literal-character.float.fraction.c"
|
1109
|
+
},
|
1110
|
+
"5": {
|
1111
|
+
"name": "storage.type.number.suffix.float.c"
|
374
1112
|
}
|
375
|
-
}
|
376
|
-
"match": "(?x)\n\t\t\t (?x)\n\t\t\t(?:\n\t\t\t (?: (?= \\s ) (?<!else|new|return) (?<=\\w)\\s+ # or word + space before name\n\t\t\t )\n\t\t\t)\n\t\t\t(\n\t\t\t\t(?: [A-Za-z_][A-Za-z0-9_]*+ | :: )++ | # actual name\n\t\t\t\t(?: (?<=operator) (?: [-*&<>=+!]+ | \\(\\) | \\[\\] ) )? # if it is a C++ operator\n\t\t\t)\n\t\t\t \\s*(\\()",
|
377
|
-
"name": "meta.initialization.c"
|
378
|
-
},
|
379
|
-
{
|
380
|
-
"include": "#block"
|
1113
|
+
}
|
381
1114
|
},
|
382
1115
|
{
|
383
|
-
"
|
384
|
-
|
385
|
-
]
|
386
|
-
},
|
387
|
-
"comments": {
|
388
|
-
"patterns": [
|
389
|
-
{
|
1116
|
+
"match": "(?ix) # decimal float literal\n\t\t\t\t\t\t(?<!\\.) (?:(?=\\.)|\\b)\n\n\t\t\t\t\t\t(?!0x)\n\t\t\t\t\t\t# significand\n\t\t\t\t\t\t(?: (?: [0-9]++ ([0-9a-z&&[^e]]*?) [0-9]*+ )?\n\t\t\t\t\t\t \\. [0-9]++ ([0-9a-z.&&[^e]]*?) [0-9]*+\n\n\t\t\t\t\t\t | [0-9]++ ([0-9a-z&&[^e]]*?) [0-9]*+ (?: \\. | (?=e)) )\n\n\t\t\t\t\t\t# exponent (optional)\n\t\t\t\t\t\t(?: (e) (?: [+\\-] [0-9]++ ([0-9a-z]*?)\n\t\t\t\t\t\t | [0-9]++ ([0-9a-z.]*?) )\n\t\t\t\t\t\t | ( p [+\\-]? [0-9]++\n\t\t\t\t\t\t | [ep] [0-9a-z.]*?) )?\n\n\t\t\t\t\t\t# any invalid chars and type\n\t\t\t\t\t\t([0-9a-z]*?) [0-9]*+ ([fl]?)\n\n\t\t\t\t\t\t(?:(?<=\\.)|\\b) (?!\\.)\n\t\t\t\t\t",
|
1117
|
+
"name": "constant.numeric.float.c",
|
390
1118
|
"captures": {
|
391
1119
|
"1": {
|
392
|
-
"name": "
|
1120
|
+
"name": "invalid.illegal.numeric-literal-character.float.whole-number.c"
|
1121
|
+
},
|
1122
|
+
"2": {
|
1123
|
+
"name": "invalid.illegal.numeric-literal-character.float.fraction.c"
|
1124
|
+
},
|
1125
|
+
"3": {
|
1126
|
+
"name": "invalid.illegal.numeric-literal-character.float.whole-number.c"
|
1127
|
+
},
|
1128
|
+
"4": {
|
1129
|
+
"name": "keyword.other.exponent.decimal.c"
|
1130
|
+
},
|
1131
|
+
"5": {
|
1132
|
+
"name": "invalid.illegal.numeric-literal-character.float.exponent.c"
|
1133
|
+
},
|
1134
|
+
"6": {
|
1135
|
+
"name": "invalid.illegal.numeric-literal-character.float.exponent.c"
|
1136
|
+
},
|
1137
|
+
"7": {
|
1138
|
+
"name": "invalid.illegal.numeric-literal-character.float.exponent.c"
|
1139
|
+
},
|
1140
|
+
"8": {
|
1141
|
+
"name": "invalid.illegal.numeric-literal-character.float.exponent.c"
|
1142
|
+
},
|
1143
|
+
"9": {
|
1144
|
+
"name": "storage.type.number.suffix.float.c"
|
393
1145
|
}
|
394
|
-
}
|
395
|
-
"match": "^/\\* =(\\s*.*?)\\s*= \\*/$\\n?",
|
396
|
-
"name": "comment.block.c"
|
1146
|
+
}
|
397
1147
|
},
|
398
1148
|
{
|
399
|
-
"
|
1149
|
+
"match": "(?ix)\n\t\t\t\t\t\t(?<!\\.) \\b\n\t\t\t\t\t\t(0x)? 0++\n\t\t\t\t\t\t(u?l{0,2}|lul?|llu)\n\t\t\t\t\t\t\\b (?!\\.)\n\t\t\t\t\t",
|
1150
|
+
"name": "constant.numeric.integer.zero.c",
|
400
1151
|
"captures": {
|
401
|
-
"
|
402
|
-
"name": "
|
1152
|
+
"1": {
|
1153
|
+
"name": "storage.type.number.prefix.hexadecimal.c"
|
1154
|
+
},
|
1155
|
+
"2": {
|
1156
|
+
"name": "storage.type.number.suffix.c"
|
403
1157
|
}
|
404
|
-
}
|
405
|
-
"end": "\\*/",
|
406
|
-
"name": "comment.block.c"
|
1158
|
+
}
|
407
1159
|
},
|
408
1160
|
{
|
409
|
-
"match": "
|
410
|
-
"name": "invalid.illegal.
|
1161
|
+
"match": "(?ix)\n\t\t\t\t\t\t(?<!\\.) \\b\n\n\t\t\t\t\t\t(?: (0x) | (0b) )\n\t\t\t\t\t\t(u?l{0,2}|lul?|llu)\n\n\t\t\t\t\t\t\\b (?!\\.)\n\t\t\t\t\t",
|
1162
|
+
"name": "invalid.illegal.invalid-number-literal.c"
|
411
1163
|
},
|
412
1164
|
{
|
1165
|
+
"match": "(?ix)\n\t\t\t\t\t\t(?<!\\.) \\b\n\n\t\t\t\t\t\t(0x) [0-9a-f]++\n\n\t\t\t\t\t\t# any invalid chars\n\t\t\t\t\t\t([0-9a-z]*?)\n\n\t\t\t\t\t\t# the remainder (after invalid chars, if any) and a type\n\t\t\t\t\t\t[0-9a-f]* (u?l{0,2}|lul?|llu)\n\n\t\t\t\t\t\t\\b (?!\\.)\n\t\t\t\t\t",
|
1166
|
+
"name": "constant.numeric.integer.hexadecimal.c",
|
413
1167
|
"captures": {
|
414
1168
|
"1": {
|
415
|
-
"name": "
|
416
|
-
}
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
"begin": "//",
|
423
|
-
"beginCaptures": {
|
424
|
-
"0": {
|
425
|
-
"name": "punctuation.definition.comment.c"
|
426
|
-
}
|
427
|
-
},
|
428
|
-
"end": "$\\n?",
|
429
|
-
"name": "comment.line.double-slash.c++",
|
430
|
-
"patterns": [
|
431
|
-
{
|
432
|
-
"match": "(?>\\\\\\s*\\n)",
|
433
|
-
"name": "punctuation.separator.continuation.c++"
|
1169
|
+
"name": "storage.type.number.prefix.hexadecimal.c"
|
1170
|
+
},
|
1171
|
+
"2": {
|
1172
|
+
"name": "invalid.illegal.numeric-literal-character.integer.c"
|
1173
|
+
},
|
1174
|
+
"3": {
|
1175
|
+
"name": "storage.type.number.suffix.c"
|
434
1176
|
}
|
435
|
-
|
436
|
-
}
|
437
|
-
]
|
438
|
-
},
|
439
|
-
"disabled": {
|
440
|
-
"begin": "^\\s*#\\s*(if|elseif)\\s*(!?defined)?\\b[a-zA-Z0-9_]*$",
|
441
|
-
"comment": "eat nested preprocessor if(def)s",
|
442
|
-
"end": "^\\s*#\\s*endif\\b.*$",
|
443
|
-
"patterns": [
|
444
|
-
{
|
445
|
-
"include": "#disabled"
|
446
|
-
},
|
447
|
-
{
|
448
|
-
"include": "#pragma-mark"
|
449
|
-
}
|
450
|
-
]
|
451
|
-
},
|
452
|
-
"parens": {
|
453
|
-
"begin": "\\(",
|
454
|
-
"end": "\\)",
|
455
|
-
"name": "meta.parens.c",
|
456
|
-
"patterns": [
|
457
|
-
{
|
458
|
-
"include": "$base"
|
459
|
-
}
|
460
|
-
]
|
461
|
-
},
|
462
|
-
"pragma-mark": {
|
463
|
-
"captures": {
|
464
|
-
"1": {
|
465
|
-
"name": "meta.preprocessor.c"
|
466
|
-
},
|
467
|
-
"2": {
|
468
|
-
"name": "keyword.control.import.pragma.c"
|
469
|
-
},
|
470
|
-
"3": {
|
471
|
-
"name": "keyword.control.import.pragma.c"
|
472
|
-
}
|
473
|
-
},
|
474
|
-
"match": "^\\s*(#\\s*(pragma)\\s+(align|amxlimit|amxram|codepage|compress|ctrlchar|deprecated|dynamic|library|overlay|pack|rational|semicolon|tabsize|unused))",
|
475
|
-
"name": "meta.section"
|
476
|
-
},
|
477
|
-
"preprocessor-rule-disabled": {
|
478
|
-
"begin": "^\\s*(#(if)\\s+(0)\\b).*",
|
479
|
-
"captures": {
|
480
|
-
"1": {
|
481
|
-
"name": "meta.preprocessor.c"
|
482
|
-
},
|
483
|
-
"2": {
|
484
|
-
"name": "keyword.control.import.if.c"
|
1177
|
+
}
|
485
1178
|
},
|
486
|
-
"3": {
|
487
|
-
"name": "constant.numeric.preprocessor.c"
|
488
|
-
}
|
489
|
-
},
|
490
|
-
"end": "^\\s*(#\\s*(endif)\\b)",
|
491
|
-
"patterns": [
|
492
1179
|
{
|
493
|
-
"
|
1180
|
+
"match": "(?ix)\n\t\t\t\t\t\t(?<!\\.) \\b\n\n\t\t\t\t\t\t(0b) [01]++\n\n\t\t\t\t\t\t# any invalid chars\n\t\t\t\t\t\t([0-9a-z]*?)\n\n\t\t\t\t\t\t# the remainder (after invalid chars, if any) and a type\n\t\t\t\t\t\t[01]* (u?l{0,2}|lul?|llu)\n\n\t\t\t\t\t\t\\b (?!\\.)\n\t\t\t\t\t",
|
1181
|
+
"name": "constant.numeric.integer.binary.c",
|
494
1182
|
"captures": {
|
495
1183
|
"1": {
|
496
|
-
"name": "
|
1184
|
+
"name": "storage.type.number.prefix.binary.c"
|
497
1185
|
},
|
498
1186
|
"2": {
|
499
|
-
"name": "
|
500
|
-
}
|
501
|
-
},
|
502
|
-
"end": "(?=^\\s*#\\s*endif\\b.*$)",
|
503
|
-
"patterns": [
|
504
|
-
{
|
505
|
-
"include": "$base"
|
506
|
-
}
|
507
|
-
]
|
508
|
-
},
|
509
|
-
{
|
510
|
-
"begin": "",
|
511
|
-
"end": "(?=^\\s*#\\s*(else|endif)\\b.*$)",
|
512
|
-
"name": "comment.block.preprocessor.if-branch",
|
513
|
-
"patterns": [
|
514
|
-
{
|
515
|
-
"include": "#disabled"
|
1187
|
+
"name": "invalid.illegal.numeric-literal-character.integer.c"
|
516
1188
|
},
|
517
|
-
{
|
518
|
-
"
|
1189
|
+
"3": {
|
1190
|
+
"name": "storage.type.number.suffix.c"
|
519
1191
|
}
|
520
|
-
|
521
|
-
}
|
522
|
-
]
|
523
|
-
},
|
524
|
-
"preprocessor-rule-disabled-block": {
|
525
|
-
"begin": "^\\s*(#(if)\\s+(0)\\b).*",
|
526
|
-
"captures": {
|
527
|
-
"1": {
|
528
|
-
"name": "meta.preprocessor.c"
|
529
|
-
},
|
530
|
-
"2": {
|
531
|
-
"name": "keyword.control.import.if.c"
|
1192
|
+
}
|
532
1193
|
},
|
533
|
-
"3": {
|
534
|
-
"name": "constant.numeric.preprocessor.c"
|
535
|
-
}
|
536
|
-
},
|
537
|
-
"end": "^\\s*(#\\s*(endif)\\b)",
|
538
|
-
"patterns": [
|
539
1194
|
{
|
540
|
-
"
|
1195
|
+
"match": "(?ix)\n\t\t\t\t\t\t(?<!\\.) \\b\n\n\t\t\t\t\t\t(0) [0-7]++\n\n\t\t\t\t\t\t# any invalid chars\n\t\t\t\t\t\t([0-9a-z]*?)\n\n\t\t\t\t\t\t# the remainder (after invalid chars, if any) and a type\n\t\t\t\t\t\t[0-7]* (u?l{0,2}|lul?|llu)\n\n\t\t\t\t\t\t\\b (?!\\.)\n\t\t\t\t\t",
|
1196
|
+
"name": "constant.numeric.integer.octal.c",
|
541
1197
|
"captures": {
|
542
1198
|
"1": {
|
543
|
-
"name": "
|
1199
|
+
"name": "storage.type.number.prefix.octal.c"
|
544
1200
|
},
|
545
1201
|
"2": {
|
546
|
-
"name": "
|
547
|
-
}
|
548
|
-
|
549
|
-
|
550
|
-
"patterns": [
|
551
|
-
{
|
552
|
-
"include": "#block_innards"
|
1202
|
+
"name": "invalid.illegal.numeric-literal-character.integer.c"
|
1203
|
+
},
|
1204
|
+
"3": {
|
1205
|
+
"name": "storage.type.number.suffix.c"
|
553
1206
|
}
|
554
|
-
|
1207
|
+
}
|
555
1208
|
},
|
556
1209
|
{
|
557
|
-
"
|
558
|
-
"
|
559
|
-
"
|
560
|
-
|
561
|
-
|
562
|
-
"include": "#disabled"
|
1210
|
+
"match": "(?ix)\n\t\t\t\t\t\t\\b\n\n\t\t\t\t\t\t[0-9][0-9_]*\n\n\t\t\t\t\t\t# any invalid chars\n\t\t\t\t\t\t([0-9a-z]*?)\n\n\t\t\t\t\t\t# the remainder (after invalid chars, if any) and a type\n\t\t\t\t\t\t[0-9]* (u?l{0,2}|lul?|llu)\n\n\t\t\t\t\t\t\\b\n\t\t\t\t\t",
|
1211
|
+
"name": "constant.numeric.integer.decimal.c",
|
1212
|
+
"captures": {
|
1213
|
+
"1": {
|
1214
|
+
"name": "invalid.illegal.numeric-literal-character.integer.c"
|
563
1215
|
},
|
564
|
-
{
|
565
|
-
"
|
1216
|
+
"2": {
|
1217
|
+
"name": "storage.type.number.suffix.c"
|
566
1218
|
}
|
567
|
-
|
1219
|
+
}
|
568
1220
|
}
|
569
1221
|
]
|
570
1222
|
},
|
571
|
-
"
|
572
|
-
"begin": "^\\s*(#(if)\\s+(0*1)\\b)",
|
573
|
-
"captures": {
|
574
|
-
"1": {
|
575
|
-
"name": "meta.preprocessor.c"
|
576
|
-
},
|
577
|
-
"2": {
|
578
|
-
"name": "keyword.control.import.if.c"
|
579
|
-
},
|
580
|
-
"3": {
|
581
|
-
"name": "constant.numeric.preprocessor.c"
|
582
|
-
}
|
583
|
-
},
|
584
|
-
"end": "^\\s*(#\\s*(endif)\\b)",
|
1223
|
+
"lex-string": {
|
585
1224
|
"patterns": [
|
586
1225
|
{
|
587
|
-
"begin": "
|
588
|
-
"
|
1226
|
+
"begin": "\"",
|
1227
|
+
"beginCaptures": {
|
1228
|
+
"0": {
|
1229
|
+
"name": "punctuation.definition.string.begin.c"
|
1230
|
+
}
|
1231
|
+
},
|
1232
|
+
"end": "(\")|(?<=^|[^\\\\])\\s*(\\n)",
|
1233
|
+
"endCaptures": {
|
589
1234
|
"1": {
|
590
|
-
"name": "
|
1235
|
+
"name": "punctuation.definition.string.end.c"
|
591
1236
|
},
|
592
1237
|
"2": {
|
593
|
-
"name": "
|
1238
|
+
"name": "invalid.illegal.unexpected-end-of-line.c"
|
594
1239
|
}
|
595
1240
|
},
|
596
|
-
"
|
597
|
-
"end": "(?=^\\s*#\\s*endif\\b.*$)",
|
1241
|
+
"name": "string.quoted.double.c",
|
598
1242
|
"patterns": [
|
599
1243
|
{
|
600
|
-
"include": "#
|
1244
|
+
"include": "#lex-continuation"
|
601
1245
|
},
|
602
1246
|
{
|
603
|
-
"include": "#
|
604
|
-
}
|
605
|
-
]
|
606
|
-
},
|
607
|
-
{
|
608
|
-
"begin": "",
|
609
|
-
"end": "(?=^\\s*#\\s*(else|endif)\\b.*$)",
|
610
|
-
"patterns": [
|
1247
|
+
"include": "#string_escaped_char"
|
1248
|
+
},
|
611
1249
|
{
|
612
|
-
"include": "
|
1250
|
+
"include": "#string_placeholder"
|
613
1251
|
}
|
614
1252
|
]
|
615
|
-
}
|
616
|
-
]
|
617
|
-
},
|
618
|
-
"preprocessor-rule-enabled-block": {
|
619
|
-
"begin": "^\\s*(#(if)\\s+(0*1)\\b)",
|
620
|
-
"captures": {
|
621
|
-
"1": {
|
622
|
-
"name": "meta.preprocessor.c"
|
623
|
-
},
|
624
|
-
"2": {
|
625
|
-
"name": "keyword.control.import.if.c"
|
626
1253
|
},
|
627
|
-
"3": {
|
628
|
-
"name": "constant.numeric.preprocessor.c"
|
629
|
-
}
|
630
|
-
},
|
631
|
-
"end": "^\\s*(#\\s*(endif)\\b)",
|
632
|
-
"patterns": [
|
633
1254
|
{
|
634
|
-
"begin": "
|
635
|
-
"
|
1255
|
+
"begin": "'",
|
1256
|
+
"beginCaptures": {
|
1257
|
+
"0": {
|
1258
|
+
"name": "punctuation.definition.string.begin.c"
|
1259
|
+
}
|
1260
|
+
},
|
1261
|
+
"end": "(')|(?<=^|[^\\\\])\\s*(\\n)",
|
1262
|
+
"endCaptures": {
|
636
1263
|
"1": {
|
637
|
-
"name": "
|
1264
|
+
"name": "punctuation.definition.string.end.c"
|
638
1265
|
},
|
639
1266
|
"2": {
|
640
|
-
"name": "
|
1267
|
+
"name": "invalid.illegal.unexpected-end-of-line.c"
|
641
1268
|
}
|
642
1269
|
},
|
643
|
-
"
|
644
|
-
"end": "(?=^\\s*#\\s*endif\\b.*$)",
|
1270
|
+
"name": "string.quoted.single.c",
|
645
1271
|
"patterns": [
|
646
1272
|
{
|
647
|
-
"include": "#
|
1273
|
+
"include": "#lex-continuation"
|
648
1274
|
},
|
649
1275
|
{
|
650
|
-
"include": "#
|
1276
|
+
"include": "#string_escaped_char"
|
651
1277
|
}
|
652
1278
|
]
|
653
|
-
},
|
654
|
-
{
|
655
|
-
"begin": "",
|
656
|
-
"end": "(?=^\\s*#\\s*(else|endif)\\b.*$)",
|
657
|
-
"patterns": [
|
658
|
-
{
|
659
|
-
"include": "#block_innards"
|
660
|
-
}
|
661
|
-
]
|
662
|
-
}
|
663
|
-
]
|
664
|
-
},
|
665
|
-
"preprocessor-rule-other": {
|
666
|
-
"begin": "\\s(#\\s*((if|elseif)\\s*(!?defined)?)\\b\\s*(.*?)(?:(?=(?://|/\\*))|$))",
|
667
|
-
"captures": {
|
668
|
-
"1": {
|
669
|
-
"name": "meta.preprocessor.macro.c"
|
670
|
-
},
|
671
|
-
"2": {
|
672
|
-
"name": "keyword.control.import.c"
|
673
|
-
},
|
674
|
-
"3": {
|
675
|
-
"name": "entity.name.function.preprocessor.c"
|
676
|
-
}
|
677
|
-
},
|
678
|
-
"end": "^\\s*(#\\s*(endif)\\b).*$",
|
679
|
-
"patterns": [
|
680
|
-
{
|
681
|
-
"include": "$base"
|
682
|
-
}
|
683
|
-
]
|
684
|
-
},
|
685
|
-
"preprocessor-rule-other-block": {
|
686
|
-
"begin": "^\\s*(#\\s*((if|elseif)\\s*(!?defined)?)\\b\\s*([a-zA-Z0-9_]*?)(?:(?=(?://|/\\*))|$))",
|
687
|
-
"captures": {
|
688
|
-
"1": {
|
689
|
-
"name": "meta.preprocessor.macro.c"
|
690
|
-
},
|
691
|
-
"2": {
|
692
|
-
"name": "keyword.control.import.c"
|
693
|
-
},
|
694
|
-
"5": {
|
695
|
-
"name": "entity.name.function.preprocessor.c"
|
696
|
-
}
|
697
|
-
},
|
698
|
-
"end": "^\\s*(#\\s*(endif)\\b).*$",
|
699
|
-
"patterns": [
|
700
|
-
{
|
701
|
-
"include": "#block_innards"
|
702
1279
|
}
|
703
1280
|
]
|
704
1281
|
},
|
705
|
-
"sizeof": {
|
706
|
-
"match": "\\b(sizeof)\\b",
|
707
|
-
"name": "keyword.operator.sizeof.c"
|
708
|
-
},
|
709
1282
|
"string_escaped_char": {
|
710
1283
|
"patterns": [
|
711
1284
|
{
|
@@ -721,14 +1294,14 @@
|
|
721
1294
|
"string_placeholder": {
|
722
1295
|
"patterns": [
|
723
1296
|
{
|
724
|
-
"match": "(?x)%\n
|
1297
|
+
"match": "(?x)%\n\t\t\t\t\t\t(\\d+\\$)? # field (argument #)\n\t\t\t\t\t\t[#0\\- +']* # flags\n\t\t\t\t\t\t[,;:_]? # separator character (AltiVec)\n\t\t\t\t\t\t((-?\\d+)|\\*(-?\\d+\\$)?)? # minimum field width\n\t\t\t\t\t\t(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)? # precision\n\t\t\t\t\t\t[diouxXDOUeEfFgGaACcSspnq%] # conversion type\n\t\t\t\t\t",
|
725
1298
|
"name": "constant.other.placeholder.c"
|
1299
|
+
},
|
1300
|
+
{
|
1301
|
+
"match": "%",
|
1302
|
+
"name": "invalid.illegal.placeholder.c"
|
726
1303
|
}
|
727
1304
|
]
|
728
|
-
},
|
729
|
-
"operators": {
|
730
|
-
"match": "\\=|\\+|\\-|\\*|\\/|\\%|\\+\\+|\\-\\-|\\=\\=|\\!\\=|<|>|<\\=|>\\=|\\!|&&|\\||\\~|&|\\||\\^|<lt;|>>|\\+\\=|\\-\\=|\\*\\=|/\\=|\\%\\=|&\\=|\\|\\=|\\^\\=|<<\\=|>>\\=|\\->|\\->\\*|\\.|\\.\\*|\\?|\\\\:\\:",
|
731
|
-
"name": "keyword.operator.sizeof.c"
|
732
1305
|
}
|
733
1306
|
},
|
734
1307
|
"scopeName": "source.pawn",
|