ver 2009.10.14
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +1404 -0
- data/MANIFEST +187 -0
- data/Rakefile +30 -0
- data/TODO +169 -0
- data/bin/ver +19 -0
- data/config/detect.rb +109 -0
- data/config/keymap/vim.rb +239 -0
- data/config/rc.rb +0 -0
- data/config/scratch +3 -0
- data/config/syntax/ANTLR.json +275 -0
- data/config/syntax/ASP VB.net.json +228 -0
- data/config/syntax/ASP.json +135 -0
- data/config/syntax/ActionScript.json +168 -0
- data/config/syntax/Ada.json +108 -0
- data/config/syntax/Apache.json +342 -0
- data/config/syntax/AppleScript.json +721 -0
- data/config/syntax/Bibtex.json +253 -0
- data/config/syntax/Blog (HTML).json +47 -0
- data/config/syntax/Blog (Markdown).json +50 -0
- data/config/syntax/Blog (Text).json +45 -0
- data/config/syntax/Blog (Textile).json +45 -0
- data/config/syntax/Bulletin Board.json +428 -0
- data/config/syntax/C++.json +323 -0
- data/config/syntax/C.json +694 -0
- data/config/syntax/CSS.json +346 -0
- data/config/syntax/DOT.json +79 -0
- data/config/syntax/Diff.json +136 -0
- data/config/syntax/Dylan.json +104 -0
- data/config/syntax/Eiffel.json +128 -0
- data/config/syntax/Erlang.json +1636 -0
- data/config/syntax/F-Script.json +137 -0
- data/config/syntax/FXScript.json +260 -0
- data/config/syntax/Gri.json +141 -0
- data/config/syntax/HTML (Mason).json +207 -0
- data/config/syntax/HTML (Rails).json +52 -0
- data/config/syntax/HTML (Tcl).json +42 -0
- data/config/syntax/HTML for ASP.net.json +736 -0
- data/config/syntax/HTML-ASP.json +45 -0
- data/config/syntax/HTML.json +614 -0
- data/config/syntax/Haskell.json +407 -0
- data/config/syntax/Inform.json +80 -0
- data/config/syntax/Ini.json +91 -0
- data/config/syntax/Io.json +142 -0
- data/config/syntax/Java.json +745 -0
- data/config/syntax/JavaProperties.json +42 -0
- data/config/syntax/JavaScript.json +446 -0
- data/config/syntax/LaTeX Beamer.json +65 -0
- data/config/syntax/LaTeX Log.json +88 -0
- data/config/syntax/LaTeX.json +962 -0
- data/config/syntax/Lighttpd.json +93 -0
- data/config/syntax/Lisp.json +101 -0
- data/config/syntax/Literate Haskell.json +55 -0
- data/config/syntax/Logtalk.json +289 -0
- data/config/syntax/Lua.json +146 -0
- data/config/syntax/M.json +744 -0
- data/config/syntax/MEL.json +161 -0
- data/config/syntax/MIPS.json +114 -0
- data/config/syntax/Mail.json +224 -0
- data/config/syntax/Makefile.json +66 -0
- data/config/syntax/Markdown.json +644 -0
- data/config/syntax/Modula-3.json +80 -0
- data/config/syntax/Movable Type.json +348 -0
- data/config/syntax/OCaml.json +1391 -0
- data/config/syntax/Objective-C++.json +21 -0
- data/config/syntax/OpenGL.json +24 -0
- data/config/syntax/PHP.json +2184 -0
- data/config/syntax/Pascal.json +128 -0
- data/config/syntax/Perl.json +2091 -0
- data/config/syntax/Plain text.json +49 -0
- data/config/syntax/Processing.json +188 -0
- data/config/syntax/Quake3 Config.json +54 -0
- data/config/syntax/R.json +157 -0
- data/config/syntax/Rez.json +137 -0
- data/config/syntax/Ruby on Rails.json +170 -0
- data/config/syntax/Ruby.json +1753 -0
- data/config/syntax/SQL (Rails).json +31 -0
- data/config/syntax/SQL.json +435 -0
- data/config/syntax/SWIG.json +96 -0
- data/config/syntax/Scheme.json +359 -0
- data/config/syntax/Shell-Unix-Generic.json +1198 -0
- data/config/syntax/Slate.json +265 -0
- data/config/syntax/Smarty.json +110 -0
- data/config/syntax/Standard ML.json +322 -0
- data/config/syntax/Subversion commit message.json +62 -0
- data/config/syntax/Tcl.json +278 -0
- data/config/syntax/TeX Math.json +83 -0
- data/config/syntax/TeX.json +157 -0
- data/config/syntax/Textile.json +273 -0
- data/config/syntax/Twiki.json +436 -0
- data/config/syntax/Vectorscript.json +97 -0
- data/config/syntax/XML strict.json +148 -0
- data/config/syntax/XML.json +301 -0
- data/config/syntax/XSL.json +96 -0
- data/config/syntax/YAML.json +293 -0
- data/config/syntax/iCalendar.json +51 -0
- data/config/syntax/reStructuredText.json +403 -0
- data/config/theme/Active4D.json +260 -0
- data/config/theme/All Hallow's Eve.json +171 -0
- data/config/theme/Amy.json +359 -0
- data/config/theme/BBEdit.json +269 -0
- data/config/theme/Bespin.json +322 -0
- data/config/theme/Blackboard.json +215 -0
- data/config/theme/BoysAndGirls01.json +156 -0
- data/config/theme/Brilliance Black.json +1695 -0
- data/config/theme/Brilliance Dull.json +1451 -0
- data/config/theme/Classic Modified.json +288 -0
- data/config/theme/Cobalt.json +345 -0
- data/config/theme/Cool Glow.json +215 -0
- data/config/theme/Dawn.json +258 -0
- data/config/theme/Eiffel.json +270 -0
- data/config/theme/Espresso Libre.json +247 -0
- data/config/theme/Fluidvision.json +272 -0
- data/config/theme/IDLE.json +159 -0
- data/config/theme/LAZY.json +178 -0
- data/config/theme/Mac Classic.json +277 -0
- data/config/theme/MagicWB (Amiga).json +231 -0
- data/config/theme/Merbivore Soft.json +181 -0
- data/config/theme/Merbivore.json +181 -0
- data/config/theme/Monokai.json +177 -0
- data/config/theme/Notepad2.json +166 -0
- data/config/theme/Pastels on Dark.json +437 -0
- data/config/theme/RubyBlue.json +226 -0
- data/config/theme/Sin City 2.json +361 -0
- data/config/theme/Slate.json +270 -0
- data/config/theme/Slush & Poppies.json +232 -0
- data/config/theme/SpaceCadet.json +143 -0
- data/config/theme/Sunburst.json +415 -0
- data/config/theme/Twilight BG FG.json +633 -0
- data/config/theme/Twilight.json +321 -0
- data/config/theme/Whys Poignant.json +119 -0
- data/config/theme/Zenburnesque.json +237 -0
- data/config/theme/barf.json +155 -0
- data/config/theme/fake.json +418 -0
- data/config/theme/happydeluxe.json +114 -0
- data/config/theme/iLife 05.json +393 -0
- data/config/theme/iPlastic.json +177 -0
- data/config/theme/mintBlue Dark.json +414 -0
- data/config/theme/mintBlue.json +415 -0
- data/config/theme/monoindustrial.json +276 -0
- data/config/theme/starlight.json +67 -0
- data/config/tutorial +74 -0
- data/config/welcome +115 -0
- data/help/index.verh +14 -0
- data/lib/ver.rb +156 -0
- data/lib/ver/entry.rb +97 -0
- data/lib/ver/keymap.rb +96 -0
- data/lib/ver/layout.rb +107 -0
- data/lib/ver/methods.rb +19 -0
- data/lib/ver/methods/completion.rb +116 -0
- data/lib/ver/methods/control.rb +340 -0
- data/lib/ver/methods/insert.rb +6 -0
- data/lib/ver/methods/move.rb +65 -0
- data/lib/ver/methods/search.rb +33 -0
- data/lib/ver/methods/select.rb +145 -0
- data/lib/ver/methods/views.rb +21 -0
- data/lib/ver/mode.rb +160 -0
- data/lib/ver/options.rb +207 -0
- data/lib/ver/plist.rb +106 -0
- data/lib/ver/status.rb +67 -0
- data/lib/ver/syntax.rb +68 -0
- data/lib/ver/syntax/detector.rb +53 -0
- data/lib/ver/syntax/processor.rb +48 -0
- data/lib/ver/text.rb +374 -0
- data/lib/ver/textpow.rb +357 -0
- data/lib/ver/theme.rb +162 -0
- data/lib/ver/vendor/fuzzy_file_finder.rb +340 -0
- data/lib/ver/view.rb +163 -0
- data/lib/ver/view/entry.rb +28 -0
- data/lib/ver/view/list.rb +137 -0
- data/lib/ver/view/list/buffer.rb +27 -0
- data/lib/ver/view/list/fuzzy_file_finder.rb +44 -0
- data/lib/ver/view/list/syntax.rb +13 -0
- data/lib/ver/view/list/theme.rb +13 -0
- data/spec/keymap.rb +224 -0
- data/tasks/bacon.rake +49 -0
- data/tasks/changelog.rake +18 -0
- data/tasks/gem.rake +22 -0
- data/tasks/gem_installer.rake +76 -0
- data/tasks/grancher.rake +12 -0
- data/tasks/install_dependencies.rake +6 -0
- data/tasks/manifest.rake +4 -0
- data/tasks/plist2json.rake +35 -0
- data/tasks/rcov.rake +18 -0
- data/tasks/release.rake +12 -0
- data/tasks/reversion.rake +8 -0
- data/tasks/syntax_list.rake +31 -0
- data/ver.gemspec +29 -0
- metadata +241 -0
@@ -0,0 +1,323 @@
|
|
1
|
+
{
|
2
|
+
"comment": "I don't think anyone uses .hp. .cp tends to be paired with .h. (I could be wrong. :) -- chris",
|
3
|
+
"fileTypes": [
|
4
|
+
"cc",
|
5
|
+
"cpp",
|
6
|
+
"cp",
|
7
|
+
"cxx",
|
8
|
+
"c++",
|
9
|
+
"C",
|
10
|
+
"h",
|
11
|
+
"hh",
|
12
|
+
"hpp",
|
13
|
+
"h++"
|
14
|
+
],
|
15
|
+
"firstLineMatch": "-\\*- C\\+\\+ -\\*-",
|
16
|
+
"foldingStartMarker": "(?x)\n\t\t \/\\*\\*(?!\\*)\n\t\t|^(?![^{]*?\/\/|[^{]*?\/\\*(?!.*?\\*\/.*?\\{)).*?\\{\\s*($|\/\/|\/\\*(?!.*?\\*\/.*\\S))\n\t",
|
17
|
+
"foldingStopMarker": "(?<!\\*)\\*\\*\/|^\\s*\\}",
|
18
|
+
"keyEquivalent": "^~C",
|
19
|
+
"name": "C++",
|
20
|
+
"patterns": [
|
21
|
+
{
|
22
|
+
"include": "#special_block"
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"include": "source.c"
|
26
|
+
},
|
27
|
+
{
|
28
|
+
"match": "\\b(friend|explicit|virtual)\\b",
|
29
|
+
"name": "storage.modifier.c++"
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"match": "\\b(private:|protected:|public:)",
|
33
|
+
"name": "storage.modifier.c++"
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"match": "\\b(catch|operator|try|throw|using)\\b",
|
37
|
+
"name": "keyword.control.c++"
|
38
|
+
},
|
39
|
+
{
|
40
|
+
"match": "\\bdelete\\b(\\s*\\[\\])?|\\bnew\\b(?!\\])",
|
41
|
+
"name": "keyword.control.c++"
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"comment": "common C++ instance var naming idiom -- fMemberName",
|
45
|
+
"match": "\\b(f|m)[A-Z]\\w*\\b",
|
46
|
+
"name": "variable.other.readwrite.member.c++"
|
47
|
+
},
|
48
|
+
{
|
49
|
+
"match": "\\b(this)\\b",
|
50
|
+
"name": "variable.language.c++"
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"match": "\\btemplate\\b\\s*",
|
54
|
+
"name": "storage.type.template.c++"
|
55
|
+
},
|
56
|
+
{
|
57
|
+
"match": "\\b(const_cast|dynamic_cast|reinterpret_cast|static_cast)\\b\\s*",
|
58
|
+
"name": "keyword.operator.cast.c++"
|
59
|
+
},
|
60
|
+
{
|
61
|
+
"match": "\\b(and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq)\\b",
|
62
|
+
"name": "keyword.operator.c++"
|
63
|
+
},
|
64
|
+
{
|
65
|
+
"match": "\\b(class|wchar_t)\\b",
|
66
|
+
"name": "storage.type.c++"
|
67
|
+
},
|
68
|
+
{
|
69
|
+
"match": "\\b(export|mutable|typename)\\b",
|
70
|
+
"name": "storage.modifier.c++"
|
71
|
+
},
|
72
|
+
{
|
73
|
+
"begin": "(?x)\n \t\t\t\t(?: ^ # begin-of-line\n \t\t\t\t | (?: (?<!else|new|=) ) # or word + space before name\n \t\t\t\t)\n \t\t\t\t((?:[A-Za-z_][A-Za-z0-9_]*::)*+~[A-Za-z_][A-Za-z0-9_]*) # actual name\n \t\t\t\t \\s*(\\() # start bracket or end-of-line\n \t\t\t",
|
74
|
+
"beginCaptures": {
|
75
|
+
"1": {
|
76
|
+
"name": "entity.name.function.c++"
|
77
|
+
},
|
78
|
+
"2": {
|
79
|
+
"name": "punctuation.definition.parameters.c"
|
80
|
+
}
|
81
|
+
},
|
82
|
+
"end": "\\)",
|
83
|
+
"endCaptures": {
|
84
|
+
"0": {
|
85
|
+
"name": "punctuation.definition.parameters.c"
|
86
|
+
}
|
87
|
+
},
|
88
|
+
"name": "meta.function.destructor.c++",
|
89
|
+
"patterns": [
|
90
|
+
{
|
91
|
+
"include": "$base"
|
92
|
+
}
|
93
|
+
]
|
94
|
+
},
|
95
|
+
{
|
96
|
+
"begin": "(?x)\n \t\t\t\t(?: ^ # begin-of-line\n \t\t\t\t | (?: (?<!else|new|=) ) # or word + space before name\n \t\t\t\t)\n \t\t\t\t((?:[A-Za-z_][A-Za-z0-9_]*::)*+~[A-Za-z_][A-Za-z0-9_]*) # actual name\n \t\t\t\t \\s*(\\() # terminating semi-colon\n \t\t\t",
|
97
|
+
"beginCaptures": {
|
98
|
+
"1": {
|
99
|
+
"name": "entity.name.function.c++"
|
100
|
+
},
|
101
|
+
"2": {
|
102
|
+
"name": "punctuation.definition.parameters.c"
|
103
|
+
}
|
104
|
+
},
|
105
|
+
"end": "\\)",
|
106
|
+
"endCaptures": {
|
107
|
+
"0": {
|
108
|
+
"name": "punctuation.definition.parameters.c"
|
109
|
+
}
|
110
|
+
},
|
111
|
+
"name": "meta.function.destructor.prototype.c++",
|
112
|
+
"patterns": [
|
113
|
+
{
|
114
|
+
"include": "$base"
|
115
|
+
}
|
116
|
+
]
|
117
|
+
}
|
118
|
+
],
|
119
|
+
"repository": {
|
120
|
+
"angle_brackets": {
|
121
|
+
"begin": "<",
|
122
|
+
"end": ">",
|
123
|
+
"name": "meta.angle-brackets.c++",
|
124
|
+
"patterns": [
|
125
|
+
{
|
126
|
+
"include": "#angle_brackets"
|
127
|
+
},
|
128
|
+
{
|
129
|
+
"include": "$base"
|
130
|
+
}
|
131
|
+
]
|
132
|
+
},
|
133
|
+
"block": {
|
134
|
+
"begin": "\\{",
|
135
|
+
"end": "\\}",
|
136
|
+
"name": "meta.block.c++",
|
137
|
+
"patterns": [
|
138
|
+
{
|
139
|
+
"captures": {
|
140
|
+
"1": {
|
141
|
+
"name": "support.function.any-method.c"
|
142
|
+
},
|
143
|
+
"2": {
|
144
|
+
"name": "punctuation.definition.parameters.c"
|
145
|
+
}
|
146
|
+
},
|
147
|
+
"match": "(?x)\n \t\t\t\t(\n \t\t\t\t\t(?!while|for|do|if|else|switch|catch|enumerate|return|r?iterate)(?: \\b[A-Za-z_][A-Za-z0-9_]*+\\b | :: )*+ # actual name\n \t\t\t\t)\n \t\t\t\t \\s*(\\()",
|
148
|
+
"name": "meta.function-call.c"
|
149
|
+
},
|
150
|
+
{
|
151
|
+
"include": "$base"
|
152
|
+
}
|
153
|
+
]
|
154
|
+
},
|
155
|
+
"constructor": {
|
156
|
+
"patterns": [
|
157
|
+
{
|
158
|
+
"begin": "(?x)\n \t\t\t\t(?: ^\\s*) # begin-of-line\n \t\t\t\t((?!while|for|do|if|else|switch|catch|enumerate|r?iterate)[A-Za-z_][A-Za-z0-9_:]*) # actual name\n \t\t\t\t \\s*(\\() # start bracket or end-of-line\n \t\t\t",
|
159
|
+
"beginCaptures": {
|
160
|
+
"1": {
|
161
|
+
"name": "entity.name.function.c++"
|
162
|
+
},
|
163
|
+
"2": {
|
164
|
+
"name": "punctuation.definition.parameters.c"
|
165
|
+
}
|
166
|
+
},
|
167
|
+
"end": "\\)",
|
168
|
+
"endCaptures": {
|
169
|
+
"0": {
|
170
|
+
"name": "punctuation.definition.parameters.c"
|
171
|
+
}
|
172
|
+
},
|
173
|
+
"name": "meta.function.constructor.c++",
|
174
|
+
"patterns": [
|
175
|
+
{
|
176
|
+
"include": "$base"
|
177
|
+
}
|
178
|
+
]
|
179
|
+
},
|
180
|
+
{
|
181
|
+
"begin": "(?x)\n \t\t\t\t(:) # begin-of-line\n \t\t\t\t((?=\\s*[A-Za-z_][A-Za-z0-9_:]* # actual name\n \t\t\t\t \\s*(\\())) # start bracket or end-of-line\n \t\t\t",
|
182
|
+
"beginCaptures": {
|
183
|
+
"1": {
|
184
|
+
"name": "punctuation.definition.parameters.c"
|
185
|
+
}
|
186
|
+
},
|
187
|
+
"end": "(?=\\{)",
|
188
|
+
"name": "meta.function.constructor.initializer-list.c++",
|
189
|
+
"patterns": [
|
190
|
+
{
|
191
|
+
"include": "$base"
|
192
|
+
}
|
193
|
+
]
|
194
|
+
}
|
195
|
+
]
|
196
|
+
},
|
197
|
+
"special_block": {
|
198
|
+
"patterns": [
|
199
|
+
{
|
200
|
+
"begin": "\\b(namespace)\\b\\s*([_A-Za-z][_A-Za-z0-9]*\\b)?+",
|
201
|
+
"beginCaptures": {
|
202
|
+
"1": {
|
203
|
+
"name": "storage.type.c++"
|
204
|
+
},
|
205
|
+
"2": {
|
206
|
+
"name": "entity.name.type.c++"
|
207
|
+
}
|
208
|
+
},
|
209
|
+
"end": "(?<=\\})|(?=(;|,|\\(|\\)|>|\\[|\\]|=))",
|
210
|
+
"name": "meta.namespace-block.c++",
|
211
|
+
"patterns": [
|
212
|
+
{
|
213
|
+
"begin": "(\\{)",
|
214
|
+
"beginCaptures": {
|
215
|
+
"1": {
|
216
|
+
"name": "punctuation.definition.scope.c++"
|
217
|
+
}
|
218
|
+
},
|
219
|
+
"end": "(\\})",
|
220
|
+
"endCaptures": {
|
221
|
+
"1": {
|
222
|
+
"name": "punctuation.definition.invalid.c++"
|
223
|
+
}
|
224
|
+
},
|
225
|
+
"patterns": [
|
226
|
+
{
|
227
|
+
"include": "#special_block"
|
228
|
+
},
|
229
|
+
{
|
230
|
+
"include": "#constructor"
|
231
|
+
},
|
232
|
+
{
|
233
|
+
"include": "$base"
|
234
|
+
}
|
235
|
+
]
|
236
|
+
},
|
237
|
+
{
|
238
|
+
"include": "$base"
|
239
|
+
}
|
240
|
+
]
|
241
|
+
},
|
242
|
+
{
|
243
|
+
"begin": "\\b(class|struct)\\b\\s*([_A-Za-z][_A-Za-z0-9]*\\b)?+",
|
244
|
+
"beginCaptures": {
|
245
|
+
"1": {
|
246
|
+
"name": "storage.type.c++"
|
247
|
+
},
|
248
|
+
"2": {
|
249
|
+
"name": "entity.name.type.c++"
|
250
|
+
}
|
251
|
+
},
|
252
|
+
"end": "(?<=\\})|(?=(;|,|\\(|\\)|>|\\[|\\]|=))",
|
253
|
+
"name": "meta.class-struct-block.c++",
|
254
|
+
"patterns": [
|
255
|
+
{
|
256
|
+
"include": "#angle_brackets"
|
257
|
+
},
|
258
|
+
{
|
259
|
+
"begin": "(\\{)",
|
260
|
+
"beginCaptures": {
|
261
|
+
"1": {
|
262
|
+
"name": "punctuation.definition.scope.c++"
|
263
|
+
}
|
264
|
+
},
|
265
|
+
"end": "(\\})(\\s*\\n)?",
|
266
|
+
"endCaptures": {
|
267
|
+
"1": {
|
268
|
+
"name": "punctuation.definition.invalid.c++"
|
269
|
+
},
|
270
|
+
"2": {
|
271
|
+
"name": "invalid.illegal.you-forgot-semicolon.c++"
|
272
|
+
}
|
273
|
+
},
|
274
|
+
"patterns": [
|
275
|
+
{
|
276
|
+
"include": "#special_block"
|
277
|
+
},
|
278
|
+
{
|
279
|
+
"include": "#constructor"
|
280
|
+
},
|
281
|
+
{
|
282
|
+
"include": "$base"
|
283
|
+
}
|
284
|
+
]
|
285
|
+
},
|
286
|
+
{
|
287
|
+
"include": "$base"
|
288
|
+
}
|
289
|
+
]
|
290
|
+
},
|
291
|
+
{
|
292
|
+
"begin": "\\b(extern)(?=\\s*\")",
|
293
|
+
"beginCaptures": {
|
294
|
+
"1": {
|
295
|
+
"name": "storage.modifier.c++"
|
296
|
+
}
|
297
|
+
},
|
298
|
+
"end": "(?<=\\})|(?=\\w)",
|
299
|
+
"name": "meta.extern-block.c++",
|
300
|
+
"patterns": [
|
301
|
+
{
|
302
|
+
"begin": "\\{",
|
303
|
+
"end": "\\}",
|
304
|
+
"patterns": [
|
305
|
+
{
|
306
|
+
"include": "#special_block"
|
307
|
+
},
|
308
|
+
{
|
309
|
+
"include": "$base"
|
310
|
+
}
|
311
|
+
]
|
312
|
+
},
|
313
|
+
{
|
314
|
+
"include": "$base"
|
315
|
+
}
|
316
|
+
]
|
317
|
+
}
|
318
|
+
]
|
319
|
+
}
|
320
|
+
},
|
321
|
+
"scopeName": "source.c++",
|
322
|
+
"uuid": "26251B18-6B1D-11D9-AFDB-000D93589AF6"
|
323
|
+
}
|
@@ -0,0 +1,694 @@
|
|
1
|
+
{
|
2
|
+
"fileTypes": [
|
3
|
+
"c",
|
4
|
+
"h"
|
5
|
+
],
|
6
|
+
"firstLineMatch": "-[*]-( Mode:)? C -[*]-",
|
7
|
+
"foldingStartMarker": "(?x)\n\t\t \/\\*\\*(?!\\*)\n\t\t|^(?![^{]*?\/\/|[^{]*?\/\\*(?!.*?\\*\/.*?\\{)).*?\\{\\s*($|\/\/|\/\\*(?!.*?\\*\/.*\\S))\n\t",
|
8
|
+
"foldingStopMarker": "(?<!\\*)\\*\\*\/|^\\s*\\}",
|
9
|
+
"keyEquivalent": "^~C",
|
10
|
+
"name": "C",
|
11
|
+
"patterns": [
|
12
|
+
{
|
13
|
+
"include": "#preprocessor-rule-enabled"
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"include": "#preprocessor-rule-disabled"
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"include": "#preprocessor-rule-other"
|
20
|
+
},
|
21
|
+
{
|
22
|
+
"include": "#comments"
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"match": "\\b(break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while)\\b",
|
26
|
+
"name": "keyword.control.c"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"match": "\\b(asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void)\\b",
|
30
|
+
"name": "storage.type.c"
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"match": "\\b(const|extern|register|restrict|static|volatile|inline)\\b",
|
34
|
+
"name": "storage.modifier.c"
|
35
|
+
},
|
36
|
+
{
|
37
|
+
"comment": "common C constant naming idiom -- kConstantVariable",
|
38
|
+
"match": "\\bk[A-Z]\\w*\\b",
|
39
|
+
"name": "constant.other.variable.mac-classic.c"
|
40
|
+
},
|
41
|
+
{
|
42
|
+
"match": "\\bg[A-Z]\\w*\\b",
|
43
|
+
"name": "variable.other.readwrite.global.mac-classic.c"
|
44
|
+
},
|
45
|
+
{
|
46
|
+
"match": "\\bs[A-Z]\\w*\\b",
|
47
|
+
"name": "variable.other.readwrite.static.mac-classic.c"
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"match": "\\b(NULL|true|false|TRUE|FALSE)\\b",
|
51
|
+
"name": "constant.language.c"
|
52
|
+
},
|
53
|
+
{
|
54
|
+
"include": "#sizeof"
|
55
|
+
},
|
56
|
+
{
|
57
|
+
"match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b",
|
58
|
+
"name": "constant.numeric.c"
|
59
|
+
},
|
60
|
+
{
|
61
|
+
"begin": "\"",
|
62
|
+
"beginCaptures": {
|
63
|
+
"0": {
|
64
|
+
"name": "punctuation.definition.string.begin.c"
|
65
|
+
}
|
66
|
+
},
|
67
|
+
"end": "\"",
|
68
|
+
"endCaptures": {
|
69
|
+
"0": {
|
70
|
+
"name": "punctuation.definition.string.end.c"
|
71
|
+
}
|
72
|
+
},
|
73
|
+
"name": "string.quoted.double.c",
|
74
|
+
"patterns": [
|
75
|
+
{
|
76
|
+
"include": "#string_escaped_char"
|
77
|
+
},
|
78
|
+
{
|
79
|
+
"include": "#string_placeholder"
|
80
|
+
}
|
81
|
+
]
|
82
|
+
},
|
83
|
+
{
|
84
|
+
"begin": "'",
|
85
|
+
"beginCaptures": {
|
86
|
+
"0": {
|
87
|
+
"name": "punctuation.definition.string.begin.c"
|
88
|
+
}
|
89
|
+
},
|
90
|
+
"end": "'",
|
91
|
+
"endCaptures": {
|
92
|
+
"0": {
|
93
|
+
"name": "punctuation.definition.string.end.c"
|
94
|
+
}
|
95
|
+
},
|
96
|
+
"name": "string.quoted.single.c",
|
97
|
+
"patterns": [
|
98
|
+
{
|
99
|
+
"include": "#string_escaped_char"
|
100
|
+
}
|
101
|
+
]
|
102
|
+
},
|
103
|
+
{
|
104
|
+
"begin": "(?x)\n \t\t^\\s*\\#\\s*(define)\\s+ # define\n \t\t((?<id>[a-zA-Z_][a-zA-Z0-9_]*)) # macro name\n \t\t(?: # and optionally:\n \t\t (\\() # an open parenthesis\n \t\t (\n \t\t \\s* \\g<id> \\s* # first argument\n \t\t ((,) \\s* \\g<id> \\s*)* # additional arguments\n \t\t (?:\\.\\.\\.)? # varargs ellipsis?\n \t\t )\n \t\t (\\)) # a close parenthesis\n \t\t)?\n \t",
|
105
|
+
"beginCaptures": {
|
106
|
+
"1": {
|
107
|
+
"name": "keyword.control.import.define.c"
|
108
|
+
},
|
109
|
+
"2": {
|
110
|
+
"name": "entity.name.function.preprocessor.c"
|
111
|
+
},
|
112
|
+
"4": {
|
113
|
+
"name": "punctuation.definition.parameters.c"
|
114
|
+
},
|
115
|
+
"5": {
|
116
|
+
"name": "variable.parameter.preprocessor.c"
|
117
|
+
},
|
118
|
+
"7": {
|
119
|
+
"name": "punctuation.separator.parameters.c"
|
120
|
+
},
|
121
|
+
"8": {
|
122
|
+
"name": "punctuation.definition.parameters.c"
|
123
|
+
}
|
124
|
+
},
|
125
|
+
"end": "(?=(?:\/\/|\/\\*))|$",
|
126
|
+
"name": "meta.preprocessor.macro.c",
|
127
|
+
"patterns": [
|
128
|
+
{
|
129
|
+
"match": "(?>\\\\\\s*\\n)",
|
130
|
+
"name": "punctuation.separator.continuation.c"
|
131
|
+
},
|
132
|
+
{
|
133
|
+
"include": "$base"
|
134
|
+
}
|
135
|
+
]
|
136
|
+
},
|
137
|
+
{
|
138
|
+
"begin": "^\\s*#\\s*(error|warning)\\b",
|
139
|
+
"captures": {
|
140
|
+
"1": {
|
141
|
+
"name": "keyword.control.import.error.c"
|
142
|
+
}
|
143
|
+
},
|
144
|
+
"end": "$",
|
145
|
+
"name": "meta.preprocessor.diagnostic.c",
|
146
|
+
"patterns": [
|
147
|
+
{
|
148
|
+
"match": "(?>\\\\\\s*\\n)",
|
149
|
+
"name": "punctuation.separator.continuation.c"
|
150
|
+
}
|
151
|
+
]
|
152
|
+
},
|
153
|
+
{
|
154
|
+
"begin": "^\\s*#\\s*(include|import)\\b\\s+",
|
155
|
+
"captures": {
|
156
|
+
"1": {
|
157
|
+
"name": "keyword.control.import.include.c"
|
158
|
+
}
|
159
|
+
},
|
160
|
+
"end": "(?=(?:\/\/|\/\\*))|$",
|
161
|
+
"name": "meta.preprocessor.c.include",
|
162
|
+
"patterns": [
|
163
|
+
{
|
164
|
+
"match": "(?>\\\\\\s*\\n)",
|
165
|
+
"name": "punctuation.separator.continuation.c"
|
166
|
+
},
|
167
|
+
{
|
168
|
+
"begin": "\"",
|
169
|
+
"beginCaptures": {
|
170
|
+
"0": {
|
171
|
+
"name": "punctuation.definition.string.begin.c"
|
172
|
+
}
|
173
|
+
},
|
174
|
+
"end": "\"",
|
175
|
+
"endCaptures": {
|
176
|
+
"0": {
|
177
|
+
"name": "punctuation.definition.string.end.c"
|
178
|
+
}
|
179
|
+
},
|
180
|
+
"name": "string.quoted.double.include.c"
|
181
|
+
},
|
182
|
+
{
|
183
|
+
"begin": "<",
|
184
|
+
"beginCaptures": {
|
185
|
+
"0": {
|
186
|
+
"name": "punctuation.definition.string.begin.c"
|
187
|
+
}
|
188
|
+
},
|
189
|
+
"end": ">",
|
190
|
+
"endCaptures": {
|
191
|
+
"0": {
|
192
|
+
"name": "punctuation.definition.string.end.c"
|
193
|
+
}
|
194
|
+
},
|
195
|
+
"name": "string.quoted.other.lt-gt.include.c"
|
196
|
+
}
|
197
|
+
]
|
198
|
+
},
|
199
|
+
{
|
200
|
+
"include": "#pragma-mark"
|
201
|
+
},
|
202
|
+
{
|
203
|
+
"begin": "^\\s*#\\s*(define|defined|elif|else|if|ifdef|ifndef|line|pragma|undef)\\b",
|
204
|
+
"captures": {
|
205
|
+
"1": {
|
206
|
+
"name": "keyword.control.import.c"
|
207
|
+
}
|
208
|
+
},
|
209
|
+
"end": "(?=(?:\/\/|\/\\*))|$",
|
210
|
+
"name": "meta.preprocessor.c",
|
211
|
+
"patterns": [
|
212
|
+
{
|
213
|
+
"match": "(?>\\\\\\s*\\n)",
|
214
|
+
"name": "punctuation.separator.continuation.c"
|
215
|
+
}
|
216
|
+
]
|
217
|
+
},
|
218
|
+
{
|
219
|
+
"match": "\\b(u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t)\\b",
|
220
|
+
"name": "support.type.sys-types.c"
|
221
|
+
},
|
222
|
+
{
|
223
|
+
"match": "\\b(pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t)\\b",
|
224
|
+
"name": "support.type.pthread.c"
|
225
|
+
},
|
226
|
+
{
|
227
|
+
"match": "\\b(int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t|uintmax_t|uintmax_t)\\b",
|
228
|
+
"name": "support.type.stdint.c"
|
229
|
+
},
|
230
|
+
{
|
231
|
+
"match": "\\b(noErr|kNilOptions|kInvalidID|kVariableLengthArray)\\b",
|
232
|
+
"name": "support.constant.mac-classic.c"
|
233
|
+
},
|
234
|
+
{
|
235
|
+
"match": "\\b(AbsoluteTime|Boolean|Byte|ByteCount|ByteOffset|BytePtr|CompTimeValue|ConstLogicalAddress|ConstStrFileNameParam|ConstStringPtr|Duration|Fixed|FixedPtr|Float32|Float32Point|Float64|Float80|Float96|FourCharCode|Fract|FractPtr|Handle|ItemCount|LogicalAddress|OptionBits|OSErr|OSStatus|OSType|OSTypePtr|PhysicalAddress|ProcessSerialNumber|ProcessSerialNumberPtr|ProcHandle|Ptr|ResType|ResTypePtr|ShortFixed|ShortFixedPtr|SignedByte|SInt16|SInt32|SInt64|SInt8|Size|StrFileName|StringHandle|StringPtr|TimeBase|TimeRecord|TimeScale|TimeValue|TimeValue64|UInt16|UInt32|UInt64|UInt8|UniChar|UniCharCount|UniCharCountPtr|UniCharPtr|UnicodeScalarValue|UniversalProcHandle|UniversalProcPtr|UnsignedFixed|UnsignedFixedPtr|UnsignedWide|UTF16Char|UTF32Char|UTF8Char)\\b",
|
236
|
+
"name": "support.type.mac-classic.c"
|
237
|
+
},
|
238
|
+
{
|
239
|
+
"include": "#block"
|
240
|
+
},
|
241
|
+
{
|
242
|
+
"begin": "(?x)\n \t\t(?: ^ # begin-of-line\n \t\t | \n \t\t (?: (?= \\s ) (?<!else|new|return) (?<=\\w) # or word + space before name\n \t\t | (?= \\s*[A-Za-z_] ) (?<!&&) (?<=[*&>]) # or type modifier before name\n \t\t )\n \t\t)\n \t\t(\\s*) (?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\\s*\\()\n \t\t(\n \t\t\t(?: [A-Za-z_][A-Za-z0-9_]*+ | :: )++ | # actual name\n \t\t\t(?: (?<=operator) (?: [-*&<>=+!]+ | \\(\\) | \\[\\] ) ) # if it is a C++ operator\n \t\t)\n \t\t \\s*(?=\\()",
|
243
|
+
"beginCaptures": {
|
244
|
+
"1": {
|
245
|
+
"name": "punctuation.whitespace.function.leading.c"
|
246
|
+
},
|
247
|
+
"3": {
|
248
|
+
"name": "entity.name.function.c"
|
249
|
+
},
|
250
|
+
"4": {
|
251
|
+
"name": "punctuation.definition.parameters.c"
|
252
|
+
}
|
253
|
+
},
|
254
|
+
"end": "(?<=\\})|(?=#)|(;)",
|
255
|
+
"name": "meta.function.c",
|
256
|
+
"patterns": [
|
257
|
+
{
|
258
|
+
"include": "#comments"
|
259
|
+
},
|
260
|
+
{
|
261
|
+
"include": "#parens"
|
262
|
+
},
|
263
|
+
{
|
264
|
+
"match": "\\bconst\\b",
|
265
|
+
"name": "storage.modifier.c"
|
266
|
+
},
|
267
|
+
{
|
268
|
+
"include": "#block"
|
269
|
+
}
|
270
|
+
]
|
271
|
+
}
|
272
|
+
],
|
273
|
+
"repository": {
|
274
|
+
"access": {
|
275
|
+
"match": "\\.[a-zA-Z_][a-zA-Z_0-9]*\\b(?!\\s*\\()",
|
276
|
+
"name": "variable.other.dot-access.c"
|
277
|
+
},
|
278
|
+
"block": {
|
279
|
+
"begin": "\\{",
|
280
|
+
"end": "\\}",
|
281
|
+
"name": "meta.block.c",
|
282
|
+
"patterns": [
|
283
|
+
{
|
284
|
+
"include": "#block_innards"
|
285
|
+
}
|
286
|
+
]
|
287
|
+
},
|
288
|
+
"block_innards": {
|
289
|
+
"patterns": [
|
290
|
+
{
|
291
|
+
"include": "#preprocessor-rule-enabled-block"
|
292
|
+
},
|
293
|
+
{
|
294
|
+
"include": "#preprocessor-rule-disabled-block"
|
295
|
+
},
|
296
|
+
{
|
297
|
+
"include": "#preprocessor-rule-other-block"
|
298
|
+
},
|
299
|
+
{
|
300
|
+
"include": "#sizeof"
|
301
|
+
},
|
302
|
+
{
|
303
|
+
"include": "#access"
|
304
|
+
},
|
305
|
+
{
|
306
|
+
"captures": {
|
307
|
+
"1": {
|
308
|
+
"name": "punctuation.whitespace.support.function.leading.c"
|
309
|
+
},
|
310
|
+
"2": {
|
311
|
+
"name": "support.function.C99.c"
|
312
|
+
}
|
313
|
+
},
|
314
|
+
"match": "(\\s*)\\b(hypot(f|l)?|s(scanf|ystem|nprintf|ca(nf|lb(n(f|l)?|ln(f|l)?))|i(n(h(f|l)?|f|l)?|gn(al|bit))|tr(s(tr|pn)|nc(py|at|mp)|c(spn|hr|oll|py|at|mp)|to(imax|d|u(l(l)?|max)|k|f|l(d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(jmp|vbuf|locale|buf)|qrt(f|l)?|w(scanf|printf)|rand)|n(e(arbyint(f|l)?|xt(toward(f|l)?|after(f|l)?))|an(f|l)?)|c(s(in(h(f|l)?|f|l)?|qrt(f|l)?)|cos(h(f)?|f|l)?|imag(f|l)?|t(ime|an(h(f|l)?|f|l)?)|o(s(h(f|l)?|f|l)?|nj(f|l)?|pysign(f|l)?)|p(ow(f|l)?|roj(f|l)?)|e(il(f|l)?|xp(f|l)?)|l(o(ck|g(f|l)?)|earerr)|a(sin(h(f|l)?|f|l)?|cos(h(f|l)?|f|l)?|tan(h(f|l)?|f|l)?|lloc|rg(f|l)?|bs(f|l)?)|real(f|l)?|brt(f|l)?)|t(ime|o(upper|lower)|an(h(f|l)?|f|l)?|runc(f|l)?|gamma(f|l)?|mp(nam|file))|i(s(space|n(ormal|an)|cntrl|inf|digit|u(nordered|pper)|p(unct|rint)|finite|w(space|c(ntrl|type)|digit|upper|p(unct|rint)|lower|al(num|pha)|graph|xdigit|blank)|l(ower|ess(equal|greater)?)|al(num|pha)|gr(eater(equal)?|aph)|xdigit|blank)|logb(f|l)?|max(div|abs))|di(v|fftime)|_Exit|unget(c|wc)|p(ow(f|l)?|ut(s|c(har)?|wc(har)?)|error|rintf)|e(rf(c(f|l)?|f|l)?|x(it|p(2(f|l)?|f|l|m1(f|l)?)?))|v(s(scanf|nprintf|canf|printf|w(scanf|printf))|printf|f(scanf|printf|w(scanf|printf))|w(scanf|printf)|a_(start|copy|end|arg))|qsort|f(s(canf|e(tpos|ek))|close|tell|open|dim(f|l)?|p(classify|ut(s|c|w(s|c))|rintf)|e(holdexcept|set(e(nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(aiseexcept|ror)|get(e(nv|xceptflag)|round))|flush|w(scanf|ide|printf|rite)|loor(f|l)?|abs(f|l)?|get(s|c|pos|w(s|c))|re(open|e|ad|xp(f|l)?)|m(in(f|l)?|od(f|l)?|a(f|l|x(f|l)?)?))|l(d(iv|exp(f|l)?)|o(ngjmp|cal(time|econv)|g(1(p(f|l)?|0(f|l)?)|2(f|l)?|f|l|b(f|l)?)?)|abs|l(div|abs|r(int(f|l)?|ound(f|l)?))|r(int(f|l)?|ound(f|l)?)|gamma(f|l)?)|w(scanf|c(s(s(tr|pn)|nc(py|at|mp)|c(spn|hr|oll|py|at|mp)|to(imax|d|u(l(l)?|max)|k|f|l(d|l)?|mbs)|pbrk|ftime|len|r(chr|tombs)|xfrm)|to(b|mb)|rtomb)|printf|mem(set|c(hr|py|mp)|move))|a(s(sert|ctime|in(h(f|l)?|f|l)?)|cos(h(f|l)?|f|l)?|t(o(i|f|l(l)?)|exit|an(h(f|l)?|2(f|l)?|f|l)?)|b(s|ort))|g(et(s|c(har)?|env|wc(har)?)|mtime)|r(int(f|l)?|ound(f|l)?|e(name|alloc|wind|m(ove|quo(f|l)?|ainder(f|l)?))|a(nd|ise))|b(search|towc)|m(odf(f|l)?|em(set|c(hr|py|mp)|move)|ktime|alloc|b(s(init|towcs|rtowcs)|towc|len|r(towc|len))))\\b"
|
315
|
+
},
|
316
|
+
{
|
317
|
+
"captures": {
|
318
|
+
"1": {
|
319
|
+
"name": "punctuation.whitespace.function-call.leading.c"
|
320
|
+
},
|
321
|
+
"2": {
|
322
|
+
"name": "support.function.any-method.c"
|
323
|
+
},
|
324
|
+
"3": {
|
325
|
+
"name": "punctuation.definition.parameters.c"
|
326
|
+
}
|
327
|
+
},
|
328
|
+
"match": "(?x) (?: (?= \\s ) (?:(?<=else|new|return) | (?<!\\w)) (\\s+))?\n\t\t\t(\\b \n\t\t\t\t(?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\\s*\\()(?:(?!NS)[A-Za-z_][A-Za-z0-9_]*+\\b | :: )++ # actual name\n\t\t\t)\n\t\t\t \\s*(\\()",
|
329
|
+
"name": "meta.function-call.c"
|
330
|
+
},
|
331
|
+
{
|
332
|
+
"captures": {
|
333
|
+
"1": {
|
334
|
+
"name": "variable.other.c"
|
335
|
+
},
|
336
|
+
"2": {
|
337
|
+
"name": "punctuation.definition.parameters.c"
|
338
|
+
}
|
339
|
+
},
|
340
|
+
"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*(\\()",
|
341
|
+
"name": "meta.initialization.c"
|
342
|
+
},
|
343
|
+
{
|
344
|
+
"include": "#block"
|
345
|
+
},
|
346
|
+
{
|
347
|
+
"include": "$base"
|
348
|
+
}
|
349
|
+
]
|
350
|
+
},
|
351
|
+
"comments": {
|
352
|
+
"patterns": [
|
353
|
+
{
|
354
|
+
"captures": {
|
355
|
+
"1": {
|
356
|
+
"name": "meta.toc-list.banner.block.c"
|
357
|
+
}
|
358
|
+
},
|
359
|
+
"match": "^\/\\* =(\\s*.*?)\\s*= \\*\/$\\n?",
|
360
|
+
"name": "comment.block.c"
|
361
|
+
},
|
362
|
+
{
|
363
|
+
"begin": "\/\\*",
|
364
|
+
"captures": {
|
365
|
+
"0": {
|
366
|
+
"name": "punctuation.definition.comment.c"
|
367
|
+
}
|
368
|
+
},
|
369
|
+
"end": "\\*\/",
|
370
|
+
"name": "comment.block.c"
|
371
|
+
},
|
372
|
+
{
|
373
|
+
"match": "\\*\/.*\\n",
|
374
|
+
"name": "invalid.illegal.stray-comment-end.c"
|
375
|
+
},
|
376
|
+
{
|
377
|
+
"captures": {
|
378
|
+
"1": {
|
379
|
+
"name": "meta.toc-list.banner.line.c"
|
380
|
+
}
|
381
|
+
},
|
382
|
+
"match": "^\/\/ =(\\s*.*?)\\s*=\\s*$\\n?",
|
383
|
+
"name": "comment.line.banner.c++"
|
384
|
+
},
|
385
|
+
{
|
386
|
+
"begin": "\/\/",
|
387
|
+
"beginCaptures": {
|
388
|
+
"0": {
|
389
|
+
"name": "punctuation.definition.comment.c"
|
390
|
+
}
|
391
|
+
},
|
392
|
+
"end": "$\\n?",
|
393
|
+
"name": "comment.line.double-slash.c++",
|
394
|
+
"patterns": [
|
395
|
+
{
|
396
|
+
"match": "(?>\\\\\\s*\\n)",
|
397
|
+
"name": "punctuation.separator.continuation.c++"
|
398
|
+
}
|
399
|
+
]
|
400
|
+
}
|
401
|
+
]
|
402
|
+
},
|
403
|
+
"disabled": {
|
404
|
+
"begin": "^\\s*#\\s*if(n?def)?\\b.*$",
|
405
|
+
"comment": "eat nested preprocessor if(def)s",
|
406
|
+
"end": "^\\s*#\\s*endif\\b.*$",
|
407
|
+
"patterns": [
|
408
|
+
{
|
409
|
+
"include": "#disabled"
|
410
|
+
},
|
411
|
+
{
|
412
|
+
"include": "#pragma-mark"
|
413
|
+
}
|
414
|
+
]
|
415
|
+
},
|
416
|
+
"parens": {
|
417
|
+
"begin": "\\(",
|
418
|
+
"end": "\\)",
|
419
|
+
"name": "meta.parens.c",
|
420
|
+
"patterns": [
|
421
|
+
{
|
422
|
+
"include": "$base"
|
423
|
+
}
|
424
|
+
]
|
425
|
+
},
|
426
|
+
"pragma-mark": {
|
427
|
+
"captures": {
|
428
|
+
"1": {
|
429
|
+
"name": "meta.preprocessor.c"
|
430
|
+
},
|
431
|
+
"2": {
|
432
|
+
"name": "keyword.control.import.pragma.c"
|
433
|
+
},
|
434
|
+
"3": {
|
435
|
+
"name": "meta.toc-list.pragma-mark.c"
|
436
|
+
}
|
437
|
+
},
|
438
|
+
"match": "^\\s*(#\\s*(pragma\\s+mark)\\s+(.*))",
|
439
|
+
"name": "meta.section"
|
440
|
+
},
|
441
|
+
"preprocessor-rule-disabled": {
|
442
|
+
"begin": "^\\s*(#(if)\\s+(0)\\b).*",
|
443
|
+
"captures": {
|
444
|
+
"1": {
|
445
|
+
"name": "meta.preprocessor.c"
|
446
|
+
},
|
447
|
+
"2": {
|
448
|
+
"name": "keyword.control.import.if.c"
|
449
|
+
},
|
450
|
+
"3": {
|
451
|
+
"name": "constant.numeric.preprocessor.c"
|
452
|
+
}
|
453
|
+
},
|
454
|
+
"end": "^\\s*(#\\s*(endif)\\b)",
|
455
|
+
"patterns": [
|
456
|
+
{
|
457
|
+
"begin": "^\\s*(#\\s*(else)\\b)",
|
458
|
+
"captures": {
|
459
|
+
"1": {
|
460
|
+
"name": "meta.preprocessor.c"
|
461
|
+
},
|
462
|
+
"2": {
|
463
|
+
"name": "keyword.control.import.else.c"
|
464
|
+
}
|
465
|
+
},
|
466
|
+
"end": "(?=^\\s*#\\s*endif\\b.*$)",
|
467
|
+
"patterns": [
|
468
|
+
{
|
469
|
+
"include": "$base"
|
470
|
+
}
|
471
|
+
]
|
472
|
+
},
|
473
|
+
{
|
474
|
+
"begin": "",
|
475
|
+
"end": "(?=^\\s*#\\s*(else|endif)\\b.*$)",
|
476
|
+
"name": "comment.block.preprocessor.if-branch",
|
477
|
+
"patterns": [
|
478
|
+
{
|
479
|
+
"include": "#disabled"
|
480
|
+
},
|
481
|
+
{
|
482
|
+
"include": "#pragma-mark"
|
483
|
+
}
|
484
|
+
]
|
485
|
+
}
|
486
|
+
]
|
487
|
+
},
|
488
|
+
"preprocessor-rule-disabled-block": {
|
489
|
+
"begin": "^\\s*(#(if)\\s+(0)\\b).*",
|
490
|
+
"captures": {
|
491
|
+
"1": {
|
492
|
+
"name": "meta.preprocessor.c"
|
493
|
+
},
|
494
|
+
"2": {
|
495
|
+
"name": "keyword.control.import.if.c"
|
496
|
+
},
|
497
|
+
"3": {
|
498
|
+
"name": "constant.numeric.preprocessor.c"
|
499
|
+
}
|
500
|
+
},
|
501
|
+
"end": "^\\s*(#\\s*(endif)\\b)",
|
502
|
+
"patterns": [
|
503
|
+
{
|
504
|
+
"begin": "^\\s*(#\\s*(else)\\b)",
|
505
|
+
"captures": {
|
506
|
+
"1": {
|
507
|
+
"name": "meta.preprocessor.c"
|
508
|
+
},
|
509
|
+
"2": {
|
510
|
+
"name": "keyword.control.import.else.c"
|
511
|
+
}
|
512
|
+
},
|
513
|
+
"end": "(?=^\\s*#\\s*endif\\b.*$)",
|
514
|
+
"patterns": [
|
515
|
+
{
|
516
|
+
"include": "#block_innards"
|
517
|
+
}
|
518
|
+
]
|
519
|
+
},
|
520
|
+
{
|
521
|
+
"begin": "",
|
522
|
+
"end": "(?=^\\s*#\\s*(else|endif)\\b.*$)",
|
523
|
+
"name": "comment.block.preprocessor.if-branch.in-block",
|
524
|
+
"patterns": [
|
525
|
+
{
|
526
|
+
"include": "#disabled"
|
527
|
+
},
|
528
|
+
{
|
529
|
+
"include": "#pragma-mark"
|
530
|
+
}
|
531
|
+
]
|
532
|
+
}
|
533
|
+
]
|
534
|
+
},
|
535
|
+
"preprocessor-rule-enabled": {
|
536
|
+
"begin": "^\\s*(#(if)\\s+(0*1)\\b)",
|
537
|
+
"captures": {
|
538
|
+
"1": {
|
539
|
+
"name": "meta.preprocessor.c"
|
540
|
+
},
|
541
|
+
"2": {
|
542
|
+
"name": "keyword.control.import.if.c"
|
543
|
+
},
|
544
|
+
"3": {
|
545
|
+
"name": "constant.numeric.preprocessor.c"
|
546
|
+
}
|
547
|
+
},
|
548
|
+
"end": "^\\s*(#\\s*(endif)\\b)",
|
549
|
+
"patterns": [
|
550
|
+
{
|
551
|
+
"begin": "^\\s*(#\\s*(else)\\b).*",
|
552
|
+
"captures": {
|
553
|
+
"1": {
|
554
|
+
"name": "meta.preprocessor.c"
|
555
|
+
},
|
556
|
+
"2": {
|
557
|
+
"name": "keyword.control.import.else.c"
|
558
|
+
}
|
559
|
+
},
|
560
|
+
"contentName": "comment.block.preprocessor.else-branch",
|
561
|
+
"end": "(?=^\\s*#\\s*endif\\b.*$)",
|
562
|
+
"patterns": [
|
563
|
+
{
|
564
|
+
"include": "#disabled"
|
565
|
+
},
|
566
|
+
{
|
567
|
+
"include": "#pragma-mark"
|
568
|
+
}
|
569
|
+
]
|
570
|
+
},
|
571
|
+
{
|
572
|
+
"begin": "",
|
573
|
+
"end": "(?=^\\s*#\\s*(else|endif)\\b.*$)",
|
574
|
+
"patterns": [
|
575
|
+
{
|
576
|
+
"include": "$base"
|
577
|
+
}
|
578
|
+
]
|
579
|
+
}
|
580
|
+
]
|
581
|
+
},
|
582
|
+
"preprocessor-rule-enabled-block": {
|
583
|
+
"begin": "^\\s*(#(if)\\s+(0*1)\\b)",
|
584
|
+
"captures": {
|
585
|
+
"1": {
|
586
|
+
"name": "meta.preprocessor.c"
|
587
|
+
},
|
588
|
+
"2": {
|
589
|
+
"name": "keyword.control.import.if.c"
|
590
|
+
},
|
591
|
+
"3": {
|
592
|
+
"name": "constant.numeric.preprocessor.c"
|
593
|
+
}
|
594
|
+
},
|
595
|
+
"end": "^\\s*(#\\s*(endif)\\b)",
|
596
|
+
"patterns": [
|
597
|
+
{
|
598
|
+
"begin": "^\\s*(#\\s*(else)\\b).*",
|
599
|
+
"captures": {
|
600
|
+
"1": {
|
601
|
+
"name": "meta.preprocessor.c"
|
602
|
+
},
|
603
|
+
"2": {
|
604
|
+
"name": "keyword.control.import.else.c"
|
605
|
+
}
|
606
|
+
},
|
607
|
+
"contentName": "comment.block.preprocessor.else-branch.in-block",
|
608
|
+
"end": "(?=^\\s*#\\s*endif\\b.*$)",
|
609
|
+
"patterns": [
|
610
|
+
{
|
611
|
+
"include": "#disabled"
|
612
|
+
},
|
613
|
+
{
|
614
|
+
"include": "#pragma-mark"
|
615
|
+
}
|
616
|
+
]
|
617
|
+
},
|
618
|
+
{
|
619
|
+
"begin": "",
|
620
|
+
"end": "(?=^\\s*#\\s*(else|endif)\\b.*$)",
|
621
|
+
"patterns": [
|
622
|
+
{
|
623
|
+
"include": "#block_innards"
|
624
|
+
}
|
625
|
+
]
|
626
|
+
}
|
627
|
+
]
|
628
|
+
},
|
629
|
+
"preprocessor-rule-other": {
|
630
|
+
"begin": "^\\s*(#\\s*(if(n?def)?)\\b.*?(?:(?=(?:\/\/|\/\\*))|$))",
|
631
|
+
"captures": {
|
632
|
+
"1": {
|
633
|
+
"name": "meta.preprocessor.c"
|
634
|
+
},
|
635
|
+
"2": {
|
636
|
+
"name": "keyword.control.import.c"
|
637
|
+
}
|
638
|
+
},
|
639
|
+
"end": "^\\s*(#\\s*(endif)\\b).*$",
|
640
|
+
"patterns": [
|
641
|
+
{
|
642
|
+
"include": "$base"
|
643
|
+
}
|
644
|
+
]
|
645
|
+
},
|
646
|
+
"preprocessor-rule-other-block": {
|
647
|
+
"begin": "^\\s*(#\\s*(if(n?def)?)\\b.*?(?:(?=(?:\/\/|\/\\*))|$))",
|
648
|
+
"captures": {
|
649
|
+
"1": {
|
650
|
+
"name": "meta.preprocessor.c"
|
651
|
+
},
|
652
|
+
"2": {
|
653
|
+
"name": "keyword.control.import.c"
|
654
|
+
}
|
655
|
+
},
|
656
|
+
"end": "^\\s*(#\\s*(endif)\\b).*$",
|
657
|
+
"patterns": [
|
658
|
+
{
|
659
|
+
"include": "#block_innards"
|
660
|
+
}
|
661
|
+
]
|
662
|
+
},
|
663
|
+
"sizeof": {
|
664
|
+
"match": "\\b(sizeof)\\b",
|
665
|
+
"name": "keyword.operator.sizeof.c"
|
666
|
+
},
|
667
|
+
"string_escaped_char": {
|
668
|
+
"patterns": [
|
669
|
+
{
|
670
|
+
"match": "\\\\(\\\\|[abefnprtv'\"?]|[0-3]\\d{,2}|[4-7]\\d?|x[a-fA-F0-9]{,2})",
|
671
|
+
"name": "constant.character.escape.c"
|
672
|
+
},
|
673
|
+
{
|
674
|
+
"match": "\\\\.",
|
675
|
+
"name": "invalid.illegal.unknown-escape.c"
|
676
|
+
}
|
677
|
+
]
|
678
|
+
},
|
679
|
+
"string_placeholder": {
|
680
|
+
"patterns": [
|
681
|
+
{
|
682
|
+
"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(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\n \t\t\t\t\t\t[diouxXDOUeEfFgGaACcSspn%] # conversion type\n \t\t\t\t\t",
|
683
|
+
"name": "constant.other.placeholder.c"
|
684
|
+
},
|
685
|
+
{
|
686
|
+
"match": "%",
|
687
|
+
"name": "invalid.illegal.placeholder.c"
|
688
|
+
}
|
689
|
+
]
|
690
|
+
}
|
691
|
+
},
|
692
|
+
"scopeName": "source.c",
|
693
|
+
"uuid": "25066DC2-6B1D-11D9-9D5B-000D93589AF6"
|
694
|
+
}
|