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,868 @@
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: $self
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: "#language_variables"
83
+ - include: "#generic_names"
84
+ builtin_types:
85
+ name: support.type.python
86
+ match: |-
87
+ (?x)\b(
88
+ basestring|bool|buffer|classmethod|complex|dict|enumerate|file|
89
+ float|frozenset|int|list|long|object|open|property|reversed|set|
90
+ slice|staticmethod|str|super|tuple|type|unicode|xrange
91
+ )\b
92
+ builtin_exceptions:
93
+ name: support.type.exception.python
94
+ 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
95
+ magic_variable_names:
96
+ name: support.variable.magic.python
97
+ match: \b__(all|bases|class|debug|dict|doc|file|members|metaclass|methods|name|slots|weakref)__\b
98
+ comment: magic variables which a class/module may have.
99
+ magic_function_names:
100
+ name: support.function.magic.python
101
+ match: |-
102
+ (?x)\b(__(?:
103
+ abs|add|and|call|cmp|coerce|complex|contains|del|delattr|
104
+ delete|delitem|delslice|div|divmod|enter|eq|exit|float|
105
+ floordiv|ge|get|getattr|getattribute|getitem|getslice|gt|
106
+ hash|hex|iadd|iand|idiv|ifloordiv|ilshift|imod|imul|init|
107
+ int|invert|ior|ipow|irshift|isub|iter|itruediv|ixor|le|len|
108
+ long|lshift|lt|mod|mul|ne|neg|new|nonzero|oct|or|pos|pow|
109
+ radd|rand|rdiv|rdivmod|repr|rfloordiv|rlshift|rmod|rmul|ror|
110
+ rpow|rrshift|rshift|rsub|rtruediv|rxor|set|setattr|setitem|
111
+ setslice|str|sub|truediv|unicode|xor
112
+ )__)\b
113
+ comment: these methods have magic interpretation by python and are generally called indirectly through syntactic constructs
114
+ illegal_names:
115
+ name: invalid.illegal.name.python
116
+ 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
117
+ builtin_functions:
118
+ name: support.function.builtin.python
119
+ match: |-
120
+ (?x)\b(
121
+ __import__|all|abs|any|apply|callable|chr|cmp|coerce|compile|delattr|dir|
122
+ divmod|eval|execfile|filter|getattr|globals|hasattr|hash|hex|id|
123
+ input|intern|isinstance|issubclass|iter|len|locals|map|max|min|oct|
124
+ ord|pow|range|raw_input|reduce|reload|repr|round|setattr|sorted|
125
+ sum|unichr|vars|zip
126
+ )\b
127
+ docstrings:
128
+ patterns:
129
+ - name: comment.block.python
130
+ begin: ^\s*(?=[uU]?[rR]?""")
131
+ end: (?<=""")
132
+ patterns:
133
+ - include: "#string_quoted_double"
134
+ - name: comment.block.python
135
+ begin: ^\s*(?=[uU]?[rR]?''')
136
+ end: (?<=''')
137
+ patterns:
138
+ - include: "#string_quoted_single"
139
+ entity_name_function:
140
+ patterns:
141
+ - include: "#magic_function_names"
142
+ - include: "#illegal_names"
143
+ - include: "#generic_names"
144
+ strings:
145
+ patterns:
146
+ - include: "#string_quoted_double"
147
+ - include: "#string_quoted_single"
148
+ string_quoted_single:
149
+ patterns:
150
+ - name: string.quoted.single.single-line.python
151
+ captures:
152
+ "1":
153
+ name: punctuation.definition.string.begin.python
154
+ "2":
155
+ name: punctuation.definition.string.end.python
156
+ "3":
157
+ name: meta.empty-string.single.python
158
+ match: (?<!')(')(('))(?!')
159
+ - name: string.quoted.single.block.unicode-raw.python
160
+ endCaptures:
161
+ "1":
162
+ name: punctuation.definition.string.end.python
163
+ "2":
164
+ name: meta.empty-string.single.python
165
+ begin: ((?i:ur))(''')
166
+ beginCaptures:
167
+ "1":
168
+ name: storage.type.string.python
169
+ "2":
170
+ name: punctuation.definition.string.begin.python
171
+ end: ((?<=''')(')''|''')
172
+ patterns:
173
+ - include: "#constant_placeholder"
174
+ - include: "#escaped_unicode_char"
175
+ - include: "#escaped_char"
176
+ - include: source.regexp.python
177
+ comment: single quoted unicode-raw string
178
+ - name: string.quoted.single.block.raw.python
179
+ endCaptures:
180
+ "1":
181
+ name: punctuation.definition.string.end.python
182
+ "2":
183
+ name: meta.empty-string.single.python
184
+ begin: ([rR])(''')
185
+ beginCaptures:
186
+ "1":
187
+ name: storage.type.string.python
188
+ "2":
189
+ name: punctuation.definition.string.begin.python
190
+ end: ((?<=''')(')''|''')
191
+ patterns:
192
+ - include: "#constant_placeholder"
193
+ - include: "#escaped_char"
194
+ - include: source.regexp.python
195
+ comment: single quoted raw string
196
+ - name: string.quoted.single.block.unicode.python
197
+ endCaptures:
198
+ "1":
199
+ name: punctuation.definition.string.end.python
200
+ "2":
201
+ name: meta.empty-string.single.python
202
+ begin: ([uU])(''')
203
+ beginCaptures:
204
+ "1":
205
+ name: storage.type.string.python
206
+ "2":
207
+ name: punctuation.definition.string.begin.python
208
+ end: ((?<=''')(')''|''')
209
+ patterns:
210
+ - include: "#constant_placeholder"
211
+ - include: "#escaped_unicode_char"
212
+ - include: "#escaped_char"
213
+ comment: single quoted unicode string
214
+ - name: string.quoted.single.single-line.unicode-raw.python
215
+ endCaptures:
216
+ "1":
217
+ name: punctuation.definition.string.end.python
218
+ "2":
219
+ name: invalid.illegal.unclosed-string.python
220
+ begin: ((?i:ur))(')
221
+ beginCaptures:
222
+ "1":
223
+ name: storage.type.string.python
224
+ "2":
225
+ name: punctuation.definition.string.begin.python
226
+ end: (')|(\n)
227
+ patterns:
228
+ - include: "#constant_placeholder"
229
+ - include: "#escaped_unicode_char"
230
+ - include: "#escaped_char"
231
+ - include: source.regexp.python
232
+ comment: single quoted raw string
233
+ - name: string.quoted.single.single-line.raw.python
234
+ endCaptures:
235
+ "1":
236
+ name: punctuation.definition.string.end.python
237
+ "2":
238
+ name: invalid.illegal.unclosed-string.python
239
+ begin: ([rR])(')
240
+ beginCaptures:
241
+ "1":
242
+ name: storage.type.string.python
243
+ "2":
244
+ name: punctuation.definition.string.begin.python
245
+ end: (')|(\n)
246
+ patterns:
247
+ - include: "#constant_placeholder"
248
+ - include: "#escaped_char"
249
+ - include: source.regexp.python
250
+ comment: single quoted raw string
251
+ - name: string.quoted.single.single-line.unicode.python
252
+ endCaptures:
253
+ "1":
254
+ name: punctuation.definition.string.end.python
255
+ "2":
256
+ name: invalid.illegal.unclosed-string.python
257
+ begin: ([uU])(')
258
+ beginCaptures:
259
+ "1":
260
+ name: storage.type.string.python
261
+ "2":
262
+ name: punctuation.definition.string.begin.python
263
+ end: (')|(\n)
264
+ patterns:
265
+ - include: "#constant_placeholder"
266
+ - include: "#escaped_unicode_char"
267
+ - include: "#escaped_char"
268
+ comment: single quoted unicode string
269
+ - name: string.quoted.single.block.python
270
+ endCaptures:
271
+ "1":
272
+ name: punctuation.definition.string.end.python
273
+ "2":
274
+ name: meta.empty-string.single.python
275
+ begin: (''')
276
+ beginCaptures:
277
+ "1":
278
+ name: punctuation.definition.string.begin.python
279
+ end: ((?<=''')(')''|''')
280
+ patterns:
281
+ - include: "#constant_placeholder"
282
+ - include: "#escaped_char"
283
+ comment: single quoted string
284
+ - name: string.quoted.single.single-line.python
285
+ endCaptures:
286
+ "1":
287
+ name: punctuation.definition.string.end.python
288
+ "2":
289
+ name: invalid.illegal.unclosed-string.python
290
+ begin: (')
291
+ beginCaptures:
292
+ "1":
293
+ name: punctuation.definition.string.begin.python
294
+ end: (')|(\n)
295
+ patterns:
296
+ - include: "#constant_placeholder"
297
+ - include: "#escaped_char"
298
+ comment: single quoted string
299
+ line_continuation:
300
+ captures:
301
+ "1":
302
+ name: punctuation.separator.continuation.line.python
303
+ "2":
304
+ name: invalid.illegal.unexpected-text.python
305
+ match: (\\)(.*)$\n?
306
+ constant_placeholder:
307
+ name: constant.other.placeholder.python
308
+ match: (?i:%(\([a-z_]+\))?#?0?\-?[ ]?\+?([0-9]*|\*)(\.([0-9]*|\*))?[hL]?[a-z%])
309
+ function_name:
310
+ patterns:
311
+ - include: "#magic_function_names"
312
+ - include: "#magic_variable_names"
313
+ - include: "#builtin_exceptions"
314
+ - include: "#builtin_functions"
315
+ - include: "#builtin_types"
316
+ - include: "#generic_names"
317
+ string_quoted_double:
318
+ patterns:
319
+ - name: string.quoted.double.block.unicode-raw.python
320
+ endCaptures:
321
+ "1":
322
+ name: punctuation.definition.string.end.python
323
+ "2":
324
+ name: meta.empty-string.double.python
325
+ begin: ((?i:ur))(""")
326
+ beginCaptures:
327
+ "1":
328
+ name: storage.type.string.python
329
+ "2":
330
+ name: punctuation.definition.string.begin.python
331
+ end: ((?<=""")(")""|""")
332
+ patterns:
333
+ - include: "#constant_placeholder"
334
+ - include: "#escaped_unicode_char"
335
+ - include: "#escaped_char"
336
+ - include: source.regexp.python
337
+ comment: single quoted unicode-raw string
338
+ - name: string.quoted.double.block.raw.python
339
+ endCaptures:
340
+ "1":
341
+ name: punctuation.definition.string.end.python
342
+ "2":
343
+ name: meta.empty-string.double.python
344
+ begin: ([rR])(""")
345
+ beginCaptures:
346
+ "1":
347
+ name: storage.type.string.python
348
+ "2":
349
+ name: punctuation.definition.string.begin.python
350
+ end: ((?<=""")(")""|""")
351
+ patterns:
352
+ - include: "#constant_placeholder"
353
+ - include: "#escaped_char"
354
+ - include: source.regexp.python
355
+ comment: double quoted raw string
356
+ - name: string.quoted.double.block.unicode.python
357
+ endCaptures:
358
+ "1":
359
+ name: punctuation.definition.string.end.python
360
+ "2":
361
+ name: meta.empty-string.double.python
362
+ begin: ([uU])(""")
363
+ beginCaptures:
364
+ "1":
365
+ name: storage.type.string.python
366
+ "2":
367
+ name: punctuation.definition.string.begin.python
368
+ end: ((?<=""")(")""|""")
369
+ patterns:
370
+ - include: "#constant_placeholder"
371
+ - include: "#escaped_unicode_char"
372
+ - include: "#escaped_char"
373
+ comment: double quoted unicode string
374
+ - name: string.quoted.double.single-line.unicode-raw.python
375
+ endCaptures:
376
+ "1":
377
+ name: punctuation.definition.string.end.python
378
+ "2":
379
+ name: meta.empty-string.double.python
380
+ "3":
381
+ name: invalid.illegal.unclosed-string.python
382
+ begin: ((?i:ur))(")
383
+ beginCaptures:
384
+ "1":
385
+ name: storage.type.string.python
386
+ "2":
387
+ name: punctuation.definition.string.begin.python
388
+ end: ((?<=")(")|")|(\n)
389
+ patterns:
390
+ - include: "#constant_placeholder"
391
+ - include: "#escaped_unicode_char"
392
+ - include: "#escaped_char"
393
+ - include: source.regexp.python
394
+ comment: double-quoted raw string
395
+ - name: string.quoted.double.single-line.raw.python
396
+ endCaptures:
397
+ "1":
398
+ name: punctuation.definition.string.end.python
399
+ "2":
400
+ name: meta.empty-string.double.python
401
+ "3":
402
+ name: invalid.illegal.unclosed-string.python
403
+ begin: ([rR])(")
404
+ beginCaptures:
405
+ "1":
406
+ name: storage.type.string.python
407
+ "2":
408
+ name: punctuation.definition.string.begin.python
409
+ end: ((?<=")(")|")|(\n)
410
+ patterns:
411
+ - include: "#constant_placeholder"
412
+ - include: "#escaped_char"
413
+ - include: source.regexp.python
414
+ comment: double-quoted raw string
415
+ - name: string.quoted.double.single-line.raw.python
416
+ endCaptures:
417
+ "1":
418
+ name: punctuation.definition.string.end.python
419
+ "2":
420
+ name: meta.empty-string.double.python
421
+ "3":
422
+ name: invalid.illegal.unclosed-string.python
423
+ begin: ([rR])(")
424
+ beginCaptures:
425
+ "1":
426
+ name: storage.type.string.python
427
+ "2":
428
+ name: punctuation.definition.string.begin.python
429
+ end: ((?<=")(")|")|(\n)
430
+ patterns:
431
+ - include: "#constant_placeholder"
432
+ - include: "#escaped_char"
433
+ - include: source.regexp.python
434
+ comment: double-quoted raw string
435
+ - name: string.quoted.double.single-line.unicode.python
436
+ endCaptures:
437
+ "1":
438
+ name: punctuation.definition.string.end.python
439
+ "2":
440
+ name: meta.empty-string.double.python
441
+ "3":
442
+ name: invalid.illegal.unclosed-string.python
443
+ begin: ([uU])(")
444
+ beginCaptures:
445
+ "1":
446
+ name: storage.type.string.python
447
+ "2":
448
+ name: punctuation.definition.string.begin.python
449
+ end: ((?<=")(")|")|(\n)
450
+ patterns:
451
+ - include: "#constant_placeholder"
452
+ - include: "#escaped_unicode_char"
453
+ - include: "#escaped_char"
454
+ comment: double quoted unicode string
455
+ - name: string.quoted.double.block.python
456
+ endCaptures:
457
+ "1":
458
+ name: punctuation.definition.string.end.python
459
+ "2":
460
+ name: meta.empty-string.double.python
461
+ begin: (""")
462
+ beginCaptures:
463
+ "1":
464
+ name: punctuation.definition.string.begin.python
465
+ end: ((?<=""")(")""|""")
466
+ patterns:
467
+ - include: "#constant_placeholder"
468
+ - include: "#escaped_char"
469
+ comment: double quoted string
470
+ - name: string.quoted.double.single-line.python
471
+ endCaptures:
472
+ "1":
473
+ name: punctuation.definition.string.end.python
474
+ "2":
475
+ name: meta.empty-string.double.python
476
+ "3":
477
+ name: invalid.illegal.unclosed-string.python
478
+ begin: (")
479
+ beginCaptures:
480
+ "1":
481
+ name: punctuation.definition.string.begin.python
482
+ end: ((?<=")(")|")|(\n)
483
+ patterns:
484
+ - include: "#constant_placeholder"
485
+ - include: "#escaped_char"
486
+ comment: double quoted string
487
+ language_variables:
488
+ name: variable.language.python
489
+ match: \b(self|cls)\b
490
+ escaped_unicode_char:
491
+ captures:
492
+ "1":
493
+ name: constant.character.escape.unicode.16-bit-hex.python
494
+ "2":
495
+ name: constant.character.escape.unicode.32-bit-hex.python
496
+ "3":
497
+ name: constant.character.escape.unicode.name.python
498
+ match: (\\U[0-9A-Fa-f]{8})|(\\u[0-9A-Fa-f]{4})|(\\N\{[a-zA-Z ]+\})
499
+ uuid: F23DB5B2-7D08-11D9-A709-000D93B6E43C
500
+ foldingStartMarker: ^\s*(def|class)\s+([.a-zA-Z0-9_ <]+)\s*(\((.*)\))?\s*:|\{\s*$|\(\s*$|\[\s*$|^\s*"""(?=.)(?!.*""")
501
+ patterns:
502
+ - name: comment.line.number-sign.python
503
+ captures:
504
+ "1":
505
+ name: punctuation.definition.comment.python
506
+ match: (#).*$\n?
507
+ - name: constant.numeric.integer.long.hexadecimal.python
508
+ match: \b(?i:(0x\h*)L)
509
+ - name: constant.numeric.integer.hexadecimal.python
510
+ match: \b(?i:(0x\h*))
511
+ - name: constant.numeric.integer.long.octal.python
512
+ match: \b(?i:(0[0-7]+)L)
513
+ - name: constant.numeric.integer.octal.python
514
+ match: \b(0[0-7]+)
515
+ - name: constant.numeric.complex.python
516
+ match: \b(?i:(((\d+(\.(?=[^a-zA-Z_])\d*)?|(?<=[^0-9a-zA-Z_])\.\d+)(e[\-\+]?\d+)?))J)
517
+ - name: constant.numeric.float.python
518
+ match: \b(?i:(\d+\.\d*(e[\-\+]?\d+)?))(?=[^a-zA-Z_])
519
+ - name: constant.numeric.float.python
520
+ match: (?<=[^0-9a-zA-Z_])(?i:(\.\d+(e[\-\+]?\d+)?))
521
+ - name: constant.numeric.float.python
522
+ match: \b(?i:(\d+e[\-\+]?\d+))
523
+ - name: constant.numeric.integer.long.decimal.python
524
+ match: \b(?i:([1-9]+[0-9]*|0)L)
525
+ - name: constant.numeric.integer.decimal.python
526
+ match: \b([1-9]+[0-9]*|0)
527
+ - captures:
528
+ "1":
529
+ name: storage.modifier.global.python
530
+ match: \b(global)\b
531
+ - captures:
532
+ "1":
533
+ name: keyword.control.import.python
534
+ "2":
535
+ name: keyword.control.import.from.python
536
+ match: \b(?:(import)|(from))\b
537
+ - name: keyword.control.flow.python
538
+ match: \b(elif|else|except|finally|for|if|try|while|with)\b
539
+ comment: keywords that delimit flow blocks
540
+ - name: keyword.control.flow.python
541
+ match: \b(break|continue|pass|raise|return|yield)\b
542
+ comment: keywords that alter flow from within a block
543
+ - name: keyword.operator.logical.python
544
+ match: \b(and|in|is|not|or)\b
545
+ comment: keyword operators that evaluate to True or False
546
+ - captures:
547
+ "1":
548
+ name: keyword.other.python
549
+ match: \b(as|assert|del|exec|print)\b
550
+ comment: keywords that haven't fit into other groups (yet).
551
+ - name: keyword.operator.assignment.augmented.python
552
+ match: \+\=|-\=|\*\=|/\=|//\=|%\=|&\=|\|\=|\^\=|>>\=|<<\=|\*\*\=
553
+ - name: keyword.operator.arithmetic.python
554
+ match: \+|\-|\*|\*\*|/|//|%|<<|>>|&|\||\^|~
555
+ - name: keyword.operator.comparison.python
556
+ match: <|>|<\=|>\=|\=\=|!\=|<>
557
+ - name: keyword.operator.assignment.python
558
+ match: \=
559
+ - name: meta.class.old-style.python
560
+ endCaptures:
561
+ "1":
562
+ name: punctuation.section.class.begin.python
563
+ begin: ^\s*(class)\s+(?=[a-zA-Z_][a-zA-Z_0-9]*\s*\:)
564
+ contentName: entity.name.type.class.python
565
+ beginCaptures:
566
+ "1":
567
+ name: storage.type.class.python
568
+ end: \s*(:)
569
+ patterns:
570
+ - include: "#entity_name_class"
571
+ - name: meta.class.python
572
+ endCaptures:
573
+ "1":
574
+ name: punctuation.definition.inheritance.end.python
575
+ "2":
576
+ name: punctuation.section.class.begin.python
577
+ "3":
578
+ name: invalid.illegal.missing-section-begin.python
579
+ begin: ^\s*(class)\s+(?=[a-zA-Z_][a-zA-Z_0-9]*\s*\()
580
+ beginCaptures:
581
+ "1":
582
+ name: storage.type.class.python
583
+ end: (\))\s*(?:(\:)|(.*$\n?))
584
+ patterns:
585
+ - begin: (?=[A-Za-z_][A-Za-z0-9_]*)
586
+ contentName: entity.name.type.class.python
587
+ end: (?![A-Za-z0-9_])
588
+ patterns:
589
+ - include: "#entity_name_class"
590
+ - begin: (\()
591
+ contentName: meta.class.inheritance.python
592
+ beginCaptures:
593
+ "1":
594
+ name: punctuation.definition.inheritance.begin.python
595
+ end: (?=\)|:)
596
+ patterns:
597
+ - endCaptures:
598
+ "1":
599
+ name: punctuation.separator.inheritance.python
600
+ begin: (?<=\(|,)\s*
601
+ contentName: entity.other.inherited-class.python
602
+ end: \s*(?:(,)|(?=\)))
603
+ patterns:
604
+ - include: $self
605
+ - name: meta.class.python
606
+ endCaptures:
607
+ "1":
608
+ name: punctuation.definition.inheritance.begin.python
609
+ "2":
610
+ name: invalid.illegal.missing-inheritance.python
611
+ begin: ^\s*(class)\s+(?=[a-zA-Z_][a-zA-Z_0-9])
612
+ beginCaptures:
613
+ "1":
614
+ name: storage.type.class.python
615
+ end: (\()|\s*($\n?|#.*$\n?)
616
+ patterns:
617
+ - begin: (?=[A-Za-z_][A-Za-z0-9_]*)
618
+ contentName: entity.name.type.class.python
619
+ end: (?![A-Za-z0-9_])
620
+ patterns:
621
+ - include: "#entity_name_function"
622
+ - name: meta.function.python
623
+ endCaptures:
624
+ "1":
625
+ name: punctuation.definition.parameters.end.python
626
+ "2":
627
+ name: punctuation.section.function.begin.python
628
+ "3":
629
+ name: invalid.illegal.missing-section-begin.python
630
+ begin: ^\s*(def)\s+(?=[A-Za-z_][A-Za-z0-9_]*\s*\()
631
+ beginCaptures:
632
+ "1":
633
+ name: storage.type.function.python
634
+ end: (\))\s*(?:(\:)|(.*$\n?))
635
+ patterns:
636
+ - begin: (?=[A-Za-z_][A-Za-z0-9_]*)
637
+ contentName: entity.name.function.python
638
+ end: (?![A-Za-z0-9_])
639
+ patterns:
640
+ - include: "#entity_name_function"
641
+ - begin: (\()
642
+ contentName: meta.function.parameters.python
643
+ beginCaptures:
644
+ "1":
645
+ name: punctuation.definition.parameters.begin.python
646
+ end: (?=\)\s*\:)
647
+ patterns:
648
+ - include: "#keyword_arguments"
649
+ - captures:
650
+ "1":
651
+ name: variable.parameter.function.python
652
+ "2":
653
+ name: punctuation.separator.parameters.python
654
+ match: \b([a-zA-Z_][a-zA-Z_0-9]*)\s*(?:(,)|(?=[\n\)]))
655
+ - name: meta.function.python
656
+ endCaptures:
657
+ "1":
658
+ name: punctuation.definition.parameters.begin.python
659
+ "2":
660
+ name: invalid.illegal.missing-parameters.python
661
+ begin: ^\s*(def)\s+(?=[A-Za-z_][A-Za-z0-9_]*)
662
+ beginCaptures:
663
+ "1":
664
+ name: storage.type.function.python
665
+ end: (\()|\s*($\n?|#.*$\n?)
666
+ patterns:
667
+ - begin: (?=[A-Za-z_][A-Za-z0-9_]*)
668
+ contentName: entity.name.function.python
669
+ end: (?![A-Za-z0-9_])
670
+ patterns:
671
+ - include: "#entity_name_function"
672
+ - name: meta.function.decorator.python
673
+ endCaptures:
674
+ "1":
675
+ name: punctuation.definition.arguments.end.python
676
+ begin: ^\s*(?=@\s*[A-Za-z_][A-Za-z0-9_]*(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*\s*\()
677
+ end: (\))
678
+ patterns:
679
+ - begin: (?=(@)\s*[A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)*\s*\()
680
+ contentName: entity.name.function.decorator.python
681
+ beginCaptures:
682
+ "1":
683
+ name: punctuation.definition.decorator.python
684
+ end: (?=\s*\()
685
+ patterns:
686
+ - include: "#dotted_name"
687
+ - begin: (\()
688
+ contentName: meta.function.decorator.arguments.python
689
+ beginCaptures:
690
+ "1":
691
+ name: punctuation.definition.arguments.begin.python
692
+ end: (?=\))
693
+ patterns:
694
+ - include: "#keyword_arguments"
695
+ - include: $self
696
+ comment: a decorator may be a function call which returns a decorator.
697
+ - name: meta.function.decorator.python
698
+ begin: ^\s*(?=@\s*[A-Za-z_][A-Za-z0-9_]*(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*)
699
+ contentName: entity.name.function.decorator.python
700
+ end: (?=\s|$\n?|#)
701
+ patterns:
702
+ - begin: (?=(@)\s*[A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z_][A-Za-z0-9_]*)*)
703
+ beginCaptures:
704
+ "1":
705
+ name: punctuation.definition.decorator.python
706
+ end: (?=\s|$\n?|#)
707
+ patterns:
708
+ - include: "#dotted_name"
709
+ - name: meta.function-call.python
710
+ endCaptures:
711
+ "1":
712
+ name: punctuation.definition.arguments.end.python
713
+ begin: (?<=\)|\])\s*(\()
714
+ contentName: meta.function-call.arguments.python
715
+ beginCaptures:
716
+ "1":
717
+ name: punctuation.definition.arguments.begin.python
718
+ end: (\))
719
+ patterns:
720
+ - include: "#keyword_arguments"
721
+ - include: $self
722
+ - name: meta.function-call.python
723
+ endCaptures:
724
+ "1":
725
+ name: punctuation.definition.arguments.end.python
726
+ begin: (?=[A-Za-z_][A-Za-z0-9_]*(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*\s*\()
727
+ end: (\))
728
+ patterns:
729
+ - begin: (?=[A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)*\s*\()
730
+ end: (?=\s*\()
731
+ patterns:
732
+ - include: "#dotted_name"
733
+ - begin: (\()
734
+ contentName: meta.function-call.arguments.python
735
+ beginCaptures:
736
+ "1":
737
+ name: punctuation.definition.arguments.begin.python
738
+ end: (?=\))
739
+ patterns:
740
+ - include: "#keyword_arguments"
741
+ - include: $self
742
+ - name: meta.item-access.python
743
+ begin: (?=[A-Za-z_][A-Za-z0-9_]*(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*\s*\[)
744
+ end: (\])
745
+ patterns:
746
+ - begin: (?=[A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)*\s*\[)
747
+ end: (?=\s*\[)
748
+ patterns:
749
+ - include: "#dotted_name"
750
+ - endCaptures:
751
+ "1":
752
+ name: punctuation.definition.arguments.end.python
753
+ begin: (\[)
754
+ contentName: meta.item-access.arguments.python
755
+ beginCaptures:
756
+ "1":
757
+ name: punctuation.definition.arguments.begin.python
758
+ end: (?=\])
759
+ patterns:
760
+ - include: $self
761
+ - name: meta.item-access.python
762
+ endCaptures:
763
+ "1":
764
+ name: punctuation.definition.arguments.end.python
765
+ begin: (?<=\)|\])\s*(\[)
766
+ contentName: meta.item-access.arguments.python
767
+ beginCaptures:
768
+ "1":
769
+ name: punctuation.definition.arguments.begin.python
770
+ end: (\])
771
+ patterns:
772
+ - include: $self
773
+ - captures:
774
+ "1":
775
+ name: storage.type.function.python
776
+ match: \b(def|lambda)\b
777
+ - captures:
778
+ "1":
779
+ name: storage.type.class.python
780
+ match: \b(class)\b
781
+ - include: "#line_continuation"
782
+ - include: "#language_variables"
783
+ - name: constant.language.python
784
+ match: \b(None|True|False|Ellipsis|NotImplemented)\b
785
+ - include: "#string_quoted_single"
786
+ - include: "#string_quoted_double"
787
+ - include: "#dotted_name"
788
+ - begin: (\()
789
+ end: (\))
790
+ patterns:
791
+ - include: $self
792
+ - captures:
793
+ "1":
794
+ name: punctuation.definition.list.begin.python
795
+ "2":
796
+ name: meta.empty-list.python
797
+ "3":
798
+ name: punctuation.definition.list.end.python
799
+ match: (\[)(\s*(\]))\b
800
+ - name: meta.structure.list.python
801
+ endCaptures:
802
+ "1":
803
+ name: punctuation.definition.list.end.python
804
+ begin: (\[)
805
+ beginCaptures:
806
+ "1":
807
+ name: punctuation.definition.list.begin.python
808
+ end: (\])
809
+ patterns:
810
+ - endCaptures:
811
+ "1":
812
+ name: punctuation.separator.list.python
813
+ begin: (?<=\[|\,)\s*(?![\],])
814
+ contentName: meta.structure.list.item.python
815
+ end: \s*(?:(,)|(?=\]))
816
+ patterns:
817
+ - include: $self
818
+ - name: meta.structure.tuple.python
819
+ captures:
820
+ "1":
821
+ name: punctuation.definition.tuple.begin.python
822
+ "2":
823
+ name: meta.empty-tuple.python
824
+ "3":
825
+ name: punctuation.definition.tuple.end.python
826
+ match: (\()(\s*(\)))
827
+ - name: meta.structure.dictionary.python
828
+ captures:
829
+ "1":
830
+ name: punctuation.definition.dictionary.begin.python
831
+ "2":
832
+ name: meta.empty-dictionary.python
833
+ "3":
834
+ name: punctuation.definition.dictionary.end.python
835
+ match: (\{)(\s*(\}))
836
+ - name: meta.structure.dictionary.python
837
+ endCaptures:
838
+ "1":
839
+ name: punctuation.definition.dictionary.end.python
840
+ begin: (\{)
841
+ beginCaptures:
842
+ "1":
843
+ name: punctuation.definition.dictionary.begin.python
844
+ end: (\})
845
+ patterns:
846
+ - endCaptures:
847
+ "1":
848
+ name: punctuation.separator.valuepair.dictionary.python
849
+ begin: (?<=\{|\,|^)\s*(?![\},])
850
+ contentName: meta.structure.dictionary.key.python
851
+ end: \s*(?:(?=\})|(\:))
852
+ patterns:
853
+ - include: $self
854
+ - endCaptures:
855
+ "1":
856
+ name: punctuation.separator.dictionary.python
857
+ begin: (?<=\:|^)\s*
858
+ contentName: meta.structure.dictionary.value.python
859
+ end: \s*(?:(?=\})|(,))
860
+ patterns:
861
+ - include: $self
862
+ foldingStopMarker: ^\s*$|^\s*\}|^\s*\]|^\s*\)|^\s*"""\s*$
863
+ keyEquivalent: ^~P
864
+ comment: "\n\
865
+ \ttodo:\n\
866
+ \t\tlist comprehension / generator comprehension scope.\n\
867
+ \t\t\n\
868
+ \t"