ultraviolet 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (212) hide show
  1. data/History.txt +5 -0
  2. data/Manifest.txt +216 -0
  3. data/README.txt +52 -0
  4. data/Rakefile +51 -0
  5. data/bin/theme2render +104 -0
  6. data/bin/uv +162 -0
  7. data/lib/uv.rb +84 -0
  8. data/lib/uv/html_processor.rb +89 -0
  9. data/render/old/txt2tags.render +131 -0
  10. data/render/xhtml/active4d.render +105 -0
  11. data/render/xhtml/all_hallows_eve.render +69 -0
  12. data/render/xhtml/amy.render +144 -0
  13. data/render/xhtml/blackboard.render +84 -0
  14. data/render/xhtml/brilliance_black.render +575 -0
  15. data/render/xhtml/brilliance_dull.render +534 -0
  16. data/render/xhtml/cobalt.render +135 -0
  17. data/render/xhtml/dawn.render +99 -0
  18. data/render/xhtml/eiffel.render +105 -0
  19. data/render/xhtml/espresso_libre.render +96 -0
  20. data/render/xhtml/files/css/active4d.css +114 -0
  21. data/render/xhtml/files/css/all_hallows_eve.css +72 -0
  22. data/render/xhtml/files/css/amy.css +144 -0
  23. data/render/xhtml/files/css/blackboard.css +88 -0
  24. data/render/xhtml/files/css/brilliance_black.css +632 -0
  25. data/render/xhtml/files/css/brilliance_dull.css +579 -0
  26. data/render/xhtml/files/css/cobalt.css +149 -0
  27. data/render/xhtml/files/css/dawn.css +121 -0
  28. data/render/xhtml/files/css/eiffel.css +121 -0
  29. data/render/xhtml/files/css/espresso_libre.css +109 -0
  30. data/render/xhtml/files/css/idle.css +62 -0
  31. data/render/xhtml/files/css/iplastic.css +80 -0
  32. data/render/xhtml/files/css/lazy.css +73 -0
  33. data/render/xhtml/files/css/mac_classic.css +123 -0
  34. data/render/xhtml/files/css/magicwb_amiga.css +101 -0
  35. data/render/xhtml/files/css/pastels_on_dark.css +188 -0
  36. data/render/xhtml/files/css/slush_poppies.css +85 -0
  37. data/render/xhtml/files/css/spacecadet.css +51 -0
  38. data/render/xhtml/files/css/sunburst.css +180 -0
  39. data/render/xhtml/files/css/twilight.css +137 -0
  40. data/render/xhtml/files/css/zenburnesque.css +88 -0
  41. data/render/xhtml/idle.render +66 -0
  42. data/render/xhtml/iplastic.render +72 -0
  43. data/render/xhtml/lazy.render +69 -0
  44. data/render/xhtml/mac_classic.render +108 -0
  45. data/render/xhtml/magicwb_amiga.render +90 -0
  46. data/render/xhtml/pastels_on_dark.render +177 -0
  47. data/render/xhtml/slush_poppies.render +96 -0
  48. data/render/xhtml/spacecadet.render +54 -0
  49. data/render/xhtml/sunburst.render +159 -0
  50. data/render/xhtml/twilight.render +126 -0
  51. data/render/xhtml/zenburnesque.render +99 -0
  52. data/syntax/actionscript.syntax +97 -0
  53. data/syntax/active4d.syntax +276 -0
  54. data/syntax/active4d_html.syntax +311 -0
  55. data/syntax/active4d_ini.syntax +50 -0
  56. data/syntax/active4d_library.syntax +21 -0
  57. data/syntax/ada.syntax +33 -0
  58. data/syntax/antlr.syntax +128 -0
  59. data/syntax/apache.syntax +176 -0
  60. data/syntax/applescript.syntax +384 -0
  61. data/syntax/asp.syntax +70 -0
  62. data/syntax/asp_vb.net.syntax +129 -0
  63. data/syntax/bibtex.syntax +151 -0
  64. data/syntax/blog_html.syntax +41 -0
  65. data/syntax/blog_markdown.syntax +42 -0
  66. data/syntax/blog_text.syntax +27 -0
  67. data/syntax/blog_textile.syntax +27 -0
  68. data/syntax/buggy/nemerle.yaml +74 -0
  69. data/syntax/build.syntax +53 -0
  70. data/syntax/bulletin_board.syntax +287 -0
  71. data/syntax/c++.syntax +109 -0
  72. data/syntax/c.syntax +326 -0
  73. data/syntax/cake.syntax +55 -0
  74. data/syntax/camlp4.syntax +36 -0
  75. data/syntax/coldfusion.syntax +118 -0
  76. data/syntax/context_free.syntax +176 -0
  77. data/syntax/cs.syntax +59 -0
  78. data/syntax/css.syntax +190 -0
  79. data/syntax/css_experimental.syntax +1925 -0
  80. data/syntax/csv.syntax +68 -0
  81. data/syntax/d.syntax +138 -0
  82. data/syntax/diff.syntax +81 -0
  83. data/syntax/dokuwiki.syntax +204 -0
  84. data/syntax/dot.syntax +47 -0
  85. data/syntax/doxygen.syntax +43 -0
  86. data/syntax/dylan.syntax +62 -0
  87. data/syntax/eiffel.syntax +78 -0
  88. data/syntax/erlang.syntax +922 -0
  89. data/syntax/f-script.syntax +80 -0
  90. data/syntax/fortran.syntax +141 -0
  91. data/syntax/fxscript.syntax +142 -0
  92. data/syntax/greasemonkey.syntax +34 -0
  93. data/syntax/gri.syntax +83 -0
  94. data/syntax/groovy.syntax +189 -0
  95. data/syntax/gtd2_text.syntax +31 -0
  96. data/syntax/gtdalt.syntax +143 -0
  97. data/syntax/haml.syntax +88 -0
  98. data/syntax/haskell.syntax +88 -0
  99. data/syntax/html-asp.syntax +27 -0
  100. data/syntax/html.syntax +362 -0
  101. data/syntax/html_django.syntax +36 -0
  102. data/syntax/html_for_asp.net.syntax +424 -0
  103. data/syntax/html_mason.syntax +119 -0
  104. data/syntax/html_rails.syntax +40 -0
  105. data/syntax/html_tcl.syntax +26 -0
  106. data/syntax/icalendar.syntax +32 -0
  107. data/syntax/inform.syntax +48 -0
  108. data/syntax/ini.syntax +54 -0
  109. data/syntax/installer_distribution_script.syntax +77 -0
  110. data/syntax/io.syntax +81 -0
  111. data/syntax/java.syntax +211 -0
  112. data/syntax/javaproperties.syntax +20 -0
  113. data/syntax/javascript.syntax +255 -0
  114. data/syntax/javascript_+_prototype.syntax +72 -0
  115. data/syntax/javascript_+_prototype_bracketed.syntax +140 -0
  116. data/syntax/jquery_javascript.syntax +114 -0
  117. data/syntax/json.syntax +136 -0
  118. data/syntax/languagedefinition.syntax +697 -0
  119. data/syntax/latex.syntax +566 -0
  120. data/syntax/latex_beamer.syntax +41 -0
  121. data/syntax/latex_log.syntax +50 -0
  122. data/syntax/latex_memoir.syntax +64 -0
  123. data/syntax/lexflex.syntax +219 -0
  124. data/syntax/lighttpd.syntax +54 -0
  125. data/syntax/lilypond.syntax +492 -0
  126. data/syntax/lisp.syntax +61 -0
  127. data/syntax/literate_haskell.syntax +24 -0
  128. data/syntax/logo.syntax +29 -0
  129. data/syntax/logtalk.syntax +152 -0
  130. data/syntax/lua.syntax +86 -0
  131. data/syntax/m.syntax +142 -0
  132. data/syntax/macports_portfile.syntax +143 -0
  133. data/syntax/mail.syntax +118 -0
  134. data/syntax/makefile.syntax +35 -0
  135. data/syntax/man.syntax +17 -0
  136. data/syntax/markdown.syntax +543 -0
  137. data/syntax/mediawiki.syntax +567 -0
  138. data/syntax/mel.syntax +92 -0
  139. data/syntax/mips.syntax +66 -0
  140. data/syntax/mod_perl.syntax +50 -0
  141. data/syntax/modula-3.syntax +47 -0
  142. data/syntax/moinmoin.syntax +189 -0
  143. data/syntax/mootools.syntax +572 -0
  144. data/syntax/movable_type.syntax +162 -0
  145. data/syntax/multimarkdown.syntax +39 -0
  146. data/syntax/objective-c++.syntax +18 -0
  147. data/syntax/objective-c.syntax +226 -0
  148. data/syntax/ocaml.syntax +764 -0
  149. data/syntax/ocamllex.syntax +167 -0
  150. data/syntax/ocamlyacc.syntax +184 -0
  151. data/syntax/old/YAML.yaml +160 -0
  152. data/syntax/old/txt2tags.yaml +139 -0
  153. data/syntax/opengl.syntax +14 -0
  154. data/syntax/pascal.syntax +77 -0
  155. data/syntax/perl.syntax +1075 -0
  156. data/syntax/php.syntax +678 -0
  157. data/syntax/plain_text.syntax +32 -0
  158. data/syntax/postscript.syntax +114 -0
  159. data/syntax/processing.syntax +106 -0
  160. data/syntax/prolog.syntax +40 -0
  161. data/syntax/property_list.syntax +645 -0
  162. data/syntax/python.syntax +865 -0
  163. data/syntax/python_django.syntax +21 -0
  164. data/syntax/qmake_project.syntax +114 -0
  165. data/syntax/qt_c++.syntax +26 -0
  166. data/syntax/quake3_config.syntax +32 -0
  167. data/syntax/r.syntax +81 -0
  168. data/syntax/r_console.syntax +16 -0
  169. data/syntax/ragel.syntax +201 -0
  170. data/syntax/rd_r_documentation.syntax +91 -0
  171. data/syntax/regexp.syntax +50 -0
  172. data/syntax/regular_expressions_oniguruma.syntax +107 -0
  173. data/syntax/regular_expressions_python.syntax +109 -0
  174. data/syntax/release_notes.syntax +37 -0
  175. data/syntax/remind.syntax +253 -0
  176. data/syntax/restructuredtext.syntax +250 -0
  177. data/syntax/rez.syntax +80 -0
  178. data/syntax/ruby.syntax +1035 -0
  179. data/syntax/ruby_experimental.syntax +145 -0
  180. data/syntax/ruby_on_rails.syntax +88 -0
  181. data/syntax/s5.syntax +69 -0
  182. data/syntax/scheme.syntax +347 -0
  183. data/syntax/scilab.syntax +41 -0
  184. data/syntax/setext.syntax +147 -0
  185. data/syntax/shell-unix-generic.syntax +384 -0
  186. data/syntax/slate.syntax +149 -0
  187. data/syntax/smarty.syntax +63 -0
  188. data/syntax/sql.syntax +237 -0
  189. data/syntax/sql_rails.syntax +18 -0
  190. data/syntax/ssh-config.syntax +33 -0
  191. data/syntax/standard_ml.syntax +45 -0
  192. data/syntax/strings_file.syntax +39 -0
  193. data/syntax/subversion_commit_message.syntax +36 -0
  194. data/syntax/sweave.syntax +84 -0
  195. data/syntax/swig.syntax +57 -0
  196. data/syntax/tcl.syntax +152 -0
  197. data/syntax/template_toolkit.syntax +121 -0
  198. data/syntax/tex.syntax +86 -0
  199. data/syntax/tex_math.syntax +49 -0
  200. data/syntax/textile.syntax +215 -0
  201. data/syntax/tsv.syntax +50 -0
  202. data/syntax/twiki.syntax +241 -0
  203. data/syntax/txt2tags.syntax +79 -0
  204. data/syntax/vectorscript.syntax +57 -0
  205. data/syntax/xhtml_1.0.syntax +4027 -0
  206. data/syntax/xml.syntax +179 -0
  207. data/syntax/xml_strict.syntax +92 -0
  208. data/syntax/xsl.syntax +60 -0
  209. data/syntax/yaml.syntax +160 -0
  210. data/syntax/yui_javascript.syntax +176 -0
  211. data/test/test_uv.rb +0 -0
  212. metadata +270 -0
