github-linguist 5.3.3 → 6.0.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 +5 -2
- data/ext/linguist/linguist.c +18 -7
- data/grammars/annotation.liquidhaskell.haskell.json +969 -862
- data/grammars/config.xcompose.json +22 -25
- data/grammars/file.lasso.json +296 -309
- data/grammars/hint.haskell.json +867 -766
- data/grammars/hint.message.haskell.json +867 -766
- data/grammars/hint.type.haskell.json +867 -766
- data/grammars/objdump.x86asm.json +20 -24
- data/grammars/source.Kotlin.json +220 -225
- data/grammars/source.LS.json +36 -55
- data/grammars/source.MCPOST.json +24 -38
- data/grammars/source.MOD.json +26 -41
- data/grammars/source.SASLog.json +9 -16
- data/grammars/source.abap.json +48 -56
- data/grammars/source.abl.json +8 -14
- data/grammars/source.abnf.json +88 -98
- data/grammars/source.actionscript.3.json +398 -429
- data/grammars/source.acucobol.json +5 -8
- data/grammars/source.ada.json +46 -53
- data/grammars/source.afm.json +548 -554
- data/grammars/source.agc.json +34 -37
- data/grammars/source.agda.json +79 -91
- data/grammars/source.ahk.json +62 -66
- data/grammars/source.alloy.json +16 -20
- data/grammars/source.ampl.json +41 -47
- data/grammars/source.angelscript.json +71 -80
- data/grammars/source.antlr.json +131 -136
- data/grammars/source.apache-config.json +93 -99
- data/grammars/source.apache-config.mod_perl.json +19 -24
- data/grammars/source.apl.json +1038 -1029
- data/grammars/source.applescript.json +501 -523
- data/grammars/source.apt.json +9 -16
- data/grammars/source.asn.json +27 -31
- data/grammars/source.asp.json +61 -67
- data/grammars/source.aspectj.json +385 -391
- data/grammars/source.assembly.json +49 -55
- data/grammars/source.ats.json +45 -121
- data/grammars/source.autoit.json +64 -69
- data/grammars/source.awk.json +172 -176
- data/grammars/source.ballerina.json +48 -395
- data/grammars/source.batchfile.json +269 -269
- data/grammars/source.befunge.json +17 -21
- data/grammars/source.bf.json +5 -11
- data/grammars/source.bison.json +10 -14
- data/grammars/source.blitzmax.json +300 -305
- data/grammars/source.boo.json +189 -193
- data/grammars/source.brightauthorproject.json +8 -13
- data/grammars/source.brightscript.json +37 -47
- data/grammars/source.bro.json +134 -140
- data/grammars/source.bsl.json +152 -193
- data/grammars/source.bsv.json +96 -102
- data/grammars/source.c++.json +176 -193
- data/grammars/source.c++.qt.json +13 -21
- data/grammars/source.c.ec.json +15 -21
- data/grammars/source.c.json +237 -251
- data/grammars/source.c.platform.json +153 -159
- data/grammars/source.c2hs.json +3 -6
- data/grammars/source.cabal.json +17 -20
- data/grammars/source.cache.cmake.json +18 -23
- data/grammars/source.cake.json +4 -7
- data/grammars/source.camlp4.ocaml.json +24 -27
- data/grammars/source.capnp.json +33 -38
- data/grammars/source.ceylon.json +44 -50
- data/grammars/source.cfscript.cfc.json +78 -86
- data/grammars/source.cfscript.json +513 -520
- data/grammars/source.changelogs.rpm-spec.json +8 -16
- data/grammars/source.chapel.json +109 -87
- data/grammars/source.cirru.json +25 -30
- data/grammars/source.clarion.json +41 -54
- data/grammars/source.clean.json +90 -95
- data/grammars/source.click.json +25 -28
- data/grammars/source.clips.json +10 -23
- data/grammars/source.clojure.json +151 -168
- data/grammars/source.cm.json +14 -19
- data/grammars/source.cmake.json +53 -61
- data/grammars/source.cobol.json +165 -180
- data/grammars/source.coffee.json +454 -462
- data/grammars/source.cool.json +36 -43
- data/grammars/source.coq.json +17 -21
- data/grammars/source.crystal.json +889 -983
- data/grammars/source.cs.json +739 -740
- data/grammars/source.csound-document.json +69 -73
- data/grammars/source.csound-score.json +52 -55
- data/grammars/source.csound.json +167 -171
- data/grammars/source.css.json +683 -688
- data/grammars/source.css.less.json +211 -511
- data/grammars/source.css.mss.json +94 -101
- data/grammars/source.css.postcss.sugarss.json +260 -0
- data/grammars/source.csx.json +4 -7
- data/grammars/source.cuda-c++.json +47 -81
- data/grammars/source.cwl.json +103 -0
- data/grammars/source.cython.json +536 -582
- data/grammars/source.d.json +243 -252
- data/grammars/source.dart.json +161 -166
- data/grammars/source.data-weave.json +901 -905
- data/grammars/source.desktop.json +29 -33
- data/grammars/source.diff.json +43 -52
- data/grammars/source.disasm.json +15 -16
- data/grammars/source.ditroff.desc.json +73 -84
- data/grammars/source.ditroff.json +60 -61
- data/grammars/source.dm.json +202 -213
- data/grammars/source.dmf.json +44 -47
- data/grammars/source.dockerfile.json +29 -34
- data/grammars/source.dot.json +46 -55
- data/grammars/source.dylan.json +63 -68
- data/grammars/source.ebnf.json +55 -62
- data/grammars/source.eiffel.json +57 -62
- data/grammars/source.elixir.json +321 -366
- data/grammars/source.emacs.lisp.json +458 -249
- data/grammars/source.erazor.json +49 -57
- data/grammars/source.erlang.json +508 -515
- data/grammars/source.essl.json +17 -30
- data/grammars/source.factor.json +85 -91
- data/grammars/source.fan.json +92 -96
- data/grammars/source.fancy.json +93 -118
- data/grammars/source.fish.json +74 -98
- data/grammars/source.fontforge.json +142 -146
- data/grammars/source.forth.json +42 -57
- data/grammars/source.fortran.json +193 -231
- data/grammars/source.fortran.modern.json +77 -103
- data/grammars/source.fsharp.fsi.json +1 -6
- data/grammars/source.fsharp.fsl.json +1 -6
- data/grammars/source.fsharp.fsx.json +1 -6
- data/grammars/source.fsharp.json +148 -153
- data/grammars/source.gap.json +60 -70
- data/grammars/source.gcode.json +9 -16
- data/grammars/source.gdb.json +63 -79
- data/grammars/source.gdb.session.json +27 -28
- data/grammars/source.gdbregs.json +7 -8
- data/grammars/source.gdscript.json +92 -96
- data/grammars/source.gerber.json +38 -56
- data/grammars/source.gfm.json +447 -462
- data/grammars/source.glsl.json +58 -83
- data/grammars/source.gn.json +188 -193
- data/grammars/source.gnuplot.json +104 -120
- data/grammars/source.go.json +169 -181
- data/grammars/source.golo.json +82 -87
- data/grammars/source.gosu.2.json +58 -68
- data/grammars/source.grace.json +266 -270
- data/grammars/source.graphql.json +586 -596
- data/grammars/source.groovy.gradle.json +18 -22
- data/grammars/source.groovy.json +422 -433
- data/grammars/source.harbour.json +129 -173
- data/grammars/source.haskell.json +871 -772
- data/grammars/source.haxe.2.json +402 -413
- data/grammars/source.hlsl.json +6 -16
- data/grammars/source.hsc2hs.json +1 -4
- data/grammars/source.hsig.json +871 -770
- data/grammars/source.hss.1.json +122 -144
- data/grammars/source.httpspec.json +119 -123
- data/grammars/source.hxml.json +8 -15
- data/grammars/source.ideal.json +125 -125
- data/grammars/source.idl-dlm.json +25 -32
- data/grammars/source.idl.json +59 -80
- data/grammars/source.idris.json +171 -185
- data/grammars/source.inform7.json +117 -121
- data/grammars/source.ini.json +37 -43
- data/grammars/source.io.json +65 -73
- data/grammars/source.ioke.json +72 -78
- data/grammars/source.isabelle.root.json +26 -30
- data/grammars/source.isabelle.theory.json +46 -50
- data/grammars/source.j.json +18 -21
- data/grammars/source.jasmin.json +45 -50
- data/grammars/source.java-properties.json +31 -41
- data/grammars/source.java.json +333 -342
- data/grammars/source.jcl.json +15 -18
- data/grammars/source.jflex.json +166 -172
- data/grammars/source.jison.json +331 -334
- data/grammars/source.jisonlex-injection.json +1 -2
- data/grammars/source.jisonlex.json +148 -151
- data/grammars/source.jolie.json +37 -43
- data/grammars/source.jq.json +80 -87
- data/grammars/source.js.json +798 -818
- data/grammars/source.js.jsx.json +2115 -2225
- data/grammars/source.js.objj.json +167 -172
- data/grammars/source.js.regexp.json +50 -50
- data/grammars/source.js.regexp.replacement.json +7 -7
- data/grammars/source.jsdoc.json +94 -94
- data/grammars/source.json.json +61 -71
- data/grammars/source.julia.console.json +5 -6
- data/grammars/source.julia.json +237 -234
- data/grammars/source.lean.json +55 -67
- data/grammars/source.lid.json +6 -10
- data/grammars/source.lilypond.json +181 -195
- data/grammars/source.lisp.json +40 -50
- data/grammars/source.litcoffee.json +169 -183
- data/grammars/source.livescript.json +207 -220
- data/grammars/source.llvm.json +28 -38
- data/grammars/source.logos.json +7 -14
- data/grammars/source.logtalk.json +136 -141
- data/grammars/source.loomscript.json +77 -83
- data/grammars/source.lsl.json +90 -106
- data/grammars/source.lua.json +100 -109
- data/grammars/source.makefile.json +181 -188
- data/grammars/source.makegen.json +3 -7
- data/grammars/source.mask.json +260 -265
- data/grammars/source.mata.json +38 -46
- data/grammars/source.mathematica.json +155 -167
- data/grammars/source.matlab.json +407 -684
- data/grammars/source.maxscript.json +293 -281
- data/grammars/source.mercury.json +179 -184
- data/grammars/source.meson.json +52 -58
- data/grammars/source.meta-info.json +64 -74
- data/grammars/source.ml.json +107 -113
- data/grammars/source.modelica.json +51 -59
- data/grammars/source.modula2.json +33 -42
- data/grammars/source.monkey.json +234 -241
- data/grammars/source.moonscript.json +51 -56
- data/grammars/source.mql5.json +74 -101
- data/grammars/source.mupad.json +30 -72
- data/grammars/source.ncl.json +1 -14
- data/grammars/source.ne.json +39 -42
- data/grammars/source.nemerle.json +58 -63
- data/grammars/source.nesc.json +9 -15
- data/grammars/source.netlinx.erb.json +13 -25
- data/grammars/source.netlinx.json +231 -292
- data/grammars/source.nextflow-groovy.json +1360 -0
- data/grammars/source.nextflow.json +74 -0
- data/grammars/source.nginx.json +274 -287
- data/grammars/source.nim.json +442 -483
- data/grammars/source.nim_filter.json +6 -26
- data/grammars/source.nimcfg.json +38 -51
- data/grammars/source.ninja.json +64 -70
- data/grammars/source.nit.json +60 -64
- data/grammars/source.nix.json +269 -273
- data/grammars/source.nmml.json +31 -37
- data/grammars/source.nsis.json +66 -72
- data/grammars/source.nu.json +129 -139
- data/grammars/source.nut.json +129 -133
- data/grammars/source.objc++.json +3 -10
- data/grammars/source.objc.json +303 -314
- data/grammars/source.objc.platform.json +145 -151
- data/grammars/source.ocaml.json +506 -514
- data/grammars/source.ocamllex.json +108 -115
- data/grammars/source.ocamlyacc.json +116 -123
- data/grammars/source.ooc.json +148 -155
- data/grammars/source.opa.json +39 -49
- data/grammars/source.opal.json +84 -89
- data/grammars/source.opalsysdefs.json +9 -13
- data/grammars/source.opencobol.json +22 -25
- data/grammars/source.opentype.json +148 -152
- data/grammars/source.ox.json +36 -44
- data/grammars/source.oz.json +31 -38
- data/grammars/source.p4.json +49 -59
- data/grammars/source.pan.json +273 -278
- data/grammars/source.papyrus.skyrim.json +705 -781
- data/grammars/source.parrot.pir.json +59 -65
- data/grammars/source.pascal.json +54 -61
- data/grammars/source.pawn.json +835 -849
- data/grammars/source.pcb.board.json +153 -158
- data/grammars/source.pcb.schematic.json +134 -138
- data/grammars/source.pcb.sexp.json +64 -74
- data/grammars/source.pep8.json +28 -32
- data/grammars/source.perl.6.json +83 -92
- data/grammars/source.perl.json +711 -737
- data/grammars/source.perl6fe.json +1204 -1218
- data/grammars/source.php.zephir.json +80 -89
- data/grammars/source.pic.json +137 -142
- data/grammars/source.pig_latin.json +76 -80
- data/grammars/source.pike.json +23 -36
- data/grammars/source.po.json +74 -84
- data/grammars/source.pogoscript.json +23 -29
- data/grammars/source.pony.json +98 -108
- data/grammars/source.postcss.json +370 -0
- data/grammars/source.postscript.json +88 -97
- data/grammars/source.pov-ray sdl.json +36 -42
- data/grammars/source.powershell.json +175 -197
- data/grammars/source.processing.json +236 -249
- data/grammars/source.prolog.eclipse.json +33 -38
- data/grammars/source.prolog.json +66 -72
- data/grammars/source.protobuf.json +88 -94
- data/grammars/source.puppet.json +144 -151
- data/grammars/source.purescript.json +268 -289
- data/grammars/source.pyjade.json +256 -281
- data/grammars/source.python.django.json +13 -18
- data/grammars/source.python.json +3319 -3367
- data/grammars/source.python.salt.json +3 -7
- data/grammars/source.qmake.json +83 -90
- data/grammars/source.qml.json +57 -78
- data/grammars/source.quoting.perl6fe.json +666 -669
- data/grammars/source.r.json +75 -84
- data/grammars/source.racket.json +17 -38
- data/grammars/source.rascal.json +77 -80
- data/grammars/source.reason.hover.type.json +1 -1
- data/grammars/source.reason.json +1025 -1080
- data/grammars/source.rebol.json +167 -177
- data/grammars/source.red.json +169 -177
- data/grammars/source.regexp.babel.json +74 -77
- data/grammars/source.regexp.extended.json +4 -5
- data/grammars/source.regexp.json +260 -264
- data/grammars/source.regexp.perl6fe.json +108 -111
- data/grammars/source.regexp.python.json +210 -215
- data/grammars/source.regexp.spin.json +63 -72
- data/grammars/source.renpy.json +617 -687
- data/grammars/source.rexx.json +25 -32
- data/grammars/source.ring.json +84 -114
- data/grammars/source.rpm-spec.json +392 -401
- data/grammars/source.ruby.gemfile.json +9 -12
- data/grammars/source.ruby.json +862 -952
- data/grammars/source.ruby.rspec.cucumber.steps.json +90 -103
- data/grammars/source.rust.json +223 -281
- data/grammars/source.sas.json +88 -105
- data/grammars/source.sass.json +100 -108
- data/grammars/source.sbt.json +16 -23
- data/grammars/source.scad.json +60 -67
- data/grammars/source.scala.json +215 -228
- data/grammars/source.scaml.json +120 -135
- data/grammars/source.scheme.json +119 -136
- data/grammars/source.scilab.json +40 -47
- data/grammars/source.scss.json +369 -403
- data/grammars/source.sdbl.json +14 -25
- data/grammars/source.shaderlab.json +24 -27
- data/grammars/source.shell.json +409 -440
- data/grammars/source.shen.json +75 -94
- data/grammars/source.smali.json +232 -293
- data/grammars/source.smalltalk.json +60 -75
- data/grammars/source.smt.json +67 -82
- data/grammars/source.solidity.json +35 -54
- data/grammars/source.sp.json +40 -45
- data/grammars/source.sparql.json +3 -8
- data/grammars/source.spin.json +277 -297
- data/grammars/source.sqf.json +34 -44
- data/grammars/source.sql.json +142 -156
- data/grammars/source.stan.json +201 -160
- data/grammars/source.stata.json +57 -68
- data/grammars/source.strings.json +26 -30
- data/grammars/source.stylus.json +558 -565
- data/grammars/source.supercollider.json +33 -40
- data/grammars/source.swift.json +999 -1077
- data/grammars/source.systemverilog.json +351 -365
- data/grammars/source.tcl.json +77 -94
- data/grammars/source.tea.json +61 -67
- data/grammars/source.terra.json +25 -32
- data/grammars/source.terraform.json +68 -88
- data/grammars/source.thrift.json +300 -306
- data/grammars/source.tl.json +112 -117
- data/grammars/source.tla.json +65 -69
- data/grammars/source.toc.json +21 -25
- data/grammars/source.toml.json +117 -122
- data/grammars/source.ts.json +2838 -2774
- data/grammars/source.tsx.json +180 -184
- data/grammars/source.turing.json +970 -974
- data/grammars/source.turtle.json +124 -140
- data/grammars/source.txl.json +23 -37
- data/grammars/source.ucfconstraints.json +16 -21
- data/grammars/source.ur.json +15 -27
- data/grammars/source.vala.json +221 -235
- data/grammars/source.varnish.vcl.json +117 -129
- data/grammars/source.vbnet.json +69 -106
- data/grammars/source.verilog.json +101 -107
- data/grammars/source.vhdl.json +437 -445
- data/grammars/source.viml.json +540 -550
- data/grammars/source.wavefront.mtl.json +274 -277
- data/grammars/source.wavefront.obj.json +781 -784
- data/grammars/source.wdl.json +66 -46
- data/grammars/source.webassembly.json +97 -102
- data/grammars/source.webidl.json +311 -326
- data/grammars/source.x10.json +28 -32
- data/grammars/source.x86asm.json +21 -26
- data/grammars/source.xc.json +164 -172
- data/grammars/source.xq.json +81 -92
- data/grammars/source.xtend.json +199 -208
- data/grammars/source.yaml-ext.json +118 -124
- data/grammars/source.yaml.json +155 -174
- data/grammars/source.yaml.salt.json +113 -116
- data/grammars/source.yang.json +10 -13
- data/grammars/source.yara.json +98 -0
- data/grammars/text.bibtex.json +95 -100
- data/grammars/text.cfml.basic.json +403 -404
- data/grammars/text.elixir.json +18 -23
- data/grammars/text.error-list.json +15 -16
- data/grammars/text.find-refs.json +487 -488
- data/grammars/text.gherkin.feature.json +45 -53
- data/grammars/text.haml.json +176 -189
- data/grammars/text.hamlc.json +82 -88
- data/grammars/text.html.abl.json +16 -21
- data/grammars/text.html.asciidoc.json +139 -153
- data/grammars/text.html.asdoc.json +145 -155
- data/grammars/text.html.asp.json +23 -28
- data/grammars/text.html.basic.json +323 -338
- data/grammars/text.html.cfm.json +316 -325
- data/grammars/text.html.creole.json +177 -189
- data/grammars/text.html.django.json +27 -33
- data/grammars/text.html.ecr.json +21 -25
- data/grammars/text.html.elixir.json +3 -9
- data/grammars/text.html.erb.json +81 -85
- data/grammars/text.html.erlang.yaws.json +24 -29
- data/grammars/text.html.factor.json +5 -11
- data/grammars/text.html.ftl.json +16 -25
- data/grammars/text.html.handlebars.json +579 -598
- data/grammars/text.html.javadoc.json +426 -0
- data/grammars/text.html.js.json +11 -17
- data/grammars/text.html.jsp.json +377 -384
- data/grammars/text.html.liquid.json +8 -18
- data/grammars/text.html.mako.json +257 -275
- data/grammars/text.html.markdown.source.gfm.apib.json +419 -427
- data/grammars/text.html.markdown.source.gfm.mson.json +405 -414
- data/grammars/text.html.mediawiki.json +318 -344
- data/grammars/text.html.php.blade.json +2134 -2140
- data/grammars/text.html.php.json +980 -1013
- data/grammars/text.html.slash.json +101 -107
- data/grammars/text.html.smarty.json +75 -83
- data/grammars/text.html.soy.json +250 -253
- data/grammars/text.html.ssp.json +18 -24
- data/grammars/text.html.tcl.json +17 -24
- data/grammars/text.html.twig.json +712 -718
- data/grammars/text.idl-idldoc.json +5 -9
- data/grammars/text.jade.json +213 -235
- data/grammars/text.junit-test-report.json +25 -28
- data/grammars/text.log.latex.json +44 -46
- data/grammars/text.marko.json +370 -401
- data/grammars/text.python.console.json +3 -7
- data/grammars/text.python.traceback.json +2 -5
- data/grammars/text.rdoc.json +15 -19
- data/grammars/text.restructuredtext.clean.json +8 -11
- data/grammars/text.restructuredtext.json +886 -873
- data/grammars/text.robot.json +26 -36
- data/grammars/text.roff.json +2852 -2915
- data/grammars/text.runoff.json +56 -69
- data/grammars/text.sfd.json +151 -155
- data/grammars/text.shell-session.json +5 -8
- data/grammars/text.slim.json +184 -210
- data/grammars/text.srt.json +54 -57
- data/grammars/text.tex.json +98 -105
- data/grammars/text.tex.latex.beamer.json +14 -20
- data/grammars/text.tex.latex.haskell.json +883 -782
- data/grammars/text.tex.latex.json +281 -291
- data/grammars/text.tex.latex.memoir.json +39 -46
- data/grammars/text.tex.latex.rd.json +32 -38
- data/grammars/text.xml.ant.json +62 -69
- data/grammars/text.xml.flex-config.json +1009 -1013
- data/grammars/text.xml.genshi.json +10 -16
- data/grammars/text.xml.json +117 -130
- data/grammars/text.xml.pom.json +235 -240
- data/grammars/text.xml.xsl.json +31 -37
- data/grammars/text.zone_file.json +24 -29
- data/lib/linguist/blob.rb +10 -1
- data/lib/linguist/blob_helper.rb +4 -1
- data/lib/linguist/file_blob.rb +5 -0
- data/lib/linguist/generated.rb +16 -0
- data/lib/linguist/heuristics.rb +23 -11
- data/lib/linguist/language.rb +3 -6
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +74 -12
- data/lib/linguist/lazy_blob.rb +15 -1
- data/lib/linguist/linguist.bundle +0 -0
- data/lib/linguist/samples.json +1666 -3381
- data/lib/linguist/shebang.rb +2 -0
- data/lib/linguist/strategy/modeline.rb +2 -0
- data/lib/linguist/vendor.yml +5 -6
- data/lib/linguist/version.rb +1 -1
- metadata +12 -11
- data/grammars/source.elm.json +0 -381
- data/grammars/source.nant-build.json +0 -86
- data/grammars/source.octave.json +0 -451
- data/grammars/text.html.mediawiki.elm-build-output.json +0 -111
- data/grammars/text.html.mediawiki.elm-documentation.json +0 -22
- data/grammars/text.html.vue.json +0 -936
@@ -1,100 +1,93 @@
|
|
1
1
|
{
|
2
|
-
"fileTypes": [
|
3
|
-
"sc",
|
4
|
-
"scd"
|
5
|
-
],
|
6
|
-
"foldingStartMarker": "\\{|\\/\\*",
|
7
|
-
"foldingStopMarker": "\\}|\\*\\/",
|
8
2
|
"name": "SuperCollider",
|
3
|
+
"scopeName": "source.supercollider",
|
9
4
|
"patterns": [
|
10
5
|
{
|
11
|
-
"
|
12
|
-
"
|
6
|
+
"name": "keyword.control.supercollider",
|
7
|
+
"match": "\\b(arg|var|classvar|const|this|thisThread|thisMethod|thisFunction|thisFunctionDef|thisProcess|true|false|inf|nil)\\b"
|
13
8
|
},
|
14
9
|
{
|
10
|
+
"name": "string.quoted.double.supercollider",
|
15
11
|
"begin": "\"",
|
16
12
|
"end": "\"",
|
17
|
-
"name": "string.quoted.double.supercollider",
|
18
13
|
"patterns": [
|
19
14
|
{
|
20
|
-
"
|
21
|
-
"
|
15
|
+
"name": "constant.character.escape.supercollider",
|
16
|
+
"match": "\\\\."
|
22
17
|
}
|
23
18
|
]
|
24
19
|
},
|
25
20
|
{
|
21
|
+
"name": "entity.name.symbol.supercollider",
|
26
22
|
"begin": "'",
|
27
23
|
"end": "'",
|
28
|
-
"name": "entity.name.symbol.supercollider",
|
29
24
|
"patterns": [
|
30
25
|
{
|
31
|
-
"
|
32
|
-
"
|
26
|
+
"name": "constant.character.escape.supercollider",
|
27
|
+
"match": "\\\\."
|
33
28
|
}
|
34
29
|
]
|
35
30
|
},
|
36
31
|
{
|
37
|
-
"
|
38
|
-
"
|
32
|
+
"name": "support.name.tag.supercollider",
|
33
|
+
"match": "[a-z][a-zA-Z0-9_]*\\:"
|
39
34
|
},
|
40
35
|
{
|
36
|
+
"match": "^\\s*\\+*\\s*([A-Z]{1}[a-zA-Z0-9_]*)\\s*\\:{1}\\s*([A-Z]{1}[a-zA-Z0-9_]*)\\s*\\{",
|
41
37
|
"captures": {
|
42
38
|
"1": {
|
43
39
|
"name": "entity.name.class.supercollider"
|
44
40
|
}
|
45
|
-
}
|
46
|
-
"match": "^\\s*\\+*\\s*([A-Z]{1}[a-zA-Z0-9_]*)\\s*\\:{1}\\s*([A-Z]{1}[a-zA-Z0-9_]*)\\s*\\{"
|
41
|
+
}
|
47
42
|
},
|
48
43
|
{
|
44
|
+
"match": "^([A-Z_]{1}[a-zA-Z0-9_]*)[^a-zA-Z0-9_]",
|
49
45
|
"captures": {
|
50
46
|
"1": {
|
51
47
|
"name": "entity.name.class.supercollider"
|
52
48
|
}
|
53
|
-
}
|
54
|
-
"match": "^([A-Z_]{1}[a-zA-Z0-9_]*)[^a-zA-Z0-9_]"
|
49
|
+
}
|
55
50
|
},
|
56
51
|
{
|
57
|
-
"
|
58
|
-
"
|
52
|
+
"name": "variable.parameter.function.supercollider",
|
53
|
+
"match": "\\|[a-zA-Z0-9\\#\\[\\]\\\"\\_\\=\\.\\(\\)[[:space:]]\\,]+\\|"
|
59
54
|
},
|
60
55
|
{
|
56
|
+
"match": "[^a-zA-Z0-9\\\\]([A-Z_]{1}[a-zA-Z0-9_]*)[^a-zA-Z0-9_]",
|
61
57
|
"captures": {
|
62
58
|
"1": {
|
63
59
|
"name": "entity.name.class.supercollider"
|
64
60
|
}
|
65
|
-
}
|
66
|
-
"match": "[^a-zA-Z0-9\\\\]([A-Z_]{1}[a-zA-Z0-9_]*)[^a-zA-Z0-9_]"
|
61
|
+
}
|
67
62
|
},
|
68
63
|
{
|
69
|
-
"
|
70
|
-
"
|
64
|
+
"name": "entity.name.symbol.supercollider",
|
65
|
+
"match": "\\\\[a-zA-Z0-9\\_]+"
|
71
66
|
},
|
72
67
|
{
|
68
|
+
"match": "^\\s*(\\**[a-z]{1}[a-zA-Z0-9_]+)\\s*\\{",
|
73
69
|
"captures": {
|
74
70
|
"1": {
|
75
71
|
"name": "entity.name.function.supercollider"
|
76
72
|
}
|
77
|
-
}
|
78
|
-
"match": "^\\s*(\\**[a-z]{1}[a-zA-Z0-9_]+)\\s*\\{"
|
73
|
+
}
|
79
74
|
},
|
80
75
|
{
|
81
|
-
"
|
82
|
-
"
|
76
|
+
"name": "variable.language.supercollider",
|
77
|
+
"match": "\\~[a-z][a-zA-Z0-9_]*"
|
83
78
|
},
|
84
79
|
{
|
85
|
-
"
|
86
|
-
"
|
80
|
+
"name": "comment.single.supercollider",
|
81
|
+
"match": "\\/\\/.*"
|
87
82
|
},
|
88
83
|
{
|
84
|
+
"name": "comment.multiline.supercollider",
|
89
85
|
"begin": "\\/\\*",
|
90
|
-
"end": "\\*\\/"
|
91
|
-
"name": "comment.multiline.supercollider"
|
86
|
+
"end": "\\*\\/"
|
92
87
|
},
|
93
88
|
{
|
94
|
-
"
|
95
|
-
"match": "\\b(0[xX][0-9A-Fa-f](
|
96
|
-
"name": "constant.numeric.supercollider"
|
89
|
+
"name": "constant.numeric.supercollider",
|
90
|
+
"match": "\\b(0[xX][0-9A-Fa-f](?\u003e_?[0-9A-Fa-f])*|\\d(?\u003e_?\\d)*(\\.(?![^[:space:][:digit:]])(?\u003e_?\\d)*)?([eE][-+]?\\d(?\u003e_?\\d)*)?|0[bB][01]+)\\b"
|
97
91
|
}
|
98
|
-
]
|
99
|
-
|
100
|
-
}
|
92
|
+
]
|
93
|
+
}
|
data/grammars/source.swift.json
CHANGED
@@ -1,11 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"comment": "See swift.tmbundle/grammar-test.swift for test cases.",
|
3
|
-
"fileTypes": [
|
4
|
-
"swift"
|
5
|
-
],
|
6
|
-
"firstLineMatch": "^#!/.*\\bswift",
|
7
|
-
"keyEquivalent": "^~S",
|
8
2
|
"name": "Swift",
|
3
|
+
"scopeName": "source.swift",
|
9
4
|
"patterns": [
|
10
5
|
{
|
11
6
|
"include": "#root"
|
@@ -15,27 +10,12 @@
|
|
15
10
|
"attributes": {
|
16
11
|
"patterns": [
|
17
12
|
{
|
13
|
+
"name": "meta.attribute.available.swift",
|
18
14
|
"begin": "((@)available)(\\()",
|
19
|
-
"beginCaptures": {
|
20
|
-
"1": {
|
21
|
-
"name": "storage.modifier.attribute.swift"
|
22
|
-
},
|
23
|
-
"2": {
|
24
|
-
"name": "punctuation.definition.attribute.swift"
|
25
|
-
},
|
26
|
-
"3": {
|
27
|
-
"name": "punctuation.definition.arguments.begin.swift"
|
28
|
-
}
|
29
|
-
},
|
30
15
|
"end": "\\)",
|
31
|
-
"endCaptures": {
|
32
|
-
"0": {
|
33
|
-
"name": "punctuation.definition.arguments.end.swift"
|
34
|
-
}
|
35
|
-
},
|
36
|
-
"name": "meta.attribute.available.swift",
|
37
16
|
"patterns": [
|
38
17
|
{
|
18
|
+
"match": "\\b((?:iOS|macOS|OSX|watchOS|tvOS)(?:ApplicationExtension)?)\\b(?:\\s+([0-9]+(?:\\.[0-9]+)*\\b))?",
|
39
19
|
"captures": {
|
40
20
|
"1": {
|
41
21
|
"name": "keyword.other.platform.os.swift"
|
@@ -43,11 +23,17 @@
|
|
43
23
|
"2": {
|
44
24
|
"name": "constant.numeric.swift"
|
45
25
|
}
|
46
|
-
}
|
47
|
-
"match": "\\b((?:iOS|macOS|OSX|watchOS|tvOS)(?:ApplicationExtension)?)\\b(?:\\s+([0-9]+(?:\\.[0-9]+)*\\b))?"
|
26
|
+
}
|
48
27
|
},
|
49
28
|
{
|
50
29
|
"begin": "\\b(introduced|deprecated|obsoleted)\\s*(:)\\s*",
|
30
|
+
"end": "(?!\\G)",
|
31
|
+
"patterns": [
|
32
|
+
{
|
33
|
+
"name": "constant.numeric.swift",
|
34
|
+
"match": "\\b[0-9]+(?:\\.[0-9]+)*\\b"
|
35
|
+
}
|
36
|
+
],
|
51
37
|
"beginCaptures": {
|
52
38
|
"1": {
|
53
39
|
"name": "keyword.other.swift"
|
@@ -55,17 +41,16 @@
|
|
55
41
|
"2": {
|
56
42
|
"name": "punctuation.separator.key-value.swift"
|
57
43
|
}
|
58
|
-
}
|
44
|
+
}
|
45
|
+
},
|
46
|
+
{
|
47
|
+
"begin": "\\b(message|renamed)\\s*(:)\\s*(?=\")",
|
59
48
|
"end": "(?!\\G)",
|
60
49
|
"patterns": [
|
61
50
|
{
|
62
|
-
"
|
63
|
-
"name": "constant.numeric.swift"
|
51
|
+
"include": "#literals"
|
64
52
|
}
|
65
|
-
]
|
66
|
-
},
|
67
|
-
{
|
68
|
-
"begin": "\\b(message|renamed)\\s*(:)\\s*(?=\")",
|
53
|
+
],
|
69
54
|
"beginCaptures": {
|
70
55
|
"1": {
|
71
56
|
"name": "keyword.other.swift"
|
@@ -73,15 +58,10 @@
|
|
73
58
|
"2": {
|
74
59
|
"name": "punctuation.separator.key-value.swift"
|
75
60
|
}
|
76
|
-
}
|
77
|
-
"end": "(?!\\G)",
|
78
|
-
"patterns": [
|
79
|
-
{
|
80
|
-
"include": "#literals"
|
81
|
-
}
|
82
|
-
]
|
61
|
+
}
|
83
62
|
},
|
84
63
|
{
|
64
|
+
"match": "(?:(\\*)|\\b(deprecated|unavailable)\\b)\\s*(.*?)(?=[,)])",
|
85
65
|
"captures": {
|
86
66
|
"1": {
|
87
67
|
"name": "keyword.other.platform.all.swift"
|
@@ -92,13 +72,9 @@
|
|
92
72
|
"3": {
|
93
73
|
"name": "invalid.illegal.character-not-allowed-here.swift"
|
94
74
|
}
|
95
|
-
}
|
96
|
-
"match": "(?:(\\*)|\\b(deprecated|unavailable)\\b)\\s*(.*?)(?=[,)])"
|
75
|
+
}
|
97
76
|
}
|
98
|
-
]
|
99
|
-
},
|
100
|
-
{
|
101
|
-
"begin": "((@)objc)(\\()",
|
77
|
+
],
|
102
78
|
"beginCaptures": {
|
103
79
|
"1": {
|
104
80
|
"name": "storage.modifier.attribute.swift"
|
@@ -110,85 +86,100 @@
|
|
110
86
|
"name": "punctuation.definition.arguments.begin.swift"
|
111
87
|
}
|
112
88
|
},
|
113
|
-
"end": "\\)",
|
114
89
|
"endCaptures": {
|
115
90
|
"0": {
|
116
91
|
"name": "punctuation.definition.arguments.end.swift"
|
117
92
|
}
|
118
|
-
}
|
93
|
+
}
|
94
|
+
},
|
95
|
+
{
|
119
96
|
"name": "meta.attribute.objc.swift",
|
97
|
+
"begin": "((@)objc)(\\()",
|
98
|
+
"end": "\\)",
|
120
99
|
"patterns": [
|
121
100
|
{
|
101
|
+
"name": "entity.name.function.swift",
|
102
|
+
"match": "\\w*(?::(?:\\w*:)*(\\w*))?",
|
122
103
|
"captures": {
|
123
104
|
"1": {
|
124
105
|
"name": "invalid.illegal.missing-colon-after-selector-piece.swift"
|
125
106
|
}
|
126
|
-
}
|
127
|
-
"match": "\\w*(?::(?:\\w*:)*(\\w*))?",
|
128
|
-
"name": "entity.name.function.swift"
|
107
|
+
}
|
129
108
|
}
|
130
|
-
]
|
131
|
-
},
|
132
|
-
{
|
133
|
-
"begin": "(@)(?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>)",
|
109
|
+
],
|
134
110
|
"beginCaptures": {
|
135
|
-
"0": {
|
136
|
-
"name": "storage.modifier.attribute.swift"
|
137
|
-
},
|
138
111
|
"1": {
|
139
|
-
"name": "
|
112
|
+
"name": "storage.modifier.attribute.swift"
|
140
113
|
},
|
141
114
|
"2": {
|
142
|
-
"name": "punctuation.definition.
|
115
|
+
"name": "punctuation.definition.attribute.swift"
|
143
116
|
},
|
144
117
|
"3": {
|
145
|
-
"name": "punctuation.definition.
|
118
|
+
"name": "punctuation.definition.arguments.begin.swift"
|
146
119
|
}
|
147
120
|
},
|
148
|
-
"
|
149
|
-
|
121
|
+
"endCaptures": {
|
122
|
+
"0": {
|
123
|
+
"name": "punctuation.definition.arguments.end.swift"
|
124
|
+
}
|
125
|
+
}
|
126
|
+
},
|
127
|
+
{
|
150
128
|
"name": "meta.attribute.swift",
|
129
|
+
"begin": "(@)(?\u003cq\u003e`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k\u003cq\u003e)",
|
130
|
+
"end": "(?!\\G\\()",
|
151
131
|
"patterns": [
|
152
132
|
{
|
133
|
+
"name": "meta.arguments.attribute.swift",
|
153
134
|
"begin": "\\(",
|
135
|
+
"end": "\\)",
|
136
|
+
"patterns": [
|
137
|
+
{
|
138
|
+
"include": "#expressions"
|
139
|
+
}
|
140
|
+
],
|
154
141
|
"beginCaptures": {
|
155
142
|
"0": {
|
156
143
|
"name": "punctuation.definition.arguments.begin.swift"
|
157
144
|
}
|
158
145
|
},
|
159
|
-
"end": "\\)",
|
160
146
|
"endCaptures": {
|
161
147
|
"0": {
|
162
148
|
"name": "punctuation.definition.arguments.end.swift"
|
163
149
|
}
|
164
|
-
}
|
165
|
-
"name": "meta.arguments.attribute.swift",
|
166
|
-
"patterns": [
|
167
|
-
{
|
168
|
-
"include": "#expressions"
|
169
|
-
}
|
170
|
-
]
|
150
|
+
}
|
171
151
|
}
|
172
|
-
]
|
152
|
+
],
|
153
|
+
"beginCaptures": {
|
154
|
+
"0": {
|
155
|
+
"name": "storage.modifier.attribute.swift"
|
156
|
+
},
|
157
|
+
"1": {
|
158
|
+
"name": "punctuation.definition.attribute.swift"
|
159
|
+
},
|
160
|
+
"2": {
|
161
|
+
"name": "punctuation.definition.identifier.swift"
|
162
|
+
},
|
163
|
+
"3": {
|
164
|
+
"name": "punctuation.definition.identifier.swift"
|
165
|
+
}
|
166
|
+
}
|
173
167
|
}
|
174
168
|
]
|
175
169
|
},
|
176
170
|
"builtin-functions": {
|
177
171
|
"patterns": [
|
178
172
|
{
|
179
|
-
"
|
180
|
-
"match": "(
|
181
|
-
"name": "support.function.swift"
|
173
|
+
"name": "support.function.swift",
|
174
|
+
"match": "(?\u003c=\\.)(?:s(?:ort(?:ed)?|plit)|contains|index|partition|f(?:i(?:lter|rst)|orEach|latMap)|with(?:MutableCharacters|CString|U(?:nsafe(?:Mutable(?:BufferPointer|Pointer(?:s|To(?:Header|Elements)))|BufferPointer)|TF8Buffer))|m(?:in|a(?:p|x)))(?=\\s*[({])\\b"
|
182
175
|
},
|
183
176
|
{
|
184
|
-
"
|
185
|
-
"match": "(
|
186
|
-
"name": "support.function.swift"
|
177
|
+
"name": "support.function.swift",
|
178
|
+
"match": "(?\u003c=\\.)(?:s(?:ymmetricDifference|t(?:oreBytes|arts|ride)|ortInPlace|u(?:ccessor|ffix|btract(?:ing|InPlace|WithOverflow)?)|quareRoot|amePosition)|h(?:oldsUnique(?:Reference|OrPinnedReference)|as(?:Suffix|Prefix))|ne(?:gate(?:d)?|xt)|c(?:o(?:untByEnumerating|py(?:Bytes)?)|lamp(?:ed)?|reate)|t(?:o(?:IntMax|Opaque|UIntMax)|ake(?:RetainedValue|UnretainedValue)|r(?:uncatingRemainder|a(?:nscodedLength|ilSurrogate)))|i(?:s(?:MutableAndUniquelyReferenced(?:OrPinned)?|S(?:trictSu(?:perset(?:Of)?|bset(?:Of)?)|u(?:perset(?:Of)?|bset(?:Of)?))|Continuation|T(?:otallyOrdered|railSurrogate)|Disjoint(?:With)?|Unique(?:Reference|lyReferenced(?:OrPinned)?)|Equal|Le(?:ss(?:ThanOrEqualTo)?|adSurrogate))|n(?:sert(?:ContentsOf)?|tersect(?:ion|InPlace)?|itialize(?:Memory|From)?|dex(?:Of|ForKey)))|o(?:verlaps|bjectAt)|d(?:i(?:stance(?:To)?|vide(?:d|WithOverflow)?)|e(?:s(?:cendant|troy)|code(?:CString)?|initialize|alloc(?:ate(?:Capacity)?)?)|rop(?:First|Last))|u(?:n(?:ion(?:InPlace)?|derestimateCount|wrappedOrError)|p(?:date(?:Value)?|percased))|join(?:ed|WithSeparator)|p(?:op(?:First|Last)|ass(?:Retained|Unretained)|re(?:decessor|fix))|e(?:scape(?:d)?|n(?:code|umerate(?:d)?)|lementsEqual|xclusiveOr(?:InPlace)?)|f(?:orm(?:Remainder|S(?:ymmetricDifference|quareRoot)|TruncatingRemainder|In(?:tersection|dex)|Union)|latten|rom(?:CString(?:RepairingIllFormedUTF8)?|Opaque))|w(?:i(?:thMemoryRebound|dth)|rite(?:To)?)|l(?:o(?:wercased|ad)|e(?:adSurrogate|xicographical(?:Compare|lyPrecedes)))|a(?:ss(?:ign(?:BackwardFrom|From)?|umingMemoryBound)|d(?:d(?:ing(?:Product)?|Product|WithOverflow)?|vanced(?:By)?)|utorelease|ppend(?:ContentsOf)?|lloc(?:ate)?|bs)|r(?:ound(?:ed)?|e(?:serveCapacity|tain|duce|place(?:Range|Subrange)?|verse(?:d)?|quest(?:NativeBuffer|UniqueMutableBackingBuffer)|lease|m(?:ove(?:Range|Subrange|Value(?:ForKey)?|First|Last|A(?:tIndex|ll))?|ainder(?:WithOverflow)?)))|ge(?:nerate|t(?:Objects|Element))|m(?:in(?:imum(?:Magnitude)?|Element)|ove(?:Initialize(?:Memory|BackwardFrom|From)?|Assign(?:From)?)?|ultipl(?:y(?:WithOverflow)?|ied)|easure|a(?:ke(?:Iterator|Description)|x(?:imum(?:Magnitude)?|Element)))|bindMemory)(?=\\s*\\()"
|
187
179
|
},
|
188
180
|
{
|
189
|
-
"
|
190
|
-
"match": "(
|
191
|
-
"name": "support.function.swift"
|
181
|
+
"name": "support.function.swift",
|
182
|
+
"match": "(?\u003c=\\.)(?:s(?:uperclassMirror|amePositionIn|tartsWith)|nextObject|c(?:haracterAtIndex|o(?:untByEnumeratingWithState|pyWithZone)|ustom(?:Mirror|PlaygroundQuickLook))|is(?:EmptyInput|ASCII)|object(?:Enumerator|ForKey|AtIndex)|join|put|keyEnumerator|withUnsafeMutablePointerToValue|length|getMirror|m(?:oveInitializeAssignFrom|ember))(?=\\s*\\()"
|
192
183
|
}
|
193
184
|
]
|
194
185
|
},
|
@@ -196,6 +187,12 @@
|
|
196
187
|
"patterns": [
|
197
188
|
{
|
198
189
|
"begin": "\\b(type)(\\()\\s*(of)(:)",
|
190
|
+
"end": "\\)",
|
191
|
+
"patterns": [
|
192
|
+
{
|
193
|
+
"include": "#expressions"
|
194
|
+
}
|
195
|
+
],
|
199
196
|
"beginCaptures": {
|
200
197
|
"1": {
|
201
198
|
"name": "support.function.dynamic-type.swift"
|
@@ -210,60 +207,47 @@
|
|
210
207
|
"name": "punctuation.separator.argument-label.begin.swift"
|
211
208
|
}
|
212
209
|
},
|
213
|
-
"end": "\\)",
|
214
210
|
"endCaptures": {
|
215
211
|
"0": {
|
216
212
|
"name": "punctuation.definition.arguments.end.swift"
|
217
213
|
}
|
218
|
-
}
|
219
|
-
"patterns": [
|
220
|
-
{
|
221
|
-
"include": "#expressions"
|
222
|
-
}
|
223
|
-
]
|
214
|
+
}
|
224
215
|
},
|
225
216
|
{
|
226
|
-
"
|
227
|
-
"match": "\\b(?:anyGenerator|autoreleasepool)(?=\\s*[({])\\b"
|
228
|
-
"name": "support.function.swift"
|
217
|
+
"name": "support.function.swift",
|
218
|
+
"match": "\\b(?:anyGenerator|autoreleasepool)(?=\\s*[({])\\b"
|
229
219
|
},
|
230
220
|
{
|
231
|
-
"
|
232
|
-
"match": "\\b(?:s(?:tride(?:of(?:Value)?)?|izeof(?:Value)?|equence|wap)|numericCast|transcode|is(?:UniquelyReferenced(?:NonObjC)?|KnownUniquelyReferenced)|zip|d(?:ump|ebugPrint)|unsafe(?:BitCast|Downcast|Unwrap|Address(?:Of)?)|pr(?:int|econdition(?:Failure)?)|fatalError|with(?:Unsafe(?:MutablePointer|Pointer)|ExtendedLifetime|VaList)|a(?:ssert(?:ionFailure)?|lignof(?:Value)?|bs)|re(?:peatElement|adLine)|getVaList|m(?:in|ax))(?=\\s*\\()"
|
233
|
-
"name": "support.function.swift"
|
221
|
+
"name": "support.function.swift",
|
222
|
+
"match": "\\b(?:s(?:tride(?:of(?:Value)?)?|izeof(?:Value)?|equence|wap)|numericCast|transcode|is(?:UniquelyReferenced(?:NonObjC)?|KnownUniquelyReferenced)|zip|d(?:ump|ebugPrint)|unsafe(?:BitCast|Downcast|Unwrap|Address(?:Of)?)|pr(?:int|econdition(?:Failure)?)|fatalError|with(?:Unsafe(?:MutablePointer|Pointer)|ExtendedLifetime|VaList)|a(?:ssert(?:ionFailure)?|lignof(?:Value)?|bs)|re(?:peatElement|adLine)|getVaList|m(?:in|ax))(?=\\s*\\()"
|
234
223
|
},
|
235
224
|
{
|
236
|
-
"
|
237
|
-
"match": "\\b(?:s(?:ort|uffix|pli(?:ce|t))|insert|overlaps|d(?:istance|rop(?:First|Last))|join|prefix|extend|withUnsafe(?:MutablePointers|Pointers)|lazy|advance|re(?:flect|move(?:Range|Last|A(?:tIndex|ll))))(?=\\s*\\()"
|
238
|
-
"name": "support.function.swift"
|
225
|
+
"name": "support.function.swift",
|
226
|
+
"match": "\\b(?:s(?:ort|uffix|pli(?:ce|t))|insert|overlaps|d(?:istance|rop(?:First|Last))|join|prefix|extend|withUnsafe(?:MutablePointers|Pointers)|lazy|advance|re(?:flect|move(?:Range|Last|A(?:tIndex|ll))))(?=\\s*\\()"
|
239
227
|
}
|
240
228
|
]
|
241
229
|
},
|
242
230
|
"builtin-properties": {
|
243
231
|
"patterns": [
|
244
232
|
{
|
245
|
-
"
|
246
|
-
"
|
233
|
+
"name": "support.variable.swift",
|
234
|
+
"match": "(?\u003c=\\bProcess\\.|\\bCommandLine\\.)(arguments|argc|unsafeArgv)"
|
247
235
|
},
|
248
236
|
{
|
249
|
-
"
|
250
|
-
"match": "(
|
251
|
-
"name": "support.variable.swift"
|
237
|
+
"name": "support.variable.swift",
|
238
|
+
"match": "(?\u003c=\\.)(?:s(?:t(?:artIndex|ri(?:ngValue|de))|i(?:ze|gn(?:BitIndex|ificand(?:Bit(?:Count|Pattern)|Width)?|alingNaN)?)|u(?:perclassMirror|mmary|bscriptBaseAddress))|h(?:eader|as(?:hValue|PointerRepresentation))|n(?:ulTerminatedUTF8|ext(?:Down|Up)|a(?:n|tiveOwner))|c(?:haracters|ount(?:TrailingZeros)?|ustom(?:Mirror|PlaygroundQuickLook)|apacity)|i(?:s(?:S(?:ign(?:Minus|aling(?:NaN)?)|ubnormal)|N(?:ormal|aN)|Canonical|Infinite|Zero|Empty|Finite|ASCII)|n(?:dices|finity)|dentity)|owner|de(?:scription|bugDescription)|u(?:n(?:safelyUnwrapped|icodeScalar(?:s)?|derestimatedCount)|tf(?:16|8(?:Start|C(?:String|odeUnitCount))?)|intValue|ppercaseString|lp(?:OfOne)?)|p(?:i|ointee)|e(?:ndIndex|lements|xponent(?:Bit(?:Count|Pattern))?)|value(?:s)?|keys|quietNaN|f(?:irst(?:ElementAddress(?:IfContiguous)?)?|loatingPointClass)|l(?:ittleEndian|owercaseString|eastNo(?:nzeroMagnitude|rmalMagnitude)|a(?:st|zy))|a(?:l(?:ignment|l(?:ocatedElementCount|Zeros))|rray(?:PropertyIsNativeTypeChecked)?)|ra(?:dix|wValue)|greatestFiniteMagnitude|m(?:in|emory|ax)|b(?:yteS(?:ize|wapped)|i(?:nade|tPattern|gEndian)|uffer|ase(?:Address)?))\\b"
|
252
239
|
},
|
253
240
|
{
|
254
|
-
"
|
255
|
-
"match": "(
|
256
|
-
"name": "support.variable.swift"
|
241
|
+
"name": "support.variable.swift",
|
242
|
+
"match": "(?\u003c=\\.)(?:boolValue|disposition|end|objectIdentifier|quickLookObject|start|valueType)\\b"
|
257
243
|
},
|
258
244
|
{
|
259
|
-
"
|
260
|
-
"match": "(
|
261
|
-
"name": "support.variable.swift"
|
245
|
+
"name": "support.variable.swift",
|
246
|
+
"match": "(?\u003c=\\.)(?:s(?:calarValue|i(?:ze|gnalingNaN)|o(?:und|me)|uppressed|prite|et)|n(?:one|egative(?:Subnormal|Normal|Infinity|Zero))|c(?:ol(?:or|lection)|ustomized)|t(?:o(?:NearestOr(?:Even|AwayFromZero)|wardZero)|uple|ext)|i(?:nt|mage)|optional|d(?:ictionary|o(?:uble|wn))|u(?:Int|p|rl)|p(?:o(?:sitive(?:Subnormal|Normal|Infinity|Zero)|int)|lus)|e(?:rror|mptyInput)|view|quietNaN|float|a(?:ttributedString|wayFromZero)|r(?:ectangle|ange)|generated|minus|b(?:ool|ezierPath))\\b"
|
262
247
|
}
|
263
248
|
]
|
264
249
|
},
|
265
250
|
"builtin-types": {
|
266
|
-
"comment": "Types provided in the standard library",
|
267
251
|
"patterns": [
|
268
252
|
{
|
269
253
|
"include": "#builtin-class-type"
|
@@ -281,79 +265,68 @@
|
|
281
265
|
"include": "#builtin-typealias"
|
282
266
|
},
|
283
267
|
{
|
284
|
-
"
|
285
|
-
"
|
268
|
+
"name": "support.type.any.swift",
|
269
|
+
"match": "\\bAny\\b"
|
286
270
|
}
|
287
271
|
],
|
288
272
|
"repository": {
|
289
273
|
"builtin-class-type": {
|
290
|
-
"
|
291
|
-
"match": "\\b(Managed(Buffer|ProtoBuffer)|NonObjectiveCBase|AnyGenerator)\\b"
|
292
|
-
"name": "support.class.swift"
|
274
|
+
"name": "support.class.swift",
|
275
|
+
"match": "\\b(Managed(Buffer|ProtoBuffer)|NonObjectiveCBase|AnyGenerator)\\b"
|
293
276
|
},
|
294
277
|
"builtin-enum-type": {
|
295
278
|
"patterns": [
|
296
279
|
{
|
297
|
-
"
|
298
|
-
"match": "\\b(?:CommandLine|Process(?=\\.))\\b"
|
299
|
-
"name": "support.constant.swift"
|
280
|
+
"name": "support.constant.swift",
|
281
|
+
"match": "\\b(?:CommandLine|Process(?=\\.))\\b"
|
300
282
|
},
|
301
283
|
{
|
302
|
-
"
|
303
|
-
"match": "\\bNever\\b"
|
304
|
-
"name": "support.constant.never.swift"
|
284
|
+
"name": "support.constant.never.swift",
|
285
|
+
"match": "\\bNever\\b"
|
305
286
|
},
|
306
287
|
{
|
307
|
-
"
|
308
|
-
"match": "\\b(?:ImplicitlyUnwrappedOptional|Representation|MemoryLayout|FloatingPointClassification|SetIndexRepresentation|SetIteratorRepresentation|FloatingPointRoundingRule|UnicodeDecodingResult|Optional|DictionaryIndexRepresentation|AncestorRepresentation|DisplayStyle|PlaygroundQuickLook|Never|FloatingPointSign|Bit|DictionaryIteratorRepresentation)\\b"
|
309
|
-
"name": "support.type.swift"
|
288
|
+
"name": "support.type.swift",
|
289
|
+
"match": "\\b(?:ImplicitlyUnwrappedOptional|Representation|MemoryLayout|FloatingPointClassification|SetIndexRepresentation|SetIteratorRepresentation|FloatingPointRoundingRule|UnicodeDecodingResult|Optional|DictionaryIndexRepresentation|AncestorRepresentation|DisplayStyle|PlaygroundQuickLook|Never|FloatingPointSign|Bit|DictionaryIteratorRepresentation)\\b"
|
310
290
|
},
|
311
291
|
{
|
312
|
-
"
|
313
|
-
"match": "\\b(?:MirrorDisposition|QuickLookObject)\\b"
|
314
|
-
"name": "support.type.swift"
|
292
|
+
"name": "support.type.swift",
|
293
|
+
"match": "\\b(?:MirrorDisposition|QuickLookObject)\\b"
|
315
294
|
}
|
316
295
|
]
|
317
296
|
},
|
318
297
|
"builtin-protocol-type": {
|
319
298
|
"patterns": [
|
320
299
|
{
|
321
|
-
"
|
322
|
-
"match": "\\b(?:Ra(?:n(?:domAccess(?:Collection|Indexable)|geReplaceable(?:Collection|Indexable))|wRepresentable)|M(?:irrorPath|utable(?:Collection|Indexable))|Bi(?:naryFloatingPoint|twiseOperations|directional(?:Collection|Indexable))|S(?:tr(?:ideable|eamable)|igned(?:Number|Integer)|e(?:tAlgebra|quence))|Hashable|C(?:o(?:llection|mparable)|ustom(?:Reflectable|StringConvertible|DebugStringConvertible|PlaygroundQuickLookable|LeafReflectable)|VarArg)|TextOutputStream|I(?:n(?:teger(?:Arithmetic)?|dexable(?:Base)?)|teratorProtocol)|OptionSet|Un(?:signedInteger|icodeCodec)|E(?:quatable|rror|xpressibleBy(?:BooleanLiteral|String(?:Interpolation|Literal)|NilLiteral|IntegerLiteral|DictionaryLiteral|UnicodeScalarLiteral|ExtendedGraphemeClusterLiteral|FloatLiteral|ArrayLiteral))|FloatingPoint|L(?:osslessStringConvertible|azy(?:SequenceProtocol|CollectionProtocol))|A(?:nyObject|bsoluteValuable))\\b"
|
323
|
-
"name": "support.type.swift"
|
300
|
+
"name": "support.type.swift",
|
301
|
+
"match": "\\b(?:Ra(?:n(?:domAccess(?:Collection|Indexable)|geReplaceable(?:Collection|Indexable))|wRepresentable)|M(?:irrorPath|utable(?:Collection|Indexable))|Bi(?:naryFloatingPoint|twiseOperations|directional(?:Collection|Indexable))|S(?:tr(?:ideable|eamable)|igned(?:Number|Integer)|e(?:tAlgebra|quence))|Hashable|C(?:o(?:llection|mparable)|ustom(?:Reflectable|StringConvertible|DebugStringConvertible|PlaygroundQuickLookable|LeafReflectable)|VarArg)|TextOutputStream|I(?:n(?:teger(?:Arithmetic)?|dexable(?:Base)?)|teratorProtocol)|OptionSet|Un(?:signedInteger|icodeCodec)|E(?:quatable|rror|xpressibleBy(?:BooleanLiteral|String(?:Interpolation|Literal)|NilLiteral|IntegerLiteral|DictionaryLiteral|UnicodeScalarLiteral|ExtendedGraphemeClusterLiteral|FloatLiteral|ArrayLiteral))|FloatingPoint|L(?:osslessStringConvertible|azy(?:SequenceProtocol|CollectionProtocol))|A(?:nyObject|bsoluteValuable))\\b"
|
324
302
|
},
|
325
303
|
{
|
326
|
-
"
|
327
|
-
"match": "\\b(?:Ran(?:domAccessIndexType|geReplaceableCollectionType)|GeneratorType|M(?:irror(?:Type|PathType)|utable(?:Sliceable|CollectionType))|B(?:i(?:twiseOperationsType|directionalIndexType)|oolean(?:Type|LiteralConvertible))|S(?:tring(?:InterpolationConvertible|LiteralConvertible)|i(?:nkType|gned(?:NumberType|IntegerType))|e(?:tAlgebraType|quenceType)|liceable)|NilLiteralConvertible|C(?:ollectionType|VarArgType)|Inte(?:rvalType|ger(?:Type|LiteralConvertible|ArithmeticType))|O(?:utputStreamType|ptionSetType)|DictionaryLiteralConvertible|Un(?:signedIntegerType|icode(?:ScalarLiteralConvertible|CodecType))|E(?:rrorType|xten(?:sibleCollectionType|dedGraphemeClusterLiteralConvertible))|F(?:orwardIndexType|loat(?:ingPointType|LiteralConvertible))|A(?:nyCollectionType|rrayLiteralConvertible))\\b"
|
328
|
-
"name": "support.type.swift"
|
304
|
+
"name": "support.type.swift",
|
305
|
+
"match": "\\b(?:Ran(?:domAccessIndexType|geReplaceableCollectionType)|GeneratorType|M(?:irror(?:Type|PathType)|utable(?:Sliceable|CollectionType))|B(?:i(?:twiseOperationsType|directionalIndexType)|oolean(?:Type|LiteralConvertible))|S(?:tring(?:InterpolationConvertible|LiteralConvertible)|i(?:nkType|gned(?:NumberType|IntegerType))|e(?:tAlgebraType|quenceType)|liceable)|NilLiteralConvertible|C(?:ollectionType|VarArgType)|Inte(?:rvalType|ger(?:Type|LiteralConvertible|ArithmeticType))|O(?:utputStreamType|ptionSetType)|DictionaryLiteralConvertible|Un(?:signedIntegerType|icode(?:ScalarLiteralConvertible|CodecType))|E(?:rrorType|xten(?:sibleCollectionType|dedGraphemeClusterLiteralConvertible))|F(?:orwardIndexType|loat(?:ingPointType|LiteralConvertible))|A(?:nyCollectionType|rrayLiteralConvertible))\\b"
|
329
306
|
}
|
330
307
|
]
|
331
308
|
},
|
332
309
|
"builtin-struct-type": {
|
333
310
|
"patterns": [
|
334
311
|
{
|
335
|
-
"
|
336
|
-
"match": "\\b(?:R(?:e(?:peat(?:ed)?|versed(?:RandomAccess(?:Collection|Index)|Collection|Index))|an(?:domAccessSlice|ge(?:Replaceable(?:RandomAccessSlice|BidirectionalSlice|Slice)|Generator)?))|Generator(?:Sequence|OfOne)|M(?:irror|utable(?:Ran(?:domAccessSlice|geReplaceable(?:RandomAccessSlice|BidirectionalSlice|Slice))|BidirectionalSlice|Slice)|anagedBufferPointer)|B(?:idirectionalSlice|ool)|S(?:t(?:aticString|ri(?:ng|deT(?:hrough(?:Generator|Iterator)?|o(?:Generator|Iterator)?)))|et(?:I(?:ndex|terator))?|lice)|HalfOpenInterval|C(?:haracter(?:View)?|o(?:ntiguousArray|untable(?:Range|ClosedRange)|llectionOfOne)|OpaquePointer|losed(?:Range(?:I(?:ndex|terator))?|Interval)|VaListPointer)|I(?:n(?:t(?:16|8|32|64)?|d(?:ices|ex(?:ing(?:Generator|Iterator))?))|terator(?:Sequence|OverOne)?)|Zip2(?:Sequence|Iterator)|O(?:paquePointer|bjectIdentifier)|D(?:ictionary(?:I(?:ndex|terator)|Literal)?|ouble|efault(?:RandomAccessIndices|BidirectionalIndices|Indices))|U(?:n(?:safe(?:RawPointer|Mutable(?:RawPointer|BufferPointer|Pointer)|BufferPointer(?:Generator|Iterator)?|Pointer)|icodeScalar(?:View)?|foldSequence|managed)|TF(?:16(?:View)?|8(?:View)?|32)|Int(?:16|8|32|64)?)|Join(?:Generator|ed(?:Sequence|Iterator))|PermutationGenerator|E(?:numerate(?:Generator|Sequence|d(?:Sequence|Iterator))|mpty(?:Generator|Collection|Iterator))|Fl(?:oat(?:80)?|atten(?:Generator|BidirectionalCollection(?:Index)?|Sequence|Collection(?:Index)?|Iterator))|L(?:egacyChildren|azy(?:RandomAccessCollection|Map(?:RandomAccessCollection|Generator|BidirectionalCollection|Sequence|Collection|Iterator)|BidirectionalCollection|Sequence|Collection|Filter(?:Generator|BidirectionalCollection|Sequence|Collection|I(?:ndex|terator))))|A(?:ny(?:RandomAccessCollection|Generator|BidirectionalCollection|Sequence|Hashable|Collection|I(?:ndex|terator))|utoreleasingUnsafeMutablePointer|rray(?:Slice)?))\\b"
|
337
|
-
"name": "support.type.swift"
|
312
|
+
"name": "support.type.swift",
|
313
|
+
"match": "\\b(?:R(?:e(?:peat(?:ed)?|versed(?:RandomAccess(?:Collection|Index)|Collection|Index))|an(?:domAccessSlice|ge(?:Replaceable(?:RandomAccessSlice|BidirectionalSlice|Slice)|Generator)?))|Generator(?:Sequence|OfOne)|M(?:irror|utable(?:Ran(?:domAccessSlice|geReplaceable(?:RandomAccessSlice|BidirectionalSlice|Slice))|BidirectionalSlice|Slice)|anagedBufferPointer)|B(?:idirectionalSlice|ool)|S(?:t(?:aticString|ri(?:ng|deT(?:hrough(?:Generator|Iterator)?|o(?:Generator|Iterator)?)))|et(?:I(?:ndex|terator))?|lice)|HalfOpenInterval|C(?:haracter(?:View)?|o(?:ntiguousArray|untable(?:Range|ClosedRange)|llectionOfOne)|OpaquePointer|losed(?:Range(?:I(?:ndex|terator))?|Interval)|VaListPointer)|I(?:n(?:t(?:16|8|32|64)?|d(?:ices|ex(?:ing(?:Generator|Iterator))?))|terator(?:Sequence|OverOne)?)|Zip2(?:Sequence|Iterator)|O(?:paquePointer|bjectIdentifier)|D(?:ictionary(?:I(?:ndex|terator)|Literal)?|ouble|efault(?:RandomAccessIndices|BidirectionalIndices|Indices))|U(?:n(?:safe(?:RawPointer|Mutable(?:RawPointer|BufferPointer|Pointer)|BufferPointer(?:Generator|Iterator)?|Pointer)|icodeScalar(?:View)?|foldSequence|managed)|TF(?:16(?:View)?|8(?:View)?|32)|Int(?:16|8|32|64)?)|Join(?:Generator|ed(?:Sequence|Iterator))|PermutationGenerator|E(?:numerate(?:Generator|Sequence|d(?:Sequence|Iterator))|mpty(?:Generator|Collection|Iterator))|Fl(?:oat(?:80)?|atten(?:Generator|BidirectionalCollection(?:Index)?|Sequence|Collection(?:Index)?|Iterator))|L(?:egacyChildren|azy(?:RandomAccessCollection|Map(?:RandomAccessCollection|Generator|BidirectionalCollection|Sequence|Collection|Iterator)|BidirectionalCollection|Sequence|Collection|Filter(?:Generator|BidirectionalCollection|Sequence|Collection|I(?:ndex|terator))))|A(?:ny(?:RandomAccessCollection|Generator|BidirectionalCollection|Sequence|Hashable|Collection|I(?:ndex|terator))|utoreleasingUnsafeMutablePointer|rray(?:Slice)?))\\b"
|
338
314
|
},
|
339
315
|
{
|
340
|
-
"
|
341
|
-
"match": "\\b(?:R(?:everse(?:RandomAccess(?:Collection|Index)|Collection|Index)|awByte)|Map(?:Generator|Sequence|Collection)|S(?:inkOf|etGenerator)|Zip2Generator|DictionaryGenerator|Filter(?:Generator|Sequence|Collection(?:Index)?)|LazyForwardCollection|Any(?:RandomAccessIndex|BidirectionalIndex|Forward(?:Collection|Index)))\\b"
|
342
|
-
"name": "support.type.swift"
|
316
|
+
"name": "support.type.swift",
|
317
|
+
"match": "\\b(?:R(?:everse(?:RandomAccess(?:Collection|Index)|Collection|Index)|awByte)|Map(?:Generator|Sequence|Collection)|S(?:inkOf|etGenerator)|Zip2Generator|DictionaryGenerator|Filter(?:Generator|Sequence|Collection(?:Index)?)|LazyForwardCollection|Any(?:RandomAccessIndex|BidirectionalIndex|Forward(?:Collection|Index)))\\b"
|
343
318
|
}
|
344
319
|
]
|
345
320
|
},
|
346
321
|
"builtin-typealias": {
|
347
322
|
"patterns": [
|
348
323
|
{
|
349
|
-
"
|
350
|
-
"match": "\\b(?:Raw(?:Significand|Exponent|Value)|B(?:ooleanLiteralType|uffer|ase)|S(?:t(?:orage|r(?:i(?:ngLiteralType|de)|eam(?:1|2)))|ubSequence)|NativeBuffer|C(?:hild(?:ren)?|Bool|S(?:hort|ignedChar)|odeUnit|Char(?:16|32)?|Int|Double|Unsigned(?:Short|Char|Int|Long(?:Long)?)|Float|WideChar|Long(?:Long)?)|I(?:n(?:t(?:Max|egerLiteralType)|d(?:ices|ex(?:Distance)?))|terator)|Distance|U(?:n(?:icodeScalar(?:Type|Index|View|LiteralType)|foldFirstSequence)|TF(?:16(?:Index|View)|8Index)|IntMax)|E(?:lement(?:s)?|x(?:tendedGraphemeCluster(?:Type|LiteralType)|ponent))|V(?:oid|alue)|Key|Float(?:32|LiteralType|64)|AnyClass)\\b"
|
351
|
-
"name": "support.type.swift"
|
324
|
+
"name": "support.type.swift",
|
325
|
+
"match": "\\b(?:Raw(?:Significand|Exponent|Value)|B(?:ooleanLiteralType|uffer|ase)|S(?:t(?:orage|r(?:i(?:ngLiteralType|de)|eam(?:1|2)))|ubSequence)|NativeBuffer|C(?:hild(?:ren)?|Bool|S(?:hort|ignedChar)|odeUnit|Char(?:16|32)?|Int|Double|Unsigned(?:Short|Char|Int|Long(?:Long)?)|Float|WideChar|Long(?:Long)?)|I(?:n(?:t(?:Max|egerLiteralType)|d(?:ices|ex(?:Distance)?))|terator)|Distance|U(?:n(?:icodeScalar(?:Type|Index|View|LiteralType)|foldFirstSequence)|TF(?:16(?:Index|View)|8Index)|IntMax)|E(?:lement(?:s)?|x(?:tendedGraphemeCluster(?:Type|LiteralType)|ponent))|V(?:oid|alue)|Key|Float(?:32|LiteralType|64)|AnyClass)\\b"
|
352
326
|
},
|
353
327
|
{
|
354
|
-
"
|
355
|
-
"match": "\\b(?:Generator|PlaygroundQuickLook|UWord|Word)\\b"
|
356
|
-
"name": "support.type.swift"
|
328
|
+
"name": "support.type.swift",
|
329
|
+
"match": "\\b(?:Generator|PlaygroundQuickLook|UWord|Word)\\b"
|
357
330
|
}
|
358
331
|
]
|
359
332
|
}
|
@@ -361,138 +334,138 @@
|
|
361
334
|
},
|
362
335
|
"code-block": {
|
363
336
|
"begin": "\\{",
|
337
|
+
"end": "\\}",
|
338
|
+
"patterns": [
|
339
|
+
{
|
340
|
+
"include": "$self"
|
341
|
+
}
|
342
|
+
],
|
364
343
|
"beginCaptures": {
|
365
344
|
"0": {
|
366
345
|
"name": "punctuation.section.scope.begin.swift"
|
367
346
|
}
|
368
347
|
},
|
369
|
-
"end": "\\}",
|
370
348
|
"endCaptures": {
|
371
349
|
"0": {
|
372
350
|
"name": "punctuation.section.scope.end.swift"
|
373
351
|
}
|
374
|
-
}
|
375
|
-
"patterns": [
|
376
|
-
{
|
377
|
-
"include": "$self"
|
378
|
-
}
|
379
|
-
]
|
352
|
+
}
|
380
353
|
},
|
381
354
|
"comments": {
|
382
355
|
"patterns": [
|
383
356
|
{
|
357
|
+
"name": "comment.line.number-sign.swift",
|
358
|
+
"match": "\\A^(#!).*$\\n?",
|
384
359
|
"captures": {
|
385
360
|
"1": {
|
386
361
|
"name": "punctuation.definition.comment.swift"
|
387
362
|
}
|
388
|
-
}
|
389
|
-
"match": "\\A^(#!).*$\\n?",
|
390
|
-
"name": "comment.line.number-sign.swift"
|
363
|
+
}
|
391
364
|
},
|
392
365
|
{
|
366
|
+
"name": "comment.block.documentation.swift",
|
393
367
|
"begin": "/\\*\\*(?!/)",
|
368
|
+
"end": "\\*/",
|
369
|
+
"patterns": [
|
370
|
+
{
|
371
|
+
"include": "#nested"
|
372
|
+
}
|
373
|
+
],
|
394
374
|
"beginCaptures": {
|
395
375
|
"0": {
|
396
376
|
"name": "punctuation.definition.comment.begin.swift"
|
397
377
|
}
|
398
378
|
},
|
399
|
-
"end": "\\*/",
|
400
379
|
"endCaptures": {
|
401
380
|
"0": {
|
402
381
|
"name": "punctuation.definition.comment.end.swift"
|
403
382
|
}
|
404
|
-
}
|
405
|
-
|
383
|
+
}
|
384
|
+
},
|
385
|
+
{
|
386
|
+
"name": "comment.block.documentation.playground.swift",
|
387
|
+
"begin": "/\\*:",
|
388
|
+
"end": "\\*/",
|
406
389
|
"patterns": [
|
407
390
|
{
|
408
391
|
"include": "#nested"
|
409
392
|
}
|
410
|
-
]
|
411
|
-
},
|
412
|
-
{
|
413
|
-
"begin": "/\\*:",
|
393
|
+
],
|
414
394
|
"beginCaptures": {
|
415
395
|
"0": {
|
416
396
|
"name": "punctuation.definition.comment.begin.swift"
|
417
397
|
}
|
418
398
|
},
|
419
|
-
"end": "\\*/",
|
420
399
|
"endCaptures": {
|
421
400
|
"0": {
|
422
401
|
"name": "punctuation.definition.comment.end.swift"
|
423
402
|
}
|
424
|
-
}
|
425
|
-
|
403
|
+
}
|
404
|
+
},
|
405
|
+
{
|
406
|
+
"name": "comment.block.swift",
|
407
|
+
"begin": "/\\*",
|
408
|
+
"end": "\\*/",
|
426
409
|
"patterns": [
|
427
410
|
{
|
428
411
|
"include": "#nested"
|
429
412
|
}
|
430
|
-
]
|
431
|
-
},
|
432
|
-
{
|
433
|
-
"begin": "/\\*",
|
413
|
+
],
|
434
414
|
"beginCaptures": {
|
435
415
|
"0": {
|
436
416
|
"name": "punctuation.definition.comment.begin.swift"
|
437
417
|
}
|
438
418
|
},
|
439
|
-
"end": "\\*/",
|
440
419
|
"endCaptures": {
|
441
420
|
"0": {
|
442
421
|
"name": "punctuation.definition.comment.end.swift"
|
443
422
|
}
|
444
|
-
}
|
445
|
-
"name": "comment.block.swift",
|
446
|
-
"patterns": [
|
447
|
-
{
|
448
|
-
"include": "#nested"
|
449
|
-
}
|
450
|
-
]
|
423
|
+
}
|
451
424
|
},
|
452
425
|
{
|
453
|
-
"
|
454
|
-
"
|
426
|
+
"name": "invalid.illegal.unexpected-end-of-block-comment.swift",
|
427
|
+
"match": "\\*/"
|
455
428
|
},
|
456
429
|
{
|
457
430
|
"begin": "(^[ \\t]+)?(?=//)",
|
458
|
-
"beginCaptures": {
|
459
|
-
"1": {
|
460
|
-
"name": "punctuation.whitespace.comment.leading.swift"
|
461
|
-
}
|
462
|
-
},
|
463
431
|
"end": "(?!\\G)",
|
464
432
|
"patterns": [
|
465
433
|
{
|
434
|
+
"name": "comment.line.triple-slash.documentation.swift",
|
466
435
|
"begin": "///",
|
436
|
+
"end": "^",
|
467
437
|
"beginCaptures": {
|
468
438
|
"0": {
|
469
439
|
"name": "punctuation.definition.comment.swift"
|
470
440
|
}
|
471
|
-
}
|
472
|
-
"end": "^",
|
473
|
-
"name": "comment.line.triple-slash.documentation.swift"
|
441
|
+
}
|
474
442
|
},
|
475
443
|
{
|
444
|
+
"name": "comment.line.double-slash.documentation.swift",
|
476
445
|
"begin": "//:",
|
446
|
+
"end": "^",
|
477
447
|
"beginCaptures": {
|
478
448
|
"0": {
|
479
449
|
"name": "punctuation.definition.comment.swift"
|
480
450
|
}
|
481
|
-
}
|
482
|
-
"end": "^",
|
483
|
-
"name": "comment.line.double-slash.documentation.swift"
|
451
|
+
}
|
484
452
|
},
|
485
453
|
{
|
454
|
+
"name": "comment.line.double-slash.swift",
|
486
455
|
"begin": "//",
|
456
|
+
"end": "^",
|
487
457
|
"beginCaptures": {
|
488
458
|
"0": {
|
489
459
|
"name": "punctuation.definition.comment.swift"
|
490
460
|
}
|
491
|
-
}
|
492
|
-
"end": "^",
|
493
|
-
"name": "comment.line.double-slash.swift"
|
461
|
+
}
|
494
462
|
}
|
495
|
-
]
|
463
|
+
],
|
464
|
+
"beginCaptures": {
|
465
|
+
"1": {
|
466
|
+
"name": "punctuation.whitespace.comment.leading.swift"
|
467
|
+
}
|
468
|
+
}
|
496
469
|
}
|
497
470
|
],
|
498
471
|
"repository": {
|
@@ -510,7 +483,9 @@
|
|
510
483
|
"compiler-control": {
|
511
484
|
"patterns": [
|
512
485
|
{
|
486
|
+
"contentName": "comment.block.preprocessor.swift",
|
513
487
|
"begin": "^\\s*(#)(if|elseif)\\s+(false)\\b.*?(?=$|//|/\\*)",
|
488
|
+
"end": "(?=^\\s*(#(elseif|else|endif)\\b))",
|
514
489
|
"beginCaptures": {
|
515
490
|
"0": {
|
516
491
|
"name": "meta.preprocessor.conditional.swift"
|
@@ -524,32 +499,23 @@
|
|
524
499
|
"3": {
|
525
500
|
"name": "constant.language.boolean.swift"
|
526
501
|
}
|
527
|
-
}
|
528
|
-
"contentName": "comment.block.preprocessor.swift",
|
529
|
-
"end": "(?=^\\s*(#(elseif|else|endif)\\b))"
|
502
|
+
}
|
530
503
|
},
|
531
504
|
{
|
505
|
+
"name": "meta.preprocessor.conditional.swift",
|
532
506
|
"begin": "^\\s*(#)(if|elseif)\\s+",
|
533
|
-
"captures": {
|
534
|
-
"1": {
|
535
|
-
"name": "punctuation.definition.preprocessor.swift"
|
536
|
-
},
|
537
|
-
"2": {
|
538
|
-
"name": "keyword.control.preprocessor.conditional.swift"
|
539
|
-
}
|
540
|
-
},
|
541
507
|
"end": "(?=\\s*(?://|/\\*))|$",
|
542
|
-
"name": "meta.preprocessor.conditional.swift",
|
543
508
|
"patterns": [
|
544
509
|
{
|
545
|
-
"
|
546
|
-
"
|
510
|
+
"name": "keyword.operator.logical.swift",
|
511
|
+
"match": "(\u0026\u0026|\\|\\|)"
|
547
512
|
},
|
548
513
|
{
|
549
|
-
"
|
550
|
-
"
|
514
|
+
"name": "constant.language.boolean.swift",
|
515
|
+
"match": "\\b(true|false)\\b"
|
551
516
|
},
|
552
517
|
{
|
518
|
+
"match": "\\b(arch)\\s*(\\()\\s*(?:(arm|arm64|powerpc64|powerpc64le|i386|x86_64|s390x)|\\w+)\\s*(\\))",
|
553
519
|
"captures": {
|
554
520
|
"1": {
|
555
521
|
"name": "keyword.other.condition.swift"
|
@@ -563,10 +529,10 @@
|
|
563
529
|
"4": {
|
564
530
|
"name": "punctuation.definition.parameters.end.swift"
|
565
531
|
}
|
566
|
-
}
|
567
|
-
"match": "\\b(arch)\\s*(\\()\\s*(?:(arm|arm64|powerpc64|powerpc64le|i386|x86_64|s390x)|\\w+)\\s*(\\))"
|
532
|
+
}
|
568
533
|
},
|
569
534
|
{
|
535
|
+
"match": "\\b(os)\\s*(\\()\\s*(?:(macOS|OSX|iOS|tvOS|watchOS|Android|Linux|FreeBSD|Windows|PS4)|\\w+)\\s*(\\))",
|
570
536
|
"captures": {
|
571
537
|
"1": {
|
572
538
|
"name": "keyword.other.condition.swift"
|
@@ -580,11 +546,21 @@
|
|
580
546
|
"4": {
|
581
547
|
"name": "punctuation.definition.parameters.end.swift"
|
582
548
|
}
|
583
|
-
}
|
584
|
-
"match": "\\b(os)\\s*(\\()\\s*(?:(macOS|OSX|iOS|tvOS|watchOS|Android|Linux|FreeBSD|Windows|PS4)|\\w+)\\s*(\\))"
|
549
|
+
}
|
585
550
|
},
|
586
551
|
{
|
587
552
|
"begin": "\\b(swift)\\s*(\\()",
|
553
|
+
"end": "(\\))|$",
|
554
|
+
"patterns": [
|
555
|
+
{
|
556
|
+
"name": "keyword.operator.comparison.swift",
|
557
|
+
"match": "\u003e="
|
558
|
+
},
|
559
|
+
{
|
560
|
+
"name": "constant.numeric.swift",
|
561
|
+
"match": "\\b[0-9]+(?:\\.[0-9]+)*\\b"
|
562
|
+
}
|
563
|
+
],
|
588
564
|
"beginCaptures": {
|
589
565
|
"1": {
|
590
566
|
"name": "keyword.other.condition.swift"
|
@@ -593,26 +569,25 @@
|
|
593
569
|
"name": "punctuation.definition.parameters.begin.swift"
|
594
570
|
}
|
595
571
|
},
|
596
|
-
"end": "(\\))|$",
|
597
572
|
"endCaptures": {
|
598
573
|
"1": {
|
599
574
|
"name": "punctuation.definition.parameters.end.swift"
|
600
575
|
}
|
601
|
-
}
|
602
|
-
"patterns": [
|
603
|
-
{
|
604
|
-
"match": ">=",
|
605
|
-
"name": "keyword.operator.comparison.swift"
|
606
|
-
},
|
607
|
-
{
|
608
|
-
"match": "\\b[0-9]+(?:\\.[0-9]+)*\\b",
|
609
|
-
"name": "constant.numeric.swift"
|
610
|
-
}
|
611
|
-
]
|
576
|
+
}
|
612
577
|
}
|
613
|
-
]
|
578
|
+
],
|
579
|
+
"captures": {
|
580
|
+
"1": {
|
581
|
+
"name": "punctuation.definition.preprocessor.swift"
|
582
|
+
},
|
583
|
+
"2": {
|
584
|
+
"name": "keyword.control.preprocessor.conditional.swift"
|
585
|
+
}
|
586
|
+
}
|
614
587
|
},
|
615
588
|
{
|
589
|
+
"name": "meta.preprocessor.conditional.swift",
|
590
|
+
"match": "^\\s*(#)(else|endif)(.*?)(?=$|//|/\\*)",
|
616
591
|
"captures": {
|
617
592
|
"1": {
|
618
593
|
"name": "punctuation.definition.preprocessor.swift"
|
@@ -623,16 +598,16 @@
|
|
623
598
|
"3": {
|
624
599
|
"patterns": [
|
625
600
|
{
|
626
|
-
"
|
627
|
-
"
|
601
|
+
"name": "invalid.illegal.character-not-allowed-here.swift",
|
602
|
+
"match": "\\S+"
|
628
603
|
}
|
629
604
|
]
|
630
605
|
}
|
631
|
-
}
|
632
|
-
"match": "^\\s*(#)(else|endif)(.*?)(?=$|//|/\\*)",
|
633
|
-
"name": "meta.preprocessor.conditional.swift"
|
606
|
+
}
|
634
607
|
},
|
635
608
|
{
|
609
|
+
"name": "meta.preprocessor.sourcelocation.swift",
|
610
|
+
"match": "^\\s*(#)(sourceLocation)((\\()([^)]*)(\\)))(.*?)(?=$|//|/\\*)",
|
636
611
|
"captures": {
|
637
612
|
"1": {
|
638
613
|
"name": "punctuation.definition.preprocessor.swift"
|
@@ -647,6 +622,12 @@
|
|
647
622
|
"patterns": [
|
648
623
|
{
|
649
624
|
"begin": "(file)\\s*(:)\\s*(?=\")",
|
625
|
+
"end": "(?!\\G)",
|
626
|
+
"patterns": [
|
627
|
+
{
|
628
|
+
"include": "#literals"
|
629
|
+
}
|
630
|
+
],
|
650
631
|
"beginCaptures": {
|
651
632
|
"1": {
|
652
633
|
"name": "support.variable.parameter.swift"
|
@@ -654,15 +635,10 @@
|
|
654
635
|
"2": {
|
655
636
|
"name": "punctuation.separator.key-value.swift"
|
656
637
|
}
|
657
|
-
}
|
658
|
-
"end": "(?!\\G)",
|
659
|
-
"patterns": [
|
660
|
-
{
|
661
|
-
"include": "#literals"
|
662
|
-
}
|
663
|
-
]
|
638
|
+
}
|
664
639
|
},
|
665
640
|
{
|
641
|
+
"match": "(line)\\s*(:)\\s*([0-9]+)",
|
666
642
|
"captures": {
|
667
643
|
"1": {
|
668
644
|
"name": "support.variable.parameter.swift"
|
@@ -673,16 +649,15 @@
|
|
673
649
|
"3": {
|
674
650
|
"name": "constant.numeric.integer.swift"
|
675
651
|
}
|
676
|
-
}
|
677
|
-
"match": "(line)\\s*(:)\\s*([0-9]+)"
|
652
|
+
}
|
678
653
|
},
|
679
654
|
{
|
680
|
-
"
|
681
|
-
"
|
655
|
+
"name": "punctuation.separator.parameters.swift",
|
656
|
+
"match": ","
|
682
657
|
},
|
683
658
|
{
|
684
|
-
"
|
685
|
-
"
|
659
|
+
"name": "invalid.illegal.character-not-allowed-here.swift",
|
660
|
+
"match": "\\S+"
|
686
661
|
}
|
687
662
|
]
|
688
663
|
},
|
@@ -692,14 +667,12 @@
|
|
692
667
|
"7": {
|
693
668
|
"patterns": [
|
694
669
|
{
|
695
|
-
"
|
696
|
-
"
|
670
|
+
"name": "invalid.illegal.character-not-allowed-here.swift",
|
671
|
+
"match": "\\S+"
|
697
672
|
}
|
698
673
|
]
|
699
674
|
}
|
700
|
-
}
|
701
|
-
"match": "^\\s*(#)(sourceLocation)((\\()([^)]*)(\\)))(.*?)(?=$|//|/\\*)",
|
702
|
-
"name": "meta.preprocessor.sourcelocation.swift"
|
675
|
+
}
|
703
676
|
}
|
704
677
|
]
|
705
678
|
},
|
@@ -746,50 +719,48 @@
|
|
746
719
|
"include": "#attributes"
|
747
720
|
},
|
748
721
|
{
|
749
|
-
"
|
750
|
-
"
|
722
|
+
"name": "keyword.control.exception.swift",
|
723
|
+
"match": "\\b(?:throws|rethrows)\\b"
|
751
724
|
},
|
752
725
|
{
|
753
|
-
"
|
754
|
-
"
|
726
|
+
"name": "storage.modifier.swift",
|
727
|
+
"match": "\\binout\\b"
|
755
728
|
},
|
756
729
|
{
|
757
|
-
"
|
758
|
-
"
|
730
|
+
"name": "variable.language.swift",
|
731
|
+
"match": "\\bSelf\\b"
|
759
732
|
},
|
760
733
|
{
|
734
|
+
"match": "(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])(-\u003e)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])",
|
761
735
|
"captures": {
|
762
736
|
"1": {
|
763
737
|
"name": "keyword.operator.type.function.swift"
|
764
738
|
}
|
765
|
-
}
|
766
|
-
"match": "(?<![/=\\-+!*%<>&|\\^~.])(->)(?![/=\\-+!*%<>&|\\^~.])"
|
739
|
+
}
|
767
740
|
},
|
768
741
|
{
|
742
|
+
"match": "(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])(\u0026)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])",
|
769
743
|
"captures": {
|
770
744
|
"1": {
|
771
745
|
"name": "keyword.operator.type.composition.swift"
|
772
746
|
}
|
773
|
-
}
|
774
|
-
"comment": "Swift 3: A & B",
|
775
|
-
"match": "(?<![/=\\-+!*%<>&|\\^~.])(&)(?![/=\\-+!*%<>&|\\^~.])"
|
747
|
+
}
|
776
748
|
},
|
777
749
|
{
|
778
|
-
"
|
779
|
-
"
|
750
|
+
"name": "keyword.operator.type.optional.swift",
|
751
|
+
"match": "[?!]"
|
780
752
|
},
|
781
753
|
{
|
782
|
-
"
|
783
|
-
"
|
754
|
+
"name": "keyword.operator.function.variadic-parameter.swift",
|
755
|
+
"match": "\\.\\.\\."
|
784
756
|
},
|
785
757
|
{
|
786
|
-
"
|
787
|
-
"match": "\\bprotocol\\b"
|
788
|
-
"name": "keyword.operator.type.composition.swift"
|
758
|
+
"name": "keyword.operator.type.composition.swift",
|
759
|
+
"match": "\\bprotocol\\b"
|
789
760
|
},
|
790
761
|
{
|
791
|
-
"
|
792
|
-
"
|
762
|
+
"name": "keyword.operator.type.metatype.swift",
|
763
|
+
"match": "(?\u003c=\\.)(?:Protocol|Type)\\b"
|
793
764
|
},
|
794
765
|
{
|
795
766
|
"include": "#tuple-type"
|
@@ -804,127 +775,108 @@
|
|
804
775
|
"repository": {
|
805
776
|
"collection-type": {
|
806
777
|
"begin": "\\[",
|
807
|
-
"
|
808
|
-
"0": {
|
809
|
-
"name": "punctuation.section.collection-type.begin.swift"
|
810
|
-
}
|
811
|
-
},
|
812
|
-
"comment": "array and dictionary types [Value] and [Key: Value]",
|
813
|
-
"end": "\\]|(?=[>){}])",
|
814
|
-
"endCaptures": {
|
815
|
-
"0": {
|
816
|
-
"name": "punctuation.section.collection-type.end.swift"
|
817
|
-
}
|
818
|
-
},
|
778
|
+
"end": "\\]|(?=[\u003e){}])",
|
819
779
|
"patterns": [
|
820
780
|
{
|
821
781
|
"include": "#available-types"
|
822
782
|
},
|
823
783
|
{
|
824
784
|
"begin": ":",
|
825
|
-
"
|
826
|
-
"0": {
|
827
|
-
"name": "punctuation.separator.key-value.swift"
|
828
|
-
}
|
829
|
-
},
|
830
|
-
"end": "(?=\\]|[>){}])",
|
785
|
+
"end": "(?=\\]|[\u003e){}])",
|
831
786
|
"patterns": [
|
832
787
|
{
|
833
|
-
"
|
834
|
-
"
|
788
|
+
"name": "invalid.illegal.extra-colon-in-dictionary-type.swift",
|
789
|
+
"match": ":"
|
835
790
|
},
|
836
791
|
{
|
837
792
|
"include": "#available-types"
|
838
793
|
}
|
839
|
-
]
|
794
|
+
],
|
795
|
+
"beginCaptures": {
|
796
|
+
"0": {
|
797
|
+
"name": "punctuation.separator.key-value.swift"
|
798
|
+
}
|
799
|
+
}
|
840
800
|
}
|
841
|
-
]
|
801
|
+
],
|
802
|
+
"beginCaptures": {
|
803
|
+
"0": {
|
804
|
+
"name": "punctuation.section.collection-type.begin.swift"
|
805
|
+
}
|
806
|
+
},
|
807
|
+
"endCaptures": {
|
808
|
+
"0": {
|
809
|
+
"name": "punctuation.section.collection-type.end.swift"
|
810
|
+
}
|
811
|
+
}
|
842
812
|
},
|
843
813
|
"tuple-type": {
|
844
814
|
"begin": "\\(",
|
815
|
+
"end": "\\)|(?=[\u003e\\]{}])",
|
816
|
+
"patterns": [
|
817
|
+
{
|
818
|
+
"include": "#available-types"
|
819
|
+
}
|
820
|
+
],
|
845
821
|
"beginCaptures": {
|
846
822
|
"0": {
|
847
823
|
"name": "punctuation.section.tuple-type.begin.swift"
|
848
824
|
}
|
849
825
|
},
|
850
|
-
"end": "\\)|(?=[>\\]{}])",
|
851
826
|
"endCaptures": {
|
852
827
|
"0": {
|
853
828
|
"name": "punctuation.section.tuple-type.end.swift"
|
854
829
|
}
|
855
|
-
}
|
856
|
-
"patterns": [
|
857
|
-
{
|
858
|
-
"include": "#available-types"
|
859
|
-
}
|
860
|
-
]
|
830
|
+
}
|
861
831
|
}
|
862
832
|
}
|
863
833
|
},
|
864
834
|
"extension": {
|
865
|
-
"begin": "\\b(extension)\\s+((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))",
|
866
|
-
"beginCaptures": {
|
867
|
-
"1": {
|
868
|
-
"name": "storage.type.$1.swift"
|
869
|
-
},
|
870
|
-
"2": {
|
871
|
-
"name": "entity.name.type.swift",
|
872
|
-
"patterns": [
|
873
|
-
{
|
874
|
-
"include": "#available-types"
|
875
|
-
}
|
876
|
-
]
|
877
|
-
},
|
878
|
-
"3": {
|
879
|
-
"name": "punctuation.definition.identifier.swift"
|
880
|
-
},
|
881
|
-
"4": {
|
882
|
-
"name": "punctuation.definition.identifier.swift"
|
883
|
-
}
|
884
|
-
},
|
885
|
-
"end": "(?<=\\})",
|
886
835
|
"name": "meta.definition.type.$1.swift",
|
836
|
+
"begin": "\\b(extension)\\s+((?\u003cq\u003e`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k\u003cq\u003e))",
|
837
|
+
"end": "(?\u003c=\\})",
|
887
838
|
"patterns": [
|
888
839
|
{
|
889
840
|
"include": "#comments"
|
890
841
|
},
|
891
842
|
{
|
892
|
-
"comment": "SE-0143: Conditional Conformances",
|
893
843
|
"include": "#generic-where-clause"
|
894
844
|
},
|
895
845
|
{
|
896
846
|
"include": "#inheritance-clause"
|
897
847
|
},
|
898
848
|
{
|
849
|
+
"name": "meta.definition.type.body.swift",
|
899
850
|
"begin": "\\{",
|
851
|
+
"end": "\\}",
|
852
|
+
"patterns": [
|
853
|
+
{
|
854
|
+
"include": "$self"
|
855
|
+
}
|
856
|
+
],
|
900
857
|
"beginCaptures": {
|
901
858
|
"0": {
|
902
859
|
"name": "punctuation.definition.type.begin.swift"
|
903
860
|
}
|
904
861
|
},
|
905
|
-
"end": "\\}",
|
906
862
|
"endCaptures": {
|
907
863
|
"0": {
|
908
864
|
"name": "punctuation.definition.type.end.swift"
|
909
865
|
}
|
910
|
-
}
|
911
|
-
"name": "meta.definition.type.body.swift",
|
912
|
-
"patterns": [
|
913
|
-
{
|
914
|
-
"include": "$self"
|
915
|
-
}
|
916
|
-
]
|
866
|
+
}
|
917
867
|
}
|
918
|
-
]
|
919
|
-
},
|
920
|
-
"function": {
|
921
|
-
"begin": "(?x)\n\t\t\t\t\t\t\\b\n\t\t\t\t\t\t(func)\n\t\t\t\t\t\t\\s+\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t(?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>)\n\t\t\t\t\t\t | (?:\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?<oph>\t\t\t\t\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t\t[/=\\-+!*%<>&|^~?]\n\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\\g<oph>\n\t\t\t\t\t\t\t\t\t | (?<opc>\t\t\t\t\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t\t\t[\\x{0300}-\\x{036F}]\n\t\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t)*\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t | ( \\. ( \\g<oph> | \\g<opc> | \\. )+ )\t\t\t# Dot operators\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\\s*\n\t\t\t\t\t\t(?=\\(|<)\n\t\t\t\t\t",
|
868
|
+
],
|
922
869
|
"beginCaptures": {
|
923
870
|
"1": {
|
924
|
-
"name": "storage.type.
|
871
|
+
"name": "storage.type.$1.swift"
|
925
872
|
},
|
926
873
|
"2": {
|
927
|
-
"name": "entity.name.
|
874
|
+
"name": "entity.name.type.swift",
|
875
|
+
"patterns": [
|
876
|
+
{
|
877
|
+
"include": "#available-types"
|
878
|
+
}
|
879
|
+
]
|
928
880
|
},
|
929
881
|
"3": {
|
930
882
|
"name": "punctuation.definition.identifier.swift"
|
@@ -932,9 +884,12 @@
|
|
932
884
|
"4": {
|
933
885
|
"name": "punctuation.definition.identifier.swift"
|
934
886
|
}
|
935
|
-
}
|
936
|
-
|
887
|
+
}
|
888
|
+
},
|
889
|
+
"function": {
|
937
890
|
"name": "meta.definition.function.swift",
|
891
|
+
"begin": "(?x)\n\t\t\t\t\t\t\\b\n\t\t\t\t\t\t(func)\n\t\t\t\t\t\t\\s+\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t(?\u003cq\u003e`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k\u003cq\u003e)\n\t\t\t\t\t\t | (?:\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?\u003coph\u003e\t\t\t\t\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t\t[/=\\-+!*%\u003c\u003e\u0026|^~?]\n\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\\g\u003coph\u003e\n\t\t\t\t\t\t\t\t\t | (?\u003copc\u003e\t\t\t\t\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t\t\t[\\x{0300}-\\x{036F}]\n\t\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t)*\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t | ( \\. ( \\g\u003coph\u003e | \\g\u003copc\u003e | \\. )+ )\t\t\t# Dot operators\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\\s*\n\t\t\t\t\t\t(?=\\(|\u003c)\n\t\t\t\t\t",
|
892
|
+
"end": "(?\u003c=\\})|$(?# functions in protocol declarations or generated interfaces have no body)",
|
938
893
|
"patterns": [
|
939
894
|
{
|
940
895
|
"include": "#comments"
|
@@ -949,50 +904,52 @@
|
|
949
904
|
"include": "#function-result"
|
950
905
|
},
|
951
906
|
{
|
952
|
-
"
|
953
|
-
"
|
907
|
+
"name": "keyword.control.exception.swift",
|
908
|
+
"match": "\\b(?:throws|rethrows)\\b"
|
954
909
|
},
|
955
910
|
{
|
956
|
-
"comment": "Swift 3: generic constraints after the parameters and return type",
|
957
911
|
"include": "#generic-where-clause"
|
958
912
|
},
|
959
913
|
{
|
914
|
+
"name": "meta.definition.function.body.swift",
|
960
915
|
"begin": "(\\{)",
|
916
|
+
"end": "(\\})",
|
917
|
+
"patterns": [
|
918
|
+
{
|
919
|
+
"include": "$self"
|
920
|
+
}
|
921
|
+
],
|
961
922
|
"beginCaptures": {
|
962
923
|
"1": {
|
963
924
|
"name": "punctuation.section.function.begin.swift"
|
964
925
|
}
|
965
926
|
},
|
966
|
-
"end": "(\\})",
|
967
927
|
"endCaptures": {
|
968
928
|
"1": {
|
969
929
|
"name": "punctuation.section.function.end.swift"
|
970
930
|
}
|
971
|
-
}
|
972
|
-
"name": "meta.definition.function.body.swift",
|
973
|
-
"patterns": [
|
974
|
-
{
|
975
|
-
"include": "$self"
|
976
|
-
}
|
977
|
-
]
|
931
|
+
}
|
978
932
|
}
|
979
|
-
]
|
980
|
-
},
|
981
|
-
"function-initializer": {
|
982
|
-
"begin": "(?<!\\.)\\b(init[?!]*(?# only one is valid, but we want the in⇥ snippet to produce something that looks good))\\s*(?=\\(|<)",
|
933
|
+
],
|
983
934
|
"beginCaptures": {
|
984
935
|
"1": {
|
985
|
-
"name": "storage.type.function.swift"
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
|
936
|
+
"name": "storage.type.function.swift"
|
937
|
+
},
|
938
|
+
"2": {
|
939
|
+
"name": "entity.name.function.swift"
|
940
|
+
},
|
941
|
+
"3": {
|
942
|
+
"name": "punctuation.definition.identifier.swift"
|
943
|
+
},
|
944
|
+
"4": {
|
945
|
+
"name": "punctuation.definition.identifier.swift"
|
992
946
|
}
|
993
|
-
}
|
994
|
-
|
947
|
+
}
|
948
|
+
},
|
949
|
+
"function-initializer": {
|
995
950
|
"name": "meta.definition.function.initializer.swift",
|
951
|
+
"begin": "(?\u003c!\\.)\\b(init[?!]*(?# only one is valid, but we want the in⇥ snippet to produce something that looks good))\\s*(?=\\(|\u003c)",
|
952
|
+
"end": "(?\u003c=\\})|$",
|
996
953
|
"patterns": [
|
997
954
|
{
|
998
955
|
"include": "#comments"
|
@@ -1004,137 +961,141 @@
|
|
1004
961
|
"include": "#parameter-clause"
|
1005
962
|
},
|
1006
963
|
{
|
1007
|
-
"
|
1008
|
-
"
|
964
|
+
"name": "keyword.control.exception.swift",
|
965
|
+
"match": "\\b(?:throws|rethrows)\\b"
|
1009
966
|
},
|
1010
967
|
{
|
1011
|
-
"comment": "Swift 3: generic constraints after the parameters and return type",
|
1012
968
|
"include": "#generic-where-clause"
|
1013
969
|
},
|
1014
970
|
{
|
971
|
+
"name": "meta.definition.function.body.swift",
|
1015
972
|
"begin": "(\\{)",
|
973
|
+
"end": "(\\})",
|
974
|
+
"patterns": [
|
975
|
+
{
|
976
|
+
"include": "$self"
|
977
|
+
}
|
978
|
+
],
|
1016
979
|
"beginCaptures": {
|
1017
980
|
"1": {
|
1018
981
|
"name": "punctuation.section.function.begin.swift"
|
1019
982
|
}
|
1020
983
|
},
|
1021
|
-
"end": "(\\})",
|
1022
984
|
"endCaptures": {
|
1023
985
|
"1": {
|
1024
986
|
"name": "punctuation.section.function.end.swift"
|
1025
987
|
}
|
1026
|
-
}
|
1027
|
-
|
988
|
+
}
|
989
|
+
}
|
990
|
+
],
|
991
|
+
"beginCaptures": {
|
992
|
+
"1": {
|
993
|
+
"name": "storage.type.function.swift",
|
1028
994
|
"patterns": [
|
1029
995
|
{
|
1030
|
-
"
|
996
|
+
"name": "invalid.illegal.character-not-allowed-here.swift",
|
997
|
+
"match": "(?\u003c=[?!])[?!]+"
|
1031
998
|
}
|
1032
999
|
]
|
1033
1000
|
}
|
1034
|
-
|
1001
|
+
}
|
1035
1002
|
},
|
1036
1003
|
"function-result": {
|
1037
|
-
"begin": "(?<![/=\\-+!*%<>&|\\^~.])(->)(?![/=\\-+!*%<>&|\\^~.])\\s*",
|
1038
|
-
"beginCaptures": {
|
1039
|
-
"1": {
|
1040
|
-
"name": "keyword.operator.function-result.swift"
|
1041
|
-
}
|
1042
|
-
},
|
1043
|
-
"end": "(?!\\G)(?=\\{|\\bwhere\\b|;)|$",
|
1044
1004
|
"name": "meta.function-result.swift",
|
1005
|
+
"begin": "(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])(-\u003e)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])\\s*",
|
1006
|
+
"end": "(?!\\G)(?=\\{|\\bwhere\\b|;)|$",
|
1045
1007
|
"patterns": [
|
1046
1008
|
{
|
1047
1009
|
"include": "#available-types"
|
1048
1010
|
}
|
1049
|
-
]
|
1050
|
-
},
|
1051
|
-
"generic-argument-clause": {
|
1052
|
-
"begin": "<",
|
1011
|
+
],
|
1053
1012
|
"beginCaptures": {
|
1054
|
-
"
|
1055
|
-
"name": "
|
1056
|
-
}
|
1057
|
-
},
|
1058
|
-
"end": ">|(?=[)\\]{}])",
|
1059
|
-
"endCaptures": {
|
1060
|
-
"0": {
|
1061
|
-
"name": "punctuation.separator.generic-argument-clause.end.swift"
|
1013
|
+
"1": {
|
1014
|
+
"name": "keyword.operator.function-result.swift"
|
1062
1015
|
}
|
1063
|
-
}
|
1016
|
+
}
|
1017
|
+
},
|
1018
|
+
"generic-argument-clause": {
|
1064
1019
|
"name": "meta.generic-argument-clause.swift",
|
1020
|
+
"begin": "\u003c",
|
1021
|
+
"end": "\u003e|(?=[)\\]{}])",
|
1065
1022
|
"patterns": [
|
1066
1023
|
{
|
1067
1024
|
"include": "#available-types"
|
1068
1025
|
}
|
1069
|
-
]
|
1070
|
-
},
|
1071
|
-
"generic-parameter-clause": {
|
1072
|
-
"begin": "<",
|
1026
|
+
],
|
1073
1027
|
"beginCaptures": {
|
1074
1028
|
"0": {
|
1075
|
-
"name": "punctuation.separator.generic-
|
1029
|
+
"name": "punctuation.separator.generic-argument-clause.begin.swift"
|
1076
1030
|
}
|
1077
1031
|
},
|
1078
|
-
"end": ">|(?=[^\\w\\d:<>\\s,=&`])(?# characters besides these are never valid in a generic param list -- even if it's not really a valid clause, we should stop trying to parse it if we see one of them.)",
|
1079
1032
|
"endCaptures": {
|
1080
1033
|
"0": {
|
1081
|
-
"name": "punctuation.separator.generic-
|
1034
|
+
"name": "punctuation.separator.generic-argument-clause.end.swift"
|
1082
1035
|
}
|
1083
|
-
}
|
1036
|
+
}
|
1037
|
+
},
|
1038
|
+
"generic-parameter-clause": {
|
1084
1039
|
"name": "meta.generic-parameter-clause.swift",
|
1040
|
+
"begin": "\u003c",
|
1041
|
+
"end": "\u003e|(?=[^\\w\\d:\u003c\u003e\\s,=\u0026`])(?# characters besides these are never valid in a generic param list -- even if it's not really a valid clause, we should stop trying to parse it if we see one of them.)",
|
1085
1042
|
"patterns": [
|
1086
1043
|
{
|
1087
1044
|
"include": "#comments"
|
1088
1045
|
},
|
1089
1046
|
{
|
1090
|
-
"comment": "Swift 2: constraints inside the generic param list",
|
1091
1047
|
"include": "#generic-where-clause"
|
1092
1048
|
},
|
1093
1049
|
{
|
1050
|
+
"match": "\\b((?!\\d)\\w[\\w\\d]*)\\b",
|
1094
1051
|
"captures": {
|
1095
1052
|
"1": {
|
1096
1053
|
"name": "variable.language.generic-parameter.swift"
|
1097
1054
|
}
|
1098
|
-
}
|
1099
|
-
"match": "\\b((?!\\d)\\w[\\w\\d]*)\\b"
|
1055
|
+
}
|
1100
1056
|
},
|
1101
1057
|
{
|
1102
|
-
"
|
1103
|
-
"
|
1058
|
+
"name": "punctuation.separator.generic-parameters.swift",
|
1059
|
+
"match": ","
|
1104
1060
|
},
|
1105
1061
|
{
|
1106
|
-
"begin": "(:)\\s*",
|
1107
|
-
"beginCaptures": {
|
1108
|
-
"1": {
|
1109
|
-
"name": "punctuation.separator.generic-parameter-constraint.swift"
|
1110
|
-
}
|
1111
|
-
},
|
1112
|
-
"end": "(?=[,>]|(?!\\G)\\bwhere\\b)",
|
1113
1062
|
"name": "meta.generic-parameter-constraint.swift",
|
1063
|
+
"begin": "(:)\\s*",
|
1064
|
+
"end": "(?=[,\u003e]|(?!\\G)\\bwhere\\b)",
|
1114
1065
|
"patterns": [
|
1115
1066
|
{
|
1116
|
-
"begin": "\\G",
|
1117
|
-
"end": "(?=[,>]|(?!\\G)\\bwhere\\b)",
|
1118
1067
|
"name": "entity.other.inherited-class.swift",
|
1068
|
+
"begin": "\\G",
|
1069
|
+
"end": "(?=[,\u003e]|(?!\\G)\\bwhere\\b)",
|
1119
1070
|
"patterns": [
|
1120
1071
|
{
|
1121
1072
|
"include": "#type-identifier"
|
1122
1073
|
}
|
1123
1074
|
]
|
1124
1075
|
}
|
1125
|
-
]
|
1076
|
+
],
|
1077
|
+
"beginCaptures": {
|
1078
|
+
"1": {
|
1079
|
+
"name": "punctuation.separator.generic-parameter-constraint.swift"
|
1080
|
+
}
|
1081
|
+
}
|
1126
1082
|
}
|
1127
|
-
]
|
1128
|
-
},
|
1129
|
-
"generic-where-clause": {
|
1130
|
-
"begin": "\\b(where)\\b\\s*",
|
1083
|
+
],
|
1131
1084
|
"beginCaptures": {
|
1132
|
-
"
|
1133
|
-
"name": "
|
1085
|
+
"0": {
|
1086
|
+
"name": "punctuation.separator.generic-parameter-clause.begin.swift"
|
1134
1087
|
}
|
1135
1088
|
},
|
1136
|
-
"
|
1089
|
+
"endCaptures": {
|
1090
|
+
"0": {
|
1091
|
+
"name": "punctuation.separator.generic-parameter-clause.end.swift"
|
1092
|
+
}
|
1093
|
+
}
|
1094
|
+
},
|
1095
|
+
"generic-where-clause": {
|
1137
1096
|
"name": "meta.generic-where-clause.swift",
|
1097
|
+
"begin": "\\b(where)\\b\\s*",
|
1098
|
+
"end": "(?!\\G)$|(?=[\u003e{};\\n]|//|/\\*)",
|
1138
1099
|
"patterns": [
|
1139
1100
|
{
|
1140
1101
|
"include": "#comments"
|
@@ -1143,10 +1104,15 @@
|
|
1143
1104
|
"include": "#requirement-list"
|
1144
1105
|
}
|
1145
1106
|
],
|
1107
|
+
"beginCaptures": {
|
1108
|
+
"1": {
|
1109
|
+
"name": "keyword.other.generic-constraint-introducer.swift"
|
1110
|
+
}
|
1111
|
+
},
|
1146
1112
|
"repository": {
|
1147
1113
|
"requirement-list": {
|
1148
1114
|
"begin": "\\G|,\\s*",
|
1149
|
-
"end": "(?=[
|
1115
|
+
"end": "(?=[,\u003e{};\\n]|//|/\\*)",
|
1150
1116
|
"patterns": [
|
1151
1117
|
{
|
1152
1118
|
"include": "#comments"
|
@@ -1158,71 +1124,58 @@
|
|
1158
1124
|
"include": "#available-types"
|
1159
1125
|
},
|
1160
1126
|
{
|
1161
|
-
"begin": "(?<![/=\\-+!*%<>&|\\^~.])(==)(?![/=\\-+!*%<>&|\\^~.])",
|
1162
|
-
"beginCaptures": {
|
1163
|
-
"1": {
|
1164
|
-
"name": "keyword.operator.generic-constraint.same-type.swift"
|
1165
|
-
}
|
1166
|
-
},
|
1167
|
-
"end": "(?=\\s*[,>{};\\n]|//|/\\*)",
|
1168
1127
|
"name": "meta.generic-where-clause.same-type-requirement.swift",
|
1128
|
+
"begin": "(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])(==)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])",
|
1129
|
+
"end": "(?=\\s*[,\u003e{};\\n]|//|/\\*)",
|
1169
1130
|
"patterns": [
|
1170
1131
|
{
|
1171
1132
|
"include": "#available-types"
|
1172
1133
|
}
|
1173
|
-
]
|
1174
|
-
},
|
1175
|
-
{
|
1176
|
-
"begin": "(?<![/=\\-+!*%<>&|\\^~.])(:)(?![/=\\-+!*%<>&|\\^~.])",
|
1134
|
+
],
|
1177
1135
|
"beginCaptures": {
|
1178
1136
|
"1": {
|
1179
|
-
"name": "keyword.operator.generic-constraint.
|
1137
|
+
"name": "keyword.operator.generic-constraint.same-type.swift"
|
1180
1138
|
}
|
1181
|
-
}
|
1182
|
-
|
1183
|
-
|
1139
|
+
}
|
1140
|
+
},
|
1141
|
+
{
|
1142
|
+
"name": "meta.generic-where-clause.conformance-requirement.swift",
|
1143
|
+
"begin": "(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])(:)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])",
|
1144
|
+
"end": "(?=\\s*[,\u003e{};\\n]|//|/\\*)",
|
1184
1145
|
"patterns": [
|
1185
1146
|
{
|
1186
|
-
"begin": "\\G\\s*",
|
1187
1147
|
"contentName": "entity.other.inherited-class.swift",
|
1188
|
-
"
|
1148
|
+
"begin": "\\G\\s*",
|
1149
|
+
"end": "(?=\\s*[,\u003e{};\\n]|//|/\\*)",
|
1189
1150
|
"patterns": [
|
1190
1151
|
{
|
1191
1152
|
"include": "#available-types"
|
1192
1153
|
}
|
1193
1154
|
]
|
1194
1155
|
}
|
1195
|
-
]
|
1156
|
+
],
|
1157
|
+
"beginCaptures": {
|
1158
|
+
"1": {
|
1159
|
+
"name": "keyword.operator.generic-constraint.conforms-to.swift"
|
1160
|
+
}
|
1161
|
+
}
|
1196
1162
|
}
|
1197
1163
|
]
|
1198
1164
|
}
|
1199
1165
|
}
|
1200
1166
|
},
|
1201
1167
|
"import": {
|
1202
|
-
"begin": "(?<!\\.)\\b(import)\\s+",
|
1203
|
-
"beginCaptures": {
|
1204
|
-
"1": {
|
1205
|
-
"name": "keyword.control.import.swift"
|
1206
|
-
}
|
1207
|
-
},
|
1208
|
-
"end": "(;)|$\\n?|(?=//|/\\*)",
|
1209
|
-
"endCaptures": {
|
1210
|
-
"1": {
|
1211
|
-
"name": "punctuation.terminator.statement.swift"
|
1212
|
-
}
|
1213
|
-
},
|
1214
1168
|
"name": "meta.import.swift",
|
1169
|
+
"begin": "(?\u003c!\\.)\\b(import)\\s+",
|
1170
|
+
"end": "(;)|$\\n?|(?=//|/\\*)",
|
1215
1171
|
"patterns": [
|
1216
1172
|
{
|
1217
1173
|
"begin": "\\G(?!;|$|//|/\\*)(?:(typealias|struct|class|enum|protocol|var|func)\\s+)?",
|
1218
|
-
"beginCaptures": {
|
1219
|
-
"1": {
|
1220
|
-
"name": "storage.modifier.swift"
|
1221
|
-
}
|
1222
|
-
},
|
1223
1174
|
"end": "(?=;|$|//|/\\*)",
|
1224
1175
|
"patterns": [
|
1225
1176
|
{
|
1177
|
+
"name": "entity.name.type.swift",
|
1178
|
+
"match": "(?x)\n\t\t\t\t\t\t\t\t\t\t(?\u003c=\\G|\\.)\n\t\t\t\t\t\t\t\t\t\t(?\u003cq\u003e`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k\u003cq\u003e)\n\t\t\t\t\t\t\t\t\t",
|
1226
1179
|
"captures": {
|
1227
1180
|
"1": {
|
1228
1181
|
"name": "punctuation.definition.identifier.swift"
|
@@ -1230,61 +1183,61 @@
|
|
1230
1183
|
"2": {
|
1231
1184
|
"name": "punctuation.definition.identifier.swift"
|
1232
1185
|
}
|
1233
|
-
}
|
1234
|
-
"match": "(?x)\n\t\t\t\t\t\t\t\t\t\t(?<=\\G|\\.)\n\t\t\t\t\t\t\t\t\t\t(?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>)\n\t\t\t\t\t\t\t\t\t",
|
1235
|
-
"name": "entity.name.type.swift"
|
1186
|
+
}
|
1236
1187
|
},
|
1237
1188
|
{
|
1238
|
-
"
|
1239
|
-
"
|
1189
|
+
"name": "entity.name.type.swift",
|
1190
|
+
"match": "(?x)\n\t\t\t\t\t\t\t\t\t\t(?\u003c=\\G|\\.)\n\t\t\t\t\t\t\t\t\t\t\\$[0-9]+\n\t\t\t\t\t\t\t\t\t"
|
1240
1191
|
},
|
1241
1192
|
{
|
1193
|
+
"name": "entity.name.type.swift",
|
1194
|
+
"match": "(?x)\n\t\t\t\t\t\t\t\t\t\t(?\u003c=\\G|\\.)\n\t\t\t\t\t\t\t\t\t\t(?:\n\t\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t\t(?\u003coph\u003e\t\t\t\t\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t\t\t\t\t[/=\\-+!*%\u003c\u003e\u0026|^~?]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\\g\u003coph\u003e\n\t\t\t\t\t\t\t\t\t\t\t\t | (?\u003copc\u003e\t\t\t\t\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\\x{0300}-\\x{036F}]\n\t\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t)*\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t | ( \\. ( \\g\u003coph\u003e | \\g\u003copc\u003e | \\. )+ )\t\t\t# Dot operators\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t(?=\\.|;|$|//|/\\*|\\s)\n\t\t\t\t\t\t\t\t\t",
|
1242
1195
|
"captures": {
|
1243
1196
|
"1": {
|
1244
1197
|
"patterns": [
|
1245
1198
|
{
|
1246
|
-
"
|
1247
|
-
"
|
1199
|
+
"name": "invalid.illegal.dot-not-allowed-here.swift",
|
1200
|
+
"match": "\\."
|
1248
1201
|
}
|
1249
1202
|
]
|
1250
1203
|
}
|
1251
|
-
}
|
1252
|
-
"match": "(?x)\n\t\t\t\t\t\t\t\t\t\t(?<=\\G|\\.)\n\t\t\t\t\t\t\t\t\t\t(?:\n\t\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t\t(?<oph>\t\t\t\t\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t\t\t\t\t[/=\\-+!*%<>&|^~?]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\\g<oph>\n\t\t\t\t\t\t\t\t\t\t\t\t | (?<opc>\t\t\t\t\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\\x{0300}-\\x{036F}]\n\t\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t)*\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t | ( \\. ( \\g<oph> | \\g<opc> | \\. )+ )\t\t\t# Dot operators\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t(?=\\.|;|$|//|/\\*|\\s)\n\t\t\t\t\t\t\t\t\t",
|
1253
|
-
"name": "entity.name.type.swift"
|
1204
|
+
}
|
1254
1205
|
},
|
1255
1206
|
{
|
1256
|
-
"
|
1257
|
-
"
|
1207
|
+
"name": "punctuation.separator.import.swift",
|
1208
|
+
"match": "\\."
|
1258
1209
|
},
|
1259
1210
|
{
|
1211
|
+
"name": "invalid.illegal.character-not-allowed-here.swift",
|
1260
1212
|
"begin": "(?!\\s*(;|$|//|/\\*))",
|
1261
|
-
"end": "(?=\\s*(;|$|//|/\\*))"
|
1262
|
-
"name": "invalid.illegal.character-not-allowed-here.swift"
|
1213
|
+
"end": "(?=\\s*(;|$|//|/\\*))"
|
1263
1214
|
}
|
1264
|
-
]
|
1215
|
+
],
|
1216
|
+
"beginCaptures": {
|
1217
|
+
"1": {
|
1218
|
+
"name": "storage.modifier.swift"
|
1219
|
+
}
|
1220
|
+
}
|
1265
1221
|
}
|
1266
|
-
]
|
1267
|
-
},
|
1268
|
-
"inheritance-clause": {
|
1269
|
-
"begin": "(:)(?=\\s*\\{)|(:)\\s*",
|
1222
|
+
],
|
1270
1223
|
"beginCaptures": {
|
1271
1224
|
"1": {
|
1272
|
-
"name": "
|
1273
|
-
},
|
1274
|
-
"2": {
|
1275
|
-
"name": "punctuation.separator.inheritance-clause.swift"
|
1225
|
+
"name": "keyword.control.import.swift"
|
1276
1226
|
}
|
1277
1227
|
},
|
1278
|
-
"
|
1228
|
+
"endCaptures": {
|
1229
|
+
"1": {
|
1230
|
+
"name": "punctuation.terminator.statement.swift"
|
1231
|
+
}
|
1232
|
+
}
|
1233
|
+
},
|
1234
|
+
"inheritance-clause": {
|
1279
1235
|
"name": "meta.inheritance-clause.swift",
|
1236
|
+
"begin": "(:)(?=\\s*\\{)|(:)\\s*",
|
1237
|
+
"end": "(?!\\G)$|(?=[={}]|(?!\\G)\\bwhere\\b)",
|
1280
1238
|
"patterns": [
|
1281
1239
|
{
|
1282
1240
|
"begin": "\\bclass\\b",
|
1283
|
-
"beginCaptures": {
|
1284
|
-
"0": {
|
1285
|
-
"name": "storage.type.class.swift"
|
1286
|
-
}
|
1287
|
-
},
|
1288
1241
|
"end": "(?=[={}]|(?!\\G)\\bwhere\\b)",
|
1289
1242
|
"patterns": [
|
1290
1243
|
{
|
@@ -1293,7 +1246,12 @@
|
|
1293
1246
|
{
|
1294
1247
|
"include": "#more-types"
|
1295
1248
|
}
|
1296
|
-
]
|
1249
|
+
],
|
1250
|
+
"beginCaptures": {
|
1251
|
+
"0": {
|
1252
|
+
"name": "storage.type.class.swift"
|
1253
|
+
}
|
1254
|
+
}
|
1297
1255
|
},
|
1298
1256
|
{
|
1299
1257
|
"begin": "\\G",
|
@@ -1311,11 +1269,19 @@
|
|
1311
1269
|
]
|
1312
1270
|
}
|
1313
1271
|
],
|
1272
|
+
"beginCaptures": {
|
1273
|
+
"1": {
|
1274
|
+
"name": "invalid.illegal.empty-inheritance-clause.swift"
|
1275
|
+
},
|
1276
|
+
"2": {
|
1277
|
+
"name": "punctuation.separator.inheritance-clause.swift"
|
1278
|
+
}
|
1279
|
+
},
|
1314
1280
|
"repository": {
|
1315
1281
|
"inherited-type": {
|
1282
|
+
"name": "entity.other.inherited-class.swift",
|
1316
1283
|
"begin": "(?=[`\\p{L}_])",
|
1317
1284
|
"end": "(?!\\G)",
|
1318
|
-
"name": "entity.other.inherited-class.swift",
|
1319
1285
|
"patterns": [
|
1320
1286
|
{
|
1321
1287
|
"include": "#type-identifier"
|
@@ -1323,9 +1289,9 @@
|
|
1323
1289
|
]
|
1324
1290
|
},
|
1325
1291
|
"more-types": {
|
1292
|
+
"name": "meta.inheritance-list.more-types",
|
1326
1293
|
"begin": ",\\s*",
|
1327
1294
|
"end": "(?!\\G)(?!//|/\\*)|(?=[,={}]|(?!\\G)\\bwhere\\b)",
|
1328
|
-
"name": "meta.inheritance-list.more-types",
|
1329
1295
|
"patterns": [
|
1330
1296
|
{
|
1331
1297
|
"include": "#comments"
|
@@ -1341,7 +1307,21 @@
|
|
1341
1307
|
}
|
1342
1308
|
},
|
1343
1309
|
"operator": {
|
1344
|
-
"
|
1310
|
+
"name": "meta.definition.operator.swift",
|
1311
|
+
"begin": "(?x)\n\t\t\t\t\t\t(?:\n\t\t\t\t\t\t\t\\b(prefix|infix|postfix)\n\t\t\t\t\t\t\t\\s+\n\t\t\t\t\t\t)?\n\t\t\t\t\t\t\\b\n\t\t\t\t\t\t(operator)\n\t\t\t\t\t\t\\s+\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t(?\u003coph\u003e\t\t\t\t\t\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t[/=\\-+!*%\u003c\u003e\u0026|^~?]\n\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\\g\u003coph\u003e\n\t\t\t\t\t\t\t\t | \\.\t\t\t\t\t\t\t\t\t# Invalid dot\n\t\t\t\t\t\t\t\t | (?\u003copc\u003e\t\t\t\t\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t\t[\\x{0300}-\\x{036F}]\n\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)*+\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t | ( \\. ( \\g\u003coph\u003e | \\g\u003copc\u003e | \\. )++ )\t\t\t# Dot operators\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\\s*\n\t\t\t\t\t",
|
1312
|
+
"end": "(;)|$\\n?|(?=//|/\\*)",
|
1313
|
+
"patterns": [
|
1314
|
+
{
|
1315
|
+
"include": "#swift2"
|
1316
|
+
},
|
1317
|
+
{
|
1318
|
+
"include": "#swift3"
|
1319
|
+
},
|
1320
|
+
{
|
1321
|
+
"name": "invalid.illegal.character-not-allowed-here.swift",
|
1322
|
+
"match": "((?!$|;|//|/\\*)\\S)+"
|
1323
|
+
}
|
1324
|
+
],
|
1345
1325
|
"beginCaptures": {
|
1346
1326
|
"1": {
|
1347
1327
|
"name": "storage.modifier.swift"
|
@@ -1355,50 +1335,27 @@
|
|
1355
1335
|
"4": {
|
1356
1336
|
"patterns": [
|
1357
1337
|
{
|
1358
|
-
"
|
1359
|
-
"
|
1338
|
+
"name": "invalid.illegal.dot-not-allowed-here.swift",
|
1339
|
+
"match": "\\."
|
1360
1340
|
}
|
1361
1341
|
]
|
1362
1342
|
}
|
1363
1343
|
},
|
1364
|
-
"end": "(;)|$\\n?|(?=//|/\\*)",
|
1365
1344
|
"endCaptures": {
|
1366
1345
|
"1": {
|
1367
1346
|
"name": "punctuation.terminator.statement.swift"
|
1368
1347
|
}
|
1369
1348
|
},
|
1370
|
-
"name": "meta.definition.operator.swift",
|
1371
|
-
"patterns": [
|
1372
|
-
{
|
1373
|
-
"include": "#swift2"
|
1374
|
-
},
|
1375
|
-
{
|
1376
|
-
"include": "#swift3"
|
1377
|
-
},
|
1378
|
-
{
|
1379
|
-
"match": "((?!$|;|//|/\\*)\\S)+",
|
1380
|
-
"name": "invalid.illegal.character-not-allowed-here.swift"
|
1381
|
-
}
|
1382
|
-
],
|
1383
1349
|
"repository": {
|
1384
1350
|
"swift2": {
|
1385
1351
|
"begin": "\\G(\\{)",
|
1386
|
-
"beginCaptures": {
|
1387
|
-
"1": {
|
1388
|
-
"name": "punctuation.definition.operator.begin.swift"
|
1389
|
-
}
|
1390
|
-
},
|
1391
1352
|
"end": "(\\})",
|
1392
|
-
"endCaptures": {
|
1393
|
-
"1": {
|
1394
|
-
"name": "punctuation.definition.operator.end.swift"
|
1395
|
-
}
|
1396
|
-
},
|
1397
1353
|
"patterns": [
|
1398
1354
|
{
|
1399
1355
|
"include": "#comments"
|
1400
1356
|
},
|
1401
1357
|
{
|
1358
|
+
"match": "\\b(associativity)\\s+(left|right)\\b",
|
1402
1359
|
"captures": {
|
1403
1360
|
"1": {
|
1404
1361
|
"name": "storage.modifier.swift"
|
@@ -1406,10 +1363,10 @@
|
|
1406
1363
|
"2": {
|
1407
1364
|
"name": "keyword.other.operator.associativity.swift"
|
1408
1365
|
}
|
1409
|
-
}
|
1410
|
-
"match": "\\b(associativity)\\s+(left|right)\\b"
|
1366
|
+
}
|
1411
1367
|
},
|
1412
1368
|
{
|
1369
|
+
"match": "\\b(precedence)\\s+([0-9]+)\\b",
|
1413
1370
|
"captures": {
|
1414
1371
|
"1": {
|
1415
1372
|
"name": "storage.modifier.swift"
|
@@ -1417,20 +1374,30 @@
|
|
1417
1374
|
"2": {
|
1418
1375
|
"name": "constant.numeric.integer.swift"
|
1419
1376
|
}
|
1420
|
-
}
|
1421
|
-
"match": "\\b(precedence)\\s+([0-9]+)\\b"
|
1377
|
+
}
|
1422
1378
|
},
|
1423
1379
|
{
|
1380
|
+
"match": "\\b(assignment)\\b",
|
1424
1381
|
"captures": {
|
1425
1382
|
"1": {
|
1426
1383
|
"name": "storage.modifier.swift"
|
1427
1384
|
}
|
1428
|
-
}
|
1429
|
-
"match": "\\b(assignment)\\b"
|
1385
|
+
}
|
1430
1386
|
}
|
1431
|
-
]
|
1387
|
+
],
|
1388
|
+
"beginCaptures": {
|
1389
|
+
"1": {
|
1390
|
+
"name": "punctuation.definition.operator.begin.swift"
|
1391
|
+
}
|
1392
|
+
},
|
1393
|
+
"endCaptures": {
|
1394
|
+
"1": {
|
1395
|
+
"name": "punctuation.definition.operator.end.swift"
|
1396
|
+
}
|
1397
|
+
}
|
1432
1398
|
},
|
1433
1399
|
"swift3": {
|
1400
|
+
"match": "\\G(:)\\s*((?\u003cq\u003e`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k\u003cq\u003e))",
|
1434
1401
|
"captures": {
|
1435
1402
|
"2": {
|
1436
1403
|
"name": "entity.other.inherited-class.swift",
|
@@ -1446,34 +1413,34 @@
|
|
1446
1413
|
"4": {
|
1447
1414
|
"name": "punctuation.definition.identifier.swift"
|
1448
1415
|
}
|
1449
|
-
}
|
1450
|
-
"match": "\\G(:)\\s*((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))"
|
1416
|
+
}
|
1451
1417
|
}
|
1452
1418
|
}
|
1453
1419
|
},
|
1454
1420
|
"parameter-clause": {
|
1421
|
+
"name": "meta.parameter-clause.swift",
|
1455
1422
|
"begin": "(\\()",
|
1423
|
+
"end": "(\\))",
|
1424
|
+
"patterns": [
|
1425
|
+
{
|
1426
|
+
"include": "#parameter-list"
|
1427
|
+
}
|
1428
|
+
],
|
1456
1429
|
"beginCaptures": {
|
1457
1430
|
"1": {
|
1458
1431
|
"name": "punctuation.definition.parameters.begin.swift"
|
1459
1432
|
}
|
1460
1433
|
},
|
1461
|
-
"end": "(\\))",
|
1462
1434
|
"endCaptures": {
|
1463
1435
|
"1": {
|
1464
1436
|
"name": "punctuation.definition.parameters.end.swift"
|
1465
1437
|
}
|
1466
|
-
}
|
1467
|
-
"name": "meta.parameter-clause.swift",
|
1468
|
-
"patterns": [
|
1469
|
-
{
|
1470
|
-
"include": "#parameter-list"
|
1471
|
-
}
|
1472
|
-
]
|
1438
|
+
}
|
1473
1439
|
},
|
1474
1440
|
"parameter-list": {
|
1475
1441
|
"patterns": [
|
1476
1442
|
{
|
1443
|
+
"match": "((?\u003cq1\u003e`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k\u003cq1\u003e))\\s+((?\u003cq2\u003e`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k\u003cq2\u003e))(?=\\s*:)",
|
1477
1444
|
"captures": {
|
1478
1445
|
"1": {
|
1479
1446
|
"name": "entity.name.function.swift"
|
@@ -1493,11 +1460,10 @@
|
|
1493
1460
|
"6": {
|
1494
1461
|
"name": "punctuation.definition.identifier.swift"
|
1495
1462
|
}
|
1496
|
-
}
|
1497
|
-
"comment": "External parameter labels are considered part of the function name",
|
1498
|
-
"match": "((?<q1>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q1>))\\s+((?<q2>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q2>))(?=\\s*:)"
|
1463
|
+
}
|
1499
1464
|
},
|
1500
1465
|
{
|
1466
|
+
"match": "(((?\u003cq\u003e`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k\u003cq\u003e)))(?=\\s*:)",
|
1501
1467
|
"captures": {
|
1502
1468
|
"1": {
|
1503
1469
|
"name": "variable.parameter.function.swift"
|
@@ -1511,9 +1477,7 @@
|
|
1511
1477
|
"4": {
|
1512
1478
|
"name": "punctuation.definition.identifier.swift"
|
1513
1479
|
}
|
1514
|
-
}
|
1515
|
-
"comment": "If no external label is given, the name is both the external label and the internal variable name",
|
1516
|
-
"match": "(((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>)))(?=\\s*:)"
|
1480
|
+
}
|
1517
1481
|
},
|
1518
1482
|
{
|
1519
1483
|
"begin": ":\\s*(?!\\s)",
|
@@ -1523,65 +1487,41 @@
|
|
1523
1487
|
"include": "#available-types"
|
1524
1488
|
},
|
1525
1489
|
{
|
1526
|
-
"
|
1527
|
-
"
|
1490
|
+
"name": "invalid.illegal.extra-colon-in-parameter-list.swift",
|
1491
|
+
"match": ":"
|
1528
1492
|
},
|
1529
1493
|
{
|
1530
1494
|
"begin": "=",
|
1531
|
-
"beginCaptures": {
|
1532
|
-
"0": {
|
1533
|
-
"name": "keyword.operator.assignment.swift"
|
1534
|
-
}
|
1535
|
-
},
|
1536
|
-
"comment": "a parameter's default value",
|
1537
1495
|
"end": "(?=[,)])",
|
1538
1496
|
"patterns": [
|
1539
1497
|
{
|
1540
1498
|
"include": "#expressions"
|
1541
1499
|
}
|
1542
|
-
]
|
1500
|
+
],
|
1501
|
+
"beginCaptures": {
|
1502
|
+
"0": {
|
1503
|
+
"name": "keyword.operator.assignment.swift"
|
1504
|
+
}
|
1505
|
+
}
|
1543
1506
|
}
|
1544
1507
|
]
|
1545
1508
|
}
|
1546
1509
|
]
|
1547
1510
|
},
|
1548
1511
|
"precedencegroup": {
|
1549
|
-
"begin": "\\b(precedencegroup)\\s+((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))\\s*(?=\\{)",
|
1550
|
-
"beginCaptures": {
|
1551
|
-
"1": {
|
1552
|
-
"name": "storage.type.precedencegroup.swift"
|
1553
|
-
},
|
1554
|
-
"2": {
|
1555
|
-
"name": "entity.name.type.precedencegroup.swift"
|
1556
|
-
},
|
1557
|
-
"3": {
|
1558
|
-
"name": "punctuation.definition.identifier.swift"
|
1559
|
-
},
|
1560
|
-
"4": {
|
1561
|
-
"name": "punctuation.definition.identifier.swift"
|
1562
|
-
}
|
1563
|
-
},
|
1564
|
-
"end": "(?!\\G)",
|
1565
1512
|
"name": "meta.definition.precedencegroup.swift",
|
1513
|
+
"begin": "\\b(precedencegroup)\\s+((?\u003cq\u003e`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k\u003cq\u003e))\\s*(?=\\{)",
|
1514
|
+
"end": "(?!\\G)",
|
1566
1515
|
"patterns": [
|
1567
1516
|
{
|
1568
1517
|
"begin": "\\{",
|
1569
|
-
"beginCaptures": {
|
1570
|
-
"0": {
|
1571
|
-
"name": "punctuation.definition.precedencegroup.begin.swift"
|
1572
|
-
}
|
1573
|
-
},
|
1574
1518
|
"end": "\\}",
|
1575
|
-
"endCaptures": {
|
1576
|
-
"0": {
|
1577
|
-
"name": "punctuation.definition.precedencegroup.end.swift"
|
1578
|
-
}
|
1579
|
-
},
|
1580
1519
|
"patterns": [
|
1581
1520
|
{
|
1582
1521
|
"include": "#comments"
|
1583
1522
|
},
|
1584
1523
|
{
|
1524
|
+
"match": "\\b(higherThan|lowerThan)\\s*:\\s*((?\u003cq\u003e`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k\u003cq\u003e))",
|
1585
1525
|
"captures": {
|
1586
1526
|
"1": {
|
1587
1527
|
"name": "storage.modifier.swift"
|
@@ -1600,10 +1540,10 @@
|
|
1600
1540
|
"4": {
|
1601
1541
|
"name": "punctuation.definition.identifier.swift"
|
1602
1542
|
}
|
1603
|
-
}
|
1604
|
-
"match": "\\b(higherThan|lowerThan)\\s*:\\s*((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))"
|
1543
|
+
}
|
1605
1544
|
},
|
1606
1545
|
{
|
1546
|
+
"match": "\\b(associativity)\\b(?:\\s*:\\s*(right|left|none)\\b)?",
|
1607
1547
|
"captures": {
|
1608
1548
|
"1": {
|
1609
1549
|
"name": "storage.modifier.swift"
|
@@ -1611,10 +1551,10 @@
|
|
1611
1551
|
"2": {
|
1612
1552
|
"name": "keyword.other.operator.associativity.swift"
|
1613
1553
|
}
|
1614
|
-
}
|
1615
|
-
"match": "\\b(associativity)\\b(?:\\s*:\\s*(right|left|none)\\b)?"
|
1554
|
+
}
|
1616
1555
|
},
|
1617
1556
|
{
|
1557
|
+
"match": "\\b(assignment)\\b(?:\\s*:\\s*(true|false)\\b)?",
|
1618
1558
|
"captures": {
|
1619
1559
|
"1": {
|
1620
1560
|
"name": "storage.modifier.swift"
|
@@ -1622,21 +1562,27 @@
|
|
1622
1562
|
"2": {
|
1623
1563
|
"name": "constant.language.boolean.swift"
|
1624
1564
|
}
|
1625
|
-
}
|
1626
|
-
"match": "\\b(assignment)\\b(?:\\s*:\\s*(true|false)\\b)?"
|
1565
|
+
}
|
1627
1566
|
}
|
1628
|
-
]
|
1567
|
+
],
|
1568
|
+
"beginCaptures": {
|
1569
|
+
"0": {
|
1570
|
+
"name": "punctuation.definition.precedencegroup.begin.swift"
|
1571
|
+
}
|
1572
|
+
},
|
1573
|
+
"endCaptures": {
|
1574
|
+
"0": {
|
1575
|
+
"name": "punctuation.definition.precedencegroup.end.swift"
|
1576
|
+
}
|
1577
|
+
}
|
1629
1578
|
}
|
1630
|
-
]
|
1631
|
-
},
|
1632
|
-
"protocol": {
|
1633
|
-
"begin": "\\b(protocol)\\s+((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))",
|
1579
|
+
],
|
1634
1580
|
"beginCaptures": {
|
1635
1581
|
"1": {
|
1636
|
-
"name": "storage.type
|
1582
|
+
"name": "storage.type.precedencegroup.swift"
|
1637
1583
|
},
|
1638
1584
|
"2": {
|
1639
|
-
"name": "entity.name.type
|
1585
|
+
"name": "entity.name.type.precedencegroup.swift"
|
1640
1586
|
},
|
1641
1587
|
"3": {
|
1642
1588
|
"name": "punctuation.definition.identifier.swift"
|
@@ -1644,9 +1590,12 @@
|
|
1644
1590
|
"4": {
|
1645
1591
|
"name": "punctuation.definition.identifier.swift"
|
1646
1592
|
}
|
1647
|
-
}
|
1648
|
-
|
1593
|
+
}
|
1594
|
+
},
|
1595
|
+
"protocol": {
|
1649
1596
|
"name": "meta.definition.type.protocol.swift",
|
1597
|
+
"begin": "\\b(protocol)\\s+((?\u003cq\u003e`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k\u003cq\u003e))",
|
1598
|
+
"end": "(?\u003c=\\})",
|
1650
1599
|
"patterns": [
|
1651
1600
|
{
|
1652
1601
|
"include": "#comments"
|
@@ -1655,23 +1604,12 @@
|
|
1655
1604
|
"include": "#inheritance-clause"
|
1656
1605
|
},
|
1657
1606
|
{
|
1658
|
-
"comment": "SE-0142: Permit where clauses to constrain associated types",
|
1659
1607
|
"include": "#generic-where-clause"
|
1660
1608
|
},
|
1661
1609
|
{
|
1610
|
+
"name": "meta.definition.type.body.swift",
|
1662
1611
|
"begin": "\\{",
|
1663
|
-
"beginCaptures": {
|
1664
|
-
"0": {
|
1665
|
-
"name": "punctuation.definition.type.begin.swift"
|
1666
|
-
}
|
1667
|
-
},
|
1668
1612
|
"end": "\\}",
|
1669
|
-
"endCaptures": {
|
1670
|
-
"0": {
|
1671
|
-
"name": "punctuation.definition.type.end.swift"
|
1672
|
-
}
|
1673
|
-
},
|
1674
|
-
"name": "meta.definition.type.body.swift",
|
1675
1613
|
"patterns": [
|
1676
1614
|
{
|
1677
1615
|
"include": "#protocol-method"
|
@@ -1685,12 +1623,49 @@
|
|
1685
1623
|
{
|
1686
1624
|
"include": "$self"
|
1687
1625
|
}
|
1688
|
-
]
|
1626
|
+
],
|
1627
|
+
"beginCaptures": {
|
1628
|
+
"0": {
|
1629
|
+
"name": "punctuation.definition.type.begin.swift"
|
1630
|
+
}
|
1631
|
+
},
|
1632
|
+
"endCaptures": {
|
1633
|
+
"0": {
|
1634
|
+
"name": "punctuation.definition.type.end.swift"
|
1635
|
+
}
|
1636
|
+
}
|
1689
1637
|
}
|
1690
1638
|
],
|
1639
|
+
"beginCaptures": {
|
1640
|
+
"1": {
|
1641
|
+
"name": "storage.type.$1.swift"
|
1642
|
+
},
|
1643
|
+
"2": {
|
1644
|
+
"name": "entity.name.type.$1.swift"
|
1645
|
+
},
|
1646
|
+
"3": {
|
1647
|
+
"name": "punctuation.definition.identifier.swift"
|
1648
|
+
},
|
1649
|
+
"4": {
|
1650
|
+
"name": "punctuation.definition.identifier.swift"
|
1651
|
+
}
|
1652
|
+
},
|
1691
1653
|
"repository": {
|
1692
1654
|
"associated-type": {
|
1693
|
-
"
|
1655
|
+
"name": "meta.definition.associatedtype.swift",
|
1656
|
+
"begin": "\\b(associatedtype)\\s+((?\u003cq\u003e`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k\u003cq\u003e))\\s*",
|
1657
|
+
"end": "(?!\\G)$|(?=[;}]|$)",
|
1658
|
+
"patterns": [
|
1659
|
+
{
|
1660
|
+
"include": "#inheritance-clause"
|
1661
|
+
},
|
1662
|
+
{
|
1663
|
+
"include": "#generic-where-clause"
|
1664
|
+
},
|
1665
|
+
{
|
1666
|
+
"include": "#typealias-assignment"
|
1667
|
+
}
|
1668
|
+
],
|
1694
1669
|
"beginCaptures": {
|
1695
1670
|
"1": {
|
1696
1671
|
"name": "keyword.other.declaration-specifier.swift"
|
@@ -1704,37 +1679,12 @@
|
|
1704
1679
|
"4": {
|
1705
1680
|
"name": "punctuation.definition.identifier.swift"
|
1706
1681
|
}
|
1707
|
-
}
|
1708
|
-
"end": "(?!\\G)$|(?=[;}]|$)",
|
1709
|
-
"name": "meta.definition.associatedtype.swift",
|
1710
|
-
"patterns": [
|
1711
|
-
{
|
1712
|
-
"include": "#inheritance-clause"
|
1713
|
-
},
|
1714
|
-
{
|
1715
|
-
"comment": "SE-0142: Permit where clauses to constrain associated types",
|
1716
|
-
"include": "#generic-where-clause"
|
1717
|
-
},
|
1718
|
-
{
|
1719
|
-
"include": "#typealias-assignment"
|
1720
|
-
}
|
1721
|
-
]
|
1682
|
+
}
|
1722
1683
|
},
|
1723
1684
|
"protocol-initializer": {
|
1724
|
-
"begin": "(?<!\\.)\\b(init[?!]*(?# only one is valid, but we want the in⇥ snippet to produce something that looks good))\\s*(?=\\(|<)",
|
1725
|
-
"beginCaptures": {
|
1726
|
-
"1": {
|
1727
|
-
"name": "storage.type.function.swift",
|
1728
|
-
"patterns": [
|
1729
|
-
{
|
1730
|
-
"match": "(?<=[?!])[?!]+",
|
1731
|
-
"name": "invalid.illegal.character-not-allowed-here.swift"
|
1732
|
-
}
|
1733
|
-
]
|
1734
|
-
}
|
1735
|
-
},
|
1736
|
-
"end": "$|(?=;|//|/\\*|\\})",
|
1737
1685
|
"name": "meta.definition.function.initializer.swift",
|
1686
|
+
"begin": "(?\u003c!\\.)\\b(init[?!]*(?# only one is valid, but we want the in⇥ snippet to produce something that looks good))\\s*(?=\\(|\u003c)",
|
1687
|
+
"end": "$|(?=;|//|/\\*|\\})",
|
1738
1688
|
"patterns": [
|
1739
1689
|
{
|
1740
1690
|
"include": "#comments"
|
@@ -1746,53 +1696,49 @@
|
|
1746
1696
|
"include": "#parameter-clause"
|
1747
1697
|
},
|
1748
1698
|
{
|
1749
|
-
"
|
1750
|
-
"
|
1699
|
+
"name": "keyword.control.exception.swift",
|
1700
|
+
"match": "\\b(?:throws|rethrows)\\b"
|
1751
1701
|
},
|
1752
1702
|
{
|
1753
|
-
"comment": "Swift 3: generic constraints after the parameters and return type",
|
1754
1703
|
"include": "#generic-where-clause"
|
1755
1704
|
},
|
1756
1705
|
{
|
1706
|
+
"name": "invalid.illegal.function-body-not-allowed-in-protocol.swift",
|
1757
1707
|
"begin": "\\{",
|
1708
|
+
"end": "\\}",
|
1709
|
+
"patterns": [
|
1710
|
+
{
|
1711
|
+
"include": "$self"
|
1712
|
+
}
|
1713
|
+
],
|
1758
1714
|
"beginCaptures": {
|
1759
1715
|
"0": {
|
1760
1716
|
"name": "punctuation.section.function.begin.swift"
|
1761
1717
|
}
|
1762
1718
|
},
|
1763
|
-
"end": "\\}",
|
1764
1719
|
"endCaptures": {
|
1765
1720
|
"0": {
|
1766
1721
|
"name": "punctuation.section.function.end.swift"
|
1767
1722
|
}
|
1768
|
-
}
|
1769
|
-
|
1723
|
+
}
|
1724
|
+
}
|
1725
|
+
],
|
1726
|
+
"beginCaptures": {
|
1727
|
+
"1": {
|
1728
|
+
"name": "storage.type.function.swift",
|
1770
1729
|
"patterns": [
|
1771
1730
|
{
|
1772
|
-
"
|
1731
|
+
"name": "invalid.illegal.character-not-allowed-here.swift",
|
1732
|
+
"match": "(?\u003c=[?!])[?!]+"
|
1773
1733
|
}
|
1774
1734
|
]
|
1775
1735
|
}
|
1776
|
-
|
1736
|
+
}
|
1777
1737
|
},
|
1778
1738
|
"protocol-method": {
|
1779
|
-
"begin": "(?x)\n\t\t\t\t\t\t\t\t\\b\n\t\t\t\t\t\t\t\t(func)\n\t\t\t\t\t\t\t\t\\s+\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>)\n\t\t \t\t\t\t\t\t | (?:\n\t\t \t\t\t\t\t\t\t\t(\n\t\t \t\t\t\t\t\t\t\t\t(?<oph>\t\t\t\t\t\t\t\t# operator-head\n\t\t \t\t\t\t\t\t\t\t\t\t[/=\\-+!*%<>&|^~?]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t \t\t\t\t\t\t\t\t\t)\n\t\t \t\t\t\t\t\t\t\t\t(\n\t\t \t\t\t\t\t\t\t\t\t\t\\g<oph>\n\t\t \t\t\t\t\t\t\t\t\t | (?<opc>\t\t\t\t\t\t\t\t# operator-character\n\t\t \t\t\t\t\t\t\t\t\t\t\t[\\x{0300}-\\x{036F}]\n\t\t \t\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t \t\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t \t\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t \t\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t \t\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t \t\t\t\t\t\t\t\t\t\t)\n\t\t \t\t\t\t\t\t\t\t\t)*\n\t\t \t\t\t\t\t\t\t\t)\n\t\t \t\t\t\t\t\t\t | ( \\. ( \\g<oph> | \\g<opc> | \\. )+ )\t\t\t# Dot operators\n\t\t \t\t\t\t\t\t\t)\n\t\t \t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\\s*\n\t\t\t\t\t\t\t\t(?=\\(|<)\n\t\t\t\t\t\t\t",
|
1780
|
-
"beginCaptures": {
|
1781
|
-
"1": {
|
1782
|
-
"name": "storage.type.function.swift"
|
1783
|
-
},
|
1784
|
-
"2": {
|
1785
|
-
"name": "entity.name.function.swift"
|
1786
|
-
},
|
1787
|
-
"3": {
|
1788
|
-
"name": "punctuation.definition.identifier.swift"
|
1789
|
-
},
|
1790
|
-
"4": {
|
1791
|
-
"name": "punctuation.definition.identifier.swift"
|
1792
|
-
}
|
1793
|
-
},
|
1794
|
-
"end": "$|(?=;|//|/\\*|\\})",
|
1795
1739
|
"name": "meta.definition.function.swift",
|
1740
|
+
"begin": "(?x)\n\t\t\t\t\t\t\t\t\\b\n\t\t\t\t\t\t\t\t(func)\n\t\t\t\t\t\t\t\t\\s+\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?\u003cq\u003e`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k\u003cq\u003e)\n\t\t \t\t\t\t\t\t | (?:\n\t\t \t\t\t\t\t\t\t\t(\n\t\t \t\t\t\t\t\t\t\t\t(?\u003coph\u003e\t\t\t\t\t\t\t\t# operator-head\n\t\t \t\t\t\t\t\t\t\t\t\t[/=\\-+!*%\u003c\u003e\u0026|^~?]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t \t\t\t\t\t\t\t\t\t)\n\t\t \t\t\t\t\t\t\t\t\t(\n\t\t \t\t\t\t\t\t\t\t\t\t\\g\u003coph\u003e\n\t\t \t\t\t\t\t\t\t\t\t | (?\u003copc\u003e\t\t\t\t\t\t\t\t# operator-character\n\t\t \t\t\t\t\t\t\t\t\t\t\t[\\x{0300}-\\x{036F}]\n\t\t \t\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t \t\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t \t\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t \t\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t \t\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t \t\t\t\t\t\t\t\t\t\t)\n\t\t \t\t\t\t\t\t\t\t\t)*\n\t\t \t\t\t\t\t\t\t\t)\n\t\t \t\t\t\t\t\t\t | ( \\. ( \\g\u003coph\u003e | \\g\u003copc\u003e | \\. )+ )\t\t\t# Dot operators\n\t\t \t\t\t\t\t\t\t)\n\t\t \t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\\s*\n\t\t\t\t\t\t\t\t(?=\\(|\u003c)\n\t\t\t\t\t\t\t",
|
1741
|
+
"end": "$|(?=;|//|/\\*|\\})",
|
1796
1742
|
"patterns": [
|
1797
1743
|
{
|
1798
1744
|
"include": "#comments"
|
@@ -1807,47 +1753,39 @@
|
|
1807
1753
|
"include": "#function-result"
|
1808
1754
|
},
|
1809
1755
|
{
|
1810
|
-
"
|
1811
|
-
"
|
1756
|
+
"name": "keyword.control.exception.swift",
|
1757
|
+
"match": "\\b(?:throws|rethrows)\\b"
|
1812
1758
|
},
|
1813
1759
|
{
|
1814
|
-
"comment": "Swift 3: generic constraints after the parameters and return type",
|
1815
1760
|
"include": "#generic-where-clause"
|
1816
1761
|
},
|
1817
1762
|
{
|
1763
|
+
"name": "invalid.illegal.function-body-not-allowed-in-protocol.swift",
|
1818
1764
|
"begin": "\\{",
|
1765
|
+
"end": "\\}",
|
1766
|
+
"patterns": [
|
1767
|
+
{
|
1768
|
+
"include": "$self"
|
1769
|
+
}
|
1770
|
+
],
|
1819
1771
|
"beginCaptures": {
|
1820
1772
|
"0": {
|
1821
1773
|
"name": "punctuation.section.function.begin.swift"
|
1822
1774
|
}
|
1823
1775
|
},
|
1824
|
-
"end": "\\}",
|
1825
1776
|
"endCaptures": {
|
1826
1777
|
"0": {
|
1827
1778
|
"name": "punctuation.section.function.end.swift"
|
1828
1779
|
}
|
1829
|
-
}
|
1830
|
-
"name": "invalid.illegal.function-body-not-allowed-in-protocol.swift",
|
1831
|
-
"patterns": [
|
1832
|
-
{
|
1833
|
-
"include": "$self"
|
1834
|
-
}
|
1835
|
-
]
|
1780
|
+
}
|
1836
1781
|
}
|
1837
|
-
]
|
1838
|
-
}
|
1839
|
-
}
|
1840
|
-
},
|
1841
|
-
"type": {
|
1842
|
-
"patterns": [
|
1843
|
-
{
|
1844
|
-
"begin": "\\b(class(?!\\s+(?:func|var|let)\\b)|struct)\\s+((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))",
|
1782
|
+
],
|
1845
1783
|
"beginCaptures": {
|
1846
1784
|
"1": {
|
1847
|
-
"name": "storage.type
|
1785
|
+
"name": "storage.type.function.swift"
|
1848
1786
|
},
|
1849
1787
|
"2": {
|
1850
|
-
"name": "entity.name.
|
1788
|
+
"name": "entity.name.function.swift"
|
1851
1789
|
},
|
1852
1790
|
"3": {
|
1853
1791
|
"name": "punctuation.definition.identifier.swift"
|
@@ -1855,9 +1793,16 @@
|
|
1855
1793
|
"4": {
|
1856
1794
|
"name": "punctuation.definition.identifier.swift"
|
1857
1795
|
}
|
1858
|
-
}
|
1859
|
-
|
1796
|
+
}
|
1797
|
+
}
|
1798
|
+
}
|
1799
|
+
},
|
1800
|
+
"type": {
|
1801
|
+
"patterns": [
|
1802
|
+
{
|
1860
1803
|
"name": "meta.definition.type.$1.swift",
|
1804
|
+
"begin": "\\b(class(?!\\s+(?:func|var|let)\\b)|struct)\\s+((?\u003cq\u003e`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k\u003cq\u003e))",
|
1805
|
+
"end": "(?\u003c=\\})",
|
1861
1806
|
"patterns": [
|
1862
1807
|
{
|
1863
1808
|
"include": "#comments"
|
@@ -1866,33 +1811,46 @@
|
|
1866
1811
|
"include": "#generic-parameter-clause"
|
1867
1812
|
},
|
1868
1813
|
{
|
1869
|
-
"comment": "Swift 3: generic constraints after the generic param list",
|
1870
1814
|
"include": "#generic-where-clause"
|
1871
1815
|
},
|
1872
1816
|
{
|
1873
1817
|
"include": "#inheritance-clause"
|
1874
1818
|
},
|
1875
1819
|
{
|
1820
|
+
"name": "meta.definition.type.body.swift",
|
1876
1821
|
"begin": "\\{",
|
1822
|
+
"end": "\\}",
|
1823
|
+
"patterns": [
|
1824
|
+
{
|
1825
|
+
"include": "$self"
|
1826
|
+
}
|
1827
|
+
],
|
1877
1828
|
"beginCaptures": {
|
1878
1829
|
"0": {
|
1879
1830
|
"name": "punctuation.definition.type.begin.swift"
|
1880
1831
|
}
|
1881
1832
|
},
|
1882
|
-
"end": "\\}",
|
1883
1833
|
"endCaptures": {
|
1884
1834
|
"0": {
|
1885
1835
|
"name": "punctuation.definition.type.end.swift"
|
1886
1836
|
}
|
1887
|
-
}
|
1888
|
-
"name": "meta.definition.type.body.swift",
|
1889
|
-
"patterns": [
|
1890
|
-
{
|
1891
|
-
"include": "$self"
|
1892
|
-
}
|
1893
|
-
]
|
1837
|
+
}
|
1894
1838
|
}
|
1895
|
-
]
|
1839
|
+
],
|
1840
|
+
"beginCaptures": {
|
1841
|
+
"1": {
|
1842
|
+
"name": "storage.type.$1.swift"
|
1843
|
+
},
|
1844
|
+
"2": {
|
1845
|
+
"name": "entity.name.type.$1.swift"
|
1846
|
+
},
|
1847
|
+
"3": {
|
1848
|
+
"name": "punctuation.definition.identifier.swift"
|
1849
|
+
},
|
1850
|
+
"4": {
|
1851
|
+
"name": "punctuation.definition.identifier.swift"
|
1852
|
+
}
|
1853
|
+
}
|
1896
1854
|
},
|
1897
1855
|
{
|
1898
1856
|
"include": "#type-enum"
|
@@ -1900,23 +1858,9 @@
|
|
1900
1858
|
]
|
1901
1859
|
},
|
1902
1860
|
"type-enum": {
|
1903
|
-
"begin": "\\b(enum)\\s+((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))",
|
1904
|
-
"beginCaptures": {
|
1905
|
-
"1": {
|
1906
|
-
"name": "storage.type.$1.swift"
|
1907
|
-
},
|
1908
|
-
"2": {
|
1909
|
-
"name": "entity.name.type.$1.swift"
|
1910
|
-
},
|
1911
|
-
"3": {
|
1912
|
-
"name": "punctuation.definition.identifier.swift"
|
1913
|
-
},
|
1914
|
-
"4": {
|
1915
|
-
"name": "punctuation.definition.identifier.swift"
|
1916
|
-
}
|
1917
|
-
},
|
1918
|
-
"end": "(?<=\\})",
|
1919
1861
|
"name": "meta.definition.type.$1.swift",
|
1862
|
+
"begin": "\\b(enum)\\s+((?\u003cq\u003e`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k\u003cq\u003e))",
|
1863
|
+
"end": "(?\u003c=\\})",
|
1920
1864
|
"patterns": [
|
1921
1865
|
{
|
1922
1866
|
"include": "#comments"
|
@@ -1925,26 +1869,15 @@
|
|
1925
1869
|
"include": "#generic-parameter-clause"
|
1926
1870
|
},
|
1927
1871
|
{
|
1928
|
-
"comment": "Swift 3: generic constraints after the generic param list",
|
1929
1872
|
"include": "#generic-where-clause"
|
1930
1873
|
},
|
1931
1874
|
{
|
1932
1875
|
"include": "#inheritance-clause"
|
1933
1876
|
},
|
1934
1877
|
{
|
1878
|
+
"name": "meta.definition.type.body.swift",
|
1935
1879
|
"begin": "\\{",
|
1936
|
-
"beginCaptures": {
|
1937
|
-
"0": {
|
1938
|
-
"name": "punctuation.definition.type.begin.swift"
|
1939
|
-
}
|
1940
|
-
},
|
1941
1880
|
"end": "\\}",
|
1942
|
-
"endCaptures": {
|
1943
|
-
"0": {
|
1944
|
-
"name": "punctuation.definition.type.end.swift"
|
1945
|
-
}
|
1946
|
-
},
|
1947
|
-
"name": "meta.definition.type.body.swift",
|
1948
1881
|
"patterns": [
|
1949
1882
|
{
|
1950
1883
|
"include": "#enum-case-clause"
|
@@ -1952,28 +1885,44 @@
|
|
1952
1885
|
{
|
1953
1886
|
"include": "$self"
|
1954
1887
|
}
|
1955
|
-
]
|
1956
|
-
}
|
1957
|
-
],
|
1958
|
-
"repository": {
|
1959
|
-
"associated-values": {
|
1960
|
-
"begin": "\\G\\(",
|
1888
|
+
],
|
1961
1889
|
"beginCaptures": {
|
1962
1890
|
"0": {
|
1963
|
-
"name": "punctuation.definition.
|
1891
|
+
"name": "punctuation.definition.type.begin.swift"
|
1964
1892
|
}
|
1965
1893
|
},
|
1966
|
-
"end": "\\)",
|
1967
1894
|
"endCaptures": {
|
1968
1895
|
"0": {
|
1969
|
-
"name": "punctuation.definition.
|
1896
|
+
"name": "punctuation.definition.type.end.swift"
|
1970
1897
|
}
|
1971
|
-
}
|
1898
|
+
}
|
1899
|
+
}
|
1900
|
+
],
|
1901
|
+
"beginCaptures": {
|
1902
|
+
"1": {
|
1903
|
+
"name": "storage.type.$1.swift"
|
1904
|
+
},
|
1905
|
+
"2": {
|
1906
|
+
"name": "entity.name.type.$1.swift"
|
1907
|
+
},
|
1908
|
+
"3": {
|
1909
|
+
"name": "punctuation.definition.identifier.swift"
|
1910
|
+
},
|
1911
|
+
"4": {
|
1912
|
+
"name": "punctuation.definition.identifier.swift"
|
1913
|
+
}
|
1914
|
+
},
|
1915
|
+
"repository": {
|
1916
|
+
"associated-values": {
|
1917
|
+
"begin": "\\G\\(",
|
1918
|
+
"end": "\\)",
|
1972
1919
|
"patterns": [
|
1973
1920
|
{
|
1974
1921
|
"include": "#comments"
|
1975
1922
|
},
|
1976
1923
|
{
|
1924
|
+
"match": "(?x)\n\t\t\t\t\t\t\t\t\t\t((?\u003cq1\u003e`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*\\k\u003cq1\u003e)\n\t\t\t\t\t\t\t\t\t\t\\s+\n\t\t\t\t\t\t\t\t\t\t(((?\u003cq2\u003e`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*\\k\u003cq2\u003e))\n\t\t\t\t\t\t\t\t\t\t\\s*(:)",
|
1925
|
+
"end": "(?=[,)\\]])",
|
1977
1926
|
"captures": {
|
1978
1927
|
"1": {
|
1979
1928
|
"name": "invalid.illegal.distinct-labels-not-allowed.swift"
|
@@ -1987,12 +1936,16 @@
|
|
1987
1936
|
"6": {
|
1988
1937
|
"name": "punctuation.separator.argument-label.swift"
|
1989
1938
|
}
|
1990
|
-
}
|
1991
|
-
"end": "(?=[,)\\]])",
|
1992
|
-
"match": "(?x)\n\t\t\t\t\t\t\t\t\t\t((?<q1>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*\\k<q1>)\n\t\t\t\t\t\t\t\t\t\t\\s+\n\t\t\t\t\t\t\t\t\t\t(((?<q2>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*\\k<q2>))\n\t\t\t\t\t\t\t\t\t\t\\s*(:)"
|
1939
|
+
}
|
1993
1940
|
},
|
1994
1941
|
{
|
1995
|
-
"begin": "(((
|
1942
|
+
"begin": "(((?\u003cq\u003e`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*\\k\u003cq\u003e))\\s*(:)",
|
1943
|
+
"end": "(?=[,)\\]])",
|
1944
|
+
"patterns": [
|
1945
|
+
{
|
1946
|
+
"include": "#available-types"
|
1947
|
+
}
|
1948
|
+
],
|
1996
1949
|
"beginCaptures": {
|
1997
1950
|
"1": {
|
1998
1951
|
"name": "entity.name.function.swift"
|
@@ -2003,38 +1956,36 @@
|
|
2003
1956
|
"4": {
|
2004
1957
|
"name": "punctuation.separator.argument-label.swift"
|
2005
1958
|
}
|
2006
|
-
}
|
2007
|
-
"end": "(?=[,)\\]])",
|
2008
|
-
"patterns": [
|
2009
|
-
{
|
2010
|
-
"include": "#available-types"
|
2011
|
-
}
|
2012
|
-
]
|
1959
|
+
}
|
2013
1960
|
},
|
2014
1961
|
{
|
2015
1962
|
"begin": "(?![,)\\]])(?=\\S)",
|
2016
|
-
"comment": "an element without a label (i.e. anything else)",
|
2017
1963
|
"end": "(?=[,)\\]])",
|
2018
1964
|
"patterns": [
|
2019
1965
|
{
|
2020
1966
|
"include": "#available-types"
|
2021
1967
|
},
|
2022
1968
|
{
|
2023
|
-
"
|
2024
|
-
"
|
1969
|
+
"name": "invalid.illegal.extra-colon-in-parameter-list.swift",
|
1970
|
+
"match": ":"
|
2025
1971
|
}
|
2026
1972
|
]
|
2027
1973
|
}
|
2028
|
-
]
|
2029
|
-
},
|
2030
|
-
"enum-case": {
|
2031
|
-
"begin": "(?x)((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))\\s*",
|
1974
|
+
],
|
2032
1975
|
"beginCaptures": {
|
2033
|
-
"
|
2034
|
-
"name": "
|
1976
|
+
"0": {
|
1977
|
+
"name": "punctuation.definition.parameters.begin.swift"
|
2035
1978
|
}
|
2036
1979
|
},
|
2037
|
-
"
|
1980
|
+
"endCaptures": {
|
1981
|
+
"0": {
|
1982
|
+
"name": "punctuation.definition.parameters.end.swift"
|
1983
|
+
}
|
1984
|
+
}
|
1985
|
+
},
|
1986
|
+
"enum-case": {
|
1987
|
+
"begin": "(?x)((?\u003cq\u003e`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k\u003cq\u003e))\\s*",
|
1988
|
+
"end": "(?\u003c=\\))|(?![=(])",
|
2038
1989
|
"patterns": [
|
2039
1990
|
{
|
2040
1991
|
"include": "#comments"
|
@@ -2045,15 +1996,15 @@
|
|
2045
1996
|
{
|
2046
1997
|
"include": "#raw-value-assignment"
|
2047
1998
|
}
|
2048
|
-
]
|
1999
|
+
],
|
2000
|
+
"beginCaptures": {
|
2001
|
+
"1": {
|
2002
|
+
"name": "constant.other.swift"
|
2003
|
+
}
|
2004
|
+
}
|
2049
2005
|
},
|
2050
2006
|
"enum-case-clause": {
|
2051
2007
|
"begin": "\\b(case)\\b\\s*",
|
2052
|
-
"beginCaptures": {
|
2053
|
-
"1": {
|
2054
|
-
"name": "storage.type.enum.case.swift"
|
2055
|
-
}
|
2056
|
-
},
|
2057
2008
|
"end": "(?=[;}])|(?!\\G)(?!//|/\\*)(?=[^\\s,])",
|
2058
2009
|
"patterns": [
|
2059
2010
|
{
|
@@ -2065,12 +2016,17 @@
|
|
2065
2016
|
{
|
2066
2017
|
"include": "#more-cases"
|
2067
2018
|
}
|
2068
|
-
]
|
2019
|
+
],
|
2020
|
+
"beginCaptures": {
|
2021
|
+
"1": {
|
2022
|
+
"name": "storage.type.enum.case.swift"
|
2023
|
+
}
|
2024
|
+
}
|
2069
2025
|
},
|
2070
2026
|
"more-cases": {
|
2027
|
+
"name": "meta.enum-case.more-cases",
|
2071
2028
|
"begin": ",\\s*",
|
2072
2029
|
"end": "(?!\\G)(?!//|/\\*)(?=[;}]|[^\\s,])",
|
2073
|
-
"name": "meta.enum-case.more-cases",
|
2074
2030
|
"patterns": [
|
2075
2031
|
{
|
2076
2032
|
"include": "#comments"
|
@@ -2085,11 +2041,6 @@
|
|
2085
2041
|
},
|
2086
2042
|
"raw-value-assignment": {
|
2087
2043
|
"begin": "(=)\\s*",
|
2088
|
-
"beginCaptures": {
|
2089
|
-
"1": {
|
2090
|
-
"name": "keyword.operator.assignment.swift"
|
2091
|
-
}
|
2092
|
-
},
|
2093
2044
|
"end": "(?!\\G)",
|
2094
2045
|
"patterns": [
|
2095
2046
|
{
|
@@ -2098,12 +2049,29 @@
|
|
2098
2049
|
{
|
2099
2050
|
"include": "#literals"
|
2100
2051
|
}
|
2101
|
-
]
|
2052
|
+
],
|
2053
|
+
"beginCaptures": {
|
2054
|
+
"1": {
|
2055
|
+
"name": "keyword.operator.assignment.swift"
|
2056
|
+
}
|
2057
|
+
}
|
2102
2058
|
}
|
2103
2059
|
}
|
2104
2060
|
},
|
2105
2061
|
"type-identifier": {
|
2106
|
-
"begin": "((
|
2062
|
+
"begin": "((?\u003cq\u003e`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k\u003cq\u003e))\\s*",
|
2063
|
+
"end": "(?!\u003c)",
|
2064
|
+
"patterns": [
|
2065
|
+
{
|
2066
|
+
"begin": "(?=\u003c)",
|
2067
|
+
"end": "(?!\\G)",
|
2068
|
+
"patterns": [
|
2069
|
+
{
|
2070
|
+
"include": "#generic-argument-clause"
|
2071
|
+
}
|
2072
|
+
]
|
2073
|
+
}
|
2074
|
+
],
|
2107
2075
|
"beginCaptures": {
|
2108
2076
|
"1": {
|
2109
2077
|
"name": "meta.type-name.swift",
|
@@ -2119,22 +2087,26 @@
|
|
2119
2087
|
"3": {
|
2120
2088
|
"name": "punctuation.definition.identifier.swift"
|
2121
2089
|
}
|
2122
|
-
}
|
2123
|
-
|
2090
|
+
}
|
2091
|
+
},
|
2092
|
+
"typealias": {
|
2093
|
+
"name": "meta.definition.typealias.swift",
|
2094
|
+
"begin": "\\b(typealias)\\s+((?\u003cq\u003e`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k\u003cq\u003e))\\s*",
|
2095
|
+
"end": "(?!\\G)$|(?=;|//|/\\*|$)",
|
2124
2096
|
"patterns": [
|
2125
2097
|
{
|
2126
|
-
"begin": "(
|
2098
|
+
"begin": "\\G(?=\u003c)",
|
2127
2099
|
"end": "(?!\\G)",
|
2128
2100
|
"patterns": [
|
2129
2101
|
{
|
2130
|
-
"include": "#generic-
|
2102
|
+
"include": "#generic-parameter-clause"
|
2131
2103
|
}
|
2132
2104
|
]
|
2105
|
+
},
|
2106
|
+
{
|
2107
|
+
"include": "#typealias-assignment"
|
2133
2108
|
}
|
2134
|
-
]
|
2135
|
-
},
|
2136
|
-
"typealias": {
|
2137
|
-
"begin": "\\b(typealias)\\s+((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))\\s*",
|
2109
|
+
],
|
2138
2110
|
"beginCaptures": {
|
2139
2111
|
"1": {
|
2140
2112
|
"name": "keyword.other.declaration-specifier.swift"
|
@@ -2148,44 +2120,27 @@
|
|
2148
2120
|
"4": {
|
2149
2121
|
"name": "punctuation.definition.identifier.swift"
|
2150
2122
|
}
|
2151
|
-
}
|
2152
|
-
"end": "(?!\\G)$|(?=;|//|/\\*|$)",
|
2153
|
-
"name": "meta.definition.typealias.swift",
|
2154
|
-
"patterns": [
|
2155
|
-
{
|
2156
|
-
"begin": "\\G(?=<)",
|
2157
|
-
"end": "(?!\\G)",
|
2158
|
-
"patterns": [
|
2159
|
-
{
|
2160
|
-
"include": "#generic-parameter-clause"
|
2161
|
-
}
|
2162
|
-
]
|
2163
|
-
},
|
2164
|
-
{
|
2165
|
-
"include": "#typealias-assignment"
|
2166
|
-
}
|
2167
|
-
]
|
2123
|
+
}
|
2168
2124
|
},
|
2169
2125
|
"typealias-assignment": {
|
2170
2126
|
"begin": "(=)\\s*",
|
2171
|
-
"beginCaptures": {
|
2172
|
-
"1": {
|
2173
|
-
"name": "keyword.operator.assignment.swift"
|
2174
|
-
}
|
2175
|
-
},
|
2176
2127
|
"end": "(?!\\G)$|(?=;|//|/\\*|$)",
|
2177
2128
|
"patterns": [
|
2178
2129
|
{
|
2179
2130
|
"include": "#available-types"
|
2180
2131
|
}
|
2181
|
-
]
|
2132
|
+
],
|
2133
|
+
"beginCaptures": {
|
2134
|
+
"1": {
|
2135
|
+
"name": "keyword.operator.assignment.swift"
|
2136
|
+
}
|
2137
|
+
}
|
2182
2138
|
},
|
2183
2139
|
"types-precedencegroup": {
|
2184
2140
|
"patterns": [
|
2185
2141
|
{
|
2186
|
-
"
|
2187
|
-
"match": "\\b(?:BitwiseShift|Assignment|RangeFormation|Casting|Addition|NilCoalescing|Comparison|LogicalConjunction|LogicalDisjunction|Default|Ternary|Multiplication|FunctionArrow)Precedence\\b"
|
2188
|
-
"name": "support.type.swift"
|
2142
|
+
"name": "support.type.swift",
|
2143
|
+
"match": "\\b(?:BitwiseShift|Assignment|RangeFormation|Casting|Addition|NilCoalescing|Comparison|LogicalConjunction|LogicalDisjunction|Default|Ternary|Multiplication|FunctionArrow)Precedence\\b"
|
2189
2144
|
}
|
2190
2145
|
]
|
2191
2146
|
}
|
@@ -2245,29 +2200,17 @@
|
|
2245
2200
|
"include": "#availability-condition"
|
2246
2201
|
},
|
2247
2202
|
{
|
2248
|
-
"
|
2249
|
-
"
|
2203
|
+
"name": "support.variable.discard-value.swift",
|
2204
|
+
"match": "\\b_\\b"
|
2250
2205
|
}
|
2251
2206
|
],
|
2252
2207
|
"repository": {
|
2253
2208
|
"availability-condition": {
|
2254
2209
|
"begin": "\\B(#available)(\\()",
|
2255
|
-
"beginCaptures": {
|
2256
|
-
"1": {
|
2257
|
-
"name": "support.function.availability-condition.swift"
|
2258
|
-
},
|
2259
|
-
"2": {
|
2260
|
-
"name": "punctuation.definition.arguments.begin.swift"
|
2261
|
-
}
|
2262
|
-
},
|
2263
2210
|
"end": "\\)",
|
2264
|
-
"endCaptures": {
|
2265
|
-
"0": {
|
2266
|
-
"name": "punctuation.definition.arguments.end.swift"
|
2267
|
-
}
|
2268
|
-
},
|
2269
2211
|
"patterns": [
|
2270
2212
|
{
|
2213
|
+
"match": "\\s*\\b((?:iOS|macOS|OSX|watchOS|tvOS)(?:ApplicationExtension)?)\\b(?:\\s+([0-9]+(?:\\.[0-9]+)*\\b))",
|
2271
2214
|
"captures": {
|
2272
2215
|
"1": {
|
2273
2216
|
"name": "keyword.other.platform.os.swift"
|
@@ -2275,10 +2218,10 @@
|
|
2275
2218
|
"2": {
|
2276
2219
|
"name": "constant.numeric.swift"
|
2277
2220
|
}
|
2278
|
-
}
|
2279
|
-
"match": "\\s*\\b((?:iOS|macOS|OSX|watchOS|tvOS)(?:ApplicationExtension)?)\\b(?:\\s+([0-9]+(?:\\.[0-9]+)*\\b))"
|
2221
|
+
}
|
2280
2222
|
},
|
2281
2223
|
{
|
2224
|
+
"match": "(\\*)\\s*(.*?)(?=[,)])",
|
2282
2225
|
"captures": {
|
2283
2226
|
"1": {
|
2284
2227
|
"name": "keyword.other.platform.all.swift"
|
@@ -2286,20 +2229,33 @@
|
|
2286
2229
|
"2": {
|
2287
2230
|
"name": "invalid.illegal.character-not-allowed-here.swift"
|
2288
2231
|
}
|
2289
|
-
}
|
2290
|
-
"match": "(\\*)\\s*(.*?)(?=[,)])"
|
2232
|
+
}
|
2291
2233
|
},
|
2292
2234
|
{
|
2293
|
-
"
|
2294
|
-
"
|
2235
|
+
"name": "invalid.illegal.character-not-allowed-here.swift",
|
2236
|
+
"match": "[^\\s,)]+"
|
2295
2237
|
}
|
2296
|
-
]
|
2238
|
+
],
|
2239
|
+
"beginCaptures": {
|
2240
|
+
"1": {
|
2241
|
+
"name": "support.function.availability-condition.swift"
|
2242
|
+
},
|
2243
|
+
"2": {
|
2244
|
+
"name": "punctuation.definition.arguments.begin.swift"
|
2245
|
+
}
|
2246
|
+
},
|
2247
|
+
"endCaptures": {
|
2248
|
+
"0": {
|
2249
|
+
"name": "punctuation.definition.arguments.end.swift"
|
2250
|
+
}
|
2251
|
+
}
|
2297
2252
|
},
|
2298
2253
|
"closure-parameter": {
|
2299
|
-
"
|
2300
|
-
"
|
2254
|
+
"name": "variable.language.closure-parameter.swift",
|
2255
|
+
"match": "\\$[0-9]+"
|
2301
2256
|
},
|
2302
2257
|
"compound-name": {
|
2258
|
+
"match": "(?x)\n\t\t\t\t\t\t((?\u003cq1\u003e`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k\u003cq1\u003e)) \t\t# function name\n\t\t\t\t\t\t\\(\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t((?\u003cq2\u003e`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k\u003cq2\u003e)) \t# argument label\n\t\t\t\t\t\t\t\t\t:\t\t\t\t\t\t\t\t\t\t\t\t# colon\n\t\t\t\t\t\t\t\t)+\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\\)\n\t\t\t\t\t",
|
2303
2259
|
"captures": {
|
2304
2260
|
"1": {
|
2305
2261
|
"name": "entity.name.function.compound-name.swift"
|
@@ -2313,6 +2269,8 @@
|
|
2313
2269
|
"4": {
|
2314
2270
|
"patterns": [
|
2315
2271
|
{
|
2272
|
+
"name": "entity.name.function.compound-name.swift",
|
2273
|
+
"match": "(?\u003cq\u003e`?)(?!_:)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k\u003cq\u003e):",
|
2316
2274
|
"captures": {
|
2317
2275
|
"1": {
|
2318
2276
|
"name": "punctuation.definition.entity.swift"
|
@@ -2320,15 +2278,11 @@
|
|
2320
2278
|
"2": {
|
2321
2279
|
"name": "punctuation.definition.entity.swift"
|
2322
2280
|
}
|
2323
|
-
}
|
2324
|
-
"match": "(?<q>`?)(?!_:)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>):",
|
2325
|
-
"name": "entity.name.function.compound-name.swift"
|
2281
|
+
}
|
2326
2282
|
}
|
2327
2283
|
]
|
2328
2284
|
}
|
2329
|
-
}
|
2330
|
-
"comment": "a reference to a function with disambiguating argument labels, such as foo(_:), foo(bar:), etc.",
|
2331
|
-
"match": "(?x)\n\t\t\t\t\t\t((?<q1>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q1>)) \t\t# function name\n\t\t\t\t\t\t\\(\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t((?<q2>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q2>)) \t# argument label\n\t\t\t\t\t\t\t\t\t:\t\t\t\t\t\t\t\t\t\t\t\t# colon\n\t\t\t\t\t\t\t\t)+\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\\)\n\t\t\t\t\t"
|
2285
|
+
}
|
2332
2286
|
},
|
2333
2287
|
"expression-element-list": {
|
2334
2288
|
"patterns": [
|
@@ -2336,7 +2290,13 @@
|
|
2336
2290
|
"include": "#comments"
|
2337
2291
|
},
|
2338
2292
|
{
|
2339
|
-
"begin": "((
|
2293
|
+
"begin": "((?\u003cq\u003e`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k\u003cq\u003e))\\s*(:)",
|
2294
|
+
"end": "(?=[,)\\]])",
|
2295
|
+
"patterns": [
|
2296
|
+
{
|
2297
|
+
"include": "#expressions"
|
2298
|
+
}
|
2299
|
+
],
|
2340
2300
|
"beginCaptures": {
|
2341
2301
|
"1": {
|
2342
2302
|
"name": "support.function.any-method.swift"
|
@@ -2350,18 +2310,10 @@
|
|
2350
2310
|
"4": {
|
2351
2311
|
"name": "punctuation.separator.argument-label.swift"
|
2352
2312
|
}
|
2353
|
-
}
|
2354
|
-
"comment": "an element with a label",
|
2355
|
-
"end": "(?=[,)\\]])",
|
2356
|
-
"patterns": [
|
2357
|
-
{
|
2358
|
-
"include": "#expressions"
|
2359
|
-
}
|
2360
|
-
]
|
2313
|
+
}
|
2361
2314
|
},
|
2362
2315
|
{
|
2363
2316
|
"begin": "(?![,)\\]])(?=\\S)",
|
2364
|
-
"comment": "an element without a label (i.e. anything else)",
|
2365
2317
|
"end": "(?=[,)\\]])",
|
2366
2318
|
"patterns": [
|
2367
2319
|
{
|
@@ -2374,7 +2326,14 @@
|
|
2374
2326
|
"function-call-expression": {
|
2375
2327
|
"patterns": [
|
2376
2328
|
{
|
2377
|
-
"
|
2329
|
+
"name": "meta.function-call.swift",
|
2330
|
+
"begin": "((?\u003cq\u003e`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k\u003cq\u003e))\\s*(\\()",
|
2331
|
+
"end": "\\)",
|
2332
|
+
"patterns": [
|
2333
|
+
{
|
2334
|
+
"include": "#expression-element-list"
|
2335
|
+
}
|
2336
|
+
],
|
2378
2337
|
"beginCaptures": {
|
2379
2338
|
"1": {
|
2380
2339
|
"name": "support.function.any-method.swift"
|
@@ -2389,46 +2348,38 @@
|
|
2389
2348
|
"name": "punctuation.definition.arguments.begin.swift"
|
2390
2349
|
}
|
2391
2350
|
},
|
2392
|
-
"comment": "foo(args) -- a call whose callee is a highlightable name",
|
2393
|
-
"end": "\\)",
|
2394
2351
|
"endCaptures": {
|
2395
2352
|
"0": {
|
2396
2353
|
"name": "punctuation.definition.arguments.end.swift"
|
2397
2354
|
}
|
2398
|
-
}
|
2355
|
+
}
|
2356
|
+
},
|
2357
|
+
{
|
2399
2358
|
"name": "meta.function-call.swift",
|
2359
|
+
"begin": "(?\u003c=[`\\])}\u003e\\p{L}_\\p{N}\\p{M}])\\s*(\\()",
|
2360
|
+
"end": "\\)",
|
2400
2361
|
"patterns": [
|
2401
2362
|
{
|
2402
2363
|
"include": "#expression-element-list"
|
2403
2364
|
}
|
2404
|
-
]
|
2405
|
-
},
|
2406
|
-
{
|
2407
|
-
"begin": "(?<=[`\\])}>\\p{L}_\\p{N}\\p{M}])\\s*(\\()",
|
2365
|
+
],
|
2408
2366
|
"beginCaptures": {
|
2409
2367
|
"1": {
|
2410
2368
|
"name": "punctuation.definition.arguments.begin.swift"
|
2411
2369
|
}
|
2412
2370
|
},
|
2413
|
-
"comment": "[Int](args) -- a call whose callee is a more complicated expression",
|
2414
|
-
"end": "\\)",
|
2415
2371
|
"endCaptures": {
|
2416
2372
|
"0": {
|
2417
2373
|
"name": "punctuation.definition.arguments.end.swift"
|
2418
2374
|
}
|
2419
|
-
}
|
2420
|
-
"name": "meta.function-call.swift",
|
2421
|
-
"patterns": [
|
2422
|
-
{
|
2423
|
-
"include": "#expression-element-list"
|
2424
|
-
}
|
2425
|
-
]
|
2375
|
+
}
|
2426
2376
|
}
|
2427
2377
|
]
|
2428
2378
|
},
|
2429
2379
|
"member-reference": {
|
2430
2380
|
"patterns": [
|
2431
2381
|
{
|
2382
|
+
"match": "(?\u003c=\\.)((?\u003cq\u003e`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k\u003cq\u003e))",
|
2432
2383
|
"captures": {
|
2433
2384
|
"1": {
|
2434
2385
|
"name": "variable.other.swift"
|
@@ -2439,67 +2390,67 @@
|
|
2439
2390
|
"3": {
|
2440
2391
|
"name": "punctuation.definition.identifier.swift"
|
2441
2392
|
}
|
2442
|
-
}
|
2443
|
-
"match": "(?<=\\.)((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))"
|
2393
|
+
}
|
2444
2394
|
}
|
2445
2395
|
]
|
2446
2396
|
},
|
2447
2397
|
"parenthesized-expression": {
|
2448
2398
|
"begin": "\\(",
|
2399
|
+
"end": "\\)",
|
2400
|
+
"patterns": [
|
2401
|
+
{
|
2402
|
+
"include": "#expression-element-list"
|
2403
|
+
}
|
2404
|
+
],
|
2449
2405
|
"beginCaptures": {
|
2450
2406
|
"0": {
|
2451
2407
|
"name": "punctuation.section.tuple.begin.swift"
|
2452
2408
|
}
|
2453
2409
|
},
|
2454
|
-
"end": "\\)",
|
2455
2410
|
"endCaptures": {
|
2456
2411
|
"0": {
|
2457
2412
|
"name": "punctuation.section.tuple.end.swift"
|
2458
2413
|
}
|
2459
|
-
}
|
2414
|
+
}
|
2415
|
+
},
|
2416
|
+
"subscript-expression": {
|
2417
|
+
"name": "meta.subscript-expression.swift",
|
2418
|
+
"begin": "(?\u003c=[`\\p{L}_\\p{N}\\p{M}])\\s*(\\[)",
|
2419
|
+
"end": "\\]",
|
2460
2420
|
"patterns": [
|
2461
2421
|
{
|
2462
2422
|
"include": "#expression-element-list"
|
2463
2423
|
}
|
2464
|
-
]
|
2465
|
-
},
|
2466
|
-
"subscript-expression": {
|
2467
|
-
"begin": "(?<=[`\\p{L}_\\p{N}\\p{M}])\\s*(\\[)",
|
2424
|
+
],
|
2468
2425
|
"beginCaptures": {
|
2469
2426
|
"1": {
|
2470
2427
|
"name": "punctuation.definition.arguments.begin.swift"
|
2471
2428
|
}
|
2472
2429
|
},
|
2473
|
-
"end": "\\]",
|
2474
2430
|
"endCaptures": {
|
2475
2431
|
"0": {
|
2476
2432
|
"name": "punctuation.definition.arguments.end.swift"
|
2477
2433
|
}
|
2478
|
-
}
|
2479
|
-
"name": "meta.subscript-expression.swift",
|
2480
|
-
"patterns": [
|
2481
|
-
{
|
2482
|
-
"include": "#expression-element-list"
|
2483
|
-
}
|
2484
|
-
]
|
2434
|
+
}
|
2485
2435
|
}
|
2486
2436
|
}
|
2487
2437
|
},
|
2488
2438
|
"keywords": {
|
2489
2439
|
"patterns": [
|
2490
2440
|
{
|
2491
|
-
"
|
2492
|
-
"
|
2441
|
+
"name": "keyword.control.branch.swift",
|
2442
|
+
"match": "(?\u003c!\\.)\\b(?:if|else|guard|where|switch|case|default|fallthrough)\\b"
|
2493
2443
|
},
|
2494
2444
|
{
|
2495
|
-
"
|
2496
|
-
"
|
2445
|
+
"name": "keyword.control.transfer.swift",
|
2446
|
+
"match": "(?\u003c!\\.)\\b(?:continue|break|fallthrough|return)\\b"
|
2497
2447
|
},
|
2498
2448
|
{
|
2499
|
-
"
|
2500
|
-
"
|
2449
|
+
"name": "keyword.control.loop.swift",
|
2450
|
+
"match": "(?\u003c!\\.)\\b(?:while|for|in)\\b"
|
2501
2451
|
},
|
2502
2452
|
{
|
2453
|
+
"match": "(?\u003c!\\.)\\b(repeat)\\b(\\s*)",
|
2503
2454
|
"captures": {
|
2504
2455
|
"1": {
|
2505
2456
|
"name": "keyword.control.loop.swift"
|
@@ -2507,19 +2458,18 @@
|
|
2507
2458
|
"2": {
|
2508
2459
|
"name": "punctuation.whitespace.trailing.repeat.swift"
|
2509
2460
|
}
|
2510
|
-
}
|
2511
|
-
"comment": "extra scopes for repeat-while snippet",
|
2512
|
-
"match": "(?<!\\.)\\b(repeat)\\b(\\s*)"
|
2461
|
+
}
|
2513
2462
|
},
|
2514
2463
|
{
|
2515
|
-
"
|
2516
|
-
"
|
2464
|
+
"name": "keyword.control.defer.swift",
|
2465
|
+
"match": "(?\u003c!\\.)\\bdefer\\b"
|
2517
2466
|
},
|
2518
2467
|
{
|
2519
|
-
"
|
2520
|
-
"
|
2468
|
+
"name": "keyword.control.exception.swift",
|
2469
|
+
"match": "(?\u003c!\\.)\\b(?:catch|throws?|rethrows|try)\\b|\\btry[?!]\\B"
|
2521
2470
|
},
|
2522
2471
|
{
|
2472
|
+
"match": "(?\u003c!\\.)\\b(do)\\b(\\s*)",
|
2523
2473
|
"captures": {
|
2524
2474
|
"1": {
|
2525
2475
|
"name": "keyword.control.exception.swift"
|
@@ -2527,36 +2477,34 @@
|
|
2527
2477
|
"2": {
|
2528
2478
|
"name": "punctuation.whitespace.trailing.do.swift"
|
2529
2479
|
}
|
2530
|
-
}
|
2531
|
-
"comment": "extra scopes for do-catch snippet",
|
2532
|
-
"match": "(?<!\\.)\\b(do)\\b(\\s*)"
|
2480
|
+
}
|
2533
2481
|
},
|
2534
2482
|
{
|
2535
|
-
"
|
2536
|
-
"
|
2483
|
+
"name": "keyword.other.declaration-specifier.swift",
|
2484
|
+
"match": "(?\u003c!\\.)\\b(?:associatedtype|let|operator|typealias|var)\\b"
|
2537
2485
|
},
|
2538
2486
|
{
|
2539
|
-
"
|
2540
|
-
"
|
2487
|
+
"name": "storage.type.$1.swift",
|
2488
|
+
"match": "(?\u003c!\\.)\\b(class|enum|extension|precedencegroup|protocol|struct)\\b"
|
2541
2489
|
},
|
2542
2490
|
{
|
2543
|
-
"
|
2544
|
-
"
|
2491
|
+
"name": "storage.modifier.swift",
|
2492
|
+
"match": "(?\u003c!\\.)\\b(?:inout|static|final|lazy|mutating|nonmutating|optional|indirect|required|override|dynamic|convenience|infix|prefix|postfix)\\b"
|
2545
2493
|
},
|
2546
2494
|
{
|
2547
|
-
"
|
2548
|
-
"
|
2495
|
+
"name": "storage.type.function.swift",
|
2496
|
+
"match": "\\binit[?!]|\\binit\\b|(?\u003c!\\.)\\b(?:func|deinit|subscript|didSet|get|set|willSet)\\b"
|
2549
2497
|
},
|
2550
2498
|
{
|
2551
|
-
"
|
2552
|
-
"
|
2499
|
+
"name": "keyword.other.declaration-specifier.accessibility.swift",
|
2500
|
+
"match": "(?\u003c!\\.)\\b(?:fileprivate|private|internal|public|open)\\b"
|
2553
2501
|
},
|
2554
2502
|
{
|
2555
|
-
"
|
2556
|
-
"match": "(
|
2557
|
-
"name": "keyword.other.capture-specifier.swift"
|
2503
|
+
"name": "keyword.other.capture-specifier.swift",
|
2504
|
+
"match": "(?\u003c!\\.)\\b(?:weak|unowned)\\b|\\bunowned\\((?:safe|unsafe)\\)"
|
2558
2505
|
},
|
2559
2506
|
{
|
2507
|
+
"match": "(?\u003c=\\.)(?:(dynamicType|self)|(Protocol|Type))\\b",
|
2560
2508
|
"captures": {
|
2561
2509
|
"1": {
|
2562
2510
|
"name": "keyword.operator.type.swift"
|
@@ -2564,20 +2512,19 @@
|
|
2564
2512
|
"2": {
|
2565
2513
|
"name": "keyword.operator.type.metatype.swift"
|
2566
2514
|
}
|
2567
|
-
}
|
2568
|
-
"match": "(?<=\\.)(?:(dynamicType|self)|(Protocol|Type))\\b"
|
2515
|
+
}
|
2569
2516
|
},
|
2570
2517
|
{
|
2571
|
-
"
|
2572
|
-
"
|
2518
|
+
"name": "variable.language.swift",
|
2519
|
+
"match": "(?\u003c!\\.)\\b(?:super|self|Self)\\b"
|
2573
2520
|
},
|
2574
2521
|
{
|
2575
|
-
"
|
2576
|
-
"
|
2522
|
+
"name": "support.variable.swift",
|
2523
|
+
"match": "\\B(?:#file|#line|#column|#function|#dsohandle)\\b|\\b(?:__FILE__|__LINE__|__COLUMN__|__FUNCTION__|__DSO_HANDLE__)\\b"
|
2577
2524
|
},
|
2578
2525
|
{
|
2579
|
-
"
|
2580
|
-
"
|
2526
|
+
"name": "keyword.control.import.swift",
|
2527
|
+
"match": "(?\u003c!\\.)\\bimport\\b"
|
2581
2528
|
}
|
2582
2529
|
]
|
2583
2530
|
},
|
@@ -2593,20 +2540,25 @@
|
|
2593
2540
|
"include": "#string"
|
2594
2541
|
},
|
2595
2542
|
{
|
2596
|
-
"
|
2597
|
-
"
|
2543
|
+
"name": "constant.language.nil.swift",
|
2544
|
+
"match": "\\bnil\\b"
|
2598
2545
|
},
|
2599
2546
|
{
|
2600
|
-
"
|
2601
|
-
"match": "\\B#(colorLiteral|imageLiteral|fileLiteral)\\b"
|
2602
|
-
"name": "support.function.object-literal.swift"
|
2547
|
+
"name": "support.function.object-literal.swift",
|
2548
|
+
"match": "\\B#(colorLiteral|imageLiteral|fileLiteral)\\b"
|
2603
2549
|
},
|
2604
2550
|
{
|
2605
|
-
"
|
2606
|
-
"
|
2551
|
+
"name": "support.function.key-path.swift",
|
2552
|
+
"match": "\\B#keyPath\\b"
|
2607
2553
|
},
|
2608
2554
|
{
|
2609
2555
|
"begin": "\\B(#selector)(\\()(?:\\s*(getter|setter)\\s*(:))?",
|
2556
|
+
"end": "\\)",
|
2557
|
+
"patterns": [
|
2558
|
+
{
|
2559
|
+
"include": "#expressions"
|
2560
|
+
}
|
2561
|
+
],
|
2610
2562
|
"beginCaptures": {
|
2611
2563
|
"1": {
|
2612
2564
|
"name": "support.function.selector-reference.swift"
|
@@ -2621,167 +2573,158 @@
|
|
2621
2573
|
"name": "punctuation.separator.argument-label.swift"
|
2622
2574
|
}
|
2623
2575
|
},
|
2624
|
-
"end": "\\)",
|
2625
2576
|
"endCaptures": {
|
2626
2577
|
"0": {
|
2627
2578
|
"name": "punctuation.definition.arguments.end.swift"
|
2628
2579
|
}
|
2629
|
-
}
|
2630
|
-
"patterns": [
|
2631
|
-
{
|
2632
|
-
"include": "#expressions"
|
2633
|
-
}
|
2634
|
-
]
|
2580
|
+
}
|
2635
2581
|
}
|
2636
2582
|
],
|
2637
2583
|
"repository": {
|
2638
2584
|
"boolean": {
|
2639
|
-
"
|
2640
|
-
"
|
2585
|
+
"name": "constant.language.boolean.swift",
|
2586
|
+
"match": "\\b(true|false)\\b"
|
2641
2587
|
},
|
2642
2588
|
"numeric": {
|
2643
2589
|
"patterns": [
|
2644
2590
|
{
|
2645
|
-
"
|
2646
|
-
"match": "(\\B\\-|\\b)(
|
2647
|
-
"name": "constant.numeric.float.decimal.swift"
|
2591
|
+
"name": "constant.numeric.float.decimal.swift",
|
2592
|
+
"match": "(\\B\\-|\\b)(?\u003c![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)[0-9][0-9_]*(?=\\.[0-9]|[eE])(?:\\.[0-9][0-9_]*)?(?:[eE][-+]?[0-9][0-9_]*)?\\b(?!\\.[0-9])"
|
2648
2593
|
},
|
2649
2594
|
{
|
2650
|
-
"
|
2651
|
-
"match": "(\\B\\-|\\b)(
|
2652
|
-
"name": "constant.numeric.float.hexadecimal.swift"
|
2595
|
+
"name": "constant.numeric.float.hexadecimal.swift",
|
2596
|
+
"match": "(\\B\\-|\\b)(?\u003c![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)(0x[0-9a-fA-F][0-9a-fA-F_]*)(?:\\.[0-9a-fA-F][0-9a-fA-F_]*)?[pP][-+]?[0-9][0-9_]*\\b(?!\\.[0-9])"
|
2653
2597
|
},
|
2654
2598
|
{
|
2655
|
-
"
|
2656
|
-
"match": "(\\B\\-|\\b)(
|
2657
|
-
"name": "invalid.illegal.numeric.float.invalid-exponent.swift"
|
2599
|
+
"name": "invalid.illegal.numeric.float.invalid-exponent.swift",
|
2600
|
+
"match": "(\\B\\-|\\b)(?\u003c![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)(0x[0-9a-fA-F][0-9a-fA-F_]*)(?:\\.[0-9a-fA-F][0-9a-fA-F_]*)?(?:[pP][-+]?\\w*)\\b(?!\\.[0-9])"
|
2658
2601
|
},
|
2659
2602
|
{
|
2660
|
-
"
|
2661
|
-
"match": "(\\B\\-|\\b)(
|
2662
|
-
"name": "invalid.illegal.numeric.float.missing-exponent.swift"
|
2603
|
+
"name": "invalid.illegal.numeric.float.missing-exponent.swift",
|
2604
|
+
"match": "(\\B\\-|\\b)(?\u003c![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)(0x[0-9a-fA-F][0-9a-fA-F_]*)\\.[0-9][\\w.]*"
|
2663
2605
|
},
|
2664
2606
|
{
|
2665
|
-
"
|
2666
|
-
"match": "(
|
2667
|
-
"name": "invalid.illegal.numeric.float.missing-leading-zero.swift"
|
2607
|
+
"name": "invalid.illegal.numeric.float.missing-leading-zero.swift",
|
2608
|
+
"match": "(?\u003c=\\s|^)\\-?\\.[0-9][\\w.]*"
|
2668
2609
|
},
|
2669
2610
|
{
|
2670
|
-
"
|
2671
|
-
"match": "(\\B\\-|\\b)0[box]_[0-9a-fA-F_]*(?:[pPeE][+-]?\\w+)?[\\w.]+"
|
2672
|
-
"name": "invalid.illegal.numeric.leading-underscore.swift"
|
2611
|
+
"name": "invalid.illegal.numeric.leading-underscore.swift",
|
2612
|
+
"match": "(\\B\\-|\\b)0[box]_[0-9a-fA-F_]*(?:[pPeE][+-]?\\w+)?[\\w.]+"
|
2673
2613
|
},
|
2674
2614
|
{
|
2675
|
-
"
|
2676
|
-
"match": "(?<=[\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)[0-9]+\\b"
|
2615
|
+
"match": "(?\u003c=[\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)[0-9]+\\b"
|
2677
2616
|
},
|
2678
2617
|
{
|
2679
|
-
"
|
2680
|
-
"match": "(\\B\\-|\\b)(
|
2681
|
-
"name": "constant.numeric.integer.binary.swift"
|
2618
|
+
"name": "constant.numeric.integer.binary.swift",
|
2619
|
+
"match": "(\\B\\-|\\b)(?\u003c![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)0b[01][01_]*\\b(?!\\.[0-9])"
|
2682
2620
|
},
|
2683
2621
|
{
|
2684
|
-
"
|
2685
|
-
"match": "(\\B\\-|\\b)(
|
2686
|
-
"name": "constant.numeric.integer.octal.swift"
|
2622
|
+
"name": "constant.numeric.integer.octal.swift",
|
2623
|
+
"match": "(\\B\\-|\\b)(?\u003c![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)0o[0-7][0-7_]*\\b(?!\\.[0-9])"
|
2687
2624
|
},
|
2688
2625
|
{
|
2689
|
-
"
|
2690
|
-
"match": "(\\B\\-|\\b)(
|
2691
|
-
"name": "constant.numeric.integer.decimal.swift"
|
2626
|
+
"name": "constant.numeric.integer.decimal.swift",
|
2627
|
+
"match": "(\\B\\-|\\b)(?\u003c![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)[0-9][0-9_]*\\b(?!\\.[0-9])"
|
2692
2628
|
},
|
2693
2629
|
{
|
2694
|
-
"
|
2695
|
-
"match": "(\\B\\-|\\b)(
|
2696
|
-
"name": "constant.numeric.integer.hexadecimal.swift"
|
2630
|
+
"name": "constant.numeric.integer.hexadecimal.swift",
|
2631
|
+
"match": "(\\B\\-|\\b)(?\u003c![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)0x[0-9a-fA-F][0-9a-fA-F_]*\\b(?!\\.[0-9])"
|
2697
2632
|
},
|
2698
2633
|
{
|
2699
|
-
"
|
2700
|
-
"
|
2634
|
+
"name": "invalid.illegal.numeric.other.swift",
|
2635
|
+
"match": "(\\B\\-|\\b)[0-9][\\w.]*"
|
2701
2636
|
}
|
2702
2637
|
]
|
2703
2638
|
},
|
2704
2639
|
"string": {
|
2705
2640
|
"patterns": [
|
2706
2641
|
{
|
2642
|
+
"name": "string.quoted.double.block.swift",
|
2707
2643
|
"begin": "\"\"\"",
|
2708
|
-
"beginCaptures": {
|
2709
|
-
"0": {
|
2710
|
-
"name": "punctuation.definition.string.begin.swift"
|
2711
|
-
}
|
2712
|
-
},
|
2713
|
-
"comment": "SE-0168: Multi-Line String Literals",
|
2714
2644
|
"end": "\"\"\"",
|
2715
|
-
"endCaptures": {
|
2716
|
-
"0": {
|
2717
|
-
"name": "punctuation.definition.string.end.swift"
|
2718
|
-
}
|
2719
|
-
},
|
2720
|
-
"name": "string.quoted.double.block.swift",
|
2721
2645
|
"patterns": [
|
2722
2646
|
{
|
2723
|
-
"
|
2724
|
-
"
|
2647
|
+
"name": "invalid.illegal.content-after-opening-delimiter.swift",
|
2648
|
+
"match": "\\G.+(?=\"\"\")|\\G.+"
|
2725
2649
|
},
|
2726
2650
|
{
|
2727
|
-
"
|
2728
|
-
"
|
2651
|
+
"name": "constant.character.escape.newline.swift",
|
2652
|
+
"match": "\\\\\\s*\\n"
|
2729
2653
|
},
|
2730
2654
|
{
|
2731
2655
|
"include": "#string-guts"
|
2732
2656
|
},
|
2733
2657
|
{
|
2734
|
-
"
|
2735
|
-
"match": "\\S((?!\\\\\\().)*(?=\"\"\")"
|
2736
|
-
"name": "invalid.illegal.content-before-closing-delimiter.swift"
|
2658
|
+
"name": "invalid.illegal.content-before-closing-delimiter.swift",
|
2659
|
+
"match": "\\S((?!\\\\\\().)*(?=\"\"\")"
|
2737
2660
|
}
|
2738
|
-
]
|
2739
|
-
},
|
2740
|
-
{
|
2741
|
-
"begin": "\"",
|
2661
|
+
],
|
2742
2662
|
"beginCaptures": {
|
2743
2663
|
"0": {
|
2744
2664
|
"name": "punctuation.definition.string.begin.swift"
|
2745
2665
|
}
|
2746
2666
|
},
|
2747
|
-
"end": "\"",
|
2748
2667
|
"endCaptures": {
|
2749
2668
|
"0": {
|
2750
2669
|
"name": "punctuation.definition.string.end.swift"
|
2751
2670
|
}
|
2752
|
-
}
|
2671
|
+
}
|
2672
|
+
},
|
2673
|
+
{
|
2753
2674
|
"name": "string.quoted.double.single-line.swift",
|
2675
|
+
"begin": "\"",
|
2676
|
+
"end": "\"",
|
2754
2677
|
"patterns": [
|
2755
2678
|
{
|
2756
|
-
"
|
2757
|
-
"
|
2679
|
+
"name": "invalid.illegal.returns-not-allowed.swift",
|
2680
|
+
"match": "\\r|\\n"
|
2758
2681
|
},
|
2759
2682
|
{
|
2760
2683
|
"include": "#string-guts"
|
2761
2684
|
}
|
2762
|
-
]
|
2685
|
+
],
|
2686
|
+
"beginCaptures": {
|
2687
|
+
"0": {
|
2688
|
+
"name": "punctuation.definition.string.begin.swift"
|
2689
|
+
}
|
2690
|
+
},
|
2691
|
+
"endCaptures": {
|
2692
|
+
"0": {
|
2693
|
+
"name": "punctuation.definition.string.end.swift"
|
2694
|
+
}
|
2695
|
+
}
|
2763
2696
|
}
|
2764
2697
|
],
|
2765
2698
|
"repository": {
|
2766
2699
|
"string-guts": {
|
2767
2700
|
"patterns": [
|
2768
2701
|
{
|
2769
|
-
"
|
2770
|
-
"
|
2702
|
+
"name": "constant.character.escape.swift",
|
2703
|
+
"match": "\\\\[0\\\\tnr\"']"
|
2771
2704
|
},
|
2772
2705
|
{
|
2773
|
-
"
|
2774
|
-
"
|
2706
|
+
"name": "constant.character.escape.unicode.swift",
|
2707
|
+
"match": "\\\\u\\{[0-9a-fA-F]{1,8}\\}"
|
2775
2708
|
},
|
2776
2709
|
{
|
2710
|
+
"name": "meta.embedded.line.swift",
|
2711
|
+
"contentName": "source.swift",
|
2777
2712
|
"begin": "\\\\\\(",
|
2713
|
+
"end": "(\\))",
|
2714
|
+
"patterns": [
|
2715
|
+
{
|
2716
|
+
"include": "$self"
|
2717
|
+
},
|
2718
|
+
{
|
2719
|
+
"begin": "\\(",
|
2720
|
+
"end": "\\)"
|
2721
|
+
}
|
2722
|
+
],
|
2778
2723
|
"beginCaptures": {
|
2779
2724
|
"0": {
|
2780
2725
|
"name": "punctuation.section.embedded.begin.swift"
|
2781
2726
|
}
|
2782
2727
|
},
|
2783
|
-
"contentName": "source.swift",
|
2784
|
-
"end": "(\\))",
|
2785
2728
|
"endCaptures": {
|
2786
2729
|
"0": {
|
2787
2730
|
"name": "punctuation.section.embedded.end.swift"
|
@@ -2789,22 +2732,11 @@
|
|
2789
2732
|
"1": {
|
2790
2733
|
"name": "source.swift"
|
2791
2734
|
}
|
2792
|
-
}
|
2793
|
-
"name": "meta.embedded.line.swift",
|
2794
|
-
"patterns": [
|
2795
|
-
{
|
2796
|
-
"include": "$self"
|
2797
|
-
},
|
2798
|
-
{
|
2799
|
-
"begin": "\\(",
|
2800
|
-
"comment": "Nested parens",
|
2801
|
-
"end": "\\)"
|
2802
|
-
}
|
2803
|
-
]
|
2735
|
+
}
|
2804
2736
|
},
|
2805
2737
|
{
|
2806
|
-
"
|
2807
|
-
"
|
2738
|
+
"name": "invalid.illegal.escape-not-recognized",
|
2739
|
+
"match": "\\\\."
|
2808
2740
|
}
|
2809
2741
|
]
|
2810
2742
|
}
|
@@ -2815,176 +2747,168 @@
|
|
2815
2747
|
"operators": {
|
2816
2748
|
"patterns": [
|
2817
2749
|
{
|
2818
|
-
"
|
2819
|
-
"match": "\\b(is\\b|as([!?]\\B|\\b))"
|
2820
|
-
"name": "keyword.operator.type-casting.swift"
|
2750
|
+
"name": "keyword.operator.type-casting.swift",
|
2751
|
+
"match": "\\b(is\\b|as([!?]\\B|\\b))"
|
2821
2752
|
},
|
2822
2753
|
{
|
2823
|
-
"begin": "(?x)\n\t\t\t\t\t\t(?=\n\t\t\t\t\t\t\t(
|
2824
|
-
"comment": "This rule helps us speed up the matching.",
|
2754
|
+
"begin": "(?x)\n\t\t\t\t\t\t(?=\n\t\t\t\t\t\t\t(?\u003coph\u003e\t\t\t\t\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t[/=\\-+!*%\u003c\u003e\u0026|^~?]\n\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t | \\.\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\\g\u003coph\u003e\t\t\t\t\t\t\t# operator-head\n\t\t\t\t\t\t\t | \\.\n\t\t\t\t\t\t\t | [\\x{0300}-\\x{036F}]\t\t\t\t# operator-character\n\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t",
|
2825
2755
|
"end": "(?!\\G)",
|
2826
2756
|
"patterns": [
|
2827
2757
|
{
|
2758
|
+
"match": "(?x)\n\t\t\t\t\t\t\t\t\\G\t\t\t\t\t\t\t\t\t\t# Matching from the beginning ensures\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# that we start with operator-head\n\t\t\t\t\t\t\t\t(?\u003c=^|[\\s(\\[{,;:])\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?!(//|/\\*|\\*/))\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t[/=\\-+!*%\u003c\u003e\u0026|^~?]\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t | [\\x{0300}-\\x{036F}]\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)++\n\t\t\t\t\t\t\t\t(?![\\s)\\]},;:]|\\z)\n\t\t\t\t\t\t\t",
|
2828
2759
|
"captures": {
|
2829
2760
|
"0": {
|
2830
2761
|
"patterns": [
|
2831
2762
|
{
|
2832
|
-
"
|
2833
|
-
"
|
2763
|
+
"name": "keyword.operator.increment-or-decrement.swift",
|
2764
|
+
"match": "\\G(\\+\\+|\\-\\-)$"
|
2834
2765
|
},
|
2835
2766
|
{
|
2836
|
-
"
|
2837
|
-
"
|
2767
|
+
"name": "keyword.operator.arithmetic.unary.swift",
|
2768
|
+
"match": "\\G(\\+|\\-)$"
|
2838
2769
|
},
|
2839
2770
|
{
|
2840
|
-
"
|
2841
|
-
"
|
2771
|
+
"name": "keyword.operator.logical.not.swift",
|
2772
|
+
"match": "\\G!$"
|
2842
2773
|
},
|
2843
2774
|
{
|
2844
|
-
"
|
2845
|
-
"
|
2775
|
+
"name": "keyword.operator.bitwise.not.swift",
|
2776
|
+
"match": "\\G~$"
|
2846
2777
|
},
|
2847
2778
|
{
|
2848
|
-
"
|
2849
|
-
"
|
2779
|
+
"name": "keyword.operator.custom.prefix.swift",
|
2780
|
+
"match": ".+"
|
2850
2781
|
}
|
2851
2782
|
]
|
2852
2783
|
}
|
2853
|
-
}
|
2854
|
-
"comment": "Prefix unary operator",
|
2855
|
-
"match": "(?x)\n\t\t\t\t\t\t\t\t\\G\t\t\t\t\t\t\t\t\t\t# Matching from the beginning ensures\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# that we start with operator-head\n\t\t\t\t\t\t\t\t(?<=^|[\\s(\\[{,;:])\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?!(//|/\\*|\\*/))\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t[/=\\-+!*%<>&|^~?]\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t | [\\x{0300}-\\x{036F}]\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)++\n\t\t\t\t\t\t\t\t(?![\\s)\\]},;:]|\\z)\n\t\t\t\t\t\t\t"
|
2784
|
+
}
|
2856
2785
|
},
|
2857
2786
|
{
|
2787
|
+
"match": "(?x)\n\t\t\t\t\t\t\t\t\\G\t\t\t\t\t\t\t\t\t\t# Matching from the beginning ensures\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# that we start with operator-head\n\t\t\t\t\t\t\t\t(?\u003c!^|[\\s(\\[{,;:])\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?!(//|/\\*|\\*/))\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t[/=\\-+!*%\u003c\u003e\u0026|^~?]\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t | [\\x{0300}-\\x{036F}]\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)++\n\t\t\t\t\t\t\t\t(?=[\\s)\\]},;:]|\\z)\n\t\t\t\t\t\t\t",
|
2858
2788
|
"captures": {
|
2859
2789
|
"0": {
|
2860
2790
|
"patterns": [
|
2861
2791
|
{
|
2862
|
-
"
|
2863
|
-
"
|
2792
|
+
"name": "keyword.operator.increment-or-decrement.swift",
|
2793
|
+
"match": "\\G(\\+\\+|\\-\\-)$"
|
2864
2794
|
},
|
2865
2795
|
{
|
2866
|
-
"
|
2867
|
-
"
|
2796
|
+
"name": "keyword.operator.increment-or-decrement.swift",
|
2797
|
+
"match": "\\G!$"
|
2868
2798
|
},
|
2869
2799
|
{
|
2870
|
-
"
|
2871
|
-
"
|
2800
|
+
"name": "keyword.operator.custom.postfix.swift",
|
2801
|
+
"match": ".+"
|
2872
2802
|
}
|
2873
2803
|
]
|
2874
2804
|
}
|
2875
|
-
}
|
2876
|
-
"comment": "Postfix unary operator",
|
2877
|
-
"match": "(?x)\n\t\t\t\t\t\t\t\t\\G\t\t\t\t\t\t\t\t\t\t# Matching from the beginning ensures\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# that we start with operator-head\n\t\t\t\t\t\t\t\t(?<!^|[\\s(\\[{,;:])\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?!(//|/\\*|\\*/))\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t[/=\\-+!*%<>&|^~?]\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t | [\\x{0300}-\\x{036F}]\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)++\n\t\t\t\t\t\t\t\t(?=[\\s)\\]},;:]|\\z)\n\t\t\t\t\t\t\t"
|
2805
|
+
}
|
2878
2806
|
},
|
2879
2807
|
{
|
2808
|
+
"match": "(?x)\n\t\t\t\t\t\t\t\t\\G\t\t\t\t\t\t\t\t\t\t# Matching from the beginning ensures\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# that we start with operator-head\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?!(//|/\\*|\\*/))\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t[/=\\-+!*%\u003c\u003e\u0026|^~?]\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t | [\\x{0300}-\\x{036F}]\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)++\n\t\t\t\t\t\t\t",
|
2880
2809
|
"captures": {
|
2881
2810
|
"0": {
|
2882
2811
|
"patterns": [
|
2883
2812
|
{
|
2884
|
-
"
|
2885
|
-
"
|
2813
|
+
"name": "keyword.operator.assignment.swift",
|
2814
|
+
"match": "\\G=$"
|
2886
2815
|
},
|
2887
2816
|
{
|
2888
|
-
"
|
2889
|
-
"
|
2817
|
+
"name": "keyword.operator.assignment.compound.swift",
|
2818
|
+
"match": "\\G(\\+|\\-|\\*|/|%|\u003c\u003c|\u003e\u003e|\u0026|\\^|\\||\u0026\u0026|\\|\\|)=$"
|
2890
2819
|
},
|
2891
2820
|
{
|
2892
|
-
"
|
2893
|
-
"
|
2821
|
+
"name": "keyword.operator.arithmetic.swift",
|
2822
|
+
"match": "\\G(\\+|\\-|\\*|/)$"
|
2894
2823
|
},
|
2895
2824
|
{
|
2896
|
-
"
|
2897
|
-
"
|
2825
|
+
"name": "keyword.operator.arithmetic.overflow.swift",
|
2826
|
+
"match": "\\G\u0026(\\+|\\-|\\*)$"
|
2898
2827
|
},
|
2899
2828
|
{
|
2900
|
-
"
|
2901
|
-
"
|
2829
|
+
"name": "keyword.operator.arithmetic.remainder.swift",
|
2830
|
+
"match": "\\G%$"
|
2902
2831
|
},
|
2903
2832
|
{
|
2904
|
-
"
|
2905
|
-
"
|
2833
|
+
"name": "keyword.operator.comparison.swift",
|
2834
|
+
"match": "\\G(==|!=|\u003e|\u003c|\u003e=|\u003c=|~=)$"
|
2906
2835
|
},
|
2907
2836
|
{
|
2908
|
-
"
|
2909
|
-
"
|
2837
|
+
"name": "keyword.operator.coalescing.swift",
|
2838
|
+
"match": "\\G\\?\\?$"
|
2910
2839
|
},
|
2911
2840
|
{
|
2912
|
-
"
|
2913
|
-
"
|
2841
|
+
"name": "keyword.operator.logical.swift",
|
2842
|
+
"match": "\\G(\u0026\u0026|\\|\\|)$"
|
2914
2843
|
},
|
2915
2844
|
{
|
2916
|
-
"
|
2917
|
-
"
|
2845
|
+
"name": "keyword.operator.bitwise.swift",
|
2846
|
+
"match": "\\G(\u0026|\\||\\^|\u003c\u003c|\u003e\u003e)$"
|
2918
2847
|
},
|
2919
2848
|
{
|
2920
|
-
"
|
2921
|
-
"
|
2849
|
+
"name": "keyword.operator.bitwise.swift",
|
2850
|
+
"match": "\\G(===|!==)$"
|
2922
2851
|
},
|
2923
2852
|
{
|
2924
|
-
"
|
2925
|
-
"
|
2853
|
+
"name": "keyword.operator.ternary.swift",
|
2854
|
+
"match": "\\G\\?$"
|
2926
2855
|
},
|
2927
2856
|
{
|
2928
|
-
"
|
2929
|
-
"
|
2857
|
+
"name": "keyword.operator.custom.infix.swift",
|
2858
|
+
"match": ".+"
|
2930
2859
|
}
|
2931
2860
|
]
|
2932
2861
|
}
|
2933
|
-
}
|
2934
|
-
"comment": "Infix operator",
|
2935
|
-
"match": "(?x)\n\t\t\t\t\t\t\t\t\\G\t\t\t\t\t\t\t\t\t\t# Matching from the beginning ensures\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# that we start with operator-head\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?!(//|/\\*|\\*/))\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t[/=\\-+!*%<>&|^~?]\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t | [\\x{0300}-\\x{036F}]\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)++\n\t\t\t\t\t\t\t"
|
2862
|
+
}
|
2936
2863
|
},
|
2937
2864
|
{
|
2865
|
+
"match": "(?x)\n\t\t\t\t\t\t\t\t\\G\t\t\t\t\t\t\t\t\t\t# Matching from the beginning ensures\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# that we start with operator-head\n\t\t\t\t\t\t\t\t(?\u003c=^|[\\s(\\[{,;:])\n\t\t\t\t\t\t\t\t\\.\t\t\t\t\t\t\t\t\t\t# dot\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?!(//|/\\*|\\*/))\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\\.\t\t\t\t\t\t\t\t# dot\n\t\t\t\t\t\t\t\t\t | [/=\\-+!*%\u003c\u003e\u0026|^~?]\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t | [\\x{0300}-\\x{036F}]\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)++\n\t\t\t\t\t\t\t\t(?![\\s)\\]},;:]|\\z)\n\t\t\t\t\t\t\t",
|
2938
2866
|
"captures": {
|
2939
2867
|
"0": {
|
2940
2868
|
"patterns": [
|
2941
2869
|
{
|
2942
|
-
"
|
2943
|
-
"
|
2870
|
+
"name": "keyword.operator.custom.prefix.dot.swift",
|
2871
|
+
"match": ".+"
|
2944
2872
|
}
|
2945
2873
|
]
|
2946
2874
|
}
|
2947
|
-
}
|
2948
|
-
"comment": "Dot prefix unary operator",
|
2949
|
-
"match": "(?x)\n\t\t\t\t\t\t\t\t\\G\t\t\t\t\t\t\t\t\t\t# Matching from the beginning ensures\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# that we start with operator-head\n\t\t\t\t\t\t\t\t(?<=^|[\\s(\\[{,;:])\n\t\t\t\t\t\t\t\t\\.\t\t\t\t\t\t\t\t\t\t# dot\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?!(//|/\\*|\\*/))\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\\.\t\t\t\t\t\t\t\t# dot\n\t\t\t\t\t\t\t\t\t | [/=\\-+!*%<>&|^~?]\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t | [\\x{0300}-\\x{036F}]\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)++\n\t\t\t\t\t\t\t\t(?![\\s)\\]},;:]|\\z)\n\t\t\t\t\t\t\t"
|
2875
|
+
}
|
2950
2876
|
},
|
2951
2877
|
{
|
2878
|
+
"match": "(?x)\n\t\t\t\t\t\t\t\t\\G\t\t\t\t\t\t\t\t\t\t# Matching from the beginning ensures\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# that we start with operator-head\n\t\t\t\t\t\t\t\t(?\u003c!^|[\\s(\\[{,;:])\n\t\t\t\t\t\t\t\t\\.\t\t\t\t\t\t\t\t\t\t# dot\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?!(//|/\\*|\\*/))\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\\.\t\t\t\t\t\t\t\t# dot\n\t\t\t\t\t\t\t\t\t | [/=\\-+!*%\u003c\u003e\u0026|^~?]\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t | [\\x{0300}-\\x{036F}]\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)++\n\t\t\t\t\t\t\t\t(?=[\\s)\\]},;:]|\\z)\n\t\t\t\t\t\t\t",
|
2952
2879
|
"captures": {
|
2953
2880
|
"0": {
|
2954
2881
|
"patterns": [
|
2955
2882
|
{
|
2956
|
-
"
|
2957
|
-
"
|
2883
|
+
"name": "keyword.operator.custom.postfix.dot.swift",
|
2884
|
+
"match": ".+"
|
2958
2885
|
}
|
2959
2886
|
]
|
2960
2887
|
}
|
2961
|
-
}
|
2962
|
-
"comment": "Dot postfix unary operator",
|
2963
|
-
"match": "(?x)\n\t\t\t\t\t\t\t\t\\G\t\t\t\t\t\t\t\t\t\t# Matching from the beginning ensures\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# that we start with operator-head\n\t\t\t\t\t\t\t\t(?<!^|[\\s(\\[{,;:])\n\t\t\t\t\t\t\t\t\\.\t\t\t\t\t\t\t\t\t\t# dot\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?!(//|/\\*|\\*/))\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\\.\t\t\t\t\t\t\t\t# dot\n\t\t\t\t\t\t\t\t\t | [/=\\-+!*%<>&|^~?]\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t | [\\x{0300}-\\x{036F}]\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)++\n\t\t\t\t\t\t\t\t(?=[\\s)\\]},;:]|\\z)\n\t\t\t\t\t\t\t"
|
2888
|
+
}
|
2964
2889
|
},
|
2965
2890
|
{
|
2891
|
+
"match": "(?x)\n\t\t\t\t\t\t\t\t\\G\t\t\t\t\t\t\t\t\t\t# Matching from the beginning ensures\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# that we start with operator-head\n\t\t\t\t\t\t\t\t\\.\t\t\t\t\t\t\t\t\t\t# dot\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?!(//|/\\*|\\*/))\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\\.\t\t\t\t\t\t\t\t# dot\n\t\t\t\t\t\t\t\t\t | [/=\\-+!*%\u003c\u003e\u0026|^~?]\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t | [\\x{0300}-\\x{036F}]\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)++\n\t\t\t\t\t\t\t",
|
2966
2892
|
"captures": {
|
2967
2893
|
"0": {
|
2968
2894
|
"patterns": [
|
2969
2895
|
{
|
2970
|
-
"
|
2971
|
-
"
|
2896
|
+
"name": "keyword.operator.range.swift",
|
2897
|
+
"match": "\\G\\.\\.[.\u003c]$"
|
2972
2898
|
},
|
2973
2899
|
{
|
2974
|
-
"
|
2975
|
-
"
|
2900
|
+
"name": "keyword.operator.custom.infix.dot.swift",
|
2901
|
+
"match": ".+"
|
2976
2902
|
}
|
2977
2903
|
]
|
2978
2904
|
}
|
2979
|
-
}
|
2980
|
-
"comment": "Dot infix operator",
|
2981
|
-
"match": "(?x)\n\t\t\t\t\t\t\t\t\\G\t\t\t\t\t\t\t\t\t\t# Matching from the beginning ensures\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# that we start with operator-head\n\t\t\t\t\t\t\t\t\\.\t\t\t\t\t\t\t\t\t\t# dot\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?!(//|/\\*|\\*/))\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\\.\t\t\t\t\t\t\t\t# dot\n\t\t\t\t\t\t\t\t\t | [/=\\-+!*%<>&|^~?]\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t | [\\x{0300}-\\x{036F}]\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)++\n\t\t\t\t\t\t\t"
|
2905
|
+
}
|
2982
2906
|
}
|
2983
2907
|
]
|
2984
2908
|
},
|
2985
2909
|
{
|
2986
|
-
"
|
2987
|
-
"
|
2910
|
+
"name": "keyword.operator.ternary.swift",
|
2911
|
+
"match": ":"
|
2988
2912
|
}
|
2989
2913
|
]
|
2990
2914
|
},
|
@@ -3001,7 +2925,5 @@
|
|
3001
2925
|
}
|
3002
2926
|
]
|
3003
2927
|
}
|
3004
|
-
}
|
3005
|
-
|
3006
|
-
"uuid": "8C743E89-9C8D-4833-8149-6500D82AA463"
|
3007
|
-
}
|
2928
|
+
}
|
2929
|
+
}
|