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