bjeanes-ultraviolet 0.10.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (234) hide show
  1. data/History.txt +29 -0
  2. data/Manifest.txt +233 -0
  3. data/README.txt +52 -0
  4. data/Rakefile +51 -0
  5. data/bin/theme2latexrender +122 -0
  6. data/bin/theme2xhtmlrender +156 -0
  7. data/bin/uv +140 -0
  8. data/lib/uv.rb +100 -0
  9. data/lib/uv/render_processor.rb +131 -0
  10. data/lib/uv/utility.rb +67 -0
  11. data/render/latex/active4d.render +132 -0
  12. data/render/latex/all_hallows_eve.render +96 -0
  13. data/render/latex/amy.render +171 -0
  14. data/render/latex/blackboard.render +111 -0
  15. data/render/latex/brilliance_black.render +552 -0
  16. data/render/latex/brilliance_dull.render +561 -0
  17. data/render/latex/cobalt.render +162 -0
  18. data/render/latex/dawn.render +126 -0
  19. data/render/latex/eiffel.render +132 -0
  20. data/render/latex/espresso_libre.render +123 -0
  21. data/render/latex/idle.render +93 -0
  22. data/render/latex/iplastic.render +99 -0
  23. data/render/latex/lazy.render +96 -0
  24. data/render/latex/mac_classic.render +135 -0
  25. data/render/latex/magicwb_amiga.render +117 -0
  26. data/render/latex/pastels_on_dark.render +204 -0
  27. data/render/latex/slush_poppies.render +123 -0
  28. data/render/latex/spacecadet.render +81 -0
  29. data/render/latex/sunburst.render +186 -0
  30. data/render/latex/twilight.render +153 -0
  31. data/render/latex/zenburnesque.render +126 -0
  32. data/render/old/txt2tags.render +131 -0
  33. data/render/xhtml/active4d.render +140 -0
  34. data/render/xhtml/all_hallows_eve.render +104 -0
  35. data/render/xhtml/amy.render +179 -0
  36. data/render/xhtml/blackboard.render +119 -0
  37. data/render/xhtml/brilliance_black.render +560 -0
  38. data/render/xhtml/brilliance_dull.render +569 -0
  39. data/render/xhtml/cobalt.render +170 -0
  40. data/render/xhtml/dawn.render +134 -0
  41. data/render/xhtml/eiffel.render +140 -0
  42. data/render/xhtml/espresso_libre.render +131 -0
  43. data/render/xhtml/files/css/active4d.css +114 -0
  44. data/render/xhtml/files/css/all_hallows_eve.css +72 -0
  45. data/render/xhtml/files/css/amy.css +147 -0
  46. data/render/xhtml/files/css/blackboard.css +88 -0
  47. data/render/xhtml/files/css/brilliance_black.css +605 -0
  48. data/render/xhtml/files/css/brilliance_dull.css +599 -0
  49. data/render/xhtml/files/css/cobalt.css +149 -0
  50. data/render/xhtml/files/css/dawn.css +121 -0
  51. data/render/xhtml/files/css/eiffel.css +121 -0
  52. data/render/xhtml/files/css/espresso_libre.css +109 -0
  53. data/render/xhtml/files/css/idle.css +62 -0
  54. data/render/xhtml/files/css/iplastic.css +80 -0
  55. data/render/xhtml/files/css/lazy.css +73 -0
  56. data/render/xhtml/files/css/mac_classic.css +123 -0
  57. data/render/xhtml/files/css/magicwb_amiga.css +104 -0
  58. data/render/xhtml/files/css/pastels_on_dark.css +188 -0
  59. data/render/xhtml/files/css/slush_poppies.css +85 -0
  60. data/render/xhtml/files/css/spacecadet.css +51 -0
  61. data/render/xhtml/files/css/sunburst.css +180 -0
  62. data/render/xhtml/files/css/twilight.css +137 -0
  63. data/render/xhtml/files/css/zenburnesque.css +91 -0
  64. data/render/xhtml/idle.render +101 -0
  65. data/render/xhtml/iplastic.render +107 -0
  66. data/render/xhtml/lazy.render +104 -0
  67. data/render/xhtml/mac_classic.render +143 -0
  68. data/render/xhtml/magicwb_amiga.render +125 -0
  69. data/render/xhtml/pastels_on_dark.render +212 -0
  70. data/render/xhtml/slush_poppies.render +131 -0
  71. data/render/xhtml/spacecadet.render +89 -0
  72. data/render/xhtml/sunburst.render +194 -0
  73. data/render/xhtml/twilight.render +161 -0
  74. data/render/xhtml/zenburnesque.render +134 -0
  75. data/syntax/actionscript.syntax +97 -0
  76. data/syntax/active4d.syntax +276 -0
  77. data/syntax/active4d_html.syntax +311 -0
  78. data/syntax/active4d_ini.syntax +50 -0
  79. data/syntax/active4d_library.syntax +21 -0
  80. data/syntax/ada.syntax +33 -0
  81. data/syntax/antlr.syntax +151 -0
  82. data/syntax/apache.syntax +191 -0
  83. data/syntax/applescript.syntax +384 -0
  84. data/syntax/asp.syntax +70 -0
  85. data/syntax/asp_vb.net.syntax +129 -0
  86. data/syntax/bibtex.syntax +151 -0
  87. data/syntax/blog_html.syntax +41 -0
  88. data/syntax/blog_markdown.syntax +42 -0
  89. data/syntax/blog_text.syntax +27 -0
  90. data/syntax/blog_textile.syntax +27 -0
  91. data/syntax/build.syntax +53 -0
  92. data/syntax/bulletin_board.syntax +287 -0
  93. data/syntax/c++.syntax +109 -0
  94. data/syntax/c.syntax +326 -0
  95. data/syntax/cake.syntax +55 -0
  96. data/syntax/camlp4.syntax +36 -0
  97. data/syntax/cm.syntax +32 -0
  98. data/syntax/coldfusion.syntax +119 -0
  99. data/syntax/context_free.syntax +176 -0
  100. data/syntax/cs.syntax +59 -0
  101. data/syntax/css.syntax +195 -0
  102. data/syntax/css_experimental.syntax +1925 -0
  103. data/syntax/csv.syntax +68 -0
  104. data/syntax/d.syntax +142 -0
  105. data/syntax/diff.syntax +81 -0
  106. data/syntax/dokuwiki.syntax +204 -0
  107. data/syntax/dot.syntax +47 -0
  108. data/syntax/doxygen.syntax +43 -0
  109. data/syntax/dylan.syntax +62 -0
  110. data/syntax/eiffel.syntax +78 -0
  111. data/syntax/erlang.syntax +922 -0
  112. data/syntax/f-script.syntax +80 -0
  113. data/syntax/fortran.syntax +141 -0
  114. data/syntax/fxscript.syntax +142 -0
  115. data/syntax/greasemonkey.syntax +34 -0
  116. data/syntax/gri.syntax +83 -0
  117. data/syntax/groovy.syntax +191 -0
  118. data/syntax/gtd.syntax +22 -0
  119. data/syntax/gtdalt.syntax +143 -0
  120. data/syntax/haml.syntax +88 -0
  121. data/syntax/haskell.syntax +88 -0
  122. data/syntax/html-asp.syntax +27 -0
  123. data/syntax/html.syntax +362 -0
  124. data/syntax/html_django.syntax +36 -0
  125. data/syntax/html_for_asp.net.syntax +424 -0
  126. data/syntax/html_mason.syntax +119 -0
  127. data/syntax/html_rails.syntax +40 -0
  128. data/syntax/html_tcl.syntax +26 -0
  129. data/syntax/icalendar.syntax +32 -0
  130. data/syntax/inform.syntax +48 -0
  131. data/syntax/ini.syntax +55 -0
  132. data/syntax/installer_distribution_script.syntax +77 -0
  133. data/syntax/io.syntax +81 -0
  134. data/syntax/java.syntax +211 -0
  135. data/syntax/javaproperties.syntax +20 -0
  136. data/syntax/javascript.syntax +256 -0
  137. data/syntax/javascript_+_prototype.syntax +72 -0
  138. data/syntax/javascript_+_prototype_bracketed.syntax +140 -0
  139. data/syntax/jquery_javascript.syntax +114 -0
  140. data/syntax/json.syntax +136 -0
  141. data/syntax/languagedefinition.syntax +708 -0
  142. data/syntax/latex.syntax +566 -0
  143. data/syntax/latex_beamer.syntax +41 -0
  144. data/syntax/latex_log.syntax +50 -0
  145. data/syntax/latex_memoir.syntax +64 -0
  146. data/syntax/lexflex.syntax +219 -0
  147. data/syntax/lighttpd.syntax +54 -0
  148. data/syntax/lilypond.syntax +492 -0
  149. data/syntax/lisp.syntax +61 -0
  150. data/syntax/literate_haskell.syntax +24 -0
  151. data/syntax/logo.syntax +29 -0
  152. data/syntax/logtalk.syntax +152 -0
  153. data/syntax/lua.syntax +86 -0
  154. data/syntax/m.syntax +142 -0
  155. data/syntax/macports_portfile.syntax +163 -0
  156. data/syntax/mail.syntax +118 -0
  157. data/syntax/makefile.syntax +36 -0
  158. data/syntax/man.syntax +17 -0
  159. data/syntax/markdown.syntax +543 -0
  160. data/syntax/mediawiki.syntax +567 -0
  161. data/syntax/mel.syntax +92 -0
  162. data/syntax/mips.syntax +66 -0
  163. data/syntax/mod_perl.syntax +50 -0
  164. data/syntax/modula-3.syntax +47 -0
  165. data/syntax/moinmoin.syntax +189 -0
  166. data/syntax/mootools.syntax +572 -0
  167. data/syntax/movable_type.syntax +162 -0
  168. data/syntax/multimarkdown.syntax +39 -0
  169. data/syntax/objective-c++.syntax +18 -0
  170. data/syntax/objective-c.syntax +233 -0
  171. data/syntax/ocaml.syntax +764 -0
  172. data/syntax/ocamllex.syntax +167 -0
  173. data/syntax/ocamlyacc.syntax +184 -0
  174. data/syntax/opengl.syntax +14 -0
  175. data/syntax/pascal.syntax +77 -0
  176. data/syntax/perl.syntax +1115 -0
  177. data/syntax/php.syntax +1253 -0
  178. data/syntax/plain_text.syntax +32 -0
  179. data/syntax/pmwiki.syntax +113 -0
  180. data/syntax/postscript.syntax +114 -0
  181. data/syntax/processing.syntax +106 -0
  182. data/syntax/prolog.syntax +40 -0
  183. data/syntax/property_list.syntax +635 -0
  184. data/syntax/python.syntax +868 -0
  185. data/syntax/python_django.syntax +21 -0
  186. data/syntax/qmake_project.syntax +114 -0
  187. data/syntax/qt_c++.syntax +26 -0
  188. data/syntax/quake3_config.syntax +32 -0
  189. data/syntax/r.syntax +81 -0
  190. data/syntax/r_console.syntax +16 -0
  191. data/syntax/ragel.syntax +201 -0
  192. data/syntax/rd_r_documentation.syntax +91 -0
  193. data/syntax/regexp.syntax +50 -0
  194. data/syntax/regular_expressions_oniguruma.syntax +107 -0
  195. data/syntax/regular_expressions_python.syntax +109 -0
  196. data/syntax/release_notes.syntax +46 -0
  197. data/syntax/remind.syntax +253 -0
  198. data/syntax/restructuredtext.syntax +250 -0
  199. data/syntax/rez.syntax +80 -0
  200. data/syntax/ruby.syntax +1035 -0
  201. data/syntax/ruby_experimental.syntax +145 -0
  202. data/syntax/ruby_on_rails.syntax +88 -0
  203. data/syntax/s5.syntax +69 -0
  204. data/syntax/scheme.syntax +347 -0
  205. data/syntax/scilab.syntax +41 -0
  206. data/syntax/setext.syntax +147 -0
  207. data/syntax/shell-unix-generic.syntax +384 -0
  208. data/syntax/slate.syntax +149 -0
  209. data/syntax/smarty.syntax +63 -0
  210. data/syntax/sql.syntax +237 -0
  211. data/syntax/sql_rails.syntax +18 -0
  212. data/syntax/ssh-config.syntax +33 -0
  213. data/syntax/standard_ml.syntax +121 -0
  214. data/syntax/strings_file.syntax +39 -0
  215. data/syntax/subversion_commit_message.syntax +36 -0
  216. data/syntax/sweave.syntax +84 -0
  217. data/syntax/swig.syntax +57 -0
  218. data/syntax/tcl.syntax +152 -0
  219. data/syntax/template_toolkit.syntax +121 -0
  220. data/syntax/tex.syntax +86 -0
  221. data/syntax/tex_math.syntax +49 -0
  222. data/syntax/textile.syntax +215 -0
  223. data/syntax/tsv.syntax +50 -0
  224. data/syntax/twiki.syntax +241 -0
  225. data/syntax/txt2tags.syntax +79 -0
  226. data/syntax/vectorscript.syntax +57 -0
  227. data/syntax/xhtml_1.0.syntax +4027 -0
  228. data/syntax/xml.syntax +180 -0
  229. data/syntax/xml_strict.syntax +92 -0
  230. data/syntax/xsl.syntax +60 -0
  231. data/syntax/yaml.syntax +160 -0
  232. data/syntax/yui_javascript.syntax +176 -0
  233. data/test/test_uv.rb +0 -0
  234. metadata +309 -0
