github-linguist 4.7.6 → 4.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/git-linguist +1 -1
- data/grammars/file.lasso.json +713 -0
- data/grammars/module.ceylon.json +54 -0
- data/grammars/objdump.x86asm.json +73 -0
- data/grammars/source.Kotlin.json +777 -0
- data/grammars/source.LS.json +104 -0
- data/grammars/source.MCPOST.json +68 -0
- data/grammars/source.MOD.json +70 -0
- data/grammars/source.abap.json +176 -0
- data/grammars/source.abl.json +138 -0
- data/grammars/source.actionscript.3.json +1571 -0
- data/grammars/source.acucobol.json +16 -0
- data/grammars/source.ada.json +140 -0
- data/grammars/source.agda.json +254 -0
- data/grammars/source.ahk.json +171 -0
- data/grammars/source.alloy.json +44 -0
- data/grammars/source.ampl.json +157 -0
- data/grammars/source.antlr.json +300 -0
- data/grammars/source.apache-config.json +352 -0
- data/grammars/source.apache-config.mod_perl.json +70 -0
- data/grammars/source.apl.json +442 -0
- data/grammars/source.applescript.json +1385 -0
- data/grammars/source.apt.json +25 -0
- data/grammars/source.asm.x86.json +182 -0
- data/grammars/source.asp.json +157 -0
- data/grammars/source.aspectj.json +966 -0
- data/grammars/source.ats.json +240 -0
- data/grammars/source.autoit.3.json +132 -0
- data/grammars/source.awk.json +388 -0
- data/grammars/source.befunge.json +38 -0
- data/grammars/source.bf.json +36 -0
- data/grammars/source.bison.json +59 -0
- data/grammars/source.blitzmax.json +912 -0
- data/grammars/source.boo.json +452 -0
- data/grammars/source.brightauthorproject.json +29 -0
- data/grammars/source.brightscript.json +158 -0
- data/grammars/source.bro.json +409 -0
- data/grammars/source.bsv.json +283 -0
- data/grammars/source.c++.json +364 -0
- data/grammars/source.c++.qt.json +37 -0
- data/grammars/source.c.ec.json +39 -0
- data/grammars/source.c.json +727 -0
- data/grammars/source.c.platform.json +154 -0
- data/grammars/source.cache.cmake.json +75 -0
- data/grammars/source.cake.json +16 -0
- data/grammars/source.camlp4.ocaml.json +63 -0
- data/grammars/source.capnp.json +93 -0
- data/grammars/source.ceylon.json +77 -0
- data/grammars/source.cfscript.cfc.json +170 -0
- data/grammars/source.cfscript.json +744 -0
- data/grammars/source.chapel.json +240 -0
- data/grammars/source.cirru.json +66 -0
- data/grammars/source.clarion.json +159 -0
- data/grammars/source.click.json +99 -0
- data/grammars/source.clips.json +80 -0
- data/grammars/source.clojure.json +414 -0
- data/grammars/source.cm.json +54 -0
- data/grammars/source.cmake.json +181 -0
- data/grammars/source.cobol.json +498 -0
- data/grammars/source.coffee.json +682 -0
- data/grammars/source.compiled-papyrus.json +11 -0
- data/grammars/source.cool.json +103 -0
- data/grammars/source.coq.json +62 -0
- data/grammars/source.crystal.json +2760 -0
- data/grammars/source.cs.json +566 -0
- data/grammars/source.css.json +630 -0
- data/grammars/source.css.less.json +614 -0
- data/grammars/source.css.mss.json +256 -0
- data/grammars/source.csx.json +16 -0
- data/grammars/source.cuda-c++.json +137 -0
- data/grammars/source.cython.json +2108 -0
- data/grammars/source.d.json +726 -0
- data/grammars/source.dart.json +763 -0
- data/grammars/source.desktop.json +90 -0
- data/grammars/source.diff.json +162 -0
- data/grammars/source.dockerfile.json +89 -0
- data/grammars/source.dosbatch.json +70 -0
- data/grammars/source.dot.json +126 -0
- data/grammars/source.dylan.json +217 -0
- data/grammars/source.eiffel.json +138 -0
- data/grammars/source.elixir.json +971 -0
- data/grammars/source.elm.json +356 -0
- data/grammars/source.erazor.json +126 -0
- data/grammars/source.erlang.json +1674 -0
- data/grammars/source.essl.json +50 -0
- data/grammars/source.factor.json +258 -0
- data/grammars/source.fan.json +188 -0
- data/grammars/source.fancy.json +270 -0
- data/grammars/source.fish.json +214 -0
- data/grammars/source.forth.json +101 -0
- data/grammars/source.fortran.json +499 -0
- data/grammars/source.fortran.modern.json +226 -0
- data/grammars/source.fsharp.fsi.json +14 -0
- data/grammars/source.fsharp.fsl.json +14 -0
- data/grammars/source.fsharp.fsx.json +18 -0
- data/grammars/source.fsharp.json +527 -0
- data/grammars/source.gap.json +167 -0
- data/grammars/source.gcode.json +25 -0
- data/grammars/source.gdscript.json +154 -0
- data/grammars/source.gfm.json +1392 -0
- data/grammars/source.glsl.json +74 -0
- data/grammars/source.gnuplot.json +276 -0
- data/grammars/source.go.json +552 -0
- data/grammars/source.golo.json +182 -0
- data/grammars/source.gosu.2.json +163 -0
- data/grammars/source.grace.json +679 -0
- data/grammars/source.groovy.gradle.json +73 -0
- data/grammars/source.groovy.json +1385 -0
- data/grammars/source.harbour.json +450 -0
- data/grammars/source.haskell.json +449 -0
- data/grammars/source.haxe.2.json +1278 -0
- data/grammars/source.hss.1.json +464 -0
- data/grammars/source.httpspec.json +287 -0
- data/grammars/source.hxml.json +26 -0
- data/grammars/source.hy.json +270 -0
- data/grammars/source.idl-dlm.json +112 -0
- data/grammars/source.idl.json +267 -0
- data/grammars/source.idris.json +537 -0
- data/grammars/source.inform7.json +187 -0
- data/grammars/source.ini.json +113 -0
- data/grammars/source.inno.json +69 -0
- data/grammars/source.io.json +164 -0
- data/grammars/source.ioke.json +272 -0
- data/grammars/source.isabelle.root.json +68 -0
- data/grammars/source.isabelle.theory.json +106 -0
- data/grammars/source.j.json +49 -0
- data/grammars/source.jasmin.json +299 -0
- data/grammars/source.java-properties.json +97 -0
- data/grammars/source.java.json +1026 -0
- data/grammars/source.jcl.json +49 -0
- data/grammars/source.jflex.json +490 -0
- data/grammars/source.jq.json +218 -0
- data/grammars/source.js.json +1646 -0
- data/grammars/source.js.jsx.json +3185 -0
- data/grammars/source.js.objj.json +424 -0
- data/grammars/source.js.regexp.json +150 -0
- data/grammars/source.js.regexp.replacement.json +30 -0
- data/grammars/source.json.json +149 -0
- data/grammars/source.julia.json +407 -0
- data/grammars/source.lean.json +145 -0
- data/grammars/source.lid.json +23 -0
- data/grammars/source.lilypond.json +623 -0
- data/grammars/source.lisp.json +111 -0
- data/grammars/source.litcoffee.json +667 -0
- data/grammars/source.livescript.json +616 -0
- data/grammars/source.llvm.json +71 -0
- data/grammars/source.logos.json +31 -0
- data/grammars/source.logtalk.json +315 -0
- data/grammars/source.loomscript.json +214 -0
- data/grammars/source.lsl.json +216 -0
- data/grammars/source.lua.json +191 -0
- data/grammars/source.makefile.json +474 -0
- data/grammars/source.makegen.json +13 -0
- data/grammars/source.man.json +53 -0
- data/grammars/source.mask.json +795 -0
- data/grammars/source.mata.json +133 -0
- data/grammars/source.mathematica.json +429 -0
- data/grammars/source.matlab.json +1109 -0
- data/grammars/source.maxscript.json +453 -0
- data/grammars/source.mercury.json +251 -0
- data/grammars/source.meta-info.json +156 -0
- data/grammars/source.ml.json +291 -0
- data/grammars/source.modelica.json +142 -0
- data/grammars/source.modula2.json +103 -0
- data/grammars/source.monkey.json +701 -0
- data/grammars/source.moonscript.json +149 -0
- data/grammars/source.mupad.json +149 -0
- data/grammars/source.nant-build.json +86 -0
- data/grammars/source.ncl.json +66 -0
- data/grammars/source.nemerle.json +137 -0
- data/grammars/source.nesc.json +27 -0
- data/grammars/source.netlinx.erb.json +47 -0
- data/grammars/source.netlinx.json +768 -0
- data/grammars/source.nginx.json +824 -0
- data/grammars/source.nim.json +1169 -0
- data/grammars/source.nim_filter.json +133 -0
- data/grammars/source.nimcfg.json +116 -0
- data/grammars/source.ninja.json +66 -0
- data/grammars/source.nit.json +238 -0
- data/grammars/source.nix.json +1200 -0
- data/grammars/source.nmml.json +87 -0
- data/grammars/source.nsis.json +158 -0
- data/grammars/source.objc++.json +19 -0
- data/grammars/source.objc.json +918 -0
- data/grammars/source.objc.platform.json +277 -0
- data/grammars/source.ocaml.json +1426 -0
- data/grammars/source.ocamllex.json +305 -0
- data/grammars/source.ocamlyacc.json +346 -0
- data/grammars/source.octave.json +451 -0
- data/grammars/source.ooc.json +692 -0
- data/grammars/source.opa.json +206 -0
- data/grammars/source.opal.json +415 -0
- data/grammars/source.opalsysdefs.json +70 -0
- data/grammars/source.opencobol.json +65 -0
- data/grammars/source.ox.json +97 -0
- data/grammars/source.oz.json +84 -0
- data/grammars/source.papyrus-assembly.json +266 -0
- data/grammars/source.papyrus.json +231 -0
- data/grammars/source.parrot.pir.json +117 -0
- data/grammars/source.pascal.json +150 -0
- data/grammars/source.perl.6.json +318 -0
- data/grammars/source.perl.json +2424 -0
- data/grammars/source.perl6fe.json +1755 -0
- data/grammars/source.php.zephir.json +362 -0
- data/grammars/source.pig_latin.json +172 -0
- data/grammars/source.pike.json +62 -0
- data/grammars/source.plsql.oracle.json +642 -0
- data/grammars/source.po.json +232 -0
- data/grammars/source.pogoscript.json +85 -0
- data/grammars/source.pony.json +255 -0
- data/grammars/source.postscript.json +231 -0
- data/grammars/source.pov-ray sdl.json +88 -0
- data/grammars/source.powershell.json +755 -0
- data/grammars/source.processing.json +885 -0
- data/grammars/source.prolog.eclipse.json +206 -0
- data/grammars/source.prolog.json +292 -0
- data/grammars/source.protobuf.json +395 -0
- data/grammars/source.pubspec.json +13 -0
- data/grammars/source.puppet.json +494 -0
- data/grammars/source.purescript.json +833 -0
- data/grammars/source.pyjade.json +1010 -0
- data/grammars/source.python.django.json +34 -0
- data/grammars/source.python.json +3435 -0
- data/grammars/source.python.salt.json +13 -0
- data/grammars/source.qmake.json +217 -0
- data/grammars/source.qml.json +195 -0
- data/grammars/source.r.json +203 -0
- data/grammars/source.racket.json +119 -0
- data/grammars/source.rebol.json +647 -0
- data/grammars/source.red.json +652 -0
- data/grammars/source.regexp.babel.json +190 -0
- data/grammars/source.regexp.perl6fe.json +220 -0
- data/grammars/source.regexp.python.json +434 -0
- data/grammars/source.regexp.spin.json +188 -0
- data/grammars/source.renpy.json +2181 -0
- data/grammars/source.ruby.json +1956 -0
- data/grammars/source.ruby.rspec.cucumber.steps.json +274 -0
- data/grammars/source.rust.json +212 -0
- data/grammars/source.sas.json +370 -0
- data/grammars/source.sas_log.json +26 -0
- data/grammars/source.sass.json +248 -0
- data/grammars/source.sbt.json +36 -0
- data/grammars/source.scad.json +152 -0
- data/grammars/source.scala.json +739 -0
- data/grammars/source.scaml.json +466 -0
- data/grammars/source.scheme.json +370 -0
- data/grammars/source.scilab.json +103 -0
- data/grammars/source.scss.json +1321 -0
- data/grammars/source.shell.json +1308 -0
- data/grammars/source.smali.json +1671 -0
- data/grammars/source.smalltalk.json +135 -0
- data/grammars/source.smt.json +173 -0
- data/grammars/source.sp.json +118 -0
- data/grammars/source.sparql.json +23 -0
- data/grammars/source.spin.json +936 -0
- data/grammars/source.sqf.json +112 -0
- data/grammars/source.sql.json +473 -0
- data/grammars/source.stan.json +312 -0
- data/grammars/source.stata.json +208 -0
- data/grammars/source.strings.json +53 -0
- data/grammars/source.stylus.json +1017 -0
- data/grammars/source.supercollider.json +100 -0
- data/grammars/source.swift.json +983 -0
- data/grammars/source.systemverilog.json +1050 -0
- data/grammars/source.tcl.json +277 -0
- data/grammars/source.tea.json +180 -0
- data/grammars/source.thrift.json +704 -0
- data/grammars/source.toml.json +327 -0
- data/grammars/source.ts.json +1188 -0
- data/grammars/source.tsx.json +1421 -0
- data/grammars/source.turtle.json +505 -0
- data/grammars/source.txl.json +62 -0
- data/grammars/source.ucfconstraints.json +72 -0
- data/grammars/source.ur.json +43 -0
- data/grammars/source.vala.json +814 -0
- data/grammars/source.varnish.vcl.json +343 -0
- data/grammars/source.vbnet.json +338 -0
- data/grammars/source.verilog.json +302 -0
- data/grammars/source.vhdl.json +1349 -0
- data/grammars/source.viml.json +224 -0
- data/grammars/source.webidl.json +814 -0
- data/grammars/source.x10.json +68 -0
- data/grammars/source.x86asm.json +47 -0
- data/grammars/source.xc.json +379 -0
- data/grammars/source.xq.json +241 -0
- data/grammars/source.xquery.json +193 -0
- data/grammars/source.xtend.json +733 -0
- data/grammars/source.yaml.json +341 -0
- data/grammars/source.yaml.salt.json +348 -0
- data/grammars/source.yang.json +81 -0
- data/grammars/text.bibtex.json +251 -0
- data/grammars/text.cfml.basic.json +736 -0
- data/grammars/text.dart-analysis-output.json +162 -0
- data/grammars/text.dart-doccomments.json +19 -0
- data/grammars/text.elixir.json +45 -0
- data/grammars/text.gherkin.feature.json +135 -0
- data/grammars/text.groff.json +113 -0
- data/grammars/text.haml.json +299 -0
- data/grammars/text.html.abl.json +75 -0
- data/grammars/text.html.asciidoc.json +492 -0
- data/grammars/text.html.asdoc.json +541 -0
- data/grammars/text.html.asp.json +58 -0
- data/grammars/text.html.basic.json +552 -0
- data/grammars/text.html.cfm.json +811 -0
- data/grammars/text.html.creole.json +329 -0
- data/grammars/text.html.django.json +69 -0
- data/grammars/text.html.elixir.json +18 -0
- data/grammars/text.html.erb.json +157 -0
- data/grammars/text.html.erlang.yaws.json +72 -0
- data/grammars/text.html.factor.json +25 -0
- data/grammars/text.html.ftl.json +85 -0
- data/grammars/text.html.handlebars.json +838 -0
- data/grammars/text.html.jsp.json +1203 -0
- data/grammars/text.html.liquid.json +35 -0
- data/grammars/text.html.mako.json +729 -0
- data/grammars/text.html.markdown.source.gfm.apib.json +1297 -0
- data/grammars/text.html.markdown.source.gfm.mson.json +1165 -0
- data/grammars/text.html.mediawiki.json +972 -0
- data/grammars/text.html.php.json +2615 -0
- data/grammars/text.html.slash.json +313 -0
- data/grammars/text.html.smarty.json +216 -0
- data/grammars/text.html.ssp.json +49 -0
- data/grammars/text.html.tcl.json +44 -0
- data/grammars/text.html.twig.json +1353 -0
- data/grammars/text.html.vue.json +642 -0
- data/grammars/text.idl-idldoc.json +14 -0
- data/grammars/text.jade.json +1024 -0
- data/grammars/text.junit-test-report.json +92 -0
- data/grammars/text.log.latex.json +86 -0
- data/grammars/text.python.console.json +25 -0
- data/grammars/text.python.traceback.json +46 -0
- data/grammars/text.rdoc.json +48 -0
- data/grammars/text.restructuredtext.json +561 -0
- data/grammars/text.robot.json +73 -0
- data/grammars/text.shell-session.json +32 -0
- data/grammars/text.slim.json +527 -0
- data/grammars/text.tex.json +271 -0
- data/grammars/text.tex.latex.beamer.json +63 -0
- data/grammars/text.tex.latex.haskell.json +56 -0
- data/grammars/text.tex.latex.json +1013 -0
- data/grammars/text.tex.latex.memoir.json +136 -0
- data/grammars/text.tex.latex.rd.json +117 -0
- data/grammars/text.xml.ant.json +202 -0
- data/grammars/text.xml.flex-config.json +2634 -0
- data/grammars/text.xml.genshi.json +34 -0
- data/grammars/text.xml.json +364 -0
- data/grammars/text.xml.pom.json +774 -0
- data/grammars/text.xml.xsl.json +94 -0
- data/grammars/text.zone_file.json +72 -0
- data/lib/linguist.rb +79 -0
- data/lib/linguist/blob_helper.rb +2 -2
- data/lib/linguist/grammars.rb +10 -0
- data/lib/linguist/heuristics.rb +17 -1
- data/lib/linguist/language.rb +2 -36
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +50 -2
- data/lib/linguist/samples.json +2580 -116
- data/lib/linguist/vendor.yml +11 -1
- data/lib/linguist/version.rb +1 -1
- metadata +365 -2
@@ -0,0 +1,34 @@
|
|
1
|
+
{
|
2
|
+
"fileTypes": [
|
3
|
+
|
4
|
+
],
|
5
|
+
"keyEquivalent": "^~P",
|
6
|
+
"name": "Python Django",
|
7
|
+
"patterns": [
|
8
|
+
{
|
9
|
+
"match": "(meta|models)\\.(Admin|AutoField|BooleanField|CharField|CommaSeparatedIntegerField|DateField|DateTimeField|DecimalField|EmailField|FileField|FilePathField|FloatField|ForeignKey|ImageField|IntegerField|IPAddressField|ManyToManyField|NullBooleanField|OneToOneField|PhoneNumberField|PositiveIntegerField|PositiveSmallIntegerField|SlugField|SmallIntegerField|TextField|TimeField|URLField|USStateField|XMLField)",
|
10
|
+
"name": "support.type.django.model"
|
11
|
+
},
|
12
|
+
{
|
13
|
+
"match": "django(\\.[a-z]+){1,} ",
|
14
|
+
"name": "support.other.django.module"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"match": "(ABSOLUTE_URL_OVERRIDES|ADMIN_FOR|ADMIN_MEDIA_PREFIX|ADMINS|ALLOWED_INCLUDE_ROOTS|APPEND_SLASH|AUTHENTICATION_BACKENDS|AUTH_PROFILE_MODULE|CACHE_BACKEND|CACHE_MIDDLEWARE_KEY_PREFIX|CACHE_MIDDLEWARE_SECONDS|DATABASE_ENGINE|DATABASE_HOST|DATABASE_NAME|DATABASE_OPTIONS|DATABASE_PASSWORD|DATABASE_PORT|DATABASE_USER|DATE_FORMAT|DATETIME_FORMAT|DEBUG|DEFAULT_CHARSET|DEFAULT_CONTENT_TYPE|DEFAULT_FROM_EMAIL|DEFAULT_TABLESPACE|DEFAULT_INDEX_TABLESPACE|DISALLOWED_USER_AGENTS|EMAIL_HOST_PASSWORD|EMAIL_HOST_USER|EMAIL_HOST|EMAIL_PORT|EMAIL_SUBJECT_PREFIX|EMAIL_USE_TLS|FILE_CHARSET|FIXTURE_DIRS|IGNORABLE_404_ENDS|IGNORABLE_404_STARTS|INSTALLED_APPS|INTERNAL_IPS|JING_PATH|LANGUAGE_CODE|LANGUAGE_COOKIE_NAME|LANGUAGES|LOCALE_PATHS|LOGIN_REDIRECT_URL|LOGIN_URL|LOGOUT_URL|MANAGERS|MEDIA_ROOT|MEDIA_URL|MIDDLEWARE_CLASSES|MONTH_DAY_FORMAT|PREPEND_WWW|PROFANITIES_LIST|ROOT_URLCONF|SECRET_KEY|SEND_BROKEN_LINK_EMAILS|SERIALIZATION_MODULES|SERVER_EMAIL|SESSION_ENGINE|SESSION_COOKIE_AGE|SESSION_COOKIE_DOMAIN|SESSION_COOKIE_NAME|SESSION_COOKIE_PATH|SESSION_COOKIE_SECURE|SESSION_EXPIRE_AT_BROWSER_CLOSE|SESSION_FILE_PATH|SESSION_SAVE_EVERY_REQUEST|SITE_ID|TEMPLATE_CONTEXT_PROCESSORS|TEMPLATE_DEBUG|TEMPLATE_DIRS|TEMPLATE_LOADERS|TEMPLATE_STRING_IF_INVALID|TEST_DATABASE_CHARSET|TEST_DATABASE_COLLATION|TEST_DATABASE_NAME|TEST_RUNNER|TIME_FORMAT|TIME_ZONE|URL_VALIDATOR_USER_AGENT|USE_ETAGS|USE_I18N|YEAR_MONTH_FORMAT)",
|
18
|
+
"name": "variable.other.django.settings"
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"match": "(get_list_or_404|get_object_or_404|load_and_render|loader|render_to_response)",
|
22
|
+
"name": "support.function.django.view"
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"match": "[a-z_]+\\.get_(object|list|iterator|count|values|values_iterator|in_bulk)",
|
26
|
+
"name": "support.function.django.model"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"include": "source.python"
|
30
|
+
}
|
31
|
+
],
|
32
|
+
"scopeName": "source.python.django",
|
33
|
+
"uuid": "5326D56C-6F76-4758-8DB7-D818527919AC"
|
34
|
+
}
|
@@ -0,0 +1,3435 @@
|
|
1
|
+
{
|
2
|
+
"name": "MagicPython",
|
3
|
+
"scopeName": "source.python",
|
4
|
+
"fileTypes": [
|
5
|
+
"py",
|
6
|
+
"py3",
|
7
|
+
"rpy",
|
8
|
+
"pyw",
|
9
|
+
"cpy",
|
10
|
+
"SConstruct",
|
11
|
+
"Sconstruct",
|
12
|
+
"sconstruct",
|
13
|
+
"SConscript"
|
14
|
+
],
|
15
|
+
"first_line_match": "^#!/.*\\bpython[\\d\\.]*\\b",
|
16
|
+
"firstLineMatch": "^#!/.*\\bpython[\\d\\.]*\\b",
|
17
|
+
"uuid": "742deb57-6e38-4192-bed6-410746efd85d",
|
18
|
+
"patterns": [
|
19
|
+
{
|
20
|
+
"include": "#statement"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"include": "#expression"
|
24
|
+
}
|
25
|
+
],
|
26
|
+
"repository": {
|
27
|
+
"statement": {
|
28
|
+
"patterns": [
|
29
|
+
{
|
30
|
+
"include": "#import"
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"include": "#class-declaration"
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"include": "#function-declaration"
|
37
|
+
},
|
38
|
+
{
|
39
|
+
"include": "#statement-keyword"
|
40
|
+
},
|
41
|
+
{
|
42
|
+
"include": "#assignment-operator"
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"include": "#decorator"
|
46
|
+
},
|
47
|
+
{
|
48
|
+
"include": "#docstring-statement"
|
49
|
+
},
|
50
|
+
{
|
51
|
+
"include": "#semicolon"
|
52
|
+
}
|
53
|
+
]
|
54
|
+
},
|
55
|
+
"semicolon": {
|
56
|
+
"patterns": [
|
57
|
+
{
|
58
|
+
"name": "invalid.deprecated.semicolon.python",
|
59
|
+
"match": "\\;$"
|
60
|
+
}
|
61
|
+
]
|
62
|
+
},
|
63
|
+
"comments": {
|
64
|
+
"patterns": [
|
65
|
+
{
|
66
|
+
"name": "comment.line.number-sign.python",
|
67
|
+
"contentName": "meta.typehint.comment.python",
|
68
|
+
"begin": "(?x)\n (?:\n \\# \\s* (type:)\n \\s*+ (?# we want `\\s*+` which is possessive quantifier since\n we do not actually want to backtrack when matching\n whitespace here)\n (?! $ | \\#)\n )\n",
|
69
|
+
"end": "(?:$|(?=\\#))",
|
70
|
+
"beginCaptures": {
|
71
|
+
"0": {
|
72
|
+
"name": "meta.typehint.comment.python"
|
73
|
+
},
|
74
|
+
"1": {
|
75
|
+
"name": "comment.typehint.directive.notation.python"
|
76
|
+
}
|
77
|
+
},
|
78
|
+
"patterns": [
|
79
|
+
{
|
80
|
+
"name": "comment.typehint.ignore.notation.python",
|
81
|
+
"match": "(?x)\n \\G ignore\n (?= \\s* (?: $ | \\#))\n"
|
82
|
+
},
|
83
|
+
{
|
84
|
+
"name": "comment.typehint.type.notation.python",
|
85
|
+
"match": "(?x)\n (?<!\\.)\\b(\n bool | bytes | float | int | object | str\n | List | Dict | Iterable | Sequence | Set\n | FrozenSet | Callable | Union | Tuple\n | Any | None\n )\\b\n"
|
86
|
+
},
|
87
|
+
{
|
88
|
+
"name": "comment.typehint.punctuation.notation.python",
|
89
|
+
"match": "([\\[\\]\\(\\),\\.\\=\\*]|(->))"
|
90
|
+
},
|
91
|
+
{
|
92
|
+
"name": "comment.typehint.variable.notation.python",
|
93
|
+
"match": "([[:alpha:]_]\\w*)"
|
94
|
+
}
|
95
|
+
]
|
96
|
+
},
|
97
|
+
{
|
98
|
+
"include": "#comments-base"
|
99
|
+
}
|
100
|
+
]
|
101
|
+
},
|
102
|
+
"docstring-statement": {
|
103
|
+
"begin": "^(?=\\s*[rR]?(\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))",
|
104
|
+
"end": "(?<=\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\")",
|
105
|
+
"patterns": [
|
106
|
+
{
|
107
|
+
"include": "#docstring"
|
108
|
+
}
|
109
|
+
]
|
110
|
+
},
|
111
|
+
"docstring": {
|
112
|
+
"patterns": [
|
113
|
+
{
|
114
|
+
"name": "string.quoted.docstring.multi.python",
|
115
|
+
"begin": "(\\'\\'\\'|\\\"\\\"\\\")",
|
116
|
+
"end": "(\\1)",
|
117
|
+
"beginCaptures": {
|
118
|
+
"1": {
|
119
|
+
"name": "punctuation.definition.string.begin.python"
|
120
|
+
}
|
121
|
+
},
|
122
|
+
"endCaptures": {
|
123
|
+
"1": {
|
124
|
+
"name": "punctuation.definition.string.end.python"
|
125
|
+
}
|
126
|
+
},
|
127
|
+
"patterns": [
|
128
|
+
{
|
129
|
+
"include": "#docstring-prompt"
|
130
|
+
},
|
131
|
+
{
|
132
|
+
"include": "#codetags"
|
133
|
+
},
|
134
|
+
{
|
135
|
+
"include": "#docstring-guts-unicode"
|
136
|
+
}
|
137
|
+
]
|
138
|
+
},
|
139
|
+
{
|
140
|
+
"name": "string.quoted.docstring.raw.multi.python",
|
141
|
+
"begin": "([rR])(\\'\\'\\'|\\\"\\\"\\\")",
|
142
|
+
"end": "(\\2)",
|
143
|
+
"beginCaptures": {
|
144
|
+
"1": {
|
145
|
+
"name": "storage.type.string.python"
|
146
|
+
},
|
147
|
+
"2": {
|
148
|
+
"name": "punctuation.definition.string.begin.python"
|
149
|
+
}
|
150
|
+
},
|
151
|
+
"endCaptures": {
|
152
|
+
"1": {
|
153
|
+
"name": "punctuation.definition.string.end.python"
|
154
|
+
}
|
155
|
+
},
|
156
|
+
"patterns": [
|
157
|
+
{
|
158
|
+
"include": "#string-consume-escape"
|
159
|
+
},
|
160
|
+
{
|
161
|
+
"include": "#docstring-prompt"
|
162
|
+
},
|
163
|
+
{
|
164
|
+
"include": "#codetags"
|
165
|
+
}
|
166
|
+
]
|
167
|
+
},
|
168
|
+
{
|
169
|
+
"name": "string.quoted.docstring.single.python",
|
170
|
+
"begin": "(\\'|\\\")",
|
171
|
+
"end": "(\\1)|((?<!\\\\)\\n)",
|
172
|
+
"beginCaptures": {
|
173
|
+
"1": {
|
174
|
+
"name": "punctuation.definition.string.begin.python"
|
175
|
+
}
|
176
|
+
},
|
177
|
+
"endCaptures": {
|
178
|
+
"1": {
|
179
|
+
"name": "punctuation.definition.string.end.python"
|
180
|
+
},
|
181
|
+
"2": {
|
182
|
+
"name": "invalid.illegal.newline.python"
|
183
|
+
}
|
184
|
+
},
|
185
|
+
"patterns": [
|
186
|
+
{
|
187
|
+
"include": "#codetags"
|
188
|
+
},
|
189
|
+
{
|
190
|
+
"include": "#docstring-guts-unicode"
|
191
|
+
}
|
192
|
+
]
|
193
|
+
},
|
194
|
+
{
|
195
|
+
"name": "string.quoted.docstring.raw.single.python",
|
196
|
+
"begin": "([rR])(\\'|\\\")",
|
197
|
+
"end": "(\\2)|((?<!\\\\)\\n)",
|
198
|
+
"beginCaptures": {
|
199
|
+
"1": {
|
200
|
+
"name": "storage.type.string.python"
|
201
|
+
},
|
202
|
+
"2": {
|
203
|
+
"name": "punctuation.definition.string.begin.python"
|
204
|
+
}
|
205
|
+
},
|
206
|
+
"endCaptures": {
|
207
|
+
"1": {
|
208
|
+
"name": "punctuation.definition.string.end.python"
|
209
|
+
},
|
210
|
+
"2": {
|
211
|
+
"name": "invalid.illegal.newline.python"
|
212
|
+
}
|
213
|
+
},
|
214
|
+
"patterns": [
|
215
|
+
{
|
216
|
+
"include": "#string-consume-escape"
|
217
|
+
},
|
218
|
+
{
|
219
|
+
"include": "#codetags"
|
220
|
+
}
|
221
|
+
]
|
222
|
+
}
|
223
|
+
]
|
224
|
+
},
|
225
|
+
"docstring-guts-unicode": {
|
226
|
+
"patterns": [
|
227
|
+
{
|
228
|
+
"include": "#escape-sequence-unicode"
|
229
|
+
},
|
230
|
+
{
|
231
|
+
"include": "#escape-sequence"
|
232
|
+
},
|
233
|
+
{
|
234
|
+
"include": "#string-line-continuation"
|
235
|
+
}
|
236
|
+
]
|
237
|
+
},
|
238
|
+
"docstring-prompt": {
|
239
|
+
"match": "(?x)\n (?:\n (?:^|\\G) \\s* (?# '\\G' is necessary for ST)\n ((?:>>>|\\.\\.\\.) \\s) (?=\\s*\\S)\n )\n",
|
240
|
+
"captures": {
|
241
|
+
"1": {
|
242
|
+
"name": "keyword.control.flow.python"
|
243
|
+
}
|
244
|
+
}
|
245
|
+
},
|
246
|
+
"codetags": {
|
247
|
+
"match": "(?:\\b(NOTE|XXX|HACK|FIXME|BUG|TODO)\\b)",
|
248
|
+
"captures": {
|
249
|
+
"1": {
|
250
|
+
"name": "keyword.codetag.notation.python"
|
251
|
+
}
|
252
|
+
}
|
253
|
+
},
|
254
|
+
"statement-keyword": {
|
255
|
+
"patterns": [
|
256
|
+
{
|
257
|
+
"name": "storage.type.function.python",
|
258
|
+
"match": "\\b((async\\s+)?\\s*def)\\b"
|
259
|
+
},
|
260
|
+
{
|
261
|
+
"name": "keyword.control.flow.python",
|
262
|
+
"match": "(?x)\n \\b(?<!\\.)(\n as | async | continue | del | assert | break | finally | for\n | from | elif | else | if | except | pass | raise\n | return | try | while | with\n )\\b\n"
|
263
|
+
},
|
264
|
+
{
|
265
|
+
"name": "storage.modifier.declaration.python",
|
266
|
+
"match": "(?x)\n \\b(?<!\\.)(\n global | nonlocal\n )\\b\n"
|
267
|
+
},
|
268
|
+
{
|
269
|
+
"name": "storage.type.class.python",
|
270
|
+
"match": "\\b(?<!\\.)(class)\\b"
|
271
|
+
}
|
272
|
+
]
|
273
|
+
},
|
274
|
+
"expression-base": {
|
275
|
+
"comment": "All valid Python expressions",
|
276
|
+
"patterns": [
|
277
|
+
{
|
278
|
+
"include": "#backticks"
|
279
|
+
},
|
280
|
+
{
|
281
|
+
"include": "#illegal-anno"
|
282
|
+
},
|
283
|
+
{
|
284
|
+
"include": "#comments"
|
285
|
+
},
|
286
|
+
{
|
287
|
+
"include": "#literal"
|
288
|
+
},
|
289
|
+
{
|
290
|
+
"include": "#regexp"
|
291
|
+
},
|
292
|
+
{
|
293
|
+
"include": "#string"
|
294
|
+
},
|
295
|
+
{
|
296
|
+
"include": "#lambda"
|
297
|
+
},
|
298
|
+
{
|
299
|
+
"include": "#illegal-operator"
|
300
|
+
},
|
301
|
+
{
|
302
|
+
"include": "#operator"
|
303
|
+
},
|
304
|
+
{
|
305
|
+
"include": "#curly-braces"
|
306
|
+
},
|
307
|
+
{
|
308
|
+
"include": "#item-access"
|
309
|
+
},
|
310
|
+
{
|
311
|
+
"include": "#list"
|
312
|
+
},
|
313
|
+
{
|
314
|
+
"include": "#round-braces"
|
315
|
+
},
|
316
|
+
{
|
317
|
+
"include": "#function-call"
|
318
|
+
},
|
319
|
+
{
|
320
|
+
"include": "#builtin-functions"
|
321
|
+
},
|
322
|
+
{
|
323
|
+
"include": "#builtin-types"
|
324
|
+
},
|
325
|
+
{
|
326
|
+
"include": "#builtin-exceptions"
|
327
|
+
},
|
328
|
+
{
|
329
|
+
"include": "#magic-names"
|
330
|
+
},
|
331
|
+
{
|
332
|
+
"include": "#special-names"
|
333
|
+
},
|
334
|
+
{
|
335
|
+
"include": "#illegal-names"
|
336
|
+
},
|
337
|
+
{
|
338
|
+
"include": "#special-variables"
|
339
|
+
},
|
340
|
+
{
|
341
|
+
"include": "#line-continuation"
|
342
|
+
},
|
343
|
+
{
|
344
|
+
"include": "#ellipsis"
|
345
|
+
}
|
346
|
+
]
|
347
|
+
},
|
348
|
+
"expression": {
|
349
|
+
"comment": "All valid Python expressions",
|
350
|
+
"patterns": [
|
351
|
+
{
|
352
|
+
"include": "#expression-base"
|
353
|
+
},
|
354
|
+
{
|
355
|
+
"include": "#member-access"
|
356
|
+
},
|
357
|
+
{
|
358
|
+
"comment": "Tokenize identifiers to help linters",
|
359
|
+
"match": "(?x) \\b ([[:alpha:]_]\\w*) \\b"
|
360
|
+
}
|
361
|
+
]
|
362
|
+
},
|
363
|
+
"member-access": {
|
364
|
+
"begin": "\\.\\s*(?!\\.)",
|
365
|
+
"end": "(?x)\n # stop when you've just read non-whitespace followed by non-word\n # i.e. when finished reading an identifier or function call\n (?<=\\S)(?=\\W) |\n # stop when seeing the start of something that's not a word,\n # i.e. when seeing a non-identifier\n (^|(?<=\\s))(?=[^\\\\\\w\\s]) |\n $\n",
|
366
|
+
"patterns": [
|
367
|
+
{
|
368
|
+
"include": "#function-call"
|
369
|
+
},
|
370
|
+
{
|
371
|
+
"include": "#member-access-base"
|
372
|
+
}
|
373
|
+
]
|
374
|
+
},
|
375
|
+
"member-access-base": {
|
376
|
+
"patterns": [
|
377
|
+
{
|
378
|
+
"include": "#magic-names"
|
379
|
+
},
|
380
|
+
{
|
381
|
+
"include": "#illegal-names"
|
382
|
+
},
|
383
|
+
{
|
384
|
+
"include": "#illegal-object-name"
|
385
|
+
},
|
386
|
+
{
|
387
|
+
"include": "#special-names"
|
388
|
+
},
|
389
|
+
{
|
390
|
+
"include": "#line-continuation"
|
391
|
+
},
|
392
|
+
{
|
393
|
+
"include": "#item-access"
|
394
|
+
}
|
395
|
+
]
|
396
|
+
},
|
397
|
+
"special-names": {
|
398
|
+
"name": "constant.other.caps.python",
|
399
|
+
"match": "(?x)\n \\b\n (\n _* [[:upper:]]\n )\n [[:upper:]\\d]* (_\\w*)?\n \\b\n"
|
400
|
+
},
|
401
|
+
"curly-braces": {
|
402
|
+
"begin": "\\{",
|
403
|
+
"end": "\\}",
|
404
|
+
"beginCaptures": {
|
405
|
+
"0": {
|
406
|
+
"name": "punctuation.definition.dict.begin.python"
|
407
|
+
}
|
408
|
+
},
|
409
|
+
"endCaptures": {
|
410
|
+
"0": {
|
411
|
+
"name": "punctuation.definition.dict.end.python"
|
412
|
+
}
|
413
|
+
},
|
414
|
+
"patterns": [
|
415
|
+
{
|
416
|
+
"include": "#expression"
|
417
|
+
}
|
418
|
+
]
|
419
|
+
},
|
420
|
+
"list": {
|
421
|
+
"begin": "\\[",
|
422
|
+
"end": "\\]",
|
423
|
+
"beginCaptures": {
|
424
|
+
"0": {
|
425
|
+
"name": "punctuation.definition.list.begin.python"
|
426
|
+
}
|
427
|
+
},
|
428
|
+
"endCaptures": {
|
429
|
+
"0": {
|
430
|
+
"name": "punctuation.definition.list.end.python"
|
431
|
+
}
|
432
|
+
},
|
433
|
+
"patterns": [
|
434
|
+
{
|
435
|
+
"include": "#expression"
|
436
|
+
}
|
437
|
+
]
|
438
|
+
},
|
439
|
+
"round-braces": {
|
440
|
+
"begin": "\\(",
|
441
|
+
"end": "\\)",
|
442
|
+
"beginCaptures": {
|
443
|
+
"0": {
|
444
|
+
"name": "punctuation.parenthesis.begin.python"
|
445
|
+
}
|
446
|
+
},
|
447
|
+
"endCaptures": {
|
448
|
+
"0": {
|
449
|
+
"name": "punctuation.parenthesis.end.python"
|
450
|
+
}
|
451
|
+
},
|
452
|
+
"patterns": [
|
453
|
+
{
|
454
|
+
"include": "#expression"
|
455
|
+
}
|
456
|
+
]
|
457
|
+
},
|
458
|
+
"line-continuation": {
|
459
|
+
"patterns": [
|
460
|
+
{
|
461
|
+
"match": "(\\\\)\\s*(\\S.*$\\n?)",
|
462
|
+
"captures": {
|
463
|
+
"1": {
|
464
|
+
"name": "separator.continuation.line.python"
|
465
|
+
},
|
466
|
+
"2": {
|
467
|
+
"name": "invalid.illegal.line.continuation.python"
|
468
|
+
}
|
469
|
+
}
|
470
|
+
},
|
471
|
+
{
|
472
|
+
"begin": "(\\\\)\\s*$\\n?",
|
473
|
+
"end": "(?x)\n (?=^\\s*$)\n |\n (?! (\\s* [rR]? (\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))\n |\n (\\G $) (?# '\\G' is necessary for ST)\n )\n",
|
474
|
+
"beginCaptures": {
|
475
|
+
"1": {
|
476
|
+
"name": "separator.continuation.line.python"
|
477
|
+
}
|
478
|
+
},
|
479
|
+
"patterns": [
|
480
|
+
{
|
481
|
+
"include": "#regexp"
|
482
|
+
},
|
483
|
+
{
|
484
|
+
"include": "#string"
|
485
|
+
}
|
486
|
+
]
|
487
|
+
}
|
488
|
+
]
|
489
|
+
},
|
490
|
+
"assignment-operator": {
|
491
|
+
"name": "keyword.operator.assignment.python",
|
492
|
+
"match": "(?x)\n <<= | >>= | //= | \\*\\*=\n | \\+= | -= | /= | @=\n | \\*= | %= | ~= | \\^= | &= | \\|=\n | =\n"
|
493
|
+
},
|
494
|
+
"operator": {
|
495
|
+
"match": "(?x)\n \\b(?<!\\.)\n (?:\n (and | or | not | in | is) (?# 1)\n |\n (for | if | else | await | (?:yield(?:\\s+from)?)) (?# 2)\n )\n (?!\\s*:)\\b\n\n | (<< | >> | & | \\| | \\^ | ~) (?# 3)\n\n | (\\*\\* | \\* | \\+ | - | % | // | / | @) (?# 4)\n\n | (!= | == | >= | <= | < | >) (?# 5)\n",
|
496
|
+
"captures": {
|
497
|
+
"1": {
|
498
|
+
"name": "keyword.operator.logical.python"
|
499
|
+
},
|
500
|
+
"2": {
|
501
|
+
"name": "keyword.control.flow.python"
|
502
|
+
},
|
503
|
+
"3": {
|
504
|
+
"name": "keyword.operator.bitwise.python"
|
505
|
+
},
|
506
|
+
"4": {
|
507
|
+
"name": "keyword.operator.arithmetic.python"
|
508
|
+
},
|
509
|
+
"5": {
|
510
|
+
"name": "keyword.operator.comparison.python"
|
511
|
+
}
|
512
|
+
}
|
513
|
+
},
|
514
|
+
"literal": {
|
515
|
+
"patterns": [
|
516
|
+
{
|
517
|
+
"name": "constant.language.python",
|
518
|
+
"match": "\\b(True|False|None|NotImplemented|Ellipsis)\\b"
|
519
|
+
},
|
520
|
+
{
|
521
|
+
"include": "#number"
|
522
|
+
}
|
523
|
+
]
|
524
|
+
},
|
525
|
+
"number": {
|
526
|
+
"name": "constant.numeric.python",
|
527
|
+
"patterns": [
|
528
|
+
{
|
529
|
+
"include": "#number-float"
|
530
|
+
},
|
531
|
+
{
|
532
|
+
"include": "#number-dec"
|
533
|
+
},
|
534
|
+
{
|
535
|
+
"include": "#number-hex"
|
536
|
+
},
|
537
|
+
{
|
538
|
+
"include": "#number-oct"
|
539
|
+
},
|
540
|
+
{
|
541
|
+
"include": "#number-bin"
|
542
|
+
},
|
543
|
+
{
|
544
|
+
"include": "#number-long"
|
545
|
+
},
|
546
|
+
{
|
547
|
+
"name": "invalid.illegal.name.python",
|
548
|
+
"match": "\\b[0-9]+\\w+"
|
549
|
+
}
|
550
|
+
]
|
551
|
+
},
|
552
|
+
"number-float": {
|
553
|
+
"name": "constant.numeric.float.python",
|
554
|
+
"match": "(?x)\n (?<! \\w)(?:\n [0-9]*\\.[0-9]+ ([eE][+-]?[0-9]+)?\n | [0-9]+\\. ([eE][+-]?[0-9]+)?\n | [0-9]+ ([eE][+-]?[0-9]+)\n )([jJ])?\\b\n",
|
555
|
+
"captures": {
|
556
|
+
"4": {
|
557
|
+
"name": "storage.type.imaginary.number.python"
|
558
|
+
}
|
559
|
+
}
|
560
|
+
},
|
561
|
+
"number-dec": {
|
562
|
+
"name": "constant.numeric.dec.python",
|
563
|
+
"match": "(?x)\n (?<![\\w\\.])(?:\n [1-9][0-9]*\n |\n 0+\n |\n [0-9]+ ([jJ])\n |\n 0 ([0-9]+)(?![eE\\.])\n )\\b\n",
|
564
|
+
"captures": {
|
565
|
+
"1": {
|
566
|
+
"name": "storage.type.imaginary.number.python"
|
567
|
+
},
|
568
|
+
"2": {
|
569
|
+
"name": "invalid.illegal.dec.python"
|
570
|
+
},
|
571
|
+
"3": {
|
572
|
+
"name": "invalid.illegal.dec.python"
|
573
|
+
}
|
574
|
+
}
|
575
|
+
},
|
576
|
+
"number-hex": {
|
577
|
+
"name": "constant.numeric.hex.python",
|
578
|
+
"match": "(?x)\n (?<![\\w\\.])\n (0[xX]) [0-9a-fA-F]+\n \\b\n",
|
579
|
+
"captures": {
|
580
|
+
"1": {
|
581
|
+
"name": "storage.type.number.python"
|
582
|
+
}
|
583
|
+
}
|
584
|
+
},
|
585
|
+
"number-oct": {
|
586
|
+
"name": "constant.numeric.oct.python",
|
587
|
+
"match": "(?x)\n (?<![\\w\\.])\n (0[oO]) [0-7]+\n \\b\n",
|
588
|
+
"captures": {
|
589
|
+
"1": {
|
590
|
+
"name": "storage.type.number.python"
|
591
|
+
}
|
592
|
+
}
|
593
|
+
},
|
594
|
+
"number-bin": {
|
595
|
+
"name": "constant.numeric.bin.python",
|
596
|
+
"match": "(?x)\n (?<![\\w\\.])\n (0[bB]) [01]+\n \\b\n",
|
597
|
+
"captures": {
|
598
|
+
"1": {
|
599
|
+
"name": "storage.type.number.python"
|
600
|
+
}
|
601
|
+
}
|
602
|
+
},
|
603
|
+
"number-long": {
|
604
|
+
"name": "constant.numeric.bin.python",
|
605
|
+
"comment": "this is to support python2 syntax for long ints",
|
606
|
+
"match": "(?x)\n (?<![\\w\\.])\n ([1-9][0-9]* | 0) ([lL])\n \\b\n",
|
607
|
+
"captures": {
|
608
|
+
"2": {
|
609
|
+
"name": "storage.type.number.python"
|
610
|
+
}
|
611
|
+
}
|
612
|
+
},
|
613
|
+
"regexp": {
|
614
|
+
"patterns": [
|
615
|
+
{
|
616
|
+
"include": "#regexp-single-quoted-multi-line"
|
617
|
+
},
|
618
|
+
{
|
619
|
+
"include": "#regexp-double-quoted-multi-line"
|
620
|
+
},
|
621
|
+
{
|
622
|
+
"include": "#regexp-single-quoted-single-line"
|
623
|
+
},
|
624
|
+
{
|
625
|
+
"include": "#regexp-double-quoted-single-line"
|
626
|
+
}
|
627
|
+
]
|
628
|
+
},
|
629
|
+
"regexp-single-quoted-single-line": {
|
630
|
+
"name": "string.regexp.quoted.single.python",
|
631
|
+
"begin": "\\b(([uU]r)|([bB]r)|(r[bB]?))(\\')",
|
632
|
+
"end": "(\\')|(?<!\\\\)(\\n)",
|
633
|
+
"beginCaptures": {
|
634
|
+
"2": {
|
635
|
+
"name": "invalid.deprecated.prefix.python"
|
636
|
+
},
|
637
|
+
"3": {
|
638
|
+
"name": "storage.type.string.python"
|
639
|
+
},
|
640
|
+
"4": {
|
641
|
+
"name": "storage.type.string.python"
|
642
|
+
},
|
643
|
+
"5": {
|
644
|
+
"name": "punctuation.definition.string.begin.python"
|
645
|
+
}
|
646
|
+
},
|
647
|
+
"endCaptures": {
|
648
|
+
"1": {
|
649
|
+
"name": "punctuation.definition.string.end.python"
|
650
|
+
},
|
651
|
+
"2": {
|
652
|
+
"name": "invalid.illegal.newline.python"
|
653
|
+
}
|
654
|
+
},
|
655
|
+
"patterns": [
|
656
|
+
{
|
657
|
+
"include": "#single-one-regexp-expression"
|
658
|
+
}
|
659
|
+
]
|
660
|
+
},
|
661
|
+
"regexp-double-quoted-single-line": {
|
662
|
+
"name": "string.regexp.quoted.single.python",
|
663
|
+
"begin": "\\b(([uU]r)|([bB]r)|(r[bB]?))(\\\")",
|
664
|
+
"end": "(\\\")|(?<!\\\\)(\\n)",
|
665
|
+
"beginCaptures": {
|
666
|
+
"2": {
|
667
|
+
"name": "invalid.deprecated.prefix.python"
|
668
|
+
},
|
669
|
+
"3": {
|
670
|
+
"name": "storage.type.string.python"
|
671
|
+
},
|
672
|
+
"4": {
|
673
|
+
"name": "storage.type.string.python"
|
674
|
+
},
|
675
|
+
"5": {
|
676
|
+
"name": "punctuation.definition.string.begin.python"
|
677
|
+
}
|
678
|
+
},
|
679
|
+
"endCaptures": {
|
680
|
+
"1": {
|
681
|
+
"name": "punctuation.definition.string.end.python"
|
682
|
+
},
|
683
|
+
"2": {
|
684
|
+
"name": "invalid.illegal.newline.python"
|
685
|
+
}
|
686
|
+
},
|
687
|
+
"patterns": [
|
688
|
+
{
|
689
|
+
"include": "#double-one-regexp-expression"
|
690
|
+
}
|
691
|
+
]
|
692
|
+
},
|
693
|
+
"regexp-single-quoted-multi-line": {
|
694
|
+
"name": "string.regexp.quoted.multi.python",
|
695
|
+
"begin": "\\b(([uU]r)|([bB]r)|(r[bB]?))(\\'\\'\\')",
|
696
|
+
"end": "\\'\\'\\'",
|
697
|
+
"beginCaptures": {
|
698
|
+
"2": {
|
699
|
+
"name": "invalid.deprecated.prefix.python"
|
700
|
+
},
|
701
|
+
"3": {
|
702
|
+
"name": "storage.type.string.python"
|
703
|
+
},
|
704
|
+
"4": {
|
705
|
+
"name": "storage.type.string.python"
|
706
|
+
},
|
707
|
+
"5": {
|
708
|
+
"name": "punctuation.definition.string.begin.python"
|
709
|
+
}
|
710
|
+
},
|
711
|
+
"endCaptures": {
|
712
|
+
"0": {
|
713
|
+
"name": "punctuation.definition.string.end.python"
|
714
|
+
}
|
715
|
+
},
|
716
|
+
"patterns": [
|
717
|
+
{
|
718
|
+
"include": "#single-three-regexp-expression"
|
719
|
+
}
|
720
|
+
]
|
721
|
+
},
|
722
|
+
"regexp-double-quoted-multi-line": {
|
723
|
+
"name": "string.regexp.quoted.multi.python",
|
724
|
+
"begin": "\\b(([uU]r)|([bB]r)|(r[bB]?))(\\\"\\\"\\\")",
|
725
|
+
"end": "\\\"\\\"\\\"",
|
726
|
+
"beginCaptures": {
|
727
|
+
"2": {
|
728
|
+
"name": "invalid.deprecated.prefix.python"
|
729
|
+
},
|
730
|
+
"3": {
|
731
|
+
"name": "storage.type.string.python"
|
732
|
+
},
|
733
|
+
"4": {
|
734
|
+
"name": "storage.type.string.python"
|
735
|
+
},
|
736
|
+
"5": {
|
737
|
+
"name": "punctuation.definition.string.begin.python"
|
738
|
+
}
|
739
|
+
},
|
740
|
+
"endCaptures": {
|
741
|
+
"0": {
|
742
|
+
"name": "punctuation.definition.string.end.python"
|
743
|
+
}
|
744
|
+
},
|
745
|
+
"patterns": [
|
746
|
+
{
|
747
|
+
"include": "#double-three-regexp-expression"
|
748
|
+
}
|
749
|
+
]
|
750
|
+
},
|
751
|
+
"string": {
|
752
|
+
"patterns": [
|
753
|
+
{
|
754
|
+
"include": "#string-quoted-multi-line"
|
755
|
+
},
|
756
|
+
{
|
757
|
+
"include": "#string-quoted-single-line"
|
758
|
+
},
|
759
|
+
{
|
760
|
+
"include": "#string-bin-quoted-multi-line"
|
761
|
+
},
|
762
|
+
{
|
763
|
+
"include": "#string-bin-quoted-single-line"
|
764
|
+
},
|
765
|
+
{
|
766
|
+
"include": "#string-raw-quoted-multi-line"
|
767
|
+
},
|
768
|
+
{
|
769
|
+
"include": "#string-raw-quoted-single-line"
|
770
|
+
},
|
771
|
+
{
|
772
|
+
"include": "#string-raw-bin-quoted-multi-line"
|
773
|
+
},
|
774
|
+
{
|
775
|
+
"include": "#string-raw-bin-quoted-single-line"
|
776
|
+
}
|
777
|
+
]
|
778
|
+
},
|
779
|
+
"string-unicode-guts": {
|
780
|
+
"patterns": [
|
781
|
+
{
|
782
|
+
"include": "#escape-sequence-unicode"
|
783
|
+
},
|
784
|
+
{
|
785
|
+
"include": "#string-entity"
|
786
|
+
},
|
787
|
+
{
|
788
|
+
"include": "#string-brace-formatting"
|
789
|
+
}
|
790
|
+
]
|
791
|
+
},
|
792
|
+
"string-consume-escape": {
|
793
|
+
"match": "\\\\['\"\\n\\\\]"
|
794
|
+
},
|
795
|
+
"string-raw-guts": {
|
796
|
+
"patterns": [
|
797
|
+
{
|
798
|
+
"include": "#string-consume-escape"
|
799
|
+
},
|
800
|
+
{
|
801
|
+
"include": "#string-formatting"
|
802
|
+
},
|
803
|
+
{
|
804
|
+
"include": "#string-brace-formatting"
|
805
|
+
}
|
806
|
+
]
|
807
|
+
},
|
808
|
+
"string-raw-bin-guts": {
|
809
|
+
"patterns": [
|
810
|
+
{
|
811
|
+
"include": "#string-consume-escape"
|
812
|
+
},
|
813
|
+
{
|
814
|
+
"include": "#string-formatting"
|
815
|
+
}
|
816
|
+
]
|
817
|
+
},
|
818
|
+
"string-entity": {
|
819
|
+
"patterns": [
|
820
|
+
{
|
821
|
+
"include": "#escape-sequence"
|
822
|
+
},
|
823
|
+
{
|
824
|
+
"include": "#string-line-continuation"
|
825
|
+
},
|
826
|
+
{
|
827
|
+
"include": "#string-formatting"
|
828
|
+
}
|
829
|
+
]
|
830
|
+
},
|
831
|
+
"escape-sequence-unicode": {
|
832
|
+
"patterns": [
|
833
|
+
{
|
834
|
+
"name": "constant.character.escape.python",
|
835
|
+
"match": "(?x)\n \\\\ (\n u[0-9A-Fa-f]{4}\n | U[0-9A-Fa-f]{8}\n | N\\{[\\w\\s]+?\\}\n )\n"
|
836
|
+
}
|
837
|
+
]
|
838
|
+
},
|
839
|
+
"escape-sequence": {
|
840
|
+
"name": "constant.character.escape.python",
|
841
|
+
"match": "(?x)\n \\\\ (\n x[0-9A-Fa-f]{2}\n | [0-7]{1,3}\n | [\\\\\"'abfnrtv]\n )\n"
|
842
|
+
},
|
843
|
+
"string-line-continuation": {
|
844
|
+
"name": "constant.language.python",
|
845
|
+
"match": "\\\\$"
|
846
|
+
},
|
847
|
+
"string-formatting": {
|
848
|
+
"name": "constant.character.format.placeholder.other.python",
|
849
|
+
"match": "(?x)\n % (\\([\\w\\s]*\\))?\n [-+#0 ]*\n (\\d+|\\*)? (\\.(\\d+|\\*))?\n ([hlL])?\n [diouxXeEfFgGcrsa%]\n"
|
850
|
+
},
|
851
|
+
"string-brace-formatting": {
|
852
|
+
"patterns": [
|
853
|
+
{
|
854
|
+
"name": "constant.character.format.placeholder.other.python",
|
855
|
+
"match": "(?x)\n (?:\n {{ | }}\n | (?:\n {\n \\w*? (\\.[[:alpha:]_]\\w*? | \\[[^\\]'\"]+\\])*?\n (![rsa])?\n ( : \\w? [<>=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )?\n })\n )\n",
|
856
|
+
"captures": {
|
857
|
+
"2": {
|
858
|
+
"name": "storage.type.format.python"
|
859
|
+
},
|
860
|
+
"3": {
|
861
|
+
"name": "support.other.format.python"
|
862
|
+
}
|
863
|
+
}
|
864
|
+
},
|
865
|
+
{
|
866
|
+
"name": "constant.character.format.placeholder.other.python",
|
867
|
+
"begin": "(?x)\n \\{\n \\w*? (\\.[[:alpha:]_]\\w*? | \\[[^\\]'\"]+\\])*?\n (![rsa])?\n (:)\n (?=[^'\"}\\n]*\\})\n",
|
868
|
+
"end": "\\}",
|
869
|
+
"beginCaptures": {
|
870
|
+
"2": {
|
871
|
+
"name": "storage.type.format.python"
|
872
|
+
},
|
873
|
+
"3": {
|
874
|
+
"name": "support.other.format.python"
|
875
|
+
}
|
876
|
+
},
|
877
|
+
"patterns": [
|
878
|
+
{
|
879
|
+
"match": "(?x) \\{ [^'\"}\\n]*? \\} (?=.*?\\})\n"
|
880
|
+
}
|
881
|
+
]
|
882
|
+
}
|
883
|
+
]
|
884
|
+
},
|
885
|
+
"import": {
|
886
|
+
"comment": "Import statements\n",
|
887
|
+
"patterns": [
|
888
|
+
{
|
889
|
+
"match": "(?x)\n \\s* \\b(from)\\b (\\s*\\.+\\s*) (import)?\n",
|
890
|
+
"captures": {
|
891
|
+
"1": {
|
892
|
+
"name": "keyword.control.import.python"
|
893
|
+
},
|
894
|
+
"3": {
|
895
|
+
"name": "keyword.control.import.python"
|
896
|
+
}
|
897
|
+
}
|
898
|
+
},
|
899
|
+
{
|
900
|
+
"name": "keyword.control.import.python",
|
901
|
+
"match": "\\b(?<!\\.)import\\b"
|
902
|
+
}
|
903
|
+
]
|
904
|
+
},
|
905
|
+
"class-declaration": {
|
906
|
+
"patterns": [
|
907
|
+
{
|
908
|
+
"name": "meta.class.python",
|
909
|
+
"begin": "(?x)\n \\s*(class)\\s+\n (?=\n [[:alpha:]_]\\w* \\s* (:|\\()\n )\n",
|
910
|
+
"end": "(:)",
|
911
|
+
"beginCaptures": {
|
912
|
+
"1": {
|
913
|
+
"name": "storage.type.class.python"
|
914
|
+
}
|
915
|
+
},
|
916
|
+
"endCaptures": {
|
917
|
+
"1": {
|
918
|
+
"name": "punctuation.section.class.begin.python"
|
919
|
+
}
|
920
|
+
},
|
921
|
+
"patterns": [
|
922
|
+
{
|
923
|
+
"include": "#class-name"
|
924
|
+
},
|
925
|
+
{
|
926
|
+
"include": "#class-inheritance"
|
927
|
+
}
|
928
|
+
]
|
929
|
+
}
|
930
|
+
]
|
931
|
+
},
|
932
|
+
"class-name": {
|
933
|
+
"patterns": [
|
934
|
+
{
|
935
|
+
"include": "#illegal-object-name"
|
936
|
+
},
|
937
|
+
{
|
938
|
+
"include": "#builtin-possible-callables"
|
939
|
+
},
|
940
|
+
{
|
941
|
+
"name": "entity.name.type.class.python",
|
942
|
+
"match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n"
|
943
|
+
}
|
944
|
+
]
|
945
|
+
},
|
946
|
+
"class-inheritance": {
|
947
|
+
"name": "meta.class.inheritance.python",
|
948
|
+
"begin": "(\\()",
|
949
|
+
"end": "(\\))",
|
950
|
+
"beginCaptures": {
|
951
|
+
"1": {
|
952
|
+
"name": "punctuation.definition.inheritance.begin.python"
|
953
|
+
}
|
954
|
+
},
|
955
|
+
"endCaptures": {
|
956
|
+
"1": {
|
957
|
+
"name": "punctuation.definition.inheritance.end.python"
|
958
|
+
}
|
959
|
+
},
|
960
|
+
"patterns": [
|
961
|
+
{
|
962
|
+
"name": "keyword.operator.unpacking.arguments.python",
|
963
|
+
"match": "(\\*\\*|\\*)"
|
964
|
+
},
|
965
|
+
{
|
966
|
+
"name": "punctuation.separator.inheritance.python",
|
967
|
+
"match": ","
|
968
|
+
},
|
969
|
+
{
|
970
|
+
"name": "keyword.operator.assignment.python",
|
971
|
+
"match": "\\="
|
972
|
+
},
|
973
|
+
{
|
974
|
+
"include": "#expression-class"
|
975
|
+
},
|
976
|
+
{
|
977
|
+
"name": "support.type.metaclass.python",
|
978
|
+
"match": "\\bmetaclass\\b"
|
979
|
+
},
|
980
|
+
{
|
981
|
+
"include": "#inheritance-identifier"
|
982
|
+
}
|
983
|
+
]
|
984
|
+
},
|
985
|
+
"inheritance-identifier": {
|
986
|
+
"match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n",
|
987
|
+
"captures": {
|
988
|
+
"1": {
|
989
|
+
"name": "entity.other.inherited-class.python"
|
990
|
+
}
|
991
|
+
}
|
992
|
+
},
|
993
|
+
"expression-class": {
|
994
|
+
"patterns": [
|
995
|
+
{
|
996
|
+
"include": "#call-wrapper-inheritance"
|
997
|
+
},
|
998
|
+
{
|
999
|
+
"include": "#expression-base"
|
1000
|
+
},
|
1001
|
+
{
|
1002
|
+
"include": "#member-access-class"
|
1003
|
+
}
|
1004
|
+
]
|
1005
|
+
},
|
1006
|
+
"member-access-class": {
|
1007
|
+
"begin": "\\.\\s*(?!\\.)",
|
1008
|
+
"end": "(?<=\\S)(?=\\W)|$",
|
1009
|
+
"patterns": [
|
1010
|
+
{
|
1011
|
+
"include": "#call-wrapper-inheritance"
|
1012
|
+
},
|
1013
|
+
{
|
1014
|
+
"include": "#member-access-base"
|
1015
|
+
},
|
1016
|
+
{
|
1017
|
+
"include": "#inheritance-identifier"
|
1018
|
+
}
|
1019
|
+
]
|
1020
|
+
},
|
1021
|
+
"lambda": {
|
1022
|
+
"patterns": [
|
1023
|
+
{
|
1024
|
+
"match": "((?<=\\.)lambda|lambda(?=\\s*[\\.=]))",
|
1025
|
+
"captures": {
|
1026
|
+
"1": {
|
1027
|
+
"name": "keyword.control.flow.python"
|
1028
|
+
}
|
1029
|
+
}
|
1030
|
+
},
|
1031
|
+
{
|
1032
|
+
"match": "\\b(lambda)\\s*?([,\\n]|$)",
|
1033
|
+
"captures": {
|
1034
|
+
"1": {
|
1035
|
+
"name": "storage.type.function.lambda.python"
|
1036
|
+
}
|
1037
|
+
}
|
1038
|
+
},
|
1039
|
+
{
|
1040
|
+
"name": "meta.lambda-function.python",
|
1041
|
+
"begin": "(?x)\n \\b (lambda) \\b\n",
|
1042
|
+
"end": "(:)|(\\n)",
|
1043
|
+
"beginCaptures": {
|
1044
|
+
"1": {
|
1045
|
+
"name": "storage.type.function.lambda.python"
|
1046
|
+
}
|
1047
|
+
},
|
1048
|
+
"endCaptures": {
|
1049
|
+
"1": {
|
1050
|
+
"name": "punctuation.section.function.lambda.begin.python"
|
1051
|
+
}
|
1052
|
+
},
|
1053
|
+
"contentName": "meta.function.lambda.parameters.python",
|
1054
|
+
"patterns": [
|
1055
|
+
{
|
1056
|
+
"name": "keyword.operator.unpacking.parameter.python",
|
1057
|
+
"match": "(\\*\\*|\\*)"
|
1058
|
+
},
|
1059
|
+
{
|
1060
|
+
"include": "#lambda-incomplete"
|
1061
|
+
},
|
1062
|
+
{
|
1063
|
+
"include": "#illegal-names"
|
1064
|
+
},
|
1065
|
+
{
|
1066
|
+
"match": "([[:alpha:]_]\\w*)\\s*(?:(,)|(?=:|$))",
|
1067
|
+
"captures": {
|
1068
|
+
"1": {
|
1069
|
+
"name": "variable.parameter.function.language.python"
|
1070
|
+
},
|
1071
|
+
"2": {
|
1072
|
+
"name": "punctuation.separator.parameters.python"
|
1073
|
+
}
|
1074
|
+
}
|
1075
|
+
},
|
1076
|
+
{
|
1077
|
+
"include": "#comments"
|
1078
|
+
},
|
1079
|
+
{
|
1080
|
+
"include": "#backticks"
|
1081
|
+
},
|
1082
|
+
{
|
1083
|
+
"include": "#illegal-anno"
|
1084
|
+
},
|
1085
|
+
{
|
1086
|
+
"include": "#lambda-parameter-with-default"
|
1087
|
+
},
|
1088
|
+
{
|
1089
|
+
"include": "#line-continuation"
|
1090
|
+
},
|
1091
|
+
{
|
1092
|
+
"include": "#illegal-operator"
|
1093
|
+
}
|
1094
|
+
]
|
1095
|
+
}
|
1096
|
+
]
|
1097
|
+
},
|
1098
|
+
"lambda-incomplete": {
|
1099
|
+
"name": "storage.type.function.lambda.python",
|
1100
|
+
"match": "\\blambda(?=\\s*[:,)])"
|
1101
|
+
},
|
1102
|
+
"lambda-parameter-with-default": {
|
1103
|
+
"begin": "(?x)\n \\b\n ([[:alpha:]_]\\w*) \\s* (=)\n",
|
1104
|
+
"end": "(,)|(?=:|$)",
|
1105
|
+
"beginCaptures": {
|
1106
|
+
"1": {
|
1107
|
+
"name": "variable.parameter.function.language.python"
|
1108
|
+
},
|
1109
|
+
"2": {
|
1110
|
+
"name": "keyword.operator.python"
|
1111
|
+
}
|
1112
|
+
},
|
1113
|
+
"endCaptures": {
|
1114
|
+
"1": {
|
1115
|
+
"name": "punctuation.separator.parameters.python"
|
1116
|
+
}
|
1117
|
+
},
|
1118
|
+
"patterns": [
|
1119
|
+
{
|
1120
|
+
"include": "#expression"
|
1121
|
+
}
|
1122
|
+
]
|
1123
|
+
},
|
1124
|
+
"function-declaration": {
|
1125
|
+
"name": "meta.function.python",
|
1126
|
+
"begin": "(?x)\n \\s*\n (?:\\b(async) \\s+)? \\b(def)\\s+\n (?=\n [[:alpha:]_][[:word:]]* \\s* \\(\n )\n",
|
1127
|
+
"end": "(:)",
|
1128
|
+
"beginCaptures": {
|
1129
|
+
"1": {
|
1130
|
+
"name": "storage.type.function.async.python"
|
1131
|
+
},
|
1132
|
+
"2": {
|
1133
|
+
"name": "storage.type.function.python"
|
1134
|
+
}
|
1135
|
+
},
|
1136
|
+
"endCaptures": {
|
1137
|
+
"1": {
|
1138
|
+
"name": "punctuation.section.function.begin.python"
|
1139
|
+
}
|
1140
|
+
},
|
1141
|
+
"patterns": [
|
1142
|
+
{
|
1143
|
+
"include": "#function-def-name"
|
1144
|
+
},
|
1145
|
+
{
|
1146
|
+
"include": "#parameters"
|
1147
|
+
},
|
1148
|
+
{
|
1149
|
+
"include": "#return-annotation"
|
1150
|
+
}
|
1151
|
+
]
|
1152
|
+
},
|
1153
|
+
"function-def-name": {
|
1154
|
+
"patterns": [
|
1155
|
+
{
|
1156
|
+
"include": "#illegal-object-name"
|
1157
|
+
},
|
1158
|
+
{
|
1159
|
+
"include": "#builtin-possible-callables"
|
1160
|
+
},
|
1161
|
+
{
|
1162
|
+
"name": "entity.name.function.python",
|
1163
|
+
"match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n"
|
1164
|
+
}
|
1165
|
+
]
|
1166
|
+
},
|
1167
|
+
"parameters": {
|
1168
|
+
"name": "meta.function.parameters.python",
|
1169
|
+
"begin": "(\\()",
|
1170
|
+
"end": "(\\))",
|
1171
|
+
"beginCaptures": {
|
1172
|
+
"1": {
|
1173
|
+
"name": "punctuation.definition.parameters.begin.python"
|
1174
|
+
}
|
1175
|
+
},
|
1176
|
+
"endCaptures": {
|
1177
|
+
"1": {
|
1178
|
+
"name": "punctuation.definition.parameters.end.python"
|
1179
|
+
}
|
1180
|
+
},
|
1181
|
+
"patterns": [
|
1182
|
+
{
|
1183
|
+
"name": "keyword.operator.unpacking.parameter.python",
|
1184
|
+
"match": "(\\*\\*|\\*)"
|
1185
|
+
},
|
1186
|
+
{
|
1187
|
+
"include": "#lambda-incomplete"
|
1188
|
+
},
|
1189
|
+
{
|
1190
|
+
"include": "#illegal-names"
|
1191
|
+
},
|
1192
|
+
{
|
1193
|
+
"include": "#illegal-object-name"
|
1194
|
+
},
|
1195
|
+
{
|
1196
|
+
"include": "#parameter-special"
|
1197
|
+
},
|
1198
|
+
{
|
1199
|
+
"match": "([[:alpha:]_]\\w*)\\s*(?:(,)|(?=\\)))",
|
1200
|
+
"captures": {
|
1201
|
+
"1": {
|
1202
|
+
"name": "variable.parameter.function.language.python"
|
1203
|
+
},
|
1204
|
+
"2": {
|
1205
|
+
"name": "punctuation.separator.parameters.python"
|
1206
|
+
}
|
1207
|
+
}
|
1208
|
+
},
|
1209
|
+
{
|
1210
|
+
"include": "#comments"
|
1211
|
+
},
|
1212
|
+
{
|
1213
|
+
"include": "#parameter-with-default"
|
1214
|
+
},
|
1215
|
+
{
|
1216
|
+
"include": "#annotated-parameter"
|
1217
|
+
}
|
1218
|
+
]
|
1219
|
+
},
|
1220
|
+
"parameter-special": {
|
1221
|
+
"match": "(?x)\n \\b ((self)|(cls)) \\b \\s*(?:(,)|(?=\\)))\n",
|
1222
|
+
"captures": {
|
1223
|
+
"1": {
|
1224
|
+
"name": "variable.parameter.function.language.python"
|
1225
|
+
},
|
1226
|
+
"2": {
|
1227
|
+
"name": "variable.parameter.function.language.special.self.python"
|
1228
|
+
},
|
1229
|
+
"3": {
|
1230
|
+
"name": "variable.parameter.function.language.special.cls.python"
|
1231
|
+
},
|
1232
|
+
"4": {
|
1233
|
+
"name": "punctuation.separator.parameters.python"
|
1234
|
+
}
|
1235
|
+
}
|
1236
|
+
},
|
1237
|
+
"parameter-with-default": {
|
1238
|
+
"begin": "(?x)\n \\b\n ([[:alpha:]_]\\w*) \\s* (=)\n",
|
1239
|
+
"end": "(,)|(?=\\))",
|
1240
|
+
"beginCaptures": {
|
1241
|
+
"1": {
|
1242
|
+
"name": "variable.parameter.function.language.python"
|
1243
|
+
},
|
1244
|
+
"2": {
|
1245
|
+
"name": "keyword.operator.python"
|
1246
|
+
}
|
1247
|
+
},
|
1248
|
+
"endCaptures": {
|
1249
|
+
"1": {
|
1250
|
+
"name": "punctuation.separator.parameters.python"
|
1251
|
+
}
|
1252
|
+
},
|
1253
|
+
"patterns": [
|
1254
|
+
{
|
1255
|
+
"include": "#expression"
|
1256
|
+
}
|
1257
|
+
]
|
1258
|
+
},
|
1259
|
+
"annotated-parameter": {
|
1260
|
+
"begin": "(?x)\n \\b\n ([[:alpha:]_]\\w*) \\s* (:)\n",
|
1261
|
+
"end": "(,)|(?=\\))",
|
1262
|
+
"beginCaptures": {
|
1263
|
+
"1": {
|
1264
|
+
"name": "variable.parameter.function.language.python"
|
1265
|
+
},
|
1266
|
+
"2": {
|
1267
|
+
"name": "punctuation.separator.annotation.python"
|
1268
|
+
}
|
1269
|
+
},
|
1270
|
+
"endCaptures": {
|
1271
|
+
"1": {
|
1272
|
+
"name": "punctuation.separator.parameters.python"
|
1273
|
+
}
|
1274
|
+
},
|
1275
|
+
"patterns": [
|
1276
|
+
{
|
1277
|
+
"include": "#expression"
|
1278
|
+
},
|
1279
|
+
{
|
1280
|
+
"name": "keyword.operator.assignment.python",
|
1281
|
+
"match": "\\="
|
1282
|
+
}
|
1283
|
+
]
|
1284
|
+
},
|
1285
|
+
"return-annotation": {
|
1286
|
+
"begin": "(->)",
|
1287
|
+
"end": "(?=:)",
|
1288
|
+
"beginCaptures": {
|
1289
|
+
"1": {
|
1290
|
+
"name": "punctuation.separator.annotation.result.python"
|
1291
|
+
}
|
1292
|
+
},
|
1293
|
+
"patterns": [
|
1294
|
+
{
|
1295
|
+
"include": "#expression"
|
1296
|
+
}
|
1297
|
+
]
|
1298
|
+
},
|
1299
|
+
"item-access": {
|
1300
|
+
"patterns": [
|
1301
|
+
{
|
1302
|
+
"name": "meta.item-access.python",
|
1303
|
+
"begin": "(?x)\n \\b(?=\n [[:alpha:]_]\\w* \\s* \\[\n )\n",
|
1304
|
+
"end": "(\\])",
|
1305
|
+
"endCaptures": {
|
1306
|
+
"1": {
|
1307
|
+
"name": "punctuation.definition.arguments.end.python"
|
1308
|
+
}
|
1309
|
+
},
|
1310
|
+
"patterns": [
|
1311
|
+
{
|
1312
|
+
"include": "#item-name"
|
1313
|
+
},
|
1314
|
+
{
|
1315
|
+
"include": "#item-index"
|
1316
|
+
},
|
1317
|
+
{
|
1318
|
+
"include": "#expression"
|
1319
|
+
}
|
1320
|
+
]
|
1321
|
+
}
|
1322
|
+
]
|
1323
|
+
},
|
1324
|
+
"item-name": {
|
1325
|
+
"patterns": [
|
1326
|
+
{
|
1327
|
+
"include": "#special-variables"
|
1328
|
+
},
|
1329
|
+
{
|
1330
|
+
"include": "#builtin-functions"
|
1331
|
+
},
|
1332
|
+
{
|
1333
|
+
"include": "#special-names"
|
1334
|
+
},
|
1335
|
+
{
|
1336
|
+
"match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n"
|
1337
|
+
}
|
1338
|
+
]
|
1339
|
+
},
|
1340
|
+
"item-index": {
|
1341
|
+
"begin": "(\\[)",
|
1342
|
+
"end": "(?=\\])",
|
1343
|
+
"beginCaptures": {
|
1344
|
+
"1": {
|
1345
|
+
"name": "punctuation.definition.arguments.begin.python"
|
1346
|
+
}
|
1347
|
+
},
|
1348
|
+
"contentName": "meta.item-access.arguments.python",
|
1349
|
+
"patterns": [
|
1350
|
+
{
|
1351
|
+
"include": "#expression"
|
1352
|
+
}
|
1353
|
+
]
|
1354
|
+
},
|
1355
|
+
"decorator": {
|
1356
|
+
"name": "meta.function.decorator.python",
|
1357
|
+
"begin": "(?x)\n ^\\s*\n (@) \\s* (?=[[:alpha:]_]\\w*)\n",
|
1358
|
+
"end": "(?x)\n ( \\) ) (?: (?=\\s*\\#|$) | (.*$) )\n | (?=\\n|\\#)\n",
|
1359
|
+
"beginCaptures": {
|
1360
|
+
"1": {
|
1361
|
+
"name": "entity.name.function.decorator.python"
|
1362
|
+
}
|
1363
|
+
},
|
1364
|
+
"endCaptures": {
|
1365
|
+
"1": {
|
1366
|
+
"name": "punctuation.definition.arguments.end.python"
|
1367
|
+
},
|
1368
|
+
"2": {
|
1369
|
+
"name": "invalid.illegal.decorator.python"
|
1370
|
+
}
|
1371
|
+
},
|
1372
|
+
"patterns": [
|
1373
|
+
{
|
1374
|
+
"include": "#decorator-name"
|
1375
|
+
},
|
1376
|
+
{
|
1377
|
+
"include": "#function-arguments"
|
1378
|
+
}
|
1379
|
+
]
|
1380
|
+
},
|
1381
|
+
"decorator-name": {
|
1382
|
+
"patterns": [
|
1383
|
+
{
|
1384
|
+
"include": "#builtin-callables"
|
1385
|
+
},
|
1386
|
+
{
|
1387
|
+
"include": "#illegal-object-name"
|
1388
|
+
},
|
1389
|
+
{
|
1390
|
+
"name": "entity.name.function.decorator.python",
|
1391
|
+
"match": "(?x)\n ([[:alpha:]_]\\w*) | \\.\n"
|
1392
|
+
},
|
1393
|
+
{
|
1394
|
+
"include": "#line-continuation"
|
1395
|
+
},
|
1396
|
+
{
|
1397
|
+
"name": "invalid.illegal.decorator.python",
|
1398
|
+
"match": "(?x)\n \\s* ([^([:alpha:]\\s_\\.#\\\\] .*?) (?=\\#|$)\n",
|
1399
|
+
"captures": {
|
1400
|
+
"1": {
|
1401
|
+
"name": "invalid.illegal.decorator.python"
|
1402
|
+
}
|
1403
|
+
}
|
1404
|
+
}
|
1405
|
+
]
|
1406
|
+
},
|
1407
|
+
"call-wrapper-inheritance": {
|
1408
|
+
"comment": "same as a funciton call, but in inheritance context",
|
1409
|
+
"name": "meta.function-call.python",
|
1410
|
+
"begin": "(?x)\n \\b(?=\n ([[:alpha:]_]\\w*) \\s* (\\()\n )\n",
|
1411
|
+
"end": "(\\))",
|
1412
|
+
"endCaptures": {
|
1413
|
+
"1": {
|
1414
|
+
"name": "punctuation.definition.arguments.end.python"
|
1415
|
+
}
|
1416
|
+
},
|
1417
|
+
"patterns": [
|
1418
|
+
{
|
1419
|
+
"include": "#inheritance-name"
|
1420
|
+
},
|
1421
|
+
{
|
1422
|
+
"include": "#function-arguments"
|
1423
|
+
}
|
1424
|
+
]
|
1425
|
+
},
|
1426
|
+
"inheritance-name": {
|
1427
|
+
"patterns": [
|
1428
|
+
{
|
1429
|
+
"include": "#lambda-incomplete"
|
1430
|
+
},
|
1431
|
+
{
|
1432
|
+
"include": "#builtin-possible-callables"
|
1433
|
+
},
|
1434
|
+
{
|
1435
|
+
"include": "#inheritance-identifier"
|
1436
|
+
}
|
1437
|
+
]
|
1438
|
+
},
|
1439
|
+
"function-call": {
|
1440
|
+
"name": "meta.function-call.python",
|
1441
|
+
"begin": "(?x)\n \\b(?=\n ([[:alpha:]_]\\w*) \\s* (\\()\n )\n",
|
1442
|
+
"end": "(\\))",
|
1443
|
+
"endCaptures": {
|
1444
|
+
"1": {
|
1445
|
+
"name": "punctuation.definition.arguments.end.python"
|
1446
|
+
}
|
1447
|
+
},
|
1448
|
+
"patterns": [
|
1449
|
+
{
|
1450
|
+
"include": "#special-variables"
|
1451
|
+
},
|
1452
|
+
{
|
1453
|
+
"include": "#function-name"
|
1454
|
+
},
|
1455
|
+
{
|
1456
|
+
"include": "#function-arguments"
|
1457
|
+
}
|
1458
|
+
]
|
1459
|
+
},
|
1460
|
+
"function-name": {
|
1461
|
+
"patterns": [
|
1462
|
+
{
|
1463
|
+
"include": "#builtin-possible-callables"
|
1464
|
+
},
|
1465
|
+
{
|
1466
|
+
"comment": "Some color schemas support meta.function-call.generic scope",
|
1467
|
+
"name": "meta.function-call.generic.python",
|
1468
|
+
"match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n"
|
1469
|
+
}
|
1470
|
+
]
|
1471
|
+
},
|
1472
|
+
"function-arguments": {
|
1473
|
+
"begin": "(?x)\n (?:\n (\\()\n (?:\\s*(\\*\\*|\\*))?\n )\n",
|
1474
|
+
"end": "(?=\\))(?!\\)\\s*\\()",
|
1475
|
+
"beginCaptures": {
|
1476
|
+
"1": {
|
1477
|
+
"name": "punctuation.definition.arguments.begin.python"
|
1478
|
+
},
|
1479
|
+
"2": {
|
1480
|
+
"name": "keyword.operator.unpacking.arguments.python"
|
1481
|
+
}
|
1482
|
+
},
|
1483
|
+
"contentName": "meta.function-call.arguments.python",
|
1484
|
+
"patterns": [
|
1485
|
+
{
|
1486
|
+
"match": "(?x)\n (?:\n (,)\n (?:\\s*(\\*\\*|\\*))?\n )\n",
|
1487
|
+
"captures": {
|
1488
|
+
"1": {
|
1489
|
+
"name": "punctuation.separator.arguments.python"
|
1490
|
+
},
|
1491
|
+
"2": {
|
1492
|
+
"name": "keyword.operator.unpacking.arguments.python"
|
1493
|
+
}
|
1494
|
+
}
|
1495
|
+
},
|
1496
|
+
{
|
1497
|
+
"include": "#lambda-incomplete"
|
1498
|
+
},
|
1499
|
+
{
|
1500
|
+
"include": "#illegal-names"
|
1501
|
+
},
|
1502
|
+
{
|
1503
|
+
"match": "\\b([[:alpha:]_]\\w*)\\s*(=)(?!=)",
|
1504
|
+
"captures": {
|
1505
|
+
"1": {
|
1506
|
+
"name": "variable.parameter.function-call.python"
|
1507
|
+
},
|
1508
|
+
"2": {
|
1509
|
+
"name": "keyword.operator.assignment.python"
|
1510
|
+
}
|
1511
|
+
}
|
1512
|
+
},
|
1513
|
+
{
|
1514
|
+
"name": "keyword.operator.assignment.python",
|
1515
|
+
"match": "\\="
|
1516
|
+
},
|
1517
|
+
{
|
1518
|
+
"include": "#expression"
|
1519
|
+
},
|
1520
|
+
{
|
1521
|
+
"match": "\\s*(\\))\\s*(\\()",
|
1522
|
+
"captures": {
|
1523
|
+
"1": {
|
1524
|
+
"name": "punctuation.definition.arguments.end.python"
|
1525
|
+
},
|
1526
|
+
"2": {
|
1527
|
+
"name": "punctuation.definition.arguments.begin.python"
|
1528
|
+
}
|
1529
|
+
}
|
1530
|
+
}
|
1531
|
+
]
|
1532
|
+
},
|
1533
|
+
"builtin-callables": {
|
1534
|
+
"patterns": [
|
1535
|
+
{
|
1536
|
+
"include": "#illegal-names"
|
1537
|
+
},
|
1538
|
+
{
|
1539
|
+
"include": "#illegal-object-name"
|
1540
|
+
},
|
1541
|
+
{
|
1542
|
+
"include": "#builtin-exceptions"
|
1543
|
+
},
|
1544
|
+
{
|
1545
|
+
"include": "#builtin-functions"
|
1546
|
+
},
|
1547
|
+
{
|
1548
|
+
"include": "#builtin-types"
|
1549
|
+
}
|
1550
|
+
]
|
1551
|
+
},
|
1552
|
+
"builtin-possible-callables": {
|
1553
|
+
"patterns": [
|
1554
|
+
{
|
1555
|
+
"include": "#builtin-callables"
|
1556
|
+
},
|
1557
|
+
{
|
1558
|
+
"include": "#magic-names"
|
1559
|
+
}
|
1560
|
+
]
|
1561
|
+
},
|
1562
|
+
"builtin-exceptions": {
|
1563
|
+
"name": "support.type.exception.python",
|
1564
|
+
"match": "(?x) (?<!\\.) \\b(\n (\n Arithmetic | Assertion | Attribute | Buffer | BlockingIO\n | BrokenPipe | ChildProcess\n | (Connection (Aborted | Refused | Reset)?)\n | EOF | Environment | FileExists | FileNotFound\n | FloatingPoint | IO | Import | Indentation | Index | Interrupted\n | IsADirectory | NotADirectory | Permission | ProcessLookup\n | Timeout\n | Key | Lookup | Memory | Name | NotImplemented | OS | Overflow\n | Reference | Runtime | Recursion | Syntax | System\n | Tab | Type | UnboundLocal | Unicode(Encode|Decode|Translate)?\n | Value | Windows | ZeroDivision\n ) Error\n|\n ((Pending)?Deprecation | Runtime | Syntax | User | Future | Import\n | Unicode | Bytes | Resource\n )? Warning\n|\n SystemExit | Stop(Async)?Iteration\n | KeyboardInterrupt\n | GeneratorExit | (Base)?Exception\n)\\b\n"
|
1565
|
+
},
|
1566
|
+
"builtin-functions": {
|
1567
|
+
"patterns": [
|
1568
|
+
{
|
1569
|
+
"name": "support.function.builtin.python",
|
1570
|
+
"match": "(?x)\n (?<!\\.) \\b(\n __import__ | abs | all | any | ascii | bin | callable\n | chr | compile | copyright | credits | delattr | dir | divmod\n | enumerate | eval | exec | exit | filter | format | getattr\n | globals | hasattr | hash | help | hex | id | input\n | isinstance | issubclass | iter | len | license | locals | map\n | max | memoryview | min | next | oct | open | ord | pow | print\n | quit | range | reload | repr | reversed | round\n | setattr | sorted | sum | vars | zip\n )\\b\n"
|
1571
|
+
},
|
1572
|
+
{
|
1573
|
+
"name": "variable.legacy.builtin.python",
|
1574
|
+
"match": "(?x)\n (?<!\\.) \\b(\n file | reduce | intern | raw_input | unicode | cmp | basestring\n | execfile | long | xrange\n )\\b\n"
|
1575
|
+
}
|
1576
|
+
]
|
1577
|
+
},
|
1578
|
+
"builtin-types": {
|
1579
|
+
"name": "support.type.python",
|
1580
|
+
"match": "(?x)\n (?<!\\.) \\b(\n bool | bytearray | bytes | classmethod | complex | dict\n | float | frozenset | int | list | object | property\n | set | slice | staticmethod | str | tuple | type\n\n (?# Although 'super' is not a type, it's related to types,\n and is special enough to be highlighted differently from\n other built-ins)\n | super\n )\\b\n"
|
1581
|
+
},
|
1582
|
+
"magic-function-names": {
|
1583
|
+
"comment": "these methods have magic interpretation by python and are generally called\nindirectly through syntactic constructs\n",
|
1584
|
+
"match": "(?x)\n \\b(\n __(?:\n abs | add | aenter | aexit | aiter | and | anext | await\n | bool | call | ceil | cmp | coerce | complex | contains\n | copy | deepcopy | del | delattr | delete | delitem\n | delslice | dir | div | divmod | enter | eq | exit | float\n | floor | floordiv | format | ge | get | getattr\n | getattribute | getinitargs | getitem | getnewargs\n | getslice | getstate | gt | hash | hex | iadd | iand | idiv\n | ifloordiv | ilshift | imod | imul | index | init\n | instancecheck | int | invert | ior | ipow | irshift | isub\n | iter | itruediv | ixor | le | len | long | lshift | lt\n | missing | mod | mul | ne | neg | new | next | nonzero | oct | or\n | pos | pow | radd | rand | rdiv | rdivmod | reduce\n | reduce_ex | repr | reversed | rfloordiv | rlshift | rmod\n | rmul | ror | round | rpow | rrshift | rshift | rsub\n | rtruediv | rxor | set | setattr | setitem | setslice\n | setstate | sizeof | str | sub | subclasscheck | truediv\n | trunc | unicode | xor\n )__\n )\\b\n",
|
1585
|
+
"captures": {
|
1586
|
+
"1": {
|
1587
|
+
"name": "support.function.magic.python"
|
1588
|
+
}
|
1589
|
+
}
|
1590
|
+
},
|
1591
|
+
"magic-variable-names": {
|
1592
|
+
"comment": "magic variables which a class/module may have.",
|
1593
|
+
"match": "(?x)\n \\b(\n __(?:\n all | bases | builtins | class | code | debug | defaults | dict\n | doc | file | func | kwdefaults | members\n | metaclass | methods | module | mro | name\n | qualname | self | signature | slots | subclasses\n | version | weakref | wrapped\n )__\n )\\b\n",
|
1594
|
+
"captures": {
|
1595
|
+
"1": {
|
1596
|
+
"name": "support.variable.magic.python"
|
1597
|
+
}
|
1598
|
+
}
|
1599
|
+
},
|
1600
|
+
"magic-names": {
|
1601
|
+
"patterns": [
|
1602
|
+
{
|
1603
|
+
"include": "#magic-function-names"
|
1604
|
+
},
|
1605
|
+
{
|
1606
|
+
"include": "#magic-variable-names"
|
1607
|
+
}
|
1608
|
+
]
|
1609
|
+
},
|
1610
|
+
"illegal-names": {
|
1611
|
+
"name": "keyword.control.flow.python",
|
1612
|
+
"match": "(?x)\n \\b(\n and | as | assert | async | await | break | class | continue | def\n | del | elif | else | except | exec | finally | for | from | global\n | if | import | in | is | (?<=\\.)lambda | lambda(?=\\s*[\\.=])\n | nonlocal | not | or | pass | raise | return | try | while | with\n | yield\n )\\b\n"
|
1613
|
+
},
|
1614
|
+
"special-variables": {
|
1615
|
+
"match": "(?x)\n \\b (?<!\\.) (?:\n (self) | (cls)\n )\\b\n",
|
1616
|
+
"captures": {
|
1617
|
+
"1": {
|
1618
|
+
"name": "variable.language.special.self.python"
|
1619
|
+
},
|
1620
|
+
"2": {
|
1621
|
+
"name": "variable.language.special.cls.python"
|
1622
|
+
}
|
1623
|
+
}
|
1624
|
+
},
|
1625
|
+
"ellipsis": {
|
1626
|
+
"name": "constant.other.ellipsis.python",
|
1627
|
+
"match": "\\.\\.\\."
|
1628
|
+
},
|
1629
|
+
"backticks": {
|
1630
|
+
"name": "invalid.deprecated.backtick.python",
|
1631
|
+
"begin": "\\`",
|
1632
|
+
"end": "(?:\\`|(?<!\\\\)(\\n))",
|
1633
|
+
"patterns": [
|
1634
|
+
{
|
1635
|
+
"include": "#expression"
|
1636
|
+
}
|
1637
|
+
]
|
1638
|
+
},
|
1639
|
+
"illegal-operator": {
|
1640
|
+
"patterns": [
|
1641
|
+
{
|
1642
|
+
"name": "invalid.illegal.operator.python",
|
1643
|
+
"match": "&&|\\|\\||--|\\+\\+"
|
1644
|
+
},
|
1645
|
+
{
|
1646
|
+
"name": "invalid.illegal.operator.python",
|
1647
|
+
"match": "[?$]"
|
1648
|
+
},
|
1649
|
+
{
|
1650
|
+
"name": "invalid.illegal.operator.python",
|
1651
|
+
"comment": "We don't want `!` to flash when we're typing `!=`",
|
1652
|
+
"match": "!\\b"
|
1653
|
+
}
|
1654
|
+
]
|
1655
|
+
},
|
1656
|
+
"illegal-object-name": {
|
1657
|
+
"comment": "It's illegal to name class or function \"True\"",
|
1658
|
+
"name": "keyword.illegal.name.python",
|
1659
|
+
"match": "\\b(True|False|None)\\b"
|
1660
|
+
},
|
1661
|
+
"illegal-anno": {
|
1662
|
+
"name": "invalid.illegal.annotation.python",
|
1663
|
+
"match": "->"
|
1664
|
+
},
|
1665
|
+
"regexp-base-expression": {
|
1666
|
+
"patterns": [
|
1667
|
+
{
|
1668
|
+
"name": "support.other.match.any.regexp",
|
1669
|
+
"match": "\\."
|
1670
|
+
},
|
1671
|
+
{
|
1672
|
+
"name": "support.other.match.begin.regexp",
|
1673
|
+
"match": "\\^"
|
1674
|
+
},
|
1675
|
+
{
|
1676
|
+
"name": "support.other.match.end.regexp",
|
1677
|
+
"match": "\\$"
|
1678
|
+
},
|
1679
|
+
{
|
1680
|
+
"name": "keyword.operator.quantifier.regexp",
|
1681
|
+
"match": "[+*?]\\??"
|
1682
|
+
},
|
1683
|
+
{
|
1684
|
+
"name": "keyword.operator.disjunction.regexp",
|
1685
|
+
"match": "\\|"
|
1686
|
+
},
|
1687
|
+
{
|
1688
|
+
"name": "keyword.operator.quantifier.regexp",
|
1689
|
+
"match": "(?x)\n \\{(\n \\d+ | \\d+,(\\d+)? | ,\\d+\n )\\}\n"
|
1690
|
+
},
|
1691
|
+
{
|
1692
|
+
"include": "#regexp-escape-sequence"
|
1693
|
+
}
|
1694
|
+
]
|
1695
|
+
},
|
1696
|
+
"regexp-backreference-number": {
|
1697
|
+
"name": "meta.backreference.regexp",
|
1698
|
+
"match": "(\\\\[1-9]\\d?)",
|
1699
|
+
"captures": {
|
1700
|
+
"1": {
|
1701
|
+
"name": "entity.name.tag.backreference.regexp"
|
1702
|
+
}
|
1703
|
+
}
|
1704
|
+
},
|
1705
|
+
"regexp-backreference": {
|
1706
|
+
"name": "meta.backreference.named.regexp",
|
1707
|
+
"match": "(?x)\n (\\() (\\?P= \\w+(?:\\s+[[:alnum:]]+)?) (\\))\n",
|
1708
|
+
"captures": {
|
1709
|
+
"1": {
|
1710
|
+
"name": "punctuation.parenthesis.backreference.named.begin.regexp support.other.parenthesis.regexp"
|
1711
|
+
},
|
1712
|
+
"2": {
|
1713
|
+
"name": "entity.name.tag.named.backreference.regexp"
|
1714
|
+
},
|
1715
|
+
"3": {
|
1716
|
+
"name": "punctuation.parenthesis.backreference.named.end.regexp support.other.parenthesis.regexp"
|
1717
|
+
}
|
1718
|
+
}
|
1719
|
+
},
|
1720
|
+
"regexp-flags": {
|
1721
|
+
"name": "storage.modifier.flag.regexp",
|
1722
|
+
"match": "\\(\\?[aiLmsux]+\\)"
|
1723
|
+
},
|
1724
|
+
"regexp-escape-special": {
|
1725
|
+
"name": "support.other.escape.special.regexp",
|
1726
|
+
"match": "\\\\([AbBdDsSwWZ])"
|
1727
|
+
},
|
1728
|
+
"regexp-escape-character": {
|
1729
|
+
"name": "constant.character.escape.regexp",
|
1730
|
+
"match": "(?x)\n \\\\ (\n x[0-9A-Fa-f]{2}\n | 0[0-7]{1,2}\n | [0-7]{3}\n )\n"
|
1731
|
+
},
|
1732
|
+
"regexp-escape-unicode": {
|
1733
|
+
"name": "constant.character.unicode.regexp",
|
1734
|
+
"match": "(?x)\n \\\\ (\n u[0-9A-Fa-f]{4}\n | U[0-9A-Fa-f]{8}\n )\n"
|
1735
|
+
},
|
1736
|
+
"regexp-escape-catchall": {
|
1737
|
+
"name": "constant.character.escape.regexp",
|
1738
|
+
"match": "\\\\(.|\\n)"
|
1739
|
+
},
|
1740
|
+
"regexp-escape-sequence": {
|
1741
|
+
"patterns": [
|
1742
|
+
{
|
1743
|
+
"include": "#regexp-escape-special"
|
1744
|
+
},
|
1745
|
+
{
|
1746
|
+
"include": "#regexp-escape-character"
|
1747
|
+
},
|
1748
|
+
{
|
1749
|
+
"include": "#regexp-escape-unicode"
|
1750
|
+
},
|
1751
|
+
{
|
1752
|
+
"include": "#regexp-backreference-number"
|
1753
|
+
},
|
1754
|
+
{
|
1755
|
+
"include": "#regexp-escape-catchall"
|
1756
|
+
}
|
1757
|
+
]
|
1758
|
+
},
|
1759
|
+
"regexp-charecter-set-escapes": {
|
1760
|
+
"patterns": [
|
1761
|
+
{
|
1762
|
+
"name": "constant.character.escape.regexp",
|
1763
|
+
"match": "\\\\[abfnrtv\\\\]"
|
1764
|
+
},
|
1765
|
+
{
|
1766
|
+
"include": "#regexp-escape-special"
|
1767
|
+
},
|
1768
|
+
{
|
1769
|
+
"name": "constant.character.escape.regexp",
|
1770
|
+
"match": "\\\\([0-7]{1,3})"
|
1771
|
+
},
|
1772
|
+
{
|
1773
|
+
"include": "#regexp-escape-character"
|
1774
|
+
},
|
1775
|
+
{
|
1776
|
+
"include": "#regexp-escape-unicode"
|
1777
|
+
},
|
1778
|
+
{
|
1779
|
+
"include": "#regexp-escape-catchall"
|
1780
|
+
}
|
1781
|
+
]
|
1782
|
+
},
|
1783
|
+
"comments-base": {
|
1784
|
+
"name": "comment.line.number-sign.python",
|
1785
|
+
"begin": "(\\#)",
|
1786
|
+
"beginCaptures": {
|
1787
|
+
"1": {
|
1788
|
+
"name": "punctuation.definition.comment.python"
|
1789
|
+
}
|
1790
|
+
},
|
1791
|
+
"end": "($)",
|
1792
|
+
"patterns": [
|
1793
|
+
{
|
1794
|
+
"include": "#codetags"
|
1795
|
+
}
|
1796
|
+
]
|
1797
|
+
},
|
1798
|
+
"comments-string-single-three": {
|
1799
|
+
"name": "comment.line.number-sign.python",
|
1800
|
+
"begin": "(\\#)",
|
1801
|
+
"beginCaptures": {
|
1802
|
+
"1": {
|
1803
|
+
"name": "punctuation.definition.comment.python"
|
1804
|
+
}
|
1805
|
+
},
|
1806
|
+
"end": "($|(?='''))",
|
1807
|
+
"patterns": [
|
1808
|
+
{
|
1809
|
+
"include": "#codetags"
|
1810
|
+
}
|
1811
|
+
]
|
1812
|
+
},
|
1813
|
+
"comments-string-double-three": {
|
1814
|
+
"name": "comment.line.number-sign.python",
|
1815
|
+
"begin": "(\\#)",
|
1816
|
+
"beginCaptures": {
|
1817
|
+
"1": {
|
1818
|
+
"name": "punctuation.definition.comment.python"
|
1819
|
+
}
|
1820
|
+
},
|
1821
|
+
"end": "($|(?=\"\"\"))",
|
1822
|
+
"patterns": [
|
1823
|
+
{
|
1824
|
+
"include": "#codetags"
|
1825
|
+
}
|
1826
|
+
]
|
1827
|
+
},
|
1828
|
+
"single-one-regexp-expression": {
|
1829
|
+
"patterns": [
|
1830
|
+
{
|
1831
|
+
"include": "#regexp-base-expression"
|
1832
|
+
},
|
1833
|
+
{
|
1834
|
+
"include": "#single-one-regexp-character-set"
|
1835
|
+
},
|
1836
|
+
{
|
1837
|
+
"include": "#single-one-regexp-comments"
|
1838
|
+
},
|
1839
|
+
{
|
1840
|
+
"include": "#regexp-flags"
|
1841
|
+
},
|
1842
|
+
{
|
1843
|
+
"include": "#single-one-regexp-named-group"
|
1844
|
+
},
|
1845
|
+
{
|
1846
|
+
"include": "#regexp-backreference"
|
1847
|
+
},
|
1848
|
+
{
|
1849
|
+
"include": "#single-one-regexp-lookahead"
|
1850
|
+
},
|
1851
|
+
{
|
1852
|
+
"include": "#single-one-regexp-lookahead-negative"
|
1853
|
+
},
|
1854
|
+
{
|
1855
|
+
"include": "#single-one-regexp-lookbehind"
|
1856
|
+
},
|
1857
|
+
{
|
1858
|
+
"include": "#single-one-regexp-lookbehind-negative"
|
1859
|
+
},
|
1860
|
+
{
|
1861
|
+
"include": "#single-one-regexp-conditional"
|
1862
|
+
},
|
1863
|
+
{
|
1864
|
+
"include": "#single-one-regexp-parentheses-non-capturing"
|
1865
|
+
},
|
1866
|
+
{
|
1867
|
+
"include": "#single-one-regexp-parentheses"
|
1868
|
+
}
|
1869
|
+
]
|
1870
|
+
},
|
1871
|
+
"single-one-regexp-character-set": {
|
1872
|
+
"patterns": [
|
1873
|
+
{
|
1874
|
+
"match": "(?x)\n \\[ \\^? \\] (?! .*?\\])\n"
|
1875
|
+
},
|
1876
|
+
{
|
1877
|
+
"name": "meta.character.set.regexp",
|
1878
|
+
"begin": "(\\[)(\\^)?(\\])?",
|
1879
|
+
"end": "(\\]|(?=\\'))|((?=(?<!\\\\)\\n))",
|
1880
|
+
"beginCaptures": {
|
1881
|
+
"1": {
|
1882
|
+
"name": "constant.other.set.regexp punctuation.character.set.begin.regexp"
|
1883
|
+
},
|
1884
|
+
"2": {
|
1885
|
+
"name": "keyword.operator.negation.regexp"
|
1886
|
+
},
|
1887
|
+
"3": {
|
1888
|
+
"name": "constant.character.set.regexp"
|
1889
|
+
}
|
1890
|
+
},
|
1891
|
+
"endCaptures": {
|
1892
|
+
"1": {
|
1893
|
+
"name": "constant.other.set.regexp punctuation.character.set.end.regexp"
|
1894
|
+
},
|
1895
|
+
"2": {
|
1896
|
+
"name": "invalid.illegal.newline.python"
|
1897
|
+
}
|
1898
|
+
},
|
1899
|
+
"patterns": [
|
1900
|
+
{
|
1901
|
+
"include": "#regexp-charecter-set-escapes"
|
1902
|
+
},
|
1903
|
+
{
|
1904
|
+
"name": "constant.character.set.regexp",
|
1905
|
+
"match": "[^\\n]"
|
1906
|
+
}
|
1907
|
+
]
|
1908
|
+
}
|
1909
|
+
]
|
1910
|
+
},
|
1911
|
+
"single-one-regexp-named-group": {
|
1912
|
+
"name": "meta.named.regexp",
|
1913
|
+
"begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n",
|
1914
|
+
"end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
|
1915
|
+
"beginCaptures": {
|
1916
|
+
"1": {
|
1917
|
+
"name": "punctuation.parenthesis.named.begin.regexp support.other.parenthesis.regexp"
|
1918
|
+
},
|
1919
|
+
"2": {
|
1920
|
+
"name": "entity.name.tag.named.group.regexp"
|
1921
|
+
}
|
1922
|
+
},
|
1923
|
+
"endCaptures": {
|
1924
|
+
"1": {
|
1925
|
+
"name": "punctuation.parenthesis.named.end.regexp support.other.parenthesis.regexp"
|
1926
|
+
},
|
1927
|
+
"2": {
|
1928
|
+
"name": "invalid.illegal.newline.python"
|
1929
|
+
}
|
1930
|
+
},
|
1931
|
+
"patterns": [
|
1932
|
+
{
|
1933
|
+
"include": "#single-one-regexp-expression"
|
1934
|
+
}
|
1935
|
+
]
|
1936
|
+
},
|
1937
|
+
"single-one-regexp-comments": {
|
1938
|
+
"name": "comment.regexp",
|
1939
|
+
"begin": "\\(\\?#",
|
1940
|
+
"end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
|
1941
|
+
"beginCaptures": {
|
1942
|
+
"0": {
|
1943
|
+
"name": "punctuation.comment.begin.regexp"
|
1944
|
+
}
|
1945
|
+
},
|
1946
|
+
"endCaptures": {
|
1947
|
+
"1": {
|
1948
|
+
"name": "punctuation.comment.end.regexp"
|
1949
|
+
},
|
1950
|
+
"2": {
|
1951
|
+
"name": "invalid.illegal.newline.python"
|
1952
|
+
}
|
1953
|
+
},
|
1954
|
+
"patterns": [
|
1955
|
+
{
|
1956
|
+
"include": "#codetags"
|
1957
|
+
}
|
1958
|
+
]
|
1959
|
+
},
|
1960
|
+
"single-one-regexp-lookahead": {
|
1961
|
+
"begin": "(\\()\\?=",
|
1962
|
+
"end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
|
1963
|
+
"beginCaptures": {
|
1964
|
+
"0": {
|
1965
|
+
"name": "keyword.operator.lookahead.regexp"
|
1966
|
+
},
|
1967
|
+
"1": {
|
1968
|
+
"name": "punctuation.parenthesis.lookahead.begin.regexp"
|
1969
|
+
}
|
1970
|
+
},
|
1971
|
+
"endCaptures": {
|
1972
|
+
"1": {
|
1973
|
+
"name": "punctuation.parenthesis.lookahead.end.regexp keyword.operator.lookahead.regexp"
|
1974
|
+
},
|
1975
|
+
"2": {
|
1976
|
+
"name": "invalid.illegal.newline.python"
|
1977
|
+
}
|
1978
|
+
},
|
1979
|
+
"patterns": [
|
1980
|
+
{
|
1981
|
+
"include": "#single-one-regexp-expression"
|
1982
|
+
}
|
1983
|
+
]
|
1984
|
+
},
|
1985
|
+
"single-one-regexp-lookahead-negative": {
|
1986
|
+
"begin": "(\\()\\?!",
|
1987
|
+
"end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
|
1988
|
+
"beginCaptures": {
|
1989
|
+
"0": {
|
1990
|
+
"name": "keyword.operator.lookahead.negative.regexp"
|
1991
|
+
},
|
1992
|
+
"1": {
|
1993
|
+
"name": "punctuation.parenthesis.lookahead.begin.regexp"
|
1994
|
+
}
|
1995
|
+
},
|
1996
|
+
"endCaptures": {
|
1997
|
+
"1": {
|
1998
|
+
"name": "punctuation.parenthesis.lookahead.end.regexp keyword.operator.lookahead.negative.regexp"
|
1999
|
+
},
|
2000
|
+
"2": {
|
2001
|
+
"name": "invalid.illegal.newline.python"
|
2002
|
+
}
|
2003
|
+
},
|
2004
|
+
"patterns": [
|
2005
|
+
{
|
2006
|
+
"include": "#single-one-regexp-expression"
|
2007
|
+
}
|
2008
|
+
]
|
2009
|
+
},
|
2010
|
+
"single-one-regexp-lookbehind": {
|
2011
|
+
"begin": "(\\()\\?<=",
|
2012
|
+
"end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
|
2013
|
+
"beginCaptures": {
|
2014
|
+
"0": {
|
2015
|
+
"name": "keyword.operator.lookbehind.regexp"
|
2016
|
+
},
|
2017
|
+
"1": {
|
2018
|
+
"name": "punctuation.parenthesis.lookbehind.begin.regexp"
|
2019
|
+
}
|
2020
|
+
},
|
2021
|
+
"endCaptures": {
|
2022
|
+
"1": {
|
2023
|
+
"name": "punctuation.parenthesis.lookbehind.end.regexp keyword.operator.lookbehind.regexp"
|
2024
|
+
},
|
2025
|
+
"2": {
|
2026
|
+
"name": "invalid.illegal.newline.python"
|
2027
|
+
}
|
2028
|
+
},
|
2029
|
+
"patterns": [
|
2030
|
+
{
|
2031
|
+
"include": "#single-one-regexp-expression"
|
2032
|
+
}
|
2033
|
+
]
|
2034
|
+
},
|
2035
|
+
"single-one-regexp-lookbehind-negative": {
|
2036
|
+
"begin": "(\\()\\?<!",
|
2037
|
+
"end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
|
2038
|
+
"beginCaptures": {
|
2039
|
+
"0": {
|
2040
|
+
"name": "keyword.operator.lookbehind.negative.regexp"
|
2041
|
+
},
|
2042
|
+
"1": {
|
2043
|
+
"name": "punctuation.parenthesis.lookbehind.begin.regexp"
|
2044
|
+
}
|
2045
|
+
},
|
2046
|
+
"endCaptures": {
|
2047
|
+
"1": {
|
2048
|
+
"name": "punctuation.parenthesis.lookbehind.end.regexp keyword.operator.lookbehind.negative.regexp"
|
2049
|
+
},
|
2050
|
+
"2": {
|
2051
|
+
"name": "invalid.illegal.newline.python"
|
2052
|
+
}
|
2053
|
+
},
|
2054
|
+
"patterns": [
|
2055
|
+
{
|
2056
|
+
"include": "#single-one-regexp-expression"
|
2057
|
+
}
|
2058
|
+
]
|
2059
|
+
},
|
2060
|
+
"single-one-regexp-conditional": {
|
2061
|
+
"begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)",
|
2062
|
+
"end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
|
2063
|
+
"beginCaptures": {
|
2064
|
+
"0": {
|
2065
|
+
"name": "keyword.operator.conditional.regexp"
|
2066
|
+
},
|
2067
|
+
"1": {
|
2068
|
+
"name": "punctuation.parenthesis.conditional.begin.regexp"
|
2069
|
+
}
|
2070
|
+
},
|
2071
|
+
"endCaptures": {
|
2072
|
+
"1": {
|
2073
|
+
"name": "punctuation.parenthesis.conditional.end.regexp keyword.operator.conditional.negative.regexp"
|
2074
|
+
},
|
2075
|
+
"2": {
|
2076
|
+
"name": "invalid.illegal.newline.python"
|
2077
|
+
}
|
2078
|
+
},
|
2079
|
+
"patterns": [
|
2080
|
+
{
|
2081
|
+
"include": "#single-one-regexp-expression"
|
2082
|
+
}
|
2083
|
+
]
|
2084
|
+
},
|
2085
|
+
"single-one-regexp-parentheses-non-capturing": {
|
2086
|
+
"begin": "\\(\\?:",
|
2087
|
+
"end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
|
2088
|
+
"beginCaptures": {
|
2089
|
+
"0": {
|
2090
|
+
"name": "punctuation.parenthesis.non-capturing.begin.regexp support.other.parenthesis.regexp"
|
2091
|
+
}
|
2092
|
+
},
|
2093
|
+
"endCaptures": {
|
2094
|
+
"1": {
|
2095
|
+
"name": "punctuation.parenthesis.non-capturing.end.regexp support.other.parenthesis.regexp"
|
2096
|
+
},
|
2097
|
+
"2": {
|
2098
|
+
"name": "invalid.illegal.newline.python"
|
2099
|
+
}
|
2100
|
+
},
|
2101
|
+
"patterns": [
|
2102
|
+
{
|
2103
|
+
"include": "#single-one-regexp-expression"
|
2104
|
+
}
|
2105
|
+
]
|
2106
|
+
},
|
2107
|
+
"single-one-regexp-parentheses": {
|
2108
|
+
"begin": "\\(",
|
2109
|
+
"end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
|
2110
|
+
"beginCaptures": {
|
2111
|
+
"0": {
|
2112
|
+
"name": "punctuation.parenthesis.begin.regexp support.other.parenthesis.regexp"
|
2113
|
+
}
|
2114
|
+
},
|
2115
|
+
"endCaptures": {
|
2116
|
+
"1": {
|
2117
|
+
"name": "punctuation.parenthesis.end.regexp support.other.parenthesis.regexp"
|
2118
|
+
},
|
2119
|
+
"2": {
|
2120
|
+
"name": "invalid.illegal.newline.python"
|
2121
|
+
}
|
2122
|
+
},
|
2123
|
+
"patterns": [
|
2124
|
+
{
|
2125
|
+
"include": "#single-one-regexp-expression"
|
2126
|
+
}
|
2127
|
+
]
|
2128
|
+
},
|
2129
|
+
"single-three-regexp-expression": {
|
2130
|
+
"patterns": [
|
2131
|
+
{
|
2132
|
+
"include": "#regexp-base-expression"
|
2133
|
+
},
|
2134
|
+
{
|
2135
|
+
"include": "#single-three-regexp-character-set"
|
2136
|
+
},
|
2137
|
+
{
|
2138
|
+
"include": "#single-three-regexp-comments"
|
2139
|
+
},
|
2140
|
+
{
|
2141
|
+
"include": "#regexp-flags"
|
2142
|
+
},
|
2143
|
+
{
|
2144
|
+
"include": "#single-three-regexp-named-group"
|
2145
|
+
},
|
2146
|
+
{
|
2147
|
+
"include": "#regexp-backreference"
|
2148
|
+
},
|
2149
|
+
{
|
2150
|
+
"include": "#single-three-regexp-lookahead"
|
2151
|
+
},
|
2152
|
+
{
|
2153
|
+
"include": "#single-three-regexp-lookahead-negative"
|
2154
|
+
},
|
2155
|
+
{
|
2156
|
+
"include": "#single-three-regexp-lookbehind"
|
2157
|
+
},
|
2158
|
+
{
|
2159
|
+
"include": "#single-three-regexp-lookbehind-negative"
|
2160
|
+
},
|
2161
|
+
{
|
2162
|
+
"include": "#single-three-regexp-conditional"
|
2163
|
+
},
|
2164
|
+
{
|
2165
|
+
"include": "#single-three-regexp-parentheses-non-capturing"
|
2166
|
+
},
|
2167
|
+
{
|
2168
|
+
"include": "#single-three-regexp-parentheses"
|
2169
|
+
},
|
2170
|
+
{
|
2171
|
+
"include": "#comments-string-single-three"
|
2172
|
+
}
|
2173
|
+
]
|
2174
|
+
},
|
2175
|
+
"single-three-regexp-character-set": {
|
2176
|
+
"patterns": [
|
2177
|
+
{
|
2178
|
+
"match": "(?x)\n \\[ \\^? \\] (?! .*?\\])\n"
|
2179
|
+
},
|
2180
|
+
{
|
2181
|
+
"name": "meta.character.set.regexp",
|
2182
|
+
"begin": "(\\[)(\\^)?(\\])?",
|
2183
|
+
"end": "(\\]|(?=\\'\\'\\'))",
|
2184
|
+
"beginCaptures": {
|
2185
|
+
"1": {
|
2186
|
+
"name": "constant.other.set.regexp punctuation.character.set.begin.regexp"
|
2187
|
+
},
|
2188
|
+
"2": {
|
2189
|
+
"name": "keyword.operator.negation.regexp"
|
2190
|
+
},
|
2191
|
+
"3": {
|
2192
|
+
"name": "constant.character.set.regexp"
|
2193
|
+
}
|
2194
|
+
},
|
2195
|
+
"endCaptures": {
|
2196
|
+
"1": {
|
2197
|
+
"name": "constant.other.set.regexp punctuation.character.set.end.regexp"
|
2198
|
+
},
|
2199
|
+
"2": {
|
2200
|
+
"name": "invalid.illegal.newline.python"
|
2201
|
+
}
|
2202
|
+
},
|
2203
|
+
"patterns": [
|
2204
|
+
{
|
2205
|
+
"include": "#regexp-charecter-set-escapes"
|
2206
|
+
},
|
2207
|
+
{
|
2208
|
+
"name": "constant.character.set.regexp",
|
2209
|
+
"match": "[^\\n]"
|
2210
|
+
}
|
2211
|
+
]
|
2212
|
+
}
|
2213
|
+
]
|
2214
|
+
},
|
2215
|
+
"single-three-regexp-named-group": {
|
2216
|
+
"name": "meta.named.regexp",
|
2217
|
+
"begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n",
|
2218
|
+
"end": "(\\)|(?=\\'\\'\\'))",
|
2219
|
+
"beginCaptures": {
|
2220
|
+
"1": {
|
2221
|
+
"name": "punctuation.parenthesis.named.begin.regexp support.other.parenthesis.regexp"
|
2222
|
+
},
|
2223
|
+
"2": {
|
2224
|
+
"name": "entity.name.tag.named.group.regexp"
|
2225
|
+
}
|
2226
|
+
},
|
2227
|
+
"endCaptures": {
|
2228
|
+
"1": {
|
2229
|
+
"name": "punctuation.parenthesis.named.end.regexp support.other.parenthesis.regexp"
|
2230
|
+
},
|
2231
|
+
"2": {
|
2232
|
+
"name": "invalid.illegal.newline.python"
|
2233
|
+
}
|
2234
|
+
},
|
2235
|
+
"patterns": [
|
2236
|
+
{
|
2237
|
+
"include": "#single-three-regexp-expression"
|
2238
|
+
},
|
2239
|
+
{
|
2240
|
+
"include": "#comments-string-single-three"
|
2241
|
+
}
|
2242
|
+
]
|
2243
|
+
},
|
2244
|
+
"single-three-regexp-comments": {
|
2245
|
+
"name": "comment.regexp",
|
2246
|
+
"begin": "\\(\\?#",
|
2247
|
+
"end": "(\\)|(?=\\'\\'\\'))",
|
2248
|
+
"beginCaptures": {
|
2249
|
+
"0": {
|
2250
|
+
"name": "punctuation.comment.begin.regexp"
|
2251
|
+
}
|
2252
|
+
},
|
2253
|
+
"endCaptures": {
|
2254
|
+
"1": {
|
2255
|
+
"name": "punctuation.comment.end.regexp"
|
2256
|
+
},
|
2257
|
+
"2": {
|
2258
|
+
"name": "invalid.illegal.newline.python"
|
2259
|
+
}
|
2260
|
+
},
|
2261
|
+
"patterns": [
|
2262
|
+
{
|
2263
|
+
"include": "#codetags"
|
2264
|
+
}
|
2265
|
+
]
|
2266
|
+
},
|
2267
|
+
"single-three-regexp-lookahead": {
|
2268
|
+
"begin": "(\\()\\?=",
|
2269
|
+
"end": "(\\)|(?=\\'\\'\\'))",
|
2270
|
+
"beginCaptures": {
|
2271
|
+
"0": {
|
2272
|
+
"name": "keyword.operator.lookahead.regexp"
|
2273
|
+
},
|
2274
|
+
"1": {
|
2275
|
+
"name": "punctuation.parenthesis.lookahead.begin.regexp"
|
2276
|
+
}
|
2277
|
+
},
|
2278
|
+
"endCaptures": {
|
2279
|
+
"1": {
|
2280
|
+
"name": "punctuation.parenthesis.lookahead.end.regexp keyword.operator.lookahead.regexp"
|
2281
|
+
},
|
2282
|
+
"2": {
|
2283
|
+
"name": "invalid.illegal.newline.python"
|
2284
|
+
}
|
2285
|
+
},
|
2286
|
+
"patterns": [
|
2287
|
+
{
|
2288
|
+
"include": "#single-three-regexp-expression"
|
2289
|
+
},
|
2290
|
+
{
|
2291
|
+
"include": "#comments-string-single-three"
|
2292
|
+
}
|
2293
|
+
]
|
2294
|
+
},
|
2295
|
+
"single-three-regexp-lookahead-negative": {
|
2296
|
+
"begin": "(\\()\\?!",
|
2297
|
+
"end": "(\\)|(?=\\'\\'\\'))",
|
2298
|
+
"beginCaptures": {
|
2299
|
+
"0": {
|
2300
|
+
"name": "keyword.operator.lookahead.negative.regexp"
|
2301
|
+
},
|
2302
|
+
"1": {
|
2303
|
+
"name": "punctuation.parenthesis.lookahead.begin.regexp"
|
2304
|
+
}
|
2305
|
+
},
|
2306
|
+
"endCaptures": {
|
2307
|
+
"1": {
|
2308
|
+
"name": "punctuation.parenthesis.lookahead.end.regexp keyword.operator.lookahead.negative.regexp"
|
2309
|
+
},
|
2310
|
+
"2": {
|
2311
|
+
"name": "invalid.illegal.newline.python"
|
2312
|
+
}
|
2313
|
+
},
|
2314
|
+
"patterns": [
|
2315
|
+
{
|
2316
|
+
"include": "#single-three-regexp-expression"
|
2317
|
+
},
|
2318
|
+
{
|
2319
|
+
"include": "#comments-string-single-three"
|
2320
|
+
}
|
2321
|
+
]
|
2322
|
+
},
|
2323
|
+
"single-three-regexp-lookbehind": {
|
2324
|
+
"begin": "(\\()\\?<=",
|
2325
|
+
"end": "(\\)|(?=\\'\\'\\'))",
|
2326
|
+
"beginCaptures": {
|
2327
|
+
"0": {
|
2328
|
+
"name": "keyword.operator.lookbehind.regexp"
|
2329
|
+
},
|
2330
|
+
"1": {
|
2331
|
+
"name": "punctuation.parenthesis.lookbehind.begin.regexp"
|
2332
|
+
}
|
2333
|
+
},
|
2334
|
+
"endCaptures": {
|
2335
|
+
"1": {
|
2336
|
+
"name": "punctuation.parenthesis.lookbehind.end.regexp keyword.operator.lookbehind.regexp"
|
2337
|
+
},
|
2338
|
+
"2": {
|
2339
|
+
"name": "invalid.illegal.newline.python"
|
2340
|
+
}
|
2341
|
+
},
|
2342
|
+
"patterns": [
|
2343
|
+
{
|
2344
|
+
"include": "#single-three-regexp-expression"
|
2345
|
+
},
|
2346
|
+
{
|
2347
|
+
"include": "#comments-string-single-three"
|
2348
|
+
}
|
2349
|
+
]
|
2350
|
+
},
|
2351
|
+
"single-three-regexp-lookbehind-negative": {
|
2352
|
+
"begin": "(\\()\\?<!",
|
2353
|
+
"end": "(\\)|(?=\\'\\'\\'))",
|
2354
|
+
"beginCaptures": {
|
2355
|
+
"0": {
|
2356
|
+
"name": "keyword.operator.lookbehind.negative.regexp"
|
2357
|
+
},
|
2358
|
+
"1": {
|
2359
|
+
"name": "punctuation.parenthesis.lookbehind.begin.regexp"
|
2360
|
+
}
|
2361
|
+
},
|
2362
|
+
"endCaptures": {
|
2363
|
+
"1": {
|
2364
|
+
"name": "punctuation.parenthesis.lookbehind.end.regexp keyword.operator.lookbehind.negative.regexp"
|
2365
|
+
},
|
2366
|
+
"2": {
|
2367
|
+
"name": "invalid.illegal.newline.python"
|
2368
|
+
}
|
2369
|
+
},
|
2370
|
+
"patterns": [
|
2371
|
+
{
|
2372
|
+
"include": "#single-three-regexp-expression"
|
2373
|
+
},
|
2374
|
+
{
|
2375
|
+
"include": "#comments-string-single-three"
|
2376
|
+
}
|
2377
|
+
]
|
2378
|
+
},
|
2379
|
+
"single-three-regexp-conditional": {
|
2380
|
+
"begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)",
|
2381
|
+
"end": "(\\)|(?=\\'\\'\\'))",
|
2382
|
+
"beginCaptures": {
|
2383
|
+
"0": {
|
2384
|
+
"name": "keyword.operator.conditional.regexp"
|
2385
|
+
},
|
2386
|
+
"1": {
|
2387
|
+
"name": "punctuation.parenthesis.conditional.begin.regexp"
|
2388
|
+
}
|
2389
|
+
},
|
2390
|
+
"endCaptures": {
|
2391
|
+
"1": {
|
2392
|
+
"name": "punctuation.parenthesis.conditional.end.regexp keyword.operator.conditional.negative.regexp"
|
2393
|
+
},
|
2394
|
+
"2": {
|
2395
|
+
"name": "invalid.illegal.newline.python"
|
2396
|
+
}
|
2397
|
+
},
|
2398
|
+
"patterns": [
|
2399
|
+
{
|
2400
|
+
"include": "#single-three-regexp-expression"
|
2401
|
+
},
|
2402
|
+
{
|
2403
|
+
"include": "#comments-string-single-three"
|
2404
|
+
}
|
2405
|
+
]
|
2406
|
+
},
|
2407
|
+
"single-three-regexp-parentheses-non-capturing": {
|
2408
|
+
"begin": "\\(\\?:",
|
2409
|
+
"end": "(\\)|(?=\\'\\'\\'))",
|
2410
|
+
"beginCaptures": {
|
2411
|
+
"0": {
|
2412
|
+
"name": "punctuation.parenthesis.non-capturing.begin.regexp support.other.parenthesis.regexp"
|
2413
|
+
}
|
2414
|
+
},
|
2415
|
+
"endCaptures": {
|
2416
|
+
"1": {
|
2417
|
+
"name": "punctuation.parenthesis.non-capturing.end.regexp support.other.parenthesis.regexp"
|
2418
|
+
},
|
2419
|
+
"2": {
|
2420
|
+
"name": "invalid.illegal.newline.python"
|
2421
|
+
}
|
2422
|
+
},
|
2423
|
+
"patterns": [
|
2424
|
+
{
|
2425
|
+
"include": "#single-three-regexp-expression"
|
2426
|
+
},
|
2427
|
+
{
|
2428
|
+
"include": "#comments-string-single-three"
|
2429
|
+
}
|
2430
|
+
]
|
2431
|
+
},
|
2432
|
+
"single-three-regexp-parentheses": {
|
2433
|
+
"begin": "\\(",
|
2434
|
+
"end": "(\\)|(?=\\'\\'\\'))",
|
2435
|
+
"beginCaptures": {
|
2436
|
+
"0": {
|
2437
|
+
"name": "punctuation.parenthesis.begin.regexp support.other.parenthesis.regexp"
|
2438
|
+
}
|
2439
|
+
},
|
2440
|
+
"endCaptures": {
|
2441
|
+
"1": {
|
2442
|
+
"name": "punctuation.parenthesis.end.regexp support.other.parenthesis.regexp"
|
2443
|
+
},
|
2444
|
+
"2": {
|
2445
|
+
"name": "invalid.illegal.newline.python"
|
2446
|
+
}
|
2447
|
+
},
|
2448
|
+
"patterns": [
|
2449
|
+
{
|
2450
|
+
"include": "#single-three-regexp-expression"
|
2451
|
+
},
|
2452
|
+
{
|
2453
|
+
"include": "#comments-string-single-three"
|
2454
|
+
}
|
2455
|
+
]
|
2456
|
+
},
|
2457
|
+
"double-one-regexp-expression": {
|
2458
|
+
"patterns": [
|
2459
|
+
{
|
2460
|
+
"include": "#regexp-base-expression"
|
2461
|
+
},
|
2462
|
+
{
|
2463
|
+
"include": "#double-one-regexp-character-set"
|
2464
|
+
},
|
2465
|
+
{
|
2466
|
+
"include": "#double-one-regexp-comments"
|
2467
|
+
},
|
2468
|
+
{
|
2469
|
+
"include": "#regexp-flags"
|
2470
|
+
},
|
2471
|
+
{
|
2472
|
+
"include": "#double-one-regexp-named-group"
|
2473
|
+
},
|
2474
|
+
{
|
2475
|
+
"include": "#regexp-backreference"
|
2476
|
+
},
|
2477
|
+
{
|
2478
|
+
"include": "#double-one-regexp-lookahead"
|
2479
|
+
},
|
2480
|
+
{
|
2481
|
+
"include": "#double-one-regexp-lookahead-negative"
|
2482
|
+
},
|
2483
|
+
{
|
2484
|
+
"include": "#double-one-regexp-lookbehind"
|
2485
|
+
},
|
2486
|
+
{
|
2487
|
+
"include": "#double-one-regexp-lookbehind-negative"
|
2488
|
+
},
|
2489
|
+
{
|
2490
|
+
"include": "#double-one-regexp-conditional"
|
2491
|
+
},
|
2492
|
+
{
|
2493
|
+
"include": "#double-one-regexp-parentheses-non-capturing"
|
2494
|
+
},
|
2495
|
+
{
|
2496
|
+
"include": "#double-one-regexp-parentheses"
|
2497
|
+
}
|
2498
|
+
]
|
2499
|
+
},
|
2500
|
+
"double-one-regexp-character-set": {
|
2501
|
+
"patterns": [
|
2502
|
+
{
|
2503
|
+
"match": "(?x)\n \\[ \\^? \\] (?! .*?\\])\n"
|
2504
|
+
},
|
2505
|
+
{
|
2506
|
+
"name": "meta.character.set.regexp",
|
2507
|
+
"begin": "(\\[)(\\^)?(\\])?",
|
2508
|
+
"end": "(\\]|(?=\"))|((?=(?<!\\\\)\\n))",
|
2509
|
+
"beginCaptures": {
|
2510
|
+
"1": {
|
2511
|
+
"name": "constant.other.set.regexp punctuation.character.set.begin.regexp"
|
2512
|
+
},
|
2513
|
+
"2": {
|
2514
|
+
"name": "keyword.operator.negation.regexp"
|
2515
|
+
},
|
2516
|
+
"3": {
|
2517
|
+
"name": "constant.character.set.regexp"
|
2518
|
+
}
|
2519
|
+
},
|
2520
|
+
"endCaptures": {
|
2521
|
+
"1": {
|
2522
|
+
"name": "constant.other.set.regexp punctuation.character.set.end.regexp"
|
2523
|
+
},
|
2524
|
+
"2": {
|
2525
|
+
"name": "invalid.illegal.newline.python"
|
2526
|
+
}
|
2527
|
+
},
|
2528
|
+
"patterns": [
|
2529
|
+
{
|
2530
|
+
"include": "#regexp-charecter-set-escapes"
|
2531
|
+
},
|
2532
|
+
{
|
2533
|
+
"name": "constant.character.set.regexp",
|
2534
|
+
"match": "[^\\n]"
|
2535
|
+
}
|
2536
|
+
]
|
2537
|
+
}
|
2538
|
+
]
|
2539
|
+
},
|
2540
|
+
"double-one-regexp-named-group": {
|
2541
|
+
"name": "meta.named.regexp",
|
2542
|
+
"begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n",
|
2543
|
+
"end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
|
2544
|
+
"beginCaptures": {
|
2545
|
+
"1": {
|
2546
|
+
"name": "punctuation.parenthesis.named.begin.regexp support.other.parenthesis.regexp"
|
2547
|
+
},
|
2548
|
+
"2": {
|
2549
|
+
"name": "entity.name.tag.named.group.regexp"
|
2550
|
+
}
|
2551
|
+
},
|
2552
|
+
"endCaptures": {
|
2553
|
+
"1": {
|
2554
|
+
"name": "punctuation.parenthesis.named.end.regexp support.other.parenthesis.regexp"
|
2555
|
+
},
|
2556
|
+
"2": {
|
2557
|
+
"name": "invalid.illegal.newline.python"
|
2558
|
+
}
|
2559
|
+
},
|
2560
|
+
"patterns": [
|
2561
|
+
{
|
2562
|
+
"include": "#double-one-regexp-expression"
|
2563
|
+
}
|
2564
|
+
]
|
2565
|
+
},
|
2566
|
+
"double-one-regexp-comments": {
|
2567
|
+
"name": "comment.regexp",
|
2568
|
+
"begin": "\\(\\?#",
|
2569
|
+
"end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
|
2570
|
+
"beginCaptures": {
|
2571
|
+
"0": {
|
2572
|
+
"name": "punctuation.comment.begin.regexp"
|
2573
|
+
}
|
2574
|
+
},
|
2575
|
+
"endCaptures": {
|
2576
|
+
"1": {
|
2577
|
+
"name": "punctuation.comment.end.regexp"
|
2578
|
+
},
|
2579
|
+
"2": {
|
2580
|
+
"name": "invalid.illegal.newline.python"
|
2581
|
+
}
|
2582
|
+
},
|
2583
|
+
"patterns": [
|
2584
|
+
{
|
2585
|
+
"include": "#codetags"
|
2586
|
+
}
|
2587
|
+
]
|
2588
|
+
},
|
2589
|
+
"double-one-regexp-lookahead": {
|
2590
|
+
"begin": "(\\()\\?=",
|
2591
|
+
"end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
|
2592
|
+
"beginCaptures": {
|
2593
|
+
"0": {
|
2594
|
+
"name": "keyword.operator.lookahead.regexp"
|
2595
|
+
},
|
2596
|
+
"1": {
|
2597
|
+
"name": "punctuation.parenthesis.lookahead.begin.regexp"
|
2598
|
+
}
|
2599
|
+
},
|
2600
|
+
"endCaptures": {
|
2601
|
+
"1": {
|
2602
|
+
"name": "punctuation.parenthesis.lookahead.end.regexp keyword.operator.lookahead.regexp"
|
2603
|
+
},
|
2604
|
+
"2": {
|
2605
|
+
"name": "invalid.illegal.newline.python"
|
2606
|
+
}
|
2607
|
+
},
|
2608
|
+
"patterns": [
|
2609
|
+
{
|
2610
|
+
"include": "#double-one-regexp-expression"
|
2611
|
+
}
|
2612
|
+
]
|
2613
|
+
},
|
2614
|
+
"double-one-regexp-lookahead-negative": {
|
2615
|
+
"begin": "(\\()\\?!",
|
2616
|
+
"end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
|
2617
|
+
"beginCaptures": {
|
2618
|
+
"0": {
|
2619
|
+
"name": "keyword.operator.lookahead.negative.regexp"
|
2620
|
+
},
|
2621
|
+
"1": {
|
2622
|
+
"name": "punctuation.parenthesis.lookahead.begin.regexp"
|
2623
|
+
}
|
2624
|
+
},
|
2625
|
+
"endCaptures": {
|
2626
|
+
"1": {
|
2627
|
+
"name": "punctuation.parenthesis.lookahead.end.regexp keyword.operator.lookahead.negative.regexp"
|
2628
|
+
},
|
2629
|
+
"2": {
|
2630
|
+
"name": "invalid.illegal.newline.python"
|
2631
|
+
}
|
2632
|
+
},
|
2633
|
+
"patterns": [
|
2634
|
+
{
|
2635
|
+
"include": "#double-one-regexp-expression"
|
2636
|
+
}
|
2637
|
+
]
|
2638
|
+
},
|
2639
|
+
"double-one-regexp-lookbehind": {
|
2640
|
+
"begin": "(\\()\\?<=",
|
2641
|
+
"end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
|
2642
|
+
"beginCaptures": {
|
2643
|
+
"0": {
|
2644
|
+
"name": "keyword.operator.lookbehind.regexp"
|
2645
|
+
},
|
2646
|
+
"1": {
|
2647
|
+
"name": "punctuation.parenthesis.lookbehind.begin.regexp"
|
2648
|
+
}
|
2649
|
+
},
|
2650
|
+
"endCaptures": {
|
2651
|
+
"1": {
|
2652
|
+
"name": "punctuation.parenthesis.lookbehind.end.regexp keyword.operator.lookbehind.regexp"
|
2653
|
+
},
|
2654
|
+
"2": {
|
2655
|
+
"name": "invalid.illegal.newline.python"
|
2656
|
+
}
|
2657
|
+
},
|
2658
|
+
"patterns": [
|
2659
|
+
{
|
2660
|
+
"include": "#double-one-regexp-expression"
|
2661
|
+
}
|
2662
|
+
]
|
2663
|
+
},
|
2664
|
+
"double-one-regexp-lookbehind-negative": {
|
2665
|
+
"begin": "(\\()\\?<!",
|
2666
|
+
"end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
|
2667
|
+
"beginCaptures": {
|
2668
|
+
"0": {
|
2669
|
+
"name": "keyword.operator.lookbehind.negative.regexp"
|
2670
|
+
},
|
2671
|
+
"1": {
|
2672
|
+
"name": "punctuation.parenthesis.lookbehind.begin.regexp"
|
2673
|
+
}
|
2674
|
+
},
|
2675
|
+
"endCaptures": {
|
2676
|
+
"1": {
|
2677
|
+
"name": "punctuation.parenthesis.lookbehind.end.regexp keyword.operator.lookbehind.negative.regexp"
|
2678
|
+
},
|
2679
|
+
"2": {
|
2680
|
+
"name": "invalid.illegal.newline.python"
|
2681
|
+
}
|
2682
|
+
},
|
2683
|
+
"patterns": [
|
2684
|
+
{
|
2685
|
+
"include": "#double-one-regexp-expression"
|
2686
|
+
}
|
2687
|
+
]
|
2688
|
+
},
|
2689
|
+
"double-one-regexp-conditional": {
|
2690
|
+
"begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)",
|
2691
|
+
"end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
|
2692
|
+
"beginCaptures": {
|
2693
|
+
"0": {
|
2694
|
+
"name": "keyword.operator.conditional.regexp"
|
2695
|
+
},
|
2696
|
+
"1": {
|
2697
|
+
"name": "punctuation.parenthesis.conditional.begin.regexp"
|
2698
|
+
}
|
2699
|
+
},
|
2700
|
+
"endCaptures": {
|
2701
|
+
"1": {
|
2702
|
+
"name": "punctuation.parenthesis.conditional.end.regexp keyword.operator.conditional.negative.regexp"
|
2703
|
+
},
|
2704
|
+
"2": {
|
2705
|
+
"name": "invalid.illegal.newline.python"
|
2706
|
+
}
|
2707
|
+
},
|
2708
|
+
"patterns": [
|
2709
|
+
{
|
2710
|
+
"include": "#double-one-regexp-expression"
|
2711
|
+
}
|
2712
|
+
]
|
2713
|
+
},
|
2714
|
+
"double-one-regexp-parentheses-non-capturing": {
|
2715
|
+
"begin": "\\(\\?:",
|
2716
|
+
"end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
|
2717
|
+
"beginCaptures": {
|
2718
|
+
"0": {
|
2719
|
+
"name": "punctuation.parenthesis.non-capturing.begin.regexp support.other.parenthesis.regexp"
|
2720
|
+
}
|
2721
|
+
},
|
2722
|
+
"endCaptures": {
|
2723
|
+
"1": {
|
2724
|
+
"name": "punctuation.parenthesis.non-capturing.end.regexp support.other.parenthesis.regexp"
|
2725
|
+
},
|
2726
|
+
"2": {
|
2727
|
+
"name": "invalid.illegal.newline.python"
|
2728
|
+
}
|
2729
|
+
},
|
2730
|
+
"patterns": [
|
2731
|
+
{
|
2732
|
+
"include": "#double-one-regexp-expression"
|
2733
|
+
}
|
2734
|
+
]
|
2735
|
+
},
|
2736
|
+
"double-one-regexp-parentheses": {
|
2737
|
+
"begin": "\\(",
|
2738
|
+
"end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
|
2739
|
+
"beginCaptures": {
|
2740
|
+
"0": {
|
2741
|
+
"name": "punctuation.parenthesis.begin.regexp support.other.parenthesis.regexp"
|
2742
|
+
}
|
2743
|
+
},
|
2744
|
+
"endCaptures": {
|
2745
|
+
"1": {
|
2746
|
+
"name": "punctuation.parenthesis.end.regexp support.other.parenthesis.regexp"
|
2747
|
+
},
|
2748
|
+
"2": {
|
2749
|
+
"name": "invalid.illegal.newline.python"
|
2750
|
+
}
|
2751
|
+
},
|
2752
|
+
"patterns": [
|
2753
|
+
{
|
2754
|
+
"include": "#double-one-regexp-expression"
|
2755
|
+
}
|
2756
|
+
]
|
2757
|
+
},
|
2758
|
+
"double-three-regexp-expression": {
|
2759
|
+
"patterns": [
|
2760
|
+
{
|
2761
|
+
"include": "#regexp-base-expression"
|
2762
|
+
},
|
2763
|
+
{
|
2764
|
+
"include": "#double-three-regexp-character-set"
|
2765
|
+
},
|
2766
|
+
{
|
2767
|
+
"include": "#double-three-regexp-comments"
|
2768
|
+
},
|
2769
|
+
{
|
2770
|
+
"include": "#regexp-flags"
|
2771
|
+
},
|
2772
|
+
{
|
2773
|
+
"include": "#double-three-regexp-named-group"
|
2774
|
+
},
|
2775
|
+
{
|
2776
|
+
"include": "#regexp-backreference"
|
2777
|
+
},
|
2778
|
+
{
|
2779
|
+
"include": "#double-three-regexp-lookahead"
|
2780
|
+
},
|
2781
|
+
{
|
2782
|
+
"include": "#double-three-regexp-lookahead-negative"
|
2783
|
+
},
|
2784
|
+
{
|
2785
|
+
"include": "#double-three-regexp-lookbehind"
|
2786
|
+
},
|
2787
|
+
{
|
2788
|
+
"include": "#double-three-regexp-lookbehind-negative"
|
2789
|
+
},
|
2790
|
+
{
|
2791
|
+
"include": "#double-three-regexp-conditional"
|
2792
|
+
},
|
2793
|
+
{
|
2794
|
+
"include": "#double-three-regexp-parentheses-non-capturing"
|
2795
|
+
},
|
2796
|
+
{
|
2797
|
+
"include": "#double-three-regexp-parentheses"
|
2798
|
+
},
|
2799
|
+
{
|
2800
|
+
"include": "#comments-string-double-three"
|
2801
|
+
}
|
2802
|
+
]
|
2803
|
+
},
|
2804
|
+
"double-three-regexp-character-set": {
|
2805
|
+
"patterns": [
|
2806
|
+
{
|
2807
|
+
"match": "(?x)\n \\[ \\^? \\] (?! .*?\\])\n"
|
2808
|
+
},
|
2809
|
+
{
|
2810
|
+
"name": "meta.character.set.regexp",
|
2811
|
+
"begin": "(\\[)(\\^)?(\\])?",
|
2812
|
+
"end": "(\\]|(?=\"\"\"))",
|
2813
|
+
"beginCaptures": {
|
2814
|
+
"1": {
|
2815
|
+
"name": "constant.other.set.regexp punctuation.character.set.begin.regexp"
|
2816
|
+
},
|
2817
|
+
"2": {
|
2818
|
+
"name": "keyword.operator.negation.regexp"
|
2819
|
+
},
|
2820
|
+
"3": {
|
2821
|
+
"name": "constant.character.set.regexp"
|
2822
|
+
}
|
2823
|
+
},
|
2824
|
+
"endCaptures": {
|
2825
|
+
"1": {
|
2826
|
+
"name": "constant.other.set.regexp punctuation.character.set.end.regexp"
|
2827
|
+
},
|
2828
|
+
"2": {
|
2829
|
+
"name": "invalid.illegal.newline.python"
|
2830
|
+
}
|
2831
|
+
},
|
2832
|
+
"patterns": [
|
2833
|
+
{
|
2834
|
+
"include": "#regexp-charecter-set-escapes"
|
2835
|
+
},
|
2836
|
+
{
|
2837
|
+
"name": "constant.character.set.regexp",
|
2838
|
+
"match": "[^\\n]"
|
2839
|
+
}
|
2840
|
+
]
|
2841
|
+
}
|
2842
|
+
]
|
2843
|
+
},
|
2844
|
+
"double-three-regexp-named-group": {
|
2845
|
+
"name": "meta.named.regexp",
|
2846
|
+
"begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n",
|
2847
|
+
"end": "(\\)|(?=\"\"\"))",
|
2848
|
+
"beginCaptures": {
|
2849
|
+
"1": {
|
2850
|
+
"name": "punctuation.parenthesis.named.begin.regexp support.other.parenthesis.regexp"
|
2851
|
+
},
|
2852
|
+
"2": {
|
2853
|
+
"name": "entity.name.tag.named.group.regexp"
|
2854
|
+
}
|
2855
|
+
},
|
2856
|
+
"endCaptures": {
|
2857
|
+
"1": {
|
2858
|
+
"name": "punctuation.parenthesis.named.end.regexp support.other.parenthesis.regexp"
|
2859
|
+
},
|
2860
|
+
"2": {
|
2861
|
+
"name": "invalid.illegal.newline.python"
|
2862
|
+
}
|
2863
|
+
},
|
2864
|
+
"patterns": [
|
2865
|
+
{
|
2866
|
+
"include": "#double-three-regexp-expression"
|
2867
|
+
},
|
2868
|
+
{
|
2869
|
+
"include": "#comments-string-double-three"
|
2870
|
+
}
|
2871
|
+
]
|
2872
|
+
},
|
2873
|
+
"double-three-regexp-comments": {
|
2874
|
+
"name": "comment.regexp",
|
2875
|
+
"begin": "\\(\\?#",
|
2876
|
+
"end": "(\\)|(?=\"\"\"))",
|
2877
|
+
"beginCaptures": {
|
2878
|
+
"0": {
|
2879
|
+
"name": "punctuation.comment.begin.regexp"
|
2880
|
+
}
|
2881
|
+
},
|
2882
|
+
"endCaptures": {
|
2883
|
+
"1": {
|
2884
|
+
"name": "punctuation.comment.end.regexp"
|
2885
|
+
},
|
2886
|
+
"2": {
|
2887
|
+
"name": "invalid.illegal.newline.python"
|
2888
|
+
}
|
2889
|
+
},
|
2890
|
+
"patterns": [
|
2891
|
+
{
|
2892
|
+
"include": "#codetags"
|
2893
|
+
}
|
2894
|
+
]
|
2895
|
+
},
|
2896
|
+
"double-three-regexp-lookahead": {
|
2897
|
+
"begin": "(\\()\\?=",
|
2898
|
+
"end": "(\\)|(?=\"\"\"))",
|
2899
|
+
"beginCaptures": {
|
2900
|
+
"0": {
|
2901
|
+
"name": "keyword.operator.lookahead.regexp"
|
2902
|
+
},
|
2903
|
+
"1": {
|
2904
|
+
"name": "punctuation.parenthesis.lookahead.begin.regexp"
|
2905
|
+
}
|
2906
|
+
},
|
2907
|
+
"endCaptures": {
|
2908
|
+
"1": {
|
2909
|
+
"name": "punctuation.parenthesis.lookahead.end.regexp keyword.operator.lookahead.regexp"
|
2910
|
+
},
|
2911
|
+
"2": {
|
2912
|
+
"name": "invalid.illegal.newline.python"
|
2913
|
+
}
|
2914
|
+
},
|
2915
|
+
"patterns": [
|
2916
|
+
{
|
2917
|
+
"include": "#double-three-regexp-expression"
|
2918
|
+
},
|
2919
|
+
{
|
2920
|
+
"include": "#comments-string-double-three"
|
2921
|
+
}
|
2922
|
+
]
|
2923
|
+
},
|
2924
|
+
"double-three-regexp-lookahead-negative": {
|
2925
|
+
"begin": "(\\()\\?!",
|
2926
|
+
"end": "(\\)|(?=\"\"\"))",
|
2927
|
+
"beginCaptures": {
|
2928
|
+
"0": {
|
2929
|
+
"name": "keyword.operator.lookahead.negative.regexp"
|
2930
|
+
},
|
2931
|
+
"1": {
|
2932
|
+
"name": "punctuation.parenthesis.lookahead.begin.regexp"
|
2933
|
+
}
|
2934
|
+
},
|
2935
|
+
"endCaptures": {
|
2936
|
+
"1": {
|
2937
|
+
"name": "punctuation.parenthesis.lookahead.end.regexp keyword.operator.lookahead.negative.regexp"
|
2938
|
+
},
|
2939
|
+
"2": {
|
2940
|
+
"name": "invalid.illegal.newline.python"
|
2941
|
+
}
|
2942
|
+
},
|
2943
|
+
"patterns": [
|
2944
|
+
{
|
2945
|
+
"include": "#double-three-regexp-expression"
|
2946
|
+
},
|
2947
|
+
{
|
2948
|
+
"include": "#comments-string-double-three"
|
2949
|
+
}
|
2950
|
+
]
|
2951
|
+
},
|
2952
|
+
"double-three-regexp-lookbehind": {
|
2953
|
+
"begin": "(\\()\\?<=",
|
2954
|
+
"end": "(\\)|(?=\"\"\"))",
|
2955
|
+
"beginCaptures": {
|
2956
|
+
"0": {
|
2957
|
+
"name": "keyword.operator.lookbehind.regexp"
|
2958
|
+
},
|
2959
|
+
"1": {
|
2960
|
+
"name": "punctuation.parenthesis.lookbehind.begin.regexp"
|
2961
|
+
}
|
2962
|
+
},
|
2963
|
+
"endCaptures": {
|
2964
|
+
"1": {
|
2965
|
+
"name": "punctuation.parenthesis.lookbehind.end.regexp keyword.operator.lookbehind.regexp"
|
2966
|
+
},
|
2967
|
+
"2": {
|
2968
|
+
"name": "invalid.illegal.newline.python"
|
2969
|
+
}
|
2970
|
+
},
|
2971
|
+
"patterns": [
|
2972
|
+
{
|
2973
|
+
"include": "#double-three-regexp-expression"
|
2974
|
+
},
|
2975
|
+
{
|
2976
|
+
"include": "#comments-string-double-three"
|
2977
|
+
}
|
2978
|
+
]
|
2979
|
+
},
|
2980
|
+
"double-three-regexp-lookbehind-negative": {
|
2981
|
+
"begin": "(\\()\\?<!",
|
2982
|
+
"end": "(\\)|(?=\"\"\"))",
|
2983
|
+
"beginCaptures": {
|
2984
|
+
"0": {
|
2985
|
+
"name": "keyword.operator.lookbehind.negative.regexp"
|
2986
|
+
},
|
2987
|
+
"1": {
|
2988
|
+
"name": "punctuation.parenthesis.lookbehind.begin.regexp"
|
2989
|
+
}
|
2990
|
+
},
|
2991
|
+
"endCaptures": {
|
2992
|
+
"1": {
|
2993
|
+
"name": "punctuation.parenthesis.lookbehind.end.regexp keyword.operator.lookbehind.negative.regexp"
|
2994
|
+
},
|
2995
|
+
"2": {
|
2996
|
+
"name": "invalid.illegal.newline.python"
|
2997
|
+
}
|
2998
|
+
},
|
2999
|
+
"patterns": [
|
3000
|
+
{
|
3001
|
+
"include": "#double-three-regexp-expression"
|
3002
|
+
},
|
3003
|
+
{
|
3004
|
+
"include": "#comments-string-double-three"
|
3005
|
+
}
|
3006
|
+
]
|
3007
|
+
},
|
3008
|
+
"double-three-regexp-conditional": {
|
3009
|
+
"begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)",
|
3010
|
+
"end": "(\\)|(?=\"\"\"))",
|
3011
|
+
"beginCaptures": {
|
3012
|
+
"0": {
|
3013
|
+
"name": "keyword.operator.conditional.regexp"
|
3014
|
+
},
|
3015
|
+
"1": {
|
3016
|
+
"name": "punctuation.parenthesis.conditional.begin.regexp"
|
3017
|
+
}
|
3018
|
+
},
|
3019
|
+
"endCaptures": {
|
3020
|
+
"1": {
|
3021
|
+
"name": "punctuation.parenthesis.conditional.end.regexp keyword.operator.conditional.negative.regexp"
|
3022
|
+
},
|
3023
|
+
"2": {
|
3024
|
+
"name": "invalid.illegal.newline.python"
|
3025
|
+
}
|
3026
|
+
},
|
3027
|
+
"patterns": [
|
3028
|
+
{
|
3029
|
+
"include": "#double-three-regexp-expression"
|
3030
|
+
},
|
3031
|
+
{
|
3032
|
+
"include": "#comments-string-double-three"
|
3033
|
+
}
|
3034
|
+
]
|
3035
|
+
},
|
3036
|
+
"double-three-regexp-parentheses-non-capturing": {
|
3037
|
+
"begin": "\\(\\?:",
|
3038
|
+
"end": "(\\)|(?=\"\"\"))",
|
3039
|
+
"beginCaptures": {
|
3040
|
+
"0": {
|
3041
|
+
"name": "punctuation.parenthesis.non-capturing.begin.regexp support.other.parenthesis.regexp"
|
3042
|
+
}
|
3043
|
+
},
|
3044
|
+
"endCaptures": {
|
3045
|
+
"1": {
|
3046
|
+
"name": "punctuation.parenthesis.non-capturing.end.regexp support.other.parenthesis.regexp"
|
3047
|
+
},
|
3048
|
+
"2": {
|
3049
|
+
"name": "invalid.illegal.newline.python"
|
3050
|
+
}
|
3051
|
+
},
|
3052
|
+
"patterns": [
|
3053
|
+
{
|
3054
|
+
"include": "#double-three-regexp-expression"
|
3055
|
+
},
|
3056
|
+
{
|
3057
|
+
"include": "#comments-string-double-three"
|
3058
|
+
}
|
3059
|
+
]
|
3060
|
+
},
|
3061
|
+
"double-three-regexp-parentheses": {
|
3062
|
+
"begin": "\\(",
|
3063
|
+
"end": "(\\)|(?=\"\"\"))",
|
3064
|
+
"beginCaptures": {
|
3065
|
+
"0": {
|
3066
|
+
"name": "punctuation.parenthesis.begin.regexp support.other.parenthesis.regexp"
|
3067
|
+
}
|
3068
|
+
},
|
3069
|
+
"endCaptures": {
|
3070
|
+
"1": {
|
3071
|
+
"name": "punctuation.parenthesis.end.regexp support.other.parenthesis.regexp"
|
3072
|
+
},
|
3073
|
+
"2": {
|
3074
|
+
"name": "invalid.illegal.newline.python"
|
3075
|
+
}
|
3076
|
+
},
|
3077
|
+
"patterns": [
|
3078
|
+
{
|
3079
|
+
"include": "#double-three-regexp-expression"
|
3080
|
+
},
|
3081
|
+
{
|
3082
|
+
"include": "#comments-string-double-three"
|
3083
|
+
}
|
3084
|
+
]
|
3085
|
+
},
|
3086
|
+
"string-raw-quoted-single-line": {
|
3087
|
+
"name": "string.quoted.raw.single.python",
|
3088
|
+
"begin": "\\b(([uU]R)|(R))((['\"]))",
|
3089
|
+
"end": "(\\4)|((?<!\\\\)\\n)",
|
3090
|
+
"beginCaptures": {
|
3091
|
+
"2": {
|
3092
|
+
"name": "invalid.deprecated.prefix.python"
|
3093
|
+
},
|
3094
|
+
"3": {
|
3095
|
+
"name": "storage.type.string.python"
|
3096
|
+
},
|
3097
|
+
"4": {
|
3098
|
+
"name": "punctuation.definition.string.begin.python"
|
3099
|
+
}
|
3100
|
+
},
|
3101
|
+
"endCaptures": {
|
3102
|
+
"1": {
|
3103
|
+
"name": "punctuation.definition.string.end.python"
|
3104
|
+
},
|
3105
|
+
"2": {
|
3106
|
+
"name": "invalid.illegal.newline.python"
|
3107
|
+
}
|
3108
|
+
},
|
3109
|
+
"patterns": [
|
3110
|
+
{
|
3111
|
+
"include": "#string-single-bad-brace1-formatting-raw"
|
3112
|
+
},
|
3113
|
+
{
|
3114
|
+
"include": "#string-single-bad-brace2-formatting-raw"
|
3115
|
+
},
|
3116
|
+
{
|
3117
|
+
"include": "#string-raw-guts"
|
3118
|
+
}
|
3119
|
+
]
|
3120
|
+
},
|
3121
|
+
"string-bin-quoted-single-line": {
|
3122
|
+
"name": "string.quoted.binary.single.python",
|
3123
|
+
"begin": "(\\b[bB])((['\"]))",
|
3124
|
+
"end": "(\\2)|((?<!\\\\)\\n)",
|
3125
|
+
"beginCaptures": {
|
3126
|
+
"1": {
|
3127
|
+
"name": "storage.type.string.python"
|
3128
|
+
},
|
3129
|
+
"2": {
|
3130
|
+
"name": "punctuation.definition.string.begin.python"
|
3131
|
+
}
|
3132
|
+
},
|
3133
|
+
"endCaptures": {
|
3134
|
+
"1": {
|
3135
|
+
"name": "punctuation.definition.string.end.python"
|
3136
|
+
},
|
3137
|
+
"2": {
|
3138
|
+
"name": "invalid.illegal.newline.python"
|
3139
|
+
}
|
3140
|
+
},
|
3141
|
+
"patterns": [
|
3142
|
+
{
|
3143
|
+
"include": "#string-entity"
|
3144
|
+
}
|
3145
|
+
]
|
3146
|
+
},
|
3147
|
+
"string-raw-bin-quoted-single-line": {
|
3148
|
+
"name": "string.quoted.raw.binary.single.python",
|
3149
|
+
"begin": "(\\b(?:R[bB]|[bB]R))((['\"]))",
|
3150
|
+
"end": "(\\2)|((?<!\\\\)\\n)",
|
3151
|
+
"beginCaptures": {
|
3152
|
+
"1": {
|
3153
|
+
"name": "storage.type.string.python"
|
3154
|
+
},
|
3155
|
+
"2": {
|
3156
|
+
"name": "punctuation.definition.string.begin.python"
|
3157
|
+
}
|
3158
|
+
},
|
3159
|
+
"endCaptures": {
|
3160
|
+
"1": {
|
3161
|
+
"name": "punctuation.definition.string.end.python"
|
3162
|
+
},
|
3163
|
+
"2": {
|
3164
|
+
"name": "invalid.illegal.newline.python"
|
3165
|
+
}
|
3166
|
+
},
|
3167
|
+
"patterns": [
|
3168
|
+
{
|
3169
|
+
"include": "#string-raw-bin-guts"
|
3170
|
+
}
|
3171
|
+
]
|
3172
|
+
},
|
3173
|
+
"string-quoted-single-line": {
|
3174
|
+
"name": "string.quoted.single.python",
|
3175
|
+
"begin": "(\\b[rR](?=[uU]))?([uU])?((['\"]))",
|
3176
|
+
"end": "(\\3)|((?<!\\\\)\\n)",
|
3177
|
+
"beginCaptures": {
|
3178
|
+
"1": {
|
3179
|
+
"name": "invalid.illegal.prefix.python"
|
3180
|
+
},
|
3181
|
+
"2": {
|
3182
|
+
"name": "storage.type.string.python"
|
3183
|
+
},
|
3184
|
+
"3": {
|
3185
|
+
"name": "punctuation.definition.string.begin.python"
|
3186
|
+
}
|
3187
|
+
},
|
3188
|
+
"endCaptures": {
|
3189
|
+
"1": {
|
3190
|
+
"name": "punctuation.definition.string.end.python"
|
3191
|
+
},
|
3192
|
+
"2": {
|
3193
|
+
"name": "invalid.illegal.newline.python"
|
3194
|
+
}
|
3195
|
+
},
|
3196
|
+
"patterns": [
|
3197
|
+
{
|
3198
|
+
"include": "#string-single-bad-brace1-formatting-unicode"
|
3199
|
+
},
|
3200
|
+
{
|
3201
|
+
"include": "#string-single-bad-brace2-formatting-unicode"
|
3202
|
+
},
|
3203
|
+
{
|
3204
|
+
"include": "#string-unicode-guts"
|
3205
|
+
}
|
3206
|
+
]
|
3207
|
+
},
|
3208
|
+
"string-single-bad-brace1-formatting-unicode": {
|
3209
|
+
"comment": "template using {% ... %}",
|
3210
|
+
"begin": "(?x)\n (?= \\{%\n ( .*? (?!(['\"])|((?<!\\\\)\\n)) )\n %\\}\n )\n",
|
3211
|
+
"end": "(?=(['\"])|((?<!\\\\)\\n))",
|
3212
|
+
"patterns": [
|
3213
|
+
{
|
3214
|
+
"include": "#escape-sequence-unicode"
|
3215
|
+
},
|
3216
|
+
{
|
3217
|
+
"include": "#escape-sequence"
|
3218
|
+
},
|
3219
|
+
{
|
3220
|
+
"include": "#string-line-continuation"
|
3221
|
+
}
|
3222
|
+
]
|
3223
|
+
},
|
3224
|
+
"string-single-bad-brace1-formatting-raw": {
|
3225
|
+
"comment": "template using {% ... %}",
|
3226
|
+
"begin": "(?x)\n (?= \\{%\n ( .*? (?!(['\"])|((?<!\\\\)\\n)) )\n %\\}\n )\n",
|
3227
|
+
"end": "(?=(['\"])|((?<!\\\\)\\n))",
|
3228
|
+
"patterns": [
|
3229
|
+
{
|
3230
|
+
"include": "#string-consume-escape"
|
3231
|
+
}
|
3232
|
+
]
|
3233
|
+
},
|
3234
|
+
"string-single-bad-brace2-formatting-unicode": {
|
3235
|
+
"comment": "odd format or format-like syntax",
|
3236
|
+
"begin": "(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!(['\"])|((?<!\\\\)\\n)) [^!:\\.\\[}\\w]\n )\n .*?(?!(['\"])|((?<!\\\\)\\n))\n \\}\n )\n",
|
3237
|
+
"end": "(?=(['\"])|((?<!\\\\)\\n))",
|
3238
|
+
"patterns": [
|
3239
|
+
{
|
3240
|
+
"include": "#escape-sequence-unicode"
|
3241
|
+
},
|
3242
|
+
{
|
3243
|
+
"include": "#string-entity"
|
3244
|
+
}
|
3245
|
+
]
|
3246
|
+
},
|
3247
|
+
"string-single-bad-brace2-formatting-raw": {
|
3248
|
+
"comment": "odd format or format-like syntax",
|
3249
|
+
"begin": "(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!(['\"])|((?<!\\\\)\\n)) [^!:\\.\\[}\\w]\n )\n .*?(?!(['\"])|((?<!\\\\)\\n))\n \\}\n )\n",
|
3250
|
+
"end": "(?=(['\"])|((?<!\\\\)\\n))",
|
3251
|
+
"patterns": [
|
3252
|
+
{
|
3253
|
+
"include": "#string-consume-escape"
|
3254
|
+
},
|
3255
|
+
{
|
3256
|
+
"include": "#string-formatting"
|
3257
|
+
}
|
3258
|
+
]
|
3259
|
+
},
|
3260
|
+
"string-raw-quoted-multi-line": {
|
3261
|
+
"name": "string.quoted.raw.multi.python",
|
3262
|
+
"begin": "\\b(([uU]R)|(R))('''|\"\"\")",
|
3263
|
+
"end": "(\\4)",
|
3264
|
+
"beginCaptures": {
|
3265
|
+
"2": {
|
3266
|
+
"name": "invalid.deprecated.prefix.python"
|
3267
|
+
},
|
3268
|
+
"3": {
|
3269
|
+
"name": "storage.type.string.python"
|
3270
|
+
},
|
3271
|
+
"4": {
|
3272
|
+
"name": "punctuation.definition.string.begin.python"
|
3273
|
+
}
|
3274
|
+
},
|
3275
|
+
"endCaptures": {
|
3276
|
+
"1": {
|
3277
|
+
"name": "punctuation.definition.string.end.python"
|
3278
|
+
},
|
3279
|
+
"2": {
|
3280
|
+
"name": "invalid.illegal.newline.python"
|
3281
|
+
}
|
3282
|
+
},
|
3283
|
+
"patterns": [
|
3284
|
+
{
|
3285
|
+
"include": "#string-multi-bad-brace1-formatting-raw"
|
3286
|
+
},
|
3287
|
+
{
|
3288
|
+
"include": "#string-multi-bad-brace2-formatting-raw"
|
3289
|
+
},
|
3290
|
+
{
|
3291
|
+
"include": "#string-raw-guts"
|
3292
|
+
}
|
3293
|
+
]
|
3294
|
+
},
|
3295
|
+
"string-bin-quoted-multi-line": {
|
3296
|
+
"name": "string.quoted.binary.multi.python",
|
3297
|
+
"begin": "(\\b[bB])('''|\"\"\")",
|
3298
|
+
"end": "(\\2)",
|
3299
|
+
"beginCaptures": {
|
3300
|
+
"1": {
|
3301
|
+
"name": "storage.type.string.python"
|
3302
|
+
},
|
3303
|
+
"2": {
|
3304
|
+
"name": "punctuation.definition.string.begin.python"
|
3305
|
+
}
|
3306
|
+
},
|
3307
|
+
"endCaptures": {
|
3308
|
+
"1": {
|
3309
|
+
"name": "punctuation.definition.string.end.python"
|
3310
|
+
},
|
3311
|
+
"2": {
|
3312
|
+
"name": "invalid.illegal.newline.python"
|
3313
|
+
}
|
3314
|
+
},
|
3315
|
+
"patterns": [
|
3316
|
+
{
|
3317
|
+
"include": "#string-entity"
|
3318
|
+
}
|
3319
|
+
]
|
3320
|
+
},
|
3321
|
+
"string-raw-bin-quoted-multi-line": {
|
3322
|
+
"name": "string.quoted.raw.binary.multi.python",
|
3323
|
+
"begin": "(\\b(?:R[bB]|[bB]R))('''|\"\"\")",
|
3324
|
+
"end": "(\\2)",
|
3325
|
+
"beginCaptures": {
|
3326
|
+
"1": {
|
3327
|
+
"name": "storage.type.string.python"
|
3328
|
+
},
|
3329
|
+
"2": {
|
3330
|
+
"name": "punctuation.definition.string.begin.python"
|
3331
|
+
}
|
3332
|
+
},
|
3333
|
+
"endCaptures": {
|
3334
|
+
"1": {
|
3335
|
+
"name": "punctuation.definition.string.end.python"
|
3336
|
+
},
|
3337
|
+
"2": {
|
3338
|
+
"name": "invalid.illegal.newline.python"
|
3339
|
+
}
|
3340
|
+
},
|
3341
|
+
"patterns": [
|
3342
|
+
{
|
3343
|
+
"include": "#string-raw-bin-guts"
|
3344
|
+
}
|
3345
|
+
]
|
3346
|
+
},
|
3347
|
+
"string-quoted-multi-line": {
|
3348
|
+
"name": "string.quoted.multi.python",
|
3349
|
+
"begin": "(\\b[rR](?=[uU]))?([uU])?('''|\"\"\")",
|
3350
|
+
"end": "(\\3)",
|
3351
|
+
"beginCaptures": {
|
3352
|
+
"1": {
|
3353
|
+
"name": "invalid.illegal.prefix.python"
|
3354
|
+
},
|
3355
|
+
"2": {
|
3356
|
+
"name": "storage.type.string.python"
|
3357
|
+
},
|
3358
|
+
"3": {
|
3359
|
+
"name": "punctuation.definition.string.begin.python"
|
3360
|
+
}
|
3361
|
+
},
|
3362
|
+
"endCaptures": {
|
3363
|
+
"1": {
|
3364
|
+
"name": "punctuation.definition.string.end.python"
|
3365
|
+
},
|
3366
|
+
"2": {
|
3367
|
+
"name": "invalid.illegal.newline.python"
|
3368
|
+
}
|
3369
|
+
},
|
3370
|
+
"patterns": [
|
3371
|
+
{
|
3372
|
+
"include": "#string-multi-bad-brace1-formatting-unicode"
|
3373
|
+
},
|
3374
|
+
{
|
3375
|
+
"include": "#string-multi-bad-brace2-formatting-unicode"
|
3376
|
+
},
|
3377
|
+
{
|
3378
|
+
"include": "#string-unicode-guts"
|
3379
|
+
}
|
3380
|
+
]
|
3381
|
+
},
|
3382
|
+
"string-multi-bad-brace1-formatting-unicode": {
|
3383
|
+
"comment": "template using {% ... %}",
|
3384
|
+
"begin": "(?x)\n (?= \\{%\n ( .*? (?!'''|\"\"\") )\n %\\}\n )\n",
|
3385
|
+
"end": "(?='''|\"\"\")",
|
3386
|
+
"patterns": [
|
3387
|
+
{
|
3388
|
+
"include": "#escape-sequence-unicode"
|
3389
|
+
},
|
3390
|
+
{
|
3391
|
+
"include": "#escape-sequence"
|
3392
|
+
},
|
3393
|
+
{
|
3394
|
+
"include": "#string-line-continuation"
|
3395
|
+
}
|
3396
|
+
]
|
3397
|
+
},
|
3398
|
+
"string-multi-bad-brace1-formatting-raw": {
|
3399
|
+
"comment": "template using {% ... %}",
|
3400
|
+
"begin": "(?x)\n (?= \\{%\n ( .*? (?!'''|\"\"\") )\n %\\}\n )\n",
|
3401
|
+
"end": "(?='''|\"\"\")",
|
3402
|
+
"patterns": [
|
3403
|
+
{
|
3404
|
+
"include": "#string-consume-escape"
|
3405
|
+
}
|
3406
|
+
]
|
3407
|
+
},
|
3408
|
+
"string-multi-bad-brace2-formatting-unicode": {
|
3409
|
+
"comment": "odd format or format-like syntax",
|
3410
|
+
"begin": "(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!'''|\"\"\") [^!:\\.\\[}\\w]\n )\n .*?(?!'''|\"\"\")\n \\}\n )\n",
|
3411
|
+
"end": "(?='''|\"\"\")",
|
3412
|
+
"patterns": [
|
3413
|
+
{
|
3414
|
+
"include": "#escape-sequence-unicode"
|
3415
|
+
},
|
3416
|
+
{
|
3417
|
+
"include": "#string-entity"
|
3418
|
+
}
|
3419
|
+
]
|
3420
|
+
},
|
3421
|
+
"string-multi-bad-brace2-formatting-raw": {
|
3422
|
+
"comment": "odd format or format-like syntax",
|
3423
|
+
"begin": "(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!'''|\"\"\") [^!:\\.\\[}\\w]\n )\n .*?(?!'''|\"\"\")\n \\}\n )\n",
|
3424
|
+
"end": "(?='''|\"\"\")",
|
3425
|
+
"patterns": [
|
3426
|
+
{
|
3427
|
+
"include": "#string-consume-escape"
|
3428
|
+
},
|
3429
|
+
{
|
3430
|
+
"include": "#string-formatting"
|
3431
|
+
}
|
3432
|
+
]
|
3433
|
+
}
|
3434
|
+
}
|
3435
|
+
}
|