@@ -0,0 +1,865 @@
1
+ ---
2
+ name: Python
3
+ fileTypes:
4
+ - py
5
+ - rpy
6
+ - cpy
7
+ - SConstruct
8
+ - Sconstruct
9
+ - sconstruct
10
+ - SConscript
11
+ firstLineMatch: ^#!/.*\bpython\b
12
+ scopeName: source.python
13
+ repository:
14
+ keyword_arguments:
15
+ endCaptures:
16
+ "1":
17
+ name: punctuation.separator.parameters.python
18
+ begin: \b([a-zA-Z_][a-zA-Z_0-9]*)\s*(=)
19
+ beginCaptures:
20
+ "1":
21
+ name: variable.parameter.function.python
22
+ "2":
23
+ name: keyword.operator.assignment.python
24
+ end: \s*(?:(,)|(?=$\n?|[\)]))
25
+ patterns:
26
+ - include: $base
27
+ generic_names:
28
+ match: "[A-Za-z_][A-Za-z0-9_]*"
29
+ escaped_char:
30
+ captures:
31
+ "6":
32
+ name: constant.character.escape.single-quote.python
33
+ "11":
34
+ name: constant.character.escape.return.python
35
+ "7":
36
+ name: constant.character.escape.bell.python
37
+ "12":
38
+ name: constant.character.escape.tab.python
39
+ "8":
40
+ name: constant.character.escape.backspace.python
41
+ "13":
42
+ name: constant.character.escape.vertical-tab.python
43
+ "9":
44
+ name: constant.character.escape.formfeed.python
45
+ "1":
46
+ name: constant.character.escape.hex.python
47
+ "2":
48
+ name: constant.character.escape.octal.python
49
+ "3":
50
+ name: constant.character.escape.newline.python
51
+ "4":
52
+ name: constant.character.escape.backlash.python
53
+ "10":
54
+ name: constant.character.escape.linefeed.python
55
+ "5":
56
+ name: constant.character.escape.double-quote.python
57
+ match: (\\x[0-9A-F]{2})|(\\[0-7]{3})|(\\\n)|(\\\\)|(\\\")|(\\')|(\\a)|(\\b)|(\\f)|(\\n)|(\\r)|(\\t)|(\\v)
58
+ entity_name_class:
59
+ patterns:
60
+ - include: "#illegal_names"
61
+ - include: "#generic_names"
62
+ dotted_name:
63
+ begin: (?=[A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)*)
64
+ end: (?![A-Za-z0-9_\.])
65
+ patterns:
66
+ - begin: (\.)(?=[A-Za-z_][A-Za-z0-9_]*)
67
+ end: (?![A-Za-z0-9_])
68
+ patterns:
69
+ - include: "#magic_function_names"
70
+ - include: "#magic_variable_names"
71
+ - include: "#illegal_names"
72
+ - include: "#generic_names"
73
+ - begin: (?<!\.)(?=[A-Za-z_][A-Za-z0-9_]*)
74
+ end: (?![A-Za-z0-9_])
75
+ patterns:
76
+ - include: "#builtin_functions"
77
+ - include: "#builtin_types"
78
+ - include: "#builtin_exceptions"
79
+ - include: "#illegal_names"
80
+ - include: "#magic_function_names"
81
+ - include: "#magic_variable_names"
82
+ - include: "#generic_names"
83
+ builtin_types:
84
+ name: support.type.python
85
+ match: |-
86
+ (?x)\b(
87
+ basestring|bool|buffer|classmethod|complex|dict|enumerate|file|
88
+ float|frozenset|int|list|long|object|open|property|reversed|set|
89
+ slice|staticmethod|str|super|tuple|type|unicode|xrange
90
+ )\b
91
+ builtin_exceptions:
92
+ name: support.type.exception.python
93
+ match: (?x)\b((Arithmetic|Assertion|Attribute|EOF|Environment|FloatingPoint|IO|Import|Indentation|Index|Key|Lookup|Memory|Name|OS|Overflow|NotImplemented|Reference|Runtime|Standard|Syntax|System|Tab|Type|UnboundLocal|Unicode(Translate|Encode|Decode)?|Value|ZeroDivision)Error|(Deprecation|Future|Overflow|PendingDeprecation|Runtime|Syntax|User)?Warning|KeyboardInterrupt|NotImplemented|StopIteration|SystemExit|(Base)?Exception)\b
94
+ magic_variable_names:
95
+ name: support.variable.magic.python
96
+ match: \b__(all|bases|class|debug|dict|doc|file|members|metaclass|methods|name|slots|weakref)__\b
97
+ comment: magic variables which a class/module may have.
98
+ magic_function_names:
99
+ name: support.function.magic.python
100
+ match: |-
101
+ (?x)\b(__(?:
102
+ abs|add|and|call|cmp|coerce|complex|contains|del|delattr|
103
+ delete|delitem|delslice|div|divmod|enter|eq|exit|float|
104
+ floordiv|ge|get|getattr|getattribute|getitem|getslice|gt|
105
+ hash|hex|iadd|iand|idiv|ifloordiv|ilshift|imod|imul|init|
106
+ int|invert|ior|ipow|irshift|isub|iter|itruediv|ixor|le|len|
107
+ long|lshift|lt|mod|mul|ne|neg|new|nonzero|oct|or|pos|pow|
108
+ radd|rand|rdiv|rdivmod|repr|rfloordiv|rlshift|rmod|rmul|ror|
109
+ rpow|rrshift|rshift|rsub|rtruediv|rxor|set|setattr|setitem|
110
+ setslice|str|sub|truediv|unicode|xor
111
+ )__)\b
112
+ comment: these methods have magic interpretation by python and are generally called indirectly through syntactic constructs
113
+ illegal_names:
114
+ name: invalid.illegal.name.python
115
+ match: \b(and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield)\b
116
+ builtin_functions:
117
+ name: support.function.builtin.python
118
+ match: |-
119
+ (?x)\b(
120
+ __import__|all|abs|any|apply|callable|chr|cmp|coerce|compile|delattr|dir|
121
+ divmod|eval|execfile|filter|getattr|globals|hasattr|hash|hex|id|
122
+ input|intern|isinstance|issubclass|iter|len|locals|map|max|min|oct|
123
+ ord|pow|range|raw_input|reduce|reload|repr|round|setattr|sorted|
124
+ sum|unichr|vars|zip
125
+ )\b
126
+ docstrings:
127
+ patterns:
128
+ - name: comment.block.python
129
+ begin: ^\s*(?=[uU]?[rR]?""")
130
+ end: (?<=""")
131
+ patterns:
132
+ - include: "#string_quoted_double"
133
+ - name: comment.block.python
134
+ begin: ^\s*(?=[uU]?[rR]?''')
135
+ end: (?<=''')
136
+ patterns:
137
+ - include: "#string_quoted_single"
138
+ entity_name_function:
139
+ patterns:
140
+ - include: "#magic_function_names"
141
+ - include: "#illegal_names"
142
+ - include: "#generic_names"
143
+ strings:
144
+ patterns:
145
+ - include: "#string_quoted_double"
146
+ - include: "#string_quoted_single"
147
+ string_quoted_single:
148
+ patterns:
149
+ - name: string.quoted.single.single-line.python
150
+ captures:
151
+ "1":
152
+ name: punctuation.definition.string.begin.python
153
+ "2":
154
+ name: punctuation.definition.string.end.python
155
+ "3":
156
+ name: meta.empty-string.single.python
157
+ match: (?<!')(')(('))(?!')
158
+ - name: string.quoted.single.block.unicode-raw.python
159
+ endCaptures:
160
+ "1":
161
+ name: punctuation.definition.string.end.python
162
+ "2":
163
+ name: meta.empty-string.single.python
164
+ begin: ((?i:ur))(''')
165
+ beginCaptures:
166
+ "1":
167
+ name: storage.type.string.python
168
+ "2":
169
+ name: punctuation.definition.string.begin.python
170
+ end: ((?<=''')(')''|''')
171
+ patterns:
172
+ - include: "#constant_placeholder"
173
+ - include: "#escaped_unicode_char"
174
+ - include: "#escaped_char"
175
+ - include: source.regexp.python
176
+ comment: single quoted unicode-raw string
177
+ - name: string.quoted.single.block.raw.python
178
+ endCaptures:
179
+ "1":
180
+ name: punctuation.definition.string.end.python
181
+ "2":
182
+ name: meta.empty-string.single.python
183
+ begin: ([rR])(''')
184
+ beginCaptures:
185
+ "1":
186
+ name: storage.type.string.python
187
+ "2":
188
+ name: punctuation.definition.string.begin.python
189
+ end: ((?<=''')(')''|''')
190
+ patterns:
191
+ - include: "#constant_placeholder"
192
+ - include: "#escaped_char"
193
+ - include: source.regexp.python
194
+ comment: single quoted raw string
195
+ - name: string.quoted.single.block.unicode.python
196
+ endCaptures:
197
+ "1":
198
+ name: punctuation.definition.string.end.python
199
+ "2":
200
+ name: meta.empty-string.single.python
201
+ begin: ([uU])(''')
202
+ beginCaptures:
203
+ "1":
204
+ name: storage.type.string.python
205
+ "2":
206
+ name: punctuation.definition.string.begin.python
207
+ end: ((?<=''')(')''|''')
208
+ patterns:
209
+ - include: "#constant_placeholder"
210
+ - include: "#escaped_unicode_char"
211
+ - include: "#escaped_char"
212
+ comment: single quoted unicode string
213
+ - name: string.quoted.single.single-line.unicode-raw.python
214
+ endCaptures:
215
+ "1":
216
+ name: punctuation.definition.string.end.python
217
+ "2":
218
+ name: invalid.illegal.unclosed-string.python
219
+ begin: ((?i:ur))(')
220
+ beginCaptures:
221
+ "1":
222
+ name: storage.type.string.python
223
+ "2":
224
+ name: punctuation.definition.string.begin.python
225
+ end: (')|(\n)
226
+ patterns:
227
+ - include: "#constant_placeholder"
228
+ - include: "#escaped_unicode_char"
229
+ - include: "#escaped_char"
230
+ - include: source.regexp.python
231
+ comment: single quoted raw string
232
+ - name: string.quoted.single.single-line.raw.python
233
+ endCaptures:
234
+ "1":
235
+ name: punctuation.definition.string.end.python
236
+ "2":
237
+ name: invalid.illegal.unclosed-string.python
238
+ begin: ([rR])(')
239
+ beginCaptures:
240
+ "1":
241
+ name: storage.type.string.python
242
+ "2":
243
+ name: punctuation.definition.string.begin.python
244
+ end: (')|(\n)
245
+ patterns:
246
+ - include: "#constant_placeholder"
247
+ - include: "#escaped_char"
248
+ - include: source.regexp.python
249
+ comment: single quoted raw string
250
+ - name: string.quoted.single.single-line.unicode.python
251
+ endCaptures:
252
+ "1":
253
+ name: punctuation.definition.string.end.python
254
+ "2":
255
+ name: invalid.illegal.unclosed-string.python
256
+ begin: ([uU])(')
257
+ beginCaptures:
258
+ "1":
259
+ name: storage.type.string.python
260
+ "2":
261
+ name: punctuation.definition.string.begin.python
262
+ end: (')|(\n)
263
+ patterns:
264
+ - include: "#constant_placeholder"
265
+ - include: "#escaped_unicode_char"
266
+ - include: "#escaped_char"
267
+ comment: single quoted unicode string
268
+ - name: string.quoted.single.block.python
269
+ endCaptures:
270
+ "1":
271
+ name: punctuation.definition.string.end.python
272
+ "2":
273
+ name: meta.empty-string.single.python
274
+ begin: (''')
275
+ beginCaptures:
276
+ "1":
277
+ name: punctuation.definition.string.begin.python
278
+ end: ((?<=''')(')''|''')
279
+ patterns:
280
+ - include: "#constant_placeholder"
281
+ - include: "#escaped_char"
282
+ comment: single quoted string
283
+ - name: string.quoted.single.single-line.python
284
+ endCaptures:
285
+ "1":
286
+ name: punctuation.definition.string.end.python
287
+ "2":
288
+ name: invalid.illegal.unclosed-string.python
289
+ begin: (')
290
+ beginCaptures:
291
+ "1":
292
+ name: punctuation.definition.string.begin.python
293
+ end: (')|(\n)
294
+ patterns:
295
+ - include: "#constant_placeholder"
296
+ - include: "#escaped_char"
297
+ comment: single quoted string
298
+ line_continuation:
299
+ captures:
300
+ "1":
301
+ name: punctuation.separator.continuation.line.python
302
+ "2":
303
+ name: invalid.illegal.unexpected-text.python
304
+ match: (\\)(.*)$\n?
305
+ constant_placeholder:
306
+ name: constant.other.placeholder.python
307
+ match: (?i:%(\([a-z_]+\))?#?0?\-?[ ]?\+?([0-9]*|\*)(\.([0-9]*|\*))?[hL]?[a-z%])
308
+ function_name:
309
+ patterns:
310
+ - include: "#magic_function_names"
311
+ - include: "#magic_variable_names"
312
+ - include: "#builtin_exceptions"
313
+ - include: "#builtin_functions"
314
+ - include: "#builtin_types"
315
+ - include: "#generic_names"
316
+ string_quoted_double:
317
+ patterns:
318
+ - name: string.quoted.double.block.unicode-raw.python
319
+ endCaptures:
320
+ "1":
321
+ name: punctuation.definition.string.end.python
322
+ "2":
323
+ name: meta.empty-string.double.python
324
+ begin: ((?i:ur))(""")
325
+ beginCaptures:
326
+ "1":
327
+ name: storage.type.string.python
328
+ "2":
329
+ name: punctuation.definition.string.begin.python
330
+ end: ((?<=""")(")""|""")
331
+ patterns:
332
+ - include: "#constant_placeholder"
333
+ - include: "#escaped_unicode_char"
334
+ - include: "#escaped_char"
335
+ - include: source.regexp.python
336
+ comment: single quoted unicode-raw string
337
+ - name: string.quoted.double.block.raw.python
338
+ endCaptures:
339
+ "1":
340
+ name: punctuation.definition.string.end.python
341
+ "2":
342
+ name: meta.empty-string.double.python
343
+ begin: ([rR])(""")
344
+ beginCaptures:
345
+ "1":
346
+ name: storage.type.string.python
347
+ "2":
348
+ name: punctuation.definition.string.begin.python
349
+ end: ((?<=""")(")""|""")
350
+ patterns:
351
+ - include: "#constant_placeholder"
352
+ - include: "#escaped_char"
353
+ - include: source.regexp.python
354
+ comment: double quoted raw string
355
+ - name: string.quoted.double.block.unicode.python
356
+ endCaptures:
357
+ "1":
358
+ name: punctuation.definition.string.end.python
359
+ "2":
360
+ name: meta.empty-string.double.python
361
+ begin: ([uU])(""")
362
+ beginCaptures:
363
+ "1":
364
+ name: storage.type.string.python
365
+ "2":
366
+ name: punctuation.definition.string.begin.python
367
+ end: ((?<=""")(")""|""")
368
+ patterns:
369
+ - include: "#constant_placeholder"
370
+ - include: "#escaped_unicode_char"
371
+ - include: "#escaped_char"
372
+ comment: double quoted unicode string
373
+ - name: string.quoted.double.single-line.unicode-raw.python
374
+ endCaptures:
375
+ "1":
376
+ name: punctuation.definition.string.end.python
377
+ "2":
378
+ name: meta.empty-string.double.python
379
+ "3":
380
+ name: invalid.illegal.unclosed-string.python
381
+ begin: ((?i:ur))(")
382
+ beginCaptures:
383
+ "1":
384
+ name: storage.type.string.python
385
+ "2":
386
+ name: punctuation.definition.string.begin.python
387
+ end: ((?<=")(")|")|(\n)
388
+ patterns:
389
+ - include: "#constant_placeholder"
390
+ - include: "#escaped_unicode_char"
391
+ - include: "#escaped_char"
392
+ - include: source.regexp.python
393
+ comment: double-quoted raw string
394
+ - name: string.quoted.double.single-line.raw.python
395
+ endCaptures:
396
+ "1":
397
+ name: punctuation.definition.string.end.python
398
+ "2":
399
+ name: meta.empty-string.double.python
400
+ "3":
401
+ name: invalid.illegal.unclosed-string.python
402
+ begin: ([rR])(")
403
+ beginCaptures:
404
+ "1":
405
+ name: storage.type.string.python
406
+ "2":
407
+ name: punctuation.definition.string.begin.python
408
+ end: ((?<=")(")|")|(\n)
409
+ patterns:
410
+ - include: "#constant_placeholder"
411
+ - include: "#escaped_char"
412
+ - include: source.regexp.python
413
+ comment: double-quoted raw string
414
+ - name: string.quoted.double.single-line.raw.python
415
+ endCaptures:
416
+ "1":
417
+ name: punctuation.definition.string.end.python
418
+ "2":
419
+ name: meta.empty-string.double.python
420
+ "3":
421
+ name: invalid.illegal.unclosed-string.python
422
+ begin: ([rR])(")
423
+ beginCaptures:
424
+ "1":
425
+ name: storage.type.string.python
426
+ "2":
427
+ name: punctuation.definition.string.begin.python
428
+ end: ((?<=")(")|")|(\n)
429
+ patterns:
430
+ - include: "#constant_placeholder"
431
+ - include: "#escaped_char"
432
+ - include: source.regexp.python
433
+ comment: double-quoted raw string
434
+ - name: string.quoted.double.single-line.unicode.python
435
+ endCaptures:
436
+ "1":
437
+ name: punctuation.definition.string.end.python
438
+ "2":
439
+ name: meta.empty-string.double.python
440
+ "3":
441
+ name: invalid.illegal.unclosed-string.python
442
+ begin: ([uU])(")
443
+ beginCaptures:
444
+ "1":
445
+ name: storage.type.string.python
446
+ "2":
447
+ name: punctuation.definition.string.begin.python
448
+ end: ((?<=")(")|")|(\n)
449
+ patterns:
450
+ - include: "#constant_placeholder"
451
+ - include: "#escaped_unicode_char"
452
+ - include: "#escaped_char"
453
+ comment: double quoted unicode string
454
+ - name: string.quoted.double.block.python
455
+ endCaptures:
456
+ "1":
457
+ name: punctuation.definition.string.end.python
458
+ "2":
459
+ name: meta.empty-string.double.python
460
+ begin: (""")
461
+ beginCaptures:
462
+ "1":
463
+ name: punctuation.definition.string.begin.python
464
+ end: ((?<=""")(")""|""")
465
+ patterns:
466
+ - include: "#constant_placeholder"
467
+ - include: "#escaped_char"
468
+ comment: double quoted string
469
+ - name: string.quoted.double.single-line.python
470
+ endCaptures:
471
+ "1":
472
+ name: punctuation.definition.string.end.python
473
+ "2":
474
+ name: meta.empty-string.double.python
475
+ "3":
476
+ name: invalid.illegal.unclosed-string.python
477
+ begin: (")
478
+ beginCaptures:
479
+ "1":
480
+ name: punctuation.definition.string.begin.python
481
+ end: ((?<=")(")|")|(\n)
482
+ patterns:
483
+ - include: "#constant_placeholder"
484
+ - include: "#escaped_char"
485
+ comment: double quoted string
486
+ escaped_unicode_char:
487
+ captures:
488
+ "1":
489
+ name: constant.character.escape.unicode.16-bit-hex.python
490
+ "2":
491
+ name: constant.character.escape.unicode.32-bit-hex.python
492
+ "3":
493
+ name: constant.character.escape.unicode.name.python
494
+ match: (\\U[0-9A-Fa-f]{8})|(\\u[0-9A-Fa-f]{4})|(\\N\{[a-zA-Z ]+\})
495
+ uuid: F23DB5B2-7D08-11D9-A709-000D93B6E43C
496
+ foldingStartMarker: ^\s*(def|class)\s+([.a-zA-Z0-9_ <]+)\s*(\((.*)\))?\s*:|\{\s*$|\(\s*$|\[\s*$|^\s*"""(?=.)(?!.*""")
497
+ patterns:
498
+ - name: comment.line.number-sign.python
499
+ captures:
500
+ "1":
501
+ name: punctuation.definition.comment.python
502
+ match: (#).*$\n?
503
+ - name: constant.numeric.integer.long.hexadecimal.python
504
+ match: \b(?i:(0x\h*)L)
505
+ - name: constant.numeric.integer.hexadecimal.python
506
+ match: \b(?i:(0x\h*))
507
+ - name: constant.numeric.integer.long.octal.python
508
+ match: \b(?i:(0[0-7]+)L)
509
+ - name: constant.numeric.integer.octal.python
510
+ match: \b(0[0-7]+)
511
+ - name: constant.numeric.complex.python
512
+ match: \b(?i:(((\d+(\.(?=[^a-zA-Z_])\d*)?|(?<=[^0-9a-zA-Z_])\.\d+)(e[\-\+]?\d+)?))J)
513
+ - name: constant.numeric.float.python
514
+ match: \b(?i:(\d+\.\d*(e[\-\+]?\d+)?))(?=[^a-zA-Z_])
515
+ - name: constant.numeric.float.python
516
+ match: (?<=[^0-9a-zA-Z_])(?i:(\.\d+(e[\-\+]?\d+)?))
517
+ - name: constant.numeric.float.python
518
+ match: \b(?i:(\d+e[\-\+]?\d+))
519
+ - name: constant.numeric.integer.long.decimal.python
520
+ match: \b(?i:([1-9]+[0-9]*|0)L)
521
+ - name: constant.numeric.integer.decimal.python
522
+ match: \b([1-9]+[0-9]*|0)
523
+ - captures:
524
+ "1":
525
+ name: storage.modifier.global.python
526
+ match: \b(global)\b
527
+ - captures:
528
+ "1":
529
+ name: keyword.control.import.python
530
+ "2":
531
+ name: keyword.control.import.from.python
532
+ match: \b(?:(import)|(from))\b
533
+ - name: keyword.control.flow.python
534
+ match: \b(elif|else|except|finally|for|if|try|while|with)\b
535
+ comment: keywords that delimit flow blocks
536
+ - name: keyword.control.flow.python
537
+ match: \b(break|continue|pass|raise|return|yield)\b
538
+ comment: keywords that alter flow from within a block
539
+ - name: keyword.operator.logical.python
540
+ match: \b(and|in|is|not|or)\b
541
+ comment: keyword operators that evaluate to True or False
542
+ - captures:
543
+ "1":
544
+ name: keyword.other.python
545
+ match: \b(as|assert|del|exec|print)\b
546
+ comment: keywords that haven't fit into other groups (yet).
547
+ - name: keyword.operator.assignment.augmented.python
548
+ match: \+\=|-\=|\*\=|/\=|//\=|%\=|&\=|\|\=|\^\=|>>\=|<<\=|\*\*\=
549
+ - name: keyword.operator.arithmetic.python
550
+ match: \+|\-|\*|\*\*|/|//|%|<<|>>|&|\||\^|~
551
+ - name: keyword.operator.comparison.python
552
+ match: <|>|<\=|>\=|\=\=|!\=|<>
553
+ - name: keyword.operator.assignment.python
554
+ match: \=
555
+ - name: meta.class.old-style.python
556
+ endCaptures:
557
+ "1":
558
+ name: punctuation.section.class.begin.python
559
+ begin: ^\s*(class)\s+(?=[a-zA-Z_][a-zA-Z_0-9]*\s*\:)
560
+ contentName: entity.name.type.class.python
561
+ beginCaptures:
562
+ "1":
563
+ name: storage.type.class.python
564
+ end: \s*(:)
565
+ patterns:
566
+ - include: "#entity_name_class"
567
+ - name: meta.class.python
568
+ endCaptures:
569
+ "1":
570
+ name: punctuation.definition.inheritance.end.python
571
+ "2":
572
+ name: punctuation.section.class.begin.python
573
+ "3":
574
+ name: invalid.illegal.missing-section-begin.python
575
+ begin: ^\s*(class)\s+(?=[a-zA-Z_][a-zA-Z_0-9]*\s*\()
576
+ beginCaptures:
577
+ "1":
578
+ name: storage.type.class.python
579
+ end: (\))\s*(?:(\:)|(.*$\n?))
580
+ patterns:
581
+ - begin: (?=[A-Za-z_][A-Za-z0-9_]*)
582
+ contentName: entity.name.type.class.python
583
+ end: (?![A-Za-z0-9_])
584
+ patterns:
585
+ - include: "#entity_name_class"
586
+ - begin: (\()
587
+ contentName: meta.class.inheritance.python
588
+ beginCaptures:
589
+ "1":
590
+ name: punctuation.definition.inheritance.begin.python
591
+ end: (?=\)|:)
592
+ patterns:
593
+ - endCaptures:
594
+ "1":
595
+ name: punctuation.separator.inheritance.python
596
+ begin: (?<=\(|,)\s*
597
+ contentName: entity.other.inherited-class.python
598
+ end: \s*(?:(,)|(?=\)))
599
+ patterns:
600
+ - include: $base
601
+ - name: meta.class.python
602
+ endCaptures:
603
+ "1":
604
+ name: punctuation.definition.inheritance.begin.python
605
+ "2":
606
+ name: invalid.illegal.missing-inheritance.python
607
+ begin: ^\s*(class)\s+(?=[a-zA-Z_][a-zA-Z_0-9])
608
+ beginCaptures:
609
+ "1":
610
+ name: storage.type.class.python
611
+ end: (\()|\s*($\n?|#.*$\n?)
612
+ patterns:
613
+ - begin: (?=[A-Za-z_][A-Za-z0-9_]*)
614
+ contentName: entity.name.type.class.python
615
+ end: (?![A-Za-z0-9_])
616
+ patterns:
617
+ - include: "#entity_name_function"
618
+ - name: meta.function.python
619
+ endCaptures:
620
+ "1":
621
+ name: punctuation.definition.parameters.end.python
622
+ "2":
623
+ name: punctuation.section.function.begin.python
624
+ "3":
625
+ name: invalid.illegal.missing-section-begin.python
626
+ begin: ^\s*(def)\s+(?=[A-Za-z_][A-Za-z0-9_]*\s*\()
627
+ beginCaptures:
628
+ "1":
629
+ name: storage.type.function.python
630
+ end: (\))\s*(?:(\:)|(.*$\n?))
631
+ patterns:
632
+ - begin: (?=[A-Za-z_][A-Za-z0-9_]*)
633
+ contentName: entity.name.function.python
634
+ end: (?![A-Za-z0-9_])
635
+ patterns:
636
+ - include: "#entity_name_function"
637
+ - begin: (\()
638
+ contentName: meta.function.parameters.python
639
+ beginCaptures:
640
+ "1":
641
+ name: punctuation.definition.parameters.begin.python
642
+ end: (?=\)\s*\:)
643
+ patterns:
644
+ - include: "#keyword_arguments"
645
+ - captures:
646
+ "1":
647
+ name: variable.parameter.function.python
648
+ "2":
649
+ name: punctuation.separator.parameters.python
650
+ match: \b([a-zA-Z_][a-zA-Z_0-9]*)\s*(?:(,)|(?=[\n\)]))
651
+ - name: meta.function.python
652
+ endCaptures:
653
+ "1":
654
+ name: punctuation.definition.parameters.begin.python
655
+ "2":
656
+ name: invalid.illegal.missing-parameters.python
657
+ begin: ^\s*(def)\s+(?=[A-Za-z_][A-Za-z0-9_]*)
658
+ beginCaptures:
659
+ "1":
660
+ name: storage.type.function.python
661
+ end: (\()|\s*($\n?|#.*$\n?)
662
+ patterns:
663
+ - begin: (?=[A-Za-z_][A-Za-z0-9_]*)
664
+ contentName: entity.name.function.python
665
+ end: (?![A-Za-z0-9_])
666
+ patterns:
667
+ - include: "#entity_name_function"
668
+ - name: meta.function.decorator.python
669
+ endCaptures:
670
+ "1":
671
+ name: punctuation.definition.arguments.end.python
672
+ begin: ^\s*(?=@\s*[A-Za-z_][A-Za-z0-9_]*(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*\s*\()
673
+ end: (\))
674
+ patterns:
675
+ - begin: (?=(@)\s*[A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)*\s*\()
676
+ contentName: entity.name.function.decorator.python
677
+ beginCaptures:
678
+ "1":
679
+ name: punctuation.definition.decorator.python
680
+ end: (?=\s*\()
681
+ patterns:
682
+ - include: "#dotted_name"
683
+ - begin: (\()
684
+ contentName: meta.function.decorator.arguments.python
685
+ beginCaptures:
686
+ "1":
687
+ name: punctuation.definition.arguments.begin.python
688
+ end: (?=\))
689
+ patterns:
690
+ - include: "#keyword_arguments"
691
+ - include: $base
692
+ comment: a decorator may be a function call which returns a decorator.
693
+ - name: meta.function.decorator.python
694
+ begin: ^\s*(?=@\s*[A-Za-z_][A-Za-z0-9_]*(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*)
695
+ contentName: entity.name.function.decorator.python
696
+ end: (?=\s|$\n?|#)
697
+ patterns:
698
+ - begin: (?=(@)\s*[A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z_][A-Za-z0-9_]*)*)
699
+ beginCaptures:
700
+ "1":
701
+ name: punctuation.definition.decorator.python
702
+ end: (?=\s|$\n?|#)
703
+ patterns:
704
+ - include: "#dotted_name"
705
+ - name: meta.function-call.python
706
+ endCaptures:
707
+ "1":
708
+ name: punctuation.definition.arguments.end.python
709
+ begin: (?<=\)|\])\s*(\()
710
+ contentName: meta.function-call.arguments.python
711
+ beginCaptures:
712
+ "1":
713
+ name: punctuation.definition.arguments.begin.python
714
+ end: (\))
715
+ patterns:
716
+ - include: "#keyword_arguments"
717
+ - include: $base
718
+ - name: meta.function-call.python
719
+ endCaptures:
720
+ "1":
721
+ name: punctuation.definition.arguments.end.python
722
+ begin: (?=[A-Za-z_][A-Za-z0-9_]*(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*\s*\()
723
+ end: (\))
724
+ patterns:
725
+ - begin: (?=[A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)*\s*\()
726
+ end: (?=\s*\()
727
+ patterns:
728
+ - include: "#dotted_name"
729
+ - begin: (\()
730
+ contentName: meta.function-call.arguments.python
731
+ beginCaptures:
732
+ "1":
733
+ name: punctuation.definition.arguments.begin.python
734
+ end: (?=\))
735
+ patterns:
736
+ - include: "#keyword_arguments"
737
+ - include: $base
738
+ - name: meta.item-access.python
739
+ begin: (?=[A-Za-z_][A-Za-z0-9_]*(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*\s*\[)
740
+ end: (\])
741
+ patterns:
742
+ - begin: (?=[A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)*\s*\[)
743
+ end: (?=\s*\[)
744
+ patterns:
745
+ - include: "#dotted_name"
746
+ - endCaptures:
747
+ "1":
748
+ name: punctuation.definition.arguments.end.python
749
+ begin: (\[)
750
+ contentName: meta.item-access.arguments.python
751
+ beginCaptures:
752
+ "1":
753
+ name: punctuation.definition.arguments.begin.python
754
+ end: (?=\])
755
+ patterns:
756
+ - include: $base
757
+ - name: meta.item-access.python
758
+ endCaptures:
759
+ "1":
760
+ name: punctuation.definition.arguments.end.python
761
+ begin: (?<=\)|\])\s*(\[)
762
+ contentName: meta.item-access.arguments.python
763
+ beginCaptures:
764
+ "1":
765
+ name: punctuation.definition.arguments.begin.python
766
+ end: (\])
767
+ patterns:
768
+ - include: $base
769
+ - captures:
770
+ "1":
771
+ name: storage.type.function.python
772
+ match: \b(def|lambda)\b
773
+ - captures:
774
+ "1":
775
+ name: storage.type.class.python
776
+ match: \b(class)\b
777
+ - include: "#line_continuation"
778
+ - name: variable.language.python
779
+ match: \b(self|cls)\b
780
+ - name: constant.language.python
781
+ match: \b(None|True|False|Ellipsis|NotImplemented)\b
782
+ - include: "#string_quoted_single"
783
+ - include: "#string_quoted_double"
784
+ - include: "#dotted_name"
785
+ - begin: (\()
786
+ end: (\))
787
+ patterns:
788
+ - include: $base
789
+ - captures:
790
+ "1":
791
+ name: punctuation.definition.list.begin.python
792
+ "2":
793
+ name: meta.empty-list.python
794
+ "3":
795
+ name: punctuation.definition.list.end.python
796
+ match: (\[)(\s*(\]))\b
797
+ - name: meta.structure.list.python
798
+ endCaptures:
799
+ "1":
800
+ name: punctuation.definition.list.end.python
801
+ begin: (\[)
802
+ beginCaptures:
803
+ "1":
804
+ name: punctuation.definition.list.begin.python
805
+ end: (\])
806
+ patterns:
807
+ - endCaptures:
808
+ "1":
809
+ name: punctuation.separator.list.python
810
+ begin: (?<=\[|\,)\s*(?![\],])
811
+ contentName: meta.structure.list.item.python
812
+ end: \s*(?:(,)|(?=\]))
813
+ patterns:
814
+ - include: $base
815
+ - name: meta.structure.tuple.python
816
+ captures:
817
+ "1":
818
+ name: punctuation.definition.tuple.begin.python
819
+ "2":
820
+ name: meta.empty-tuple.python
821
+ "3":
822
+ name: punctuation.definition.tuple.end.python
823
+ match: (\()(\s*(\)))
824
+ - name: meta.structure.dictionary.python
825
+ captures:
826
+ "1":
827
+ name: punctuation.definition.dictionary.begin.python
828
+ "2":
829
+ name: meta.empty-dictionary.python
830
+ "3":
831
+ name: punctuation.definition.dictionary.end.python
832
+ match: (\{)(\s*(\}))
833
+ - name: meta.structure.dictionary.python
834
+ endCaptures:
835
+ "1":
836
+ name: punctuation.definition.dictionary.end.python
837
+ begin: (\{)
838
+ beginCaptures:
839
+ "1":
840
+ name: punctuation.definition.dictionary.begin.python
841
+ end: (\})
842
+ patterns:
843
+ - endCaptures:
844
+ "1":
845
+ name: punctuation.separator.valuepair.dictionary.python
846
+ begin: (?<=\{|\,|^)\s*(?![\},])
847
+ contentName: meta.structure.dictionary.key.python
848
+ end: \s*(?:(?=\})|(\:))
849
+ patterns:
850
+ - include: $base
851
+ - endCaptures:
852
+ "1":
853
+ name: punctuation.separator.dictionary.python
854
+ begin: (?<=\:|^)\s*
855
+ contentName: meta.structure.dictionary.value.python
856
+ end: \s*(?:(?=\})|(,))
857
+ patterns:
858
+ - include: $base
859
+ foldingStopMarker: ^\s*$|^\s*\}|^\s*\]|^\s*\)|^\s*"""\s*$
860
+ keyEquivalent: ^~P
861
+ comment: "\n\
862
+ \ttodo:\n\
863
+ \t\tlist comprehension / generator comprehension scope.\n\
864
+ \t\t\n\
865
+ \t"