@@ -0,0 +1,287 @@
1
+ ---
2
+ name: Bulletin Board
3
+ fileTypes:
4
+ - bbcode
5
+ scopeName: text.bbcode
6
+ uuid: AC4E0E7E-CC15-4394-A858-6C7E3C09C414
7
+ foldingStartMarker: |-
8
+ (?x)
9
+ (\[(?i:quote|code|list)\b.*?\]
10
+ |<!--(?!.*-->)
11
+ |\{\s*($|\?>\s*$|//|/\*(.*\*/\s*$|(?!.*?\*/)))
12
+ )
13
+ patterns:
14
+ - captures:
15
+ "0":
16
+ name: meta.tag.bbcode
17
+ "1":
18
+ name: punctuation.definition.tag.bbcode
19
+ "2":
20
+ name: punctuation.definition.tag.bbcode
21
+ begin: (\[)(?i:list)(\])
22
+ end: (\[/)(?i:list)(\])
23
+ patterns:
24
+ - captures:
25
+ "0":
26
+ name: meta.tag.bbcode
27
+ "1":
28
+ name: punctuation.definition.tag.bbcode
29
+ begin: (\[\*\])
30
+ contentName: markup.list.unnumbered.bbcode
31
+ end: (?=\[\*\]|\[/(?i:list)\])
32
+ patterns:
33
+ - include: $self
34
+ - endCaptures:
35
+ "0":
36
+ name: meta.tag.bbcode
37
+ "1":
38
+ name: punctuation.definition.tag.bbcode
39
+ "2":
40
+ name: punctuation.definition.tag.bbcode
41
+ begin: (\[)(?i:list)=(1|a)(\])
42
+ beginCaptures:
43
+ "0":
44
+ name: meta.tag.bbcode
45
+ "1":
46
+ name: punctuation.definition.tag.bbcode
47
+ "2":
48
+ name: constant.other.list-type.bbcode
49
+ "3":
50
+ name: punctuation.definition.tag.bbcode
51
+ end: (\[/)(?i:list)(\])
52
+ patterns:
53
+ - captures:
54
+ "0":
55
+ name: meta.tag.bbcode
56
+ "1":
57
+ name: punctuation.definition.tag.bbcode
58
+ begin: (\[\*\])
59
+ contentName: markup.list.numbered.bbcode
60
+ end: (?=\[\*\]|\[/(?i:list)\])
61
+ patterns:
62
+ - include: $self
63
+ - captures:
64
+ "0":
65
+ name: meta.tag.bbcode
66
+ "1":
67
+ name: punctuation.definition.tag.bbcode
68
+ "2":
69
+ name: punctuation.definition.tag.bbcode
70
+ begin: (\[)(?i:quote)(?:=[^\]]+)?(\])
71
+ contentName: markup.quote.bbcode
72
+ end: (\[/)(?i:quote)(\])
73
+ patterns:
74
+ - include: $self
75
+ - captures:
76
+ "0":
77
+ name: meta.tag.bbcode
78
+ "1":
79
+ name: punctuation.definition.tag.bbcode
80
+ "2":
81
+ name: punctuation.definition.tag.bbcode
82
+ begin: (\[)(?i:code)(\])
83
+ contentName: markup.raw.block.bbcode
84
+ end: (\[/)(?i:code)(\])
85
+ - captures:
86
+ "0":
87
+ name: meta.tag.bbcode
88
+ "1":
89
+ name: punctuation.definition.tag.bbcode
90
+ "2":
91
+ name: punctuation.definition.tag.bbcode
92
+ begin: (\[)(?i:i)(\])
93
+ contentName: markup.italic.bbcode
94
+ end: (\[/)(?i:i)(\])
95
+ patterns:
96
+ - include: $self
97
+ - captures:
98
+ "0":
99
+ name: meta.tag.bbcode
100
+ "1":
101
+ name: punctuation.definition.tag.bbcode
102
+ "2":
103
+ name: punctuation.definition.tag.bbcode
104
+ begin: (\[)(?i:b)(\])
105
+ contentName: markup.bold.bbcode
106
+ end: (\[/)(?i:b)(\])
107
+ patterns:
108
+ - include: $self
109
+ - captures:
110
+ "0":
111
+ name: meta.tag.bbcode
112
+ "1":
113
+ name: punctuation.definition.tag.bbcode
114
+ "2":
115
+ name: punctuation.definition.tag.bbcode
116
+ begin: (\[)(?i:u)(\])
117
+ contentName: markup.underline.bbcode
118
+ end: (\[/)(?i:u)(\])
119
+ patterns:
120
+ - include: $self
121
+ - captures:
122
+ "0":
123
+ name: meta.tag.bbcode
124
+ "1":
125
+ name: punctuation.definition.tag.bbcode
126
+ "2":
127
+ name: punctuation.definition.tag.bbcode
128
+ begin: (\[)(?i:strike)(\])
129
+ contentName: markup.other.strikethrough.bbcode
130
+ end: (\[/)(?i:strike)(\])
131
+ patterns:
132
+ - include: $self
133
+ - endCaptures:
134
+ "0":
135
+ name: meta.tag.bbcode
136
+ "1":
137
+ name: punctuation.definition.tag.bbcode
138
+ "2":
139
+ name: punctuation.definition.tag.bbcode
140
+ begin: |-
141
+ (?x)(\[)(?i:color)=(
142
+ (?i:(red|green|blue|yellow
143
+ |white|black|pink
144
+ |purple|brown|grey))
145
+ |(\#([0-9a-fA-F]{6}))
146
+ |([^\]]+))
147
+ (\])
148
+ contentName: markup.other.colored.bbcode
149
+ beginCaptures:
150
+ "6":
151
+ name: invalid.illegal.expected-a-color.bbcode
152
+ "7":
153
+ name: punctuation.definition.tag.bbcode
154
+ "0":
155
+ name: meta.tag.bbcode
156
+ "1":
157
+ name: punctuation.definition.tag.bbcode
158
+ "2":
159
+ name: constant.other.named-color.bbcode
160
+ "3":
161
+ name: constant.other.rgb-value.bbcode
162
+ end: (\[/)(?i:color)(\])
163
+ patterns:
164
+ - include: $self
165
+ - endCaptures:
166
+ "0":
167
+ name: meta.tag.bbcode
168
+ "1":
169
+ name: punctuation.definition.tag.bbcode
170
+ "2":
171
+ name: punctuation.definition.tag.bbcode
172
+ begin: |-
173
+ (?x)(\[)(?i:size)=
174
+ (?i:([0-9]{1,3})\b
175
+ |([^\]]+))
176
+ (\])
177
+ contentName: markup.other.resized.bbcode
178
+ beginCaptures:
179
+ "0":
180
+ name: meta.tag.bbcode
181
+ "1":
182
+ name: punctuation.definition.tag.bbcode
183
+ "2":
184
+ name: constant.numeric.size.bbcode
185
+ "3":
186
+ name: invalid.illegal.expected-a-size.bbcode
187
+ "4":
188
+ name: punctuation.definition.tag.bbcode
189
+ end: (\[/)(?i:size)(\])
190
+ patterns:
191
+ - include: $self
192
+ - name: meta.link.inline.bbcode
193
+ endCaptures:
194
+ "0":
195
+ name: meta.tag.bbcode
196
+ "1":
197
+ name: punctuation.definition.tag.bbcode
198
+ "2":
199
+ name: punctuation.definition.tag.bbcode
200
+ begin: (\[)(?i:url)=([^\]]+)(\])
201
+ contentName: string.other.link.title.bbcode
202
+ beginCaptures:
203
+ "0":
204
+ name: meta.tag.bbcode
205
+ "1":
206
+ name: punctuation.definition.tag.bbcode
207
+ "2":
208
+ name: markup.underline.link.bbcode
209
+ "3":
210
+ name: punctuation.definition.tag.bbcode
211
+ end: (\[/)(?i:url)(\])
212
+ patterns:
213
+ - include: $self
214
+ - name: meta.link.inline.bbcode
215
+ captures:
216
+ "0":
217
+ name: meta.tag.bbcode
218
+ "1":
219
+ name: punctuation.definition.tag.bbcode
220
+ "2":
221
+ name: punctuation.definition.tag.bbcode
222
+ begin: (\[)(?i:url)(\])
223
+ contentName: markup.underline.link.bbcode
224
+ end: (\[/)(?i:url)(\])
225
+ patterns:
226
+ - match: "[\\[]]+"
227
+ - name: meta.link.inline.bbcode
228
+ captures:
229
+ "0":
230
+ name: meta.tag.bbcode
231
+ "1":
232
+ name: punctuation.definition.tag.bbcode
233
+ "2":
234
+ name: punctuation.definition.tag.bbcode
235
+ begin: (\[)(?i:email)(\])
236
+ contentName: markup.underline.link.email.bbcode
237
+ end: (\[/)(?i:email)(\])
238
+ patterns:
239
+ - match: "[\\[]]+"
240
+ - name: meta.link.image.bbcode
241
+ endCaptures:
242
+ "0":
243
+ name: meta.tag.bbcode
244
+ "1":
245
+ name: punctuation.definition.tag.bbcode
246
+ "2":
247
+ name: punctuation.definition.tag.bbcode
248
+ begin: (\[)(?i:img)(:((?i:right|left|top))|([^\]]+))?(\])
249
+ contentName: markup.underline.link.image.bbcode
250
+ beginCaptures:
251
+ "0":
252
+ name: meta.tag.bbcode
253
+ "1":
254
+ name: punctuation.definition.tag.bbcode
255
+ "3":
256
+ name: constant.other.alignment.bbcode
257
+ "4":
258
+ name: invalid.illegal.expected-an-alignment.bbcode
259
+ "5":
260
+ name: punctuation.definition.tag.bbcode
261
+ end: (\[/)(?i:img)(\])
262
+ patterns:
263
+ - match: "[\\[]]+?"
264
+ - name: constant.other.smiley.bbcode
265
+ captures:
266
+ "3":
267
+ name: punctuation.definition.constant.bbcode
268
+ "5":
269
+ name: punctuation.definition.constant.bbcode
270
+ match: |-
271
+ (?x)
272
+ (
273
+ (
274
+ (:)
275
+ (mad|rolleyes|cool|eek|confused|devious|
276
+ judge|scared|eyebrow|bigdumbgrin)
277
+ (:)
278
+ )
279
+ | (?::\)|;\)|:D|:\(|:p|:o)
280
+ )
281
+ foldingStopMarker: |-
282
+ (?x)
283
+ (\[/(?i:quote|code|list)\b.*?\]
284
+ |^\s*-->
285
+ |(^|\s)\}
286
+ )
287
+ keyEquivalent: ^~B
@@ -0,0 +1,109 @@
1
+ ---
2
+ name: C++
3
+ fileTypes:
4
+ - cc
5
+ - cpp
6
+ - cp
7
+ - cxx
8
+ - c++
9
+ - C
10
+ - h
11
+ - hh
12
+ - hpp
13
+ - h++
14
+ firstLineMatch: -\*- C\+\+ -\*-
15
+ scopeName: source.c++
16
+ uuid: 26251B18-6B1D-11D9-AFDB-000D93589AF6
17
+ foldingStartMarker: "(?x)\n\
18
+ \t\t /\\*\\*(?!\\*)\n\
19
+ \t\t|^(?![^{]*?//|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|//|/\\*(?!.*?\\*/.*\\S))\n\
20
+ \t"
21
+ patterns:
22
+ - include: source.c
23
+ - name: storage.modifier.c++
24
+ match: \b(friend|explicit|private|protected|public|virtual)\b
25
+ - name: keyword.control.c++
26
+ match: \b(catch|namespace|operator|try|throw|using)\b
27
+ - name: keyword.control.c++
28
+ match: \bdelete\b(\s*\[\])?|\bnew\b(?!])
29
+ - name: variable.other.readwrite.member.c++
30
+ match: \b(f|m)[A-Z]\w*\b
31
+ comment: common C++ instance var naming idiom -- fMemberName
32
+ - name: variable.language.c++
33
+ match: \b(this)\b
34
+ - name: storage.type.template.c++
35
+ match: \btemplate\b\s*
36
+ - name: keyword.operator.cast.c++
37
+ match: \b(const_cast|dynamic_cast|reinterpret_cast|static_cast)\b\s*
38
+ - name: keyword.operator.c++
39
+ match: \b(and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq)\b
40
+ - name: storage.type.c++
41
+ match: \b(class|wchar_t)\b
42
+ - name: storage.modifier.c++
43
+ match: \b(export|mutable|typename)\b
44
+ - name: meta.function.destructor.c++
45
+ endCaptures:
46
+ "0":
47
+ name: punctuation.definition.parameters.c
48
+ begin: "(?x)\n\
49
+ \t\t\t\t(?: ^ # begin-of-line\n\
50
+ \t\t\t\t | (?: (?<!else|new|=) ) # or word + space before name\n\
51
+ \t\t\t\t)\n\
52
+ \t\t\t\t((?:[A-Za-z_][A-Za-z0-9_]*::)*+~[A-Za-z_][A-Za-z0-9_]*) # actual name\n\
53
+ \t\t\t\t \\s*(\\() (?=[^)]*\\) # match \"(\" and use look-ahead for \")\"\n\
54
+ \t\t\t\t (\\s*=\\s*0)?\\s* # optional pure modifier\n\
55
+ \t\t\t\t (\\{|\\n)) # start bracket or end-of-line\n\
56
+ \t\t\t"
57
+ beginCaptures:
58
+ "1":
59
+ name: entity.name.function.c
60
+ "2":
61
+ name: punctuation.definition.parameters.c
62
+ end: \)
63
+ patterns:
64
+ - include: $base
65
+ - name: meta.function.destructor.prototype.c++
66
+ endCaptures:
67
+ "0":
68
+ name: punctuation.definition.parameters.c
69
+ begin: "(?x)\n\
70
+ \t\t\t\t(?: ^ # begin-of-line\n\
71
+ \t\t\t\t | (?: (?<!else|new|=) ) # or word + space before name\n\
72
+ \t\t\t\t)\n\
73
+ \t\t\t\t((?:[A-Za-z_][A-Za-z0-9_]*::)*+~[A-Za-z_][A-Za-z0-9_]*) # actual name\n\
74
+ \t\t\t\t \\s*(\\() (?=[^)]*\\) # match \"(\" and use look-ahead for \")\"\n\
75
+ \t\t\t\t (\\s*=\\s*0)?\\s* # optional pure modifier\n\
76
+ \t\t\t\t ;) # terminating semi-colon\n\
77
+ \t\t\t"
78
+ beginCaptures:
79
+ "1":
80
+ name: entity.name.function.c
81
+ "2":
82
+ name: punctuation.definition.parameters.c
83
+ end: \)
84
+ patterns:
85
+ - include: $base
86
+ - name: meta.function.constructor.c++
87
+ endCaptures:
88
+ "0":
89
+ name: punctuation.definition.parameters.c
90
+ begin: "(?x)\n\
91
+ \t\t\t\t(?: ^\\s*) # begin-of-line\n\
92
+ \t\t\t\t((?!while|for|do|if|else|switch|catch|enumerate|r?iterate)[A-Za-z_][A-Za-z0-9_:]*) # actual name\n\
93
+ \t\t\t\t \\s*(\\() (?= # match \"(\"\n\
94
+ \t\t\t\t (?<arg> [^()]++ | \\( \\g<arg>*+ \\) )*+ # function arguments\n\
95
+ \t\t\t\t \\) # match \")\"\n\
96
+ \t\t\t\t (\\s* : (?<base> \\s* [A-Za-z_][A-Za-z0-9_]* \\( \\g<arg>*+ \\) ) (, \\g<base>)* (, (?=\\s*\\n))? )? \\s* # optional base constructors\n\
97
+ \t\t\t\t (\\{|\\n)) # start bracket or end-of-line\n\
98
+ \t\t\t"
99
+ beginCaptures:
100
+ "1":
101
+ name: entity.name.function.c
102
+ "2":
103
+ name: punctuation.definition.parameters.c
104
+ end: \)
105
+ patterns:
106
+ - include: $base
107
+ foldingStopMarker: (?<!\*)\*\*/|^\s*\}
108
+ keyEquivalent: ^~C
109
+ comment: I don't think anyone uses .hp. .cp tends to be paired with .h. (I could be wrong. :) -- chris
@@ -0,0 +1,326 @@
1
+ ---
2
+ name: C
3
+ fileTypes:
4
+ - c
5
+ - h
6
+ firstLineMatch: -[*]-( Mode:)? C -[*]-
7
+ scopeName: source.c
8
+ repository:
9
+ pragma-mark:
10
+ name: meta.section
11
+ captures:
12
+ "1":
13
+ name: meta.preprocessor.c
14
+ "2":
15
+ name: keyword.control.import.pragma.c
16
+ "3":
17
+ name: meta.toc-list.pragma-mark.c
18
+ match: ^\s*(#\s*(pragma\s+mark)\s+(.*))
19
+ preprocessor-rule-enabled:
20
+ captures:
21
+ "1":
22
+ name: meta.preprocessor.c
23
+ "2":
24
+ name: keyword.control.import.if.c
25
+ "3":
26
+ name: constant.numeric.preprocessor.c
27
+ begin: ^\s*(#(if)\s+(0*1)\b)
28
+ end: ^\s*(#\s*(endif)\b)
29
+ patterns:
30
+ - captures:
31
+ "1":
32
+ name: meta.preprocessor.c
33
+ "2":
34
+ name: keyword.control.import.else.c
35
+ begin: |
36
+ ^\s*(#\s*(else)\b).*
37
+
38
+ contentName: comment.block.preprocessor.else-branch
39
+ end: (?=^\s*#\s*endif\b.*$)
40
+ patterns:
41
+ - include: "#disabled"
42
+ - include: "#pragma-mark"
43
+ - begin: ""
44
+ end: (?=^\s*#\s*(else|endif)\b.*$)
45
+ patterns:
46
+ - include: $base
47
+ string_escaped_char:
48
+ patterns:
49
+ - name: constant.character.escape.c
50
+ match: \\(\\|[abefnprtv'"?]|[0-3]\d{,2}|[4-7]\d?|x[a-fA-F0-9]{,2})
51
+ - name: invalid.illegal.unknown-escape.c
52
+ match: \\.
53
+ disabled:
54
+ begin: ^\s*#\s*if(n?def)?\b.*$
55
+ end: ^\s*#\s*endif\b.*$
56
+ patterns:
57
+ - include: "#disabled"
58
+ - include: "#pragma-mark"
59
+ comment: eat nested preprocessor if(def)s
60
+ preprocessor-rule-other:
61
+ captures:
62
+ "1":
63
+ name: meta.preprocessor.c
64
+ "2":
65
+ name: keyword.control.import.c
66
+ begin: ^\s*(#\s*(if(n?def)?)\b.*?(?:(?=(?://|/\*))|$))
67
+ end: ^\s*(#\s*(endif)\b).*$
68
+ patterns:
69
+ - include: $base
70
+ preprocessor-rule-disabled:
71
+ captures:
72
+ "1":
73
+ name: meta.preprocessor.c
74
+ "2":
75
+ name: keyword.control.import.if.c
76
+ "3":
77
+ name: constant.numeric.preprocessor.c
78
+ begin: |
79
+ ^\s*(#(if)\s+(0)\b).*
80
+
81
+ end: ^\s*(#\s*(endif)\b)
82
+ patterns:
83
+ - captures:
84
+ "1":
85
+ name: meta.preprocessor.c
86
+ "2":
87
+ name: keyword.control.import.else.c
88
+ begin: ^\s*(#\s*(else)\b)
89
+ end: (?=^\s*#\s*endif\b.*$)
90
+ patterns:
91
+ - include: $base
92
+ - name: comment.block.preprocessor.if-branch
93
+ begin: ""
94
+ end: (?=^\s*#\s*(else|endif)\b.*$)
95
+ patterns:
96
+ - include: "#disabled"
97
+ - include: "#pragma-mark"
98
+ string_placeholder:
99
+ patterns:
100
+ - name: constant.other.placeholder.c
101
+ match: "(?x)%\n\
102
+ \t\t\t\t\t\t(\\d+\\$)? # field (argument #)\n\
103
+ \t\t\t\t\t\t[#0\\- +']* # flags\n\
104
+ \t\t\t\t\t\t[,;:_]? # separator character (AltiVec)\n\
105
+ \t\t\t\t\t\t((-?\\d+)|\\*(-?\\d+\\$)?)? # minimum field width\n\
106
+ \t\t\t\t\t\t(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)? # precision\n\
107
+ \t\t\t\t\t\t(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\n\
108
+ \t\t\t\t\t\t[diouxXDOUeEfFgGaACcSspn%] # conversion type\n\
109
+ \t\t\t\t\t"
110
+ - name: invalid.illegal.placeholder.c
111
+ match: "%"
112
+ uuid: 25066DC2-6B1D-11D9-9D5B-000D93589AF6
113
+ foldingStartMarker: "(?x)\n\
114
+ \t\t /\\*\\*(?!\\*)\n\
115
+ \t\t|^(?![^{]*?//|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|//|/\\*(?!.*?\\*/.*\\S))\n\
116
+ \t"
117
+ patterns:
118
+ - include: "#preprocessor-rule-enabled"
119
+ - include: "#preprocessor-rule-disabled"
120
+ - include: "#preprocessor-rule-other"
121
+ - name: comment.block.c
122
+ captures:
123
+ "0":
124
+ name: punctuation.definition.comment.c
125
+ begin: /\*
126
+ end: \*/
127
+ - name: comment.line.double-slash.c++
128
+ begin: //
129
+ beginCaptures:
130
+ "0":
131
+ name: punctuation.definition.comment.c
132
+ end: $\n?
133
+ patterns:
134
+ - name: punctuation.separator.continuation.c++
135
+ match: (?>\\\s*\n)
136
+ - name: keyword.control.c
137
+ match: \b(break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while)\b
138
+ - name: storage.type.c
139
+ match: \b(asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void)\b
140
+ - name: storage.modifier.c
141
+ match: \b(const|extern|register|restrict|static|volatile|inline)\b
142
+ - name: constant.other.variable.mac-classic.c
143
+ match: \bk[A-Z]\w*\b
144
+ comment: common C constant naming idiom -- kConstantVariable
145
+ - name: variable.other.readwrite.global.mac-classic.c
146
+ match: \bg[A-Z]\w*\b
147
+ - name: variable.other.readwrite.static.mac-classic.c
148
+ match: \bs[A-Z]\w*\b
149
+ - name: constant.language.c
150
+ match: \b(NULL|true|false|TRUE|FALSE)\b
151
+ - name: keyword.operator.sizeof.c
152
+ match: \b(sizeof)\b
153
+ - name: constant.numeric.c
154
+ 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
155
+ - name: string.quoted.double.c
156
+ endCaptures:
157
+ "0":
158
+ name: punctuation.definition.string.end.c
159
+ begin: "\""
160
+ beginCaptures:
161
+ "0":
162
+ name: punctuation.definition.string.begin.c
163
+ end: "\""
164
+ patterns:
165
+ - include: "#string_escaped_char"
166
+ - include: "#string_placeholder"
167
+ - name: string.quoted.single.c
168
+ endCaptures:
169
+ "0":
170
+ name: punctuation.definition.string.end.c
171
+ begin: "'"
172
+ beginCaptures:
173
+ "0":
174
+ name: punctuation.definition.string.begin.c
175
+ end: "'"
176
+ patterns:
177
+ - include: "#string_escaped_char"
178
+ - name: meta.preprocessor.macro.c
179
+ begin: "(?x)\n\
180
+ \t\t\t\t^\\s*\\#\\s*(define)\\s+ # define\n\
181
+ \t\t\t\t((?<id>[a-zA-Z_][a-zA-Z0-9_]*)) # macro name\n\
182
+ \t\t\t\t(?: # and optionally:\n\
183
+ \t\t\t\t (\\() # an open parenthesis\n\
184
+ \t\t\t\t (\n\
185
+ \t\t\t\t \\s* \\g<id> \\s* # first argument\n\
186
+ \t\t\t\t ((,) \\s* \\g<id> \\s*)* # additional arguments\n\
187
+ \t\t\t\t (?:\\.\\.\\.)? # varargs ellipsis?\n\
188
+ \t\t\t\t )\n\
189
+ \t\t\t\t (\\)) # a close parenthesis\n\
190
+ \t\t\t\t)?\n\
191
+ \t\t\t"
192
+ beginCaptures:
193
+ "7":
194
+ name: punctuation.separator.parameters.c
195
+ "8":
196
+ name: punctuation.definition.parameters.c
197
+ "1":
198
+ name: keyword.control.import.define.c
199
+ "2":
200
+ name: entity.name.function.preprocessor.c
201
+ "4":
202
+ name: punctuation.definition.parameters.c
203
+ "5":
204
+ name: variable.parameter.preprocessor.c
205
+ end: (?=(?://|/\*))|$
206
+ patterns:
207
+ - name: punctuation.separator.continuation.c
208
+ match: (?>\\\s*\n)
209
+ - include: $base
210
+ - name: meta.preprocessor.diagnostic.c
211
+ captures:
212
+ "1":
213
+ name: keyword.control.import.error.c
214
+ begin: ^\s*#\s*(error|warning)\b
215
+ end: $
216
+ patterns:
217
+ - name: punctuation.separator.continuation.c
218
+ match: (?>\\\s*\n)
219
+ - name: meta.preprocessor.c.include
220
+ captures:
221
+ "1":
222
+ name: keyword.control.import.include.c
223
+ begin: ^\s*#\s*(include|import)\b\s+
224
+ end: (?=(?://|/\*))|$
225
+ patterns:
226
+ - name: punctuation.separator.continuation.c
227
+ match: (?>\\\s*\n)
228
+ - name: string.quoted.double.include.c
229
+ endCaptures:
230
+ "0":
231
+ name: punctuation.definition.string.end.c
232
+ begin: "\""
233
+ beginCaptures:
234
+ "0":
235
+ name: punctuation.definition.string.begin.c
236
+ end: "\""
237
+ - name: string.quoted.other.lt-gt.include.c
238
+ endCaptures:
239
+ "0":
240
+ name: punctuation.definition.string.end.c
241
+ begin: <
242
+ beginCaptures:
243
+ "0":
244
+ name: punctuation.definition.string.begin.c
245
+ end: ">"
246
+ - include: "#pragma-mark"
247
+ - name: meta.preprocessor.c
248
+ captures:
249
+ "1":
250
+ name: keyword.control.import.c
251
+ begin: ^\s*#\s*(define|defined|elif|else|if|ifdef|ifndef|line|pragma|undef)\b
252
+ end: (?=(?://|/\*))|$
253
+ patterns:
254
+ - name: punctuation.separator.continuation.c
255
+ match: (?>\\\s*\n)
256
+ - name: support.type.sys-types.c
257
+ 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
258
+ - name: support.type.pthread.c
259
+ 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
260
+ - name: support.type.stdint.c
261
+ 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
262
+ - name: support.constant.mac-classic.c
263
+ match: \b(noErr|kNilOptions|kInvalidID|kVariableLengthArray)\b
264
+ - name: support.type.mac-classic.c
265
+ 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
266
+ - name: support.function.C99.c
267
+ match: \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
268
+ - name: meta.function.c
269
+ endCaptures:
270
+ "0":
271
+ name: punctuation.definition.parameters.c
272
+ begin: "(?x)\n\
273
+ \t\t\t\t(?: ^ # begin-of-line\n\
274
+ \t\t\t\t | \n\
275
+ \t\t\t\t (?: (?= \\s ) (?<!else|new) (?<=\\w)\\s+ # or word + space before name\n\
276
+ \t\t\t\t | (?= \\s*[A-Za-z_] ) (?<!&&) (?<=[*&>])\\s* # or type modifier before name\n\
277
+ \t\t\t\t )\n\
278
+ \t\t\t\t)\n\
279
+ \t\t\t\t(\n\
280
+ \t\t\t\t\t([A-Za-z_][A-Za-z0-9_]|::)* # actual name\n\
281
+ \t\t\t\t\t(?: (?<=operator) (?: [-*&<>=+!]+ | \\(\\) | \\[\\] ) )? # if it is a C++ operator\n\
282
+ \t\t\t\t)\n\
283
+ \t\t\t\t \\s*(\\() (?= # match \"(\"\n\
284
+ \t\t\t\t (?<fun> [^()]++ | \\( \\g<fun>*+ \\) )*+ # function arguments\n\
285
+ \t\t\t\t \\) \t\t # match \")\"\n\
286
+ \t\t\t\t (\\s+const)?\\s* # optional const modifier\n\
287
+ \t\t\t\t (\\{|\\n|//|/\\*)) # start bracket or end-of-line\n\
288
+ \t\t\t"
289
+ beginCaptures:
290
+ "1":
291
+ name: entity.name.function.c
292
+ "2":
293
+ name: punctuation.definition.parameters.c
294
+ end: \)
295
+ patterns:
296
+ - include: $base
297
+ - name: meta.function.prototype.c
298
+ endCaptures:
299
+ "0":
300
+ name: punctuation.definition.parameters.c
301
+ begin: "(?x)\n\
302
+ \t\t\t\t(?: ^ # begin-of-line\n\
303
+ \t\t\t\t | (?: (?= \\s ) (?<!else|new|return) (?<=\\w)\\s+ # or word + space before name\n\
304
+ \t\t\t\t | (?= \\s*[A-Za-z_] ) (?<!&&) (?<=[*&])\\s* # or type modifier before name\n\
305
+ \t\t\t\t )\n\
306
+ \t\t\t\t)\n\
307
+ \t\t\t\t(\n\
308
+ \t\t\t\t\t[A-Za-z_][A-Za-z0-9_:]* # actual name\n\
309
+ \t\t\t\t\t(?: (?<=operator) (?: [-*&<>=+!]+ | \\(\\) | \\[\\] ) )? # if it is a C++ operator\n\
310
+ \t\t\t\t)\n\
311
+ \t\t\t\t \\s+(\\() (?= # match \"(\"\n\
312
+ \t\t\t\t (?<fun> [^()]++ | \\( \\g<fun>*+ \\) )*+ # function arguments\n\
313
+ \t\t\t\t \\) # match \")\"\n\
314
+ \t\t\t\t (\\s+const)?\\s* # optional const modifier\n\
315
+ \t\t\t\t ;) # terminating semi-colon\n\
316
+ \t\t\t"
317
+ beginCaptures:
318
+ "1":
319
+ name: entity.name.function.c
320
+ "2":
321
+ name: punctuation.definition.parameters.c
322
+ end: \)
323
+ patterns:
324
+ - include: $base
325
+ foldingStopMarker: (?<!\*)\*\*/|^\s*\}
326
+ keyEquivalent: ^~C