github-linguist-grammars 4.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/grammars/file.lasso.json +713 -0
- data/grammars/module.ceylon.json +54 -0
- data/grammars/objdump.x86asm.json +73 -0
- data/grammars/source.Inform7.json +45 -0
- data/grammars/source.Kotlin.json +774 -0
- data/grammars/source.LS.json +104 -0
- data/grammars/source.MCPOST.json +68 -0
- data/grammars/source.MOD.json +70 -0
- data/grammars/source.abap.json +176 -0
- data/grammars/source.abl.json +138 -0
- data/grammars/source.actionscript.3.json +1571 -0
- data/grammars/source.acucobol.json +16 -0
- data/grammars/source.ada.json +140 -0
- data/grammars/source.agda.json +254 -0
- data/grammars/source.ahk.json +171 -0
- data/grammars/source.alloy.json +44 -0
- data/grammars/source.ampl.json +157 -0
- data/grammars/source.antlr.json +300 -0
- data/grammars/source.apache-config.json +352 -0
- data/grammars/source.apache-config.mod_perl.json +70 -0
- data/grammars/source.apl.json +442 -0
- data/grammars/source.applescript.json +1385 -0
- data/grammars/source.apt.json +25 -0
- data/grammars/source.asm.x86.json +182 -0
- data/grammars/source.asp.json +157 -0
- data/grammars/source.aspectj.json +963 -0
- data/grammars/source.ats.json +170 -0
- data/grammars/source.autoit.3.json +132 -0
- data/grammars/source.awk.json +388 -0
- data/grammars/source.befunge.json +38 -0
- data/grammars/source.bf.json +36 -0
- data/grammars/source.bison.json +59 -0
- data/grammars/source.blitzmax.json +912 -0
- data/grammars/source.boo.json +452 -0
- data/grammars/source.brightauthorproject.json +29 -0
- data/grammars/source.brightscript.json +158 -0
- data/grammars/source.bro.json +409 -0
- data/grammars/source.bsv.json +283 -0
- data/grammars/source.c++.json +364 -0
- data/grammars/source.c++.qt.json +37 -0
- data/grammars/source.c.ec.json +39 -0
- data/grammars/source.c.json +727 -0
- data/grammars/source.c.platform.json +154 -0
- data/grammars/source.cache.cmake.json +75 -0
- data/grammars/source.cake.json +16 -0
- data/grammars/source.camlp4.ocaml.json +63 -0
- data/grammars/source.capnp.json +93 -0
- data/grammars/source.ceylon.json +77 -0
- data/grammars/source.cfscript.cfc.json +170 -0
- data/grammars/source.cfscript.json +744 -0
- data/grammars/source.chapel.json +240 -0
- data/grammars/source.cirru.json +66 -0
- data/grammars/source.clarion.json +159 -0
- data/grammars/source.clips.json +80 -0
- data/grammars/source.clojure.json +397 -0
- data/grammars/source.cm.json +54 -0
- data/grammars/source.cmake.json +181 -0
- data/grammars/source.cobol.json +528 -0
- data/grammars/source.coffee.json +678 -0
- data/grammars/source.compiled-papyrus.json +11 -0
- data/grammars/source.cool.json +103 -0
- data/grammars/source.coq.json +62 -0
- data/grammars/source.crystal.json +2760 -0
- data/grammars/source.cs.json +556 -0
- data/grammars/source.css.json +630 -0
- data/grammars/source.css.less.json +276 -0
- data/grammars/source.css.mss.json +256 -0
- data/grammars/source.csx.json +16 -0
- data/grammars/source.cuda-c++.json +137 -0
- data/grammars/source.cython.json +2108 -0
- data/grammars/source.d.json +722 -0
- data/grammars/source.dart.json +763 -0
- data/grammars/source.desktop.json +90 -0
- data/grammars/source.diff.json +162 -0
- data/grammars/source.dockerfile.json +89 -0
- data/grammars/source.dosbatch.json +70 -0
- data/grammars/source.dot.json +126 -0
- data/grammars/source.dylan.json +217 -0
- data/grammars/source.eiffel.json +138 -0
- data/grammars/source.elixir.json +737 -0
- data/grammars/source.elm.json +355 -0
- data/grammars/source.erazor.json +126 -0
- data/grammars/source.erlang.json +1674 -0
- data/grammars/source.essl.json +50 -0
- data/grammars/source.factor.json +260 -0
- data/grammars/source.fan.json +188 -0
- data/grammars/source.fancy.json +270 -0
- data/grammars/source.fish.json +214 -0
- data/grammars/source.forth.json +101 -0
- data/grammars/source.fortran.json +499 -0
- data/grammars/source.fortran.modern.json +226 -0
- data/grammars/source.fsharp.json +403 -0
- data/grammars/source.gap.json +167 -0
- data/grammars/source.gcode.json +25 -0
- data/grammars/source.gdscript.json +154 -0
- data/grammars/source.gfm.json +1270 -0
- data/grammars/source.glsl.json +71 -0
- data/grammars/source.gnuplot.json +276 -0
- data/grammars/source.go.json +552 -0
- data/grammars/source.golo.json +182 -0
- data/grammars/source.gosu.2.json +163 -0
- data/grammars/source.grace.json +679 -0
- data/grammars/source.groovy.gradle.json +73 -0
- data/grammars/source.groovy.json +1385 -0
- data/grammars/source.harbour.json +450 -0
- data/grammars/source.haskell.json +449 -0
- data/grammars/source.haxe.2.json +1243 -0
- data/grammars/source.hss.1.json +464 -0
- data/grammars/source.httpspec.json +287 -0
- data/grammars/source.hxml.json +26 -0
- data/grammars/source.hy.json +270 -0
- data/grammars/source.idl-dlm.json +112 -0
- data/grammars/source.idl.json +267 -0
- data/grammars/source.idris.json +537 -0
- data/grammars/source.ini.json +113 -0
- data/grammars/source.inno.json +65 -0
- data/grammars/source.io.json +164 -0
- data/grammars/source.ioke.json +272 -0
- data/grammars/source.isabelle.root.json +68 -0
- data/grammars/source.isabelle.theory.json +106 -0
- data/grammars/source.j.json +49 -0
- data/grammars/source.jade.json +1009 -0
- data/grammars/source.jasmin.json +299 -0
- data/grammars/source.java-properties.json +97 -0
- data/grammars/source.java.json +1026 -0
- data/grammars/source.jcl.json +49 -0
- data/grammars/source.jflex.json +490 -0
- data/grammars/source.jq.json +218 -0
- data/grammars/source.js.json +948 -0
- data/grammars/source.js.jsx.json +2937 -0
- data/grammars/source.js.objj.json +424 -0
- data/grammars/source.js.regexp.json +150 -0
- data/grammars/source.js.regexp.replacement.json +30 -0
- data/grammars/source.json.json +149 -0
- data/grammars/source.julia.json +407 -0
- data/grammars/source.lean.json +145 -0
- data/grammars/source.lid.json +23 -0
- data/grammars/source.lilypond.json +623 -0
- data/grammars/source.lisp.json +111 -0
- data/grammars/source.litcoffee.json +669 -0
- data/grammars/source.livescript.json +616 -0
- data/grammars/source.llvm.json +71 -0
- data/grammars/source.logos.json +31 -0
- data/grammars/source.logtalk.json +315 -0
- data/grammars/source.loomscript.json +214 -0
- data/grammars/source.lsl.json +216 -0
- data/grammars/source.lua.json +191 -0
- data/grammars/source.makefile.json +474 -0
- data/grammars/source.makegen.json +13 -0
- data/grammars/source.man.json +53 -0
- data/grammars/source.mask.json +701 -0
- data/grammars/source.mata.json +133 -0
- data/grammars/source.mathematica.json +429 -0
- data/grammars/source.matlab.json +776 -0
- data/grammars/source.mercury.json +251 -0
- data/grammars/source.ml.json +291 -0
- data/grammars/source.modelica.json +142 -0
- data/grammars/source.modula2.json +103 -0
- data/grammars/source.monkey.json +701 -0
- data/grammars/source.moonscript.json +149 -0
- data/grammars/source.mupad.json +149 -0
- data/grammars/source.nant-build.json +86 -0
- data/grammars/source.ncl.json +66 -0
- data/grammars/source.nemerle.json +137 -0
- data/grammars/source.nesc.json +27 -0
- data/grammars/source.netlinx.erb.json +47 -0
- data/grammars/source.netlinx.json +768 -0
- data/grammars/source.nginx.json +797 -0
- data/grammars/source.nim.json +1150 -0
- data/grammars/source.nim_filter.json +133 -0
- data/grammars/source.nimcfg.json +116 -0
- data/grammars/source.ninja.json +66 -0
- data/grammars/source.nit.json +238 -0
- data/grammars/source.nix.json +1200 -0
- data/grammars/source.nmml.json +87 -0
- data/grammars/source.nsis.json +150 -0
- data/grammars/source.objc++.json +19 -0
- data/grammars/source.objc.json +918 -0
- data/grammars/source.objc.platform.json +277 -0
- data/grammars/source.ocaml.json +1426 -0
- data/grammars/source.ocamllex.json +305 -0
- data/grammars/source.ocamlyacc.json +346 -0
- data/grammars/source.octave.json +451 -0
- data/grammars/source.ooc.json +692 -0
- data/grammars/source.opa.json +206 -0
- data/grammars/source.opal.json +415 -0
- data/grammars/source.opalsysdefs.json +70 -0
- data/grammars/source.opencobol.json +65 -0
- data/grammars/source.ox.json +97 -0
- data/grammars/source.oz.json +84 -0
- data/grammars/source.papyrus-assembly.json +266 -0
- data/grammars/source.papyrus.json +231 -0
- data/grammars/source.parrot.pir.json +117 -0
- data/grammars/source.pascal.json +150 -0
- data/grammars/source.perl.6.json +310 -0
- data/grammars/source.perl.json +2413 -0
- data/grammars/source.php.zephir.json +362 -0
- data/grammars/source.pig_latin.json +172 -0
- data/grammars/source.pike.json +62 -0
- data/grammars/source.plsql.oracle.json +642 -0
- data/grammars/source.po.json +232 -0
- data/grammars/source.pogoscript.json +85 -0
- data/grammars/source.postscript.json +231 -0
- data/grammars/source.powershell.json +755 -0
- data/grammars/source.processing.json +885 -0
- data/grammars/source.prolog.eclipse.json +206 -0
- data/grammars/source.prolog.json +292 -0
- data/grammars/source.protobuf.json +395 -0
- data/grammars/source.pubspec.json +13 -0
- data/grammars/source.puppet.json +494 -0
- data/grammars/source.purescript.json +818 -0
- data/grammars/source.pyjade.json +1010 -0
- data/grammars/source.python.django.json +34 -0
- data/grammars/source.python.json +1960 -0
- data/grammars/source.python.salt.json +13 -0
- data/grammars/source.qmake.json +217 -0
- data/grammars/source.qml.json +195 -0
- data/grammars/source.r.json +203 -0
- data/grammars/source.racket.json +119 -0
- data/grammars/source.rebol.json +647 -0
- data/grammars/source.red.json +652 -0
- data/grammars/source.regexp.babel.json +190 -0
- data/grammars/source.regexp.python.json +187 -0
- data/grammars/source.regexp.spin.json +188 -0
- data/grammars/source.ruby.json +1956 -0
- data/grammars/source.ruby.rspec.cucumber.steps.json +274 -0
- data/grammars/source.rust.json +269 -0
- data/grammars/source.sas.json +322 -0
- data/grammars/source.sas_log.json +26 -0
- data/grammars/source.sass.json +248 -0
- data/grammars/source.sbt.json +36 -0
- data/grammars/source.scad.json +152 -0
- data/grammars/source.scala.json +739 -0
- data/grammars/source.scaml.json +466 -0
- data/grammars/source.scheme.json +370 -0
- data/grammars/source.scilab.json +103 -0
- data/grammars/source.scss.json +1321 -0
- data/grammars/source.shell.json +1212 -0
- data/grammars/source.smali.json +1668 -0
- data/grammars/source.smalltalk.json +135 -0
- data/grammars/source.smt.json +173 -0
- data/grammars/source.sp.json +118 -0
- data/grammars/source.sparql.json +23 -0
- data/grammars/source.spin.json +936 -0
- data/grammars/source.sqf.json +112 -0
- data/grammars/source.sql.json +473 -0
- data/grammars/source.stata.json +208 -0
- data/grammars/source.strings.json +53 -0
- data/grammars/source.stylus.json +1021 -0
- data/grammars/source.swift.json +965 -0
- data/grammars/source.systemverilog.json +1050 -0
- data/grammars/source.tcl.json +277 -0
- data/grammars/source.tea.json +180 -0
- data/grammars/source.thrift.json +704 -0
- data/grammars/source.toml.json +327 -0
- data/grammars/source.ts.json +1094 -0
- data/grammars/source.tsx.json +1324 -0
- data/grammars/source.turtle.json +505 -0
- data/grammars/source.txl.json +62 -0
- data/grammars/source.ucfconstraints.json +72 -0
- data/grammars/source.vala.json +814 -0
- data/grammars/source.varnish.vcl.json +343 -0
- data/grammars/source.vbnet.json +338 -0
- data/grammars/source.verilog.json +302 -0
- data/grammars/source.vhdl.json +1349 -0
- data/grammars/source.viml.json +224 -0
- data/grammars/source.webidl.json +814 -0
- data/grammars/source.x10.json +68 -0
- data/grammars/source.x86asm.json +47 -0
- data/grammars/source.xc.json +379 -0
- data/grammars/source.xq.json +241 -0
- data/grammars/source.xquery.json +193 -0
- data/grammars/source.xtend.json +733 -0
- data/grammars/source.yaml.json +334 -0
- data/grammars/source.yaml.salt.json +348 -0
- data/grammars/text.bibtex.json +251 -0
- data/grammars/text.cfml.basic.json +736 -0
- data/grammars/text.dart-analysis-output.json +162 -0
- data/grammars/text.dart-doccomments.json +19 -0
- data/grammars/text.elixir.json +45 -0
- data/grammars/text.gherkin.feature.json +135 -0
- data/grammars/text.groff.json +113 -0
- data/grammars/text.haml.json +299 -0
- data/grammars/text.html.abl.json +24 -0
- data/grammars/text.html.asciidoc.json +492 -0
- data/grammars/text.html.asdoc.json +541 -0
- data/grammars/text.html.asp.json +58 -0
- data/grammars/text.html.basic.json +552 -0
- data/grammars/text.html.cfm.json +811 -0
- data/grammars/text.html.creole.json +329 -0
- data/grammars/text.html.django.json +69 -0
- data/grammars/text.html.elixir.json +18 -0
- data/grammars/text.html.erb.json +157 -0
- data/grammars/text.html.erlang.yaws.json +72 -0
- data/grammars/text.html.factor.json +27 -0
- data/grammars/text.html.handlebars.json +783 -0
- data/grammars/text.html.jsp.json +1203 -0
- data/grammars/text.html.liquid.json +35 -0
- data/grammars/text.html.mako.json +729 -0
- data/grammars/text.html.markdown.source.gfm.apib.json +1297 -0
- data/grammars/text.html.markdown.source.gfm.mson.json +1165 -0
- data/grammars/text.html.mediawiki.json +972 -0
- data/grammars/text.html.php.json +2607 -0
- data/grammars/text.html.slash.json +313 -0
- data/grammars/text.html.smarty.json +216 -0
- data/grammars/text.html.ssp.json +49 -0
- data/grammars/text.html.tcl.json +44 -0
- data/grammars/text.html.twig.json +1353 -0
- data/grammars/text.html.vue.json +642 -0
- data/grammars/text.idl-idldoc.json +14 -0
- data/grammars/text.junit-test-report.json +92 -0
- data/grammars/text.log.latex.json +86 -0
- data/grammars/text.python.console.json +25 -0
- data/grammars/text.python.traceback.json +46 -0
- data/grammars/text.rdoc.json +48 -0
- data/grammars/text.restructuredtext.json +561 -0
- data/grammars/text.robot.json +73 -0
- data/grammars/text.shell-session.json +48 -0
- data/grammars/text.slim.json +527 -0
- data/grammars/text.tex.json +271 -0
- data/grammars/text.tex.latex.beamer.json +63 -0
- data/grammars/text.tex.latex.haskell.json +56 -0
- data/grammars/text.tex.latex.json +1013 -0
- data/grammars/text.tex.latex.memoir.json +99 -0
- data/grammars/text.tex.latex.rd.json +117 -0
- data/grammars/text.xml.ant.json +202 -0
- data/grammars/text.xml.flex-config.json +2634 -0
- data/grammars/text.xml.genshi.json +34 -0
- data/grammars/text.xml.json +364 -0
- data/grammars/text.xml.pom.json +774 -0
- data/grammars/text.xml.xsl.json +94 -0
- data/grammars/text.zone_file.json +72 -0
- data/lib/linguist/grammars.rb +13 -0
- metadata +389 -0
@@ -0,0 +1,103 @@
|
|
1
|
+
{
|
2
|
+
"comment": "This adds support for the COOL programming language used in CS 143 (Compilers) at Stanford",
|
3
|
+
"fileTypes": [
|
4
|
+
"cl"
|
5
|
+
],
|
6
|
+
"name": "COOL",
|
7
|
+
"patterns": [
|
8
|
+
{
|
9
|
+
"match": "--(.*)\\n",
|
10
|
+
"name": "comment.line.double-dash"
|
11
|
+
},
|
12
|
+
{
|
13
|
+
"begin": "\\(\\*",
|
14
|
+
"end": "\\*\\)",
|
15
|
+
"name": "comment.block.documentation",
|
16
|
+
"patterns": [
|
17
|
+
{
|
18
|
+
"include": "#comment.block.documentation"
|
19
|
+
}
|
20
|
+
]
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"match": "(Int|String|Bool|Object|IO)",
|
24
|
+
"name": "support.class"
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"match": "(abort\\(\\)|type_name\\(\\)|copy\\(\\))",
|
28
|
+
"name": "support.function"
|
29
|
+
},
|
30
|
+
{
|
31
|
+
"match": "\\b(if|fi|else|then|loop|pool|while|case|esac)\\b",
|
32
|
+
"name": "keyword.control"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"match": "\\b(in|inherits|isvoid|let|new|of|new|not)\\b",
|
36
|
+
"name": "keyword.operator"
|
37
|
+
},
|
38
|
+
{
|
39
|
+
"match": "\\b(true|false)\\b",
|
40
|
+
"name": "constant.language"
|
41
|
+
},
|
42
|
+
{
|
43
|
+
"match": "(?x)\\b((?i:( [0-9]+ ( ' [0-9]+ )* )))",
|
44
|
+
"name": "constant.numeric"
|
45
|
+
},
|
46
|
+
{
|
47
|
+
"match": "\\b([A-Z]([A-Z]|[a-z]|[0-9]|_)*|SELF_TYPE)\\b",
|
48
|
+
"name": "entity.name.type"
|
49
|
+
},
|
50
|
+
{
|
51
|
+
"match": "\\b(class)\\b",
|
52
|
+
"name": "storage.modifier"
|
53
|
+
},
|
54
|
+
{
|
55
|
+
"match": "\\b(self)\\b",
|
56
|
+
"name": "variable.language"
|
57
|
+
},
|
58
|
+
{
|
59
|
+
"match": "\\b[a-z]([A-z]|[a-z]|[0-9]|_)*\\b",
|
60
|
+
"name": "variable.parameter"
|
61
|
+
},
|
62
|
+
{
|
63
|
+
"match": "\\b[a-z]*\\(.*\\)\\b",
|
64
|
+
"name": "entity.name.function"
|
65
|
+
},
|
66
|
+
{
|
67
|
+
"begin": "\"",
|
68
|
+
"beginCaptures": {
|
69
|
+
"0": {
|
70
|
+
}
|
71
|
+
},
|
72
|
+
"end": "\"",
|
73
|
+
"endCaptures": {
|
74
|
+
"0": {
|
75
|
+
}
|
76
|
+
},
|
77
|
+
"name": "string.quoted.double",
|
78
|
+
"patterns": [
|
79
|
+
{
|
80
|
+
"include": "#string_placeholder"
|
81
|
+
}
|
82
|
+
]
|
83
|
+
}
|
84
|
+
],
|
85
|
+
"repository": {
|
86
|
+
"formal_param": {
|
87
|
+
"patterns": [
|
88
|
+
{
|
89
|
+
"match": "\\s#variable.parameter : entity.name.type\\s"
|
90
|
+
}
|
91
|
+
]
|
92
|
+
},
|
93
|
+
"formals": {
|
94
|
+
"patterns": [
|
95
|
+
{
|
96
|
+
"match": "\\s(#formal_param, #formals|#formal_param|)\\s"
|
97
|
+
}
|
98
|
+
]
|
99
|
+
}
|
100
|
+
},
|
101
|
+
"scopeName": "source.cool",
|
102
|
+
"uuid": "BAAC41A1-4CB7-4CB2-A0C1-E1B1585D451E"
|
103
|
+
}
|
@@ -0,0 +1,62 @@
|
|
1
|
+
{
|
2
|
+
"fileTypes": [
|
3
|
+
"v"
|
4
|
+
],
|
5
|
+
"name": "Coq",
|
6
|
+
"patterns": [
|
7
|
+
{
|
8
|
+
"include": "#multilinecomment"
|
9
|
+
},
|
10
|
+
{
|
11
|
+
"beginCaptures": {
|
12
|
+
"1": {
|
13
|
+
"name": "keyword.coq"
|
14
|
+
}
|
15
|
+
},
|
16
|
+
"begin": "\\b(Proof)\\.",
|
17
|
+
"endCaptures": {
|
18
|
+
"1": {
|
19
|
+
"name": "keyword.coq"
|
20
|
+
}
|
21
|
+
},
|
22
|
+
"end": "\\b(Qed)\\.",
|
23
|
+
"name": "proof.coq"
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"captures": {
|
27
|
+
"1": {
|
28
|
+
"name": "variable.coq"
|
29
|
+
}
|
30
|
+
},
|
31
|
+
"match": "\\b(Axiom|Conjecture|Parameter|Parameters|Variable|Variables|Hypothesis|Hypotheses|Definition|Let|Fixpoint|CoFixpoint|Inductive|CoInductive|Remark|Fact|Corollary|Proposition|Example|Module|Theorem|Lemma)\\b"
|
32
|
+
},
|
33
|
+
{
|
34
|
+
"captures": {
|
35
|
+
"1": {
|
36
|
+
"name": "keyword.coq"
|
37
|
+
}
|
38
|
+
},
|
39
|
+
"match": "\\b(Require|Proof|Qed|Type|Admitted|match|with|end|Eval|in|Check|End|Notation|forall|as|Defined|Set|fun|at|cofix|else|exists|exists2|fix|for|if|IF|let|mod|Prop|return|then|using|where|Abort)\\b"
|
40
|
+
},
|
41
|
+
{
|
42
|
+
"match": ":.*?[,.]",
|
43
|
+
"name": "type.coq"
|
44
|
+
}
|
45
|
+
],
|
46
|
+
"repository": {
|
47
|
+
"multilinecomment": {
|
48
|
+
"begin": "\\(\\*",
|
49
|
+
"name": "comment.coq",
|
50
|
+
"end": "\\*\\)",
|
51
|
+
"contentName": "comment.coq",
|
52
|
+
"patterns": [
|
53
|
+
{
|
54
|
+
"include": "#multilinecomment",
|
55
|
+
"name": "comment.coq"
|
56
|
+
}
|
57
|
+
]
|
58
|
+
}
|
59
|
+
},
|
60
|
+
"scopeName": "source.coq",
|
61
|
+
"uuid": "f3924813-f5ba-4ccf-b76f-f9bff62c5180"
|
62
|
+
}
|
@@ -0,0 +1,2760 @@
|
|
1
|
+
{
|
2
|
+
"name": "Crystal",
|
3
|
+
"scopeName": "source.crystal",
|
4
|
+
"fileTypes": [
|
5
|
+
"cr",
|
6
|
+
"Projectfile"
|
7
|
+
],
|
8
|
+
"firstLineMatch": "^#!\\s*/.*\\bcrystal",
|
9
|
+
"patterns": [
|
10
|
+
{
|
11
|
+
"captures": {
|
12
|
+
"1": {
|
13
|
+
"name": "keyword.control.abstract.crystal"
|
14
|
+
},
|
15
|
+
"2": {
|
16
|
+
"name": "keyword.control.class.crystal"
|
17
|
+
},
|
18
|
+
"3": {
|
19
|
+
"name": "entity.name.type.class.crystal"
|
20
|
+
},
|
21
|
+
"4": {
|
22
|
+
"name": "punctuation.section.function.crystal"
|
23
|
+
},
|
24
|
+
"5": {
|
25
|
+
"name": "entity.name.type.generic.crystal"
|
26
|
+
},
|
27
|
+
"6": {
|
28
|
+
"name": "punctuation.section.function.crystal"
|
29
|
+
},
|
30
|
+
"7": {
|
31
|
+
"name": "punctuation.separator.inheritance.crystal"
|
32
|
+
},
|
33
|
+
"8": {
|
34
|
+
"name": "entity.other.inherited-class.crystal"
|
35
|
+
}
|
36
|
+
},
|
37
|
+
"match": "^\\s*(?:(abstract)\\s+)?(class)\\s+([.\\w\\d_:]+)(?:(\\()([.\\w\\d_:]+)(\\)))?(?:\\s+(<)\\s+([.\\w\\d_:]+))?",
|
38
|
+
"name": "meta.class.crystal"
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"captures": {
|
42
|
+
"1": {
|
43
|
+
"name": "keyword.control.struct.crystal"
|
44
|
+
},
|
45
|
+
"2": {
|
46
|
+
"name": "entity.name.type.struct.crystal"
|
47
|
+
},
|
48
|
+
"3": {
|
49
|
+
"name": "punctuation.separator.inheritance.crystal"
|
50
|
+
},
|
51
|
+
"4": {
|
52
|
+
"name": "entity.other.inherited-struct.crystal"
|
53
|
+
}
|
54
|
+
},
|
55
|
+
"match": "^\\s*(struct)\\s+(?:([.\\w\\d_:]+)(?:\\s+(<)\\s+([.\\w\\d_:]+))?)",
|
56
|
+
"name": "meta.class.crystal"
|
57
|
+
},
|
58
|
+
{
|
59
|
+
"captures": {
|
60
|
+
"1": {
|
61
|
+
"name": "keyword.control.module.crystal"
|
62
|
+
},
|
63
|
+
"2": {
|
64
|
+
"name": "entity.name.type.module.crystal"
|
65
|
+
}
|
66
|
+
},
|
67
|
+
"match": "^\\s*(module)\\s+([.\\w\\d_:]+)",
|
68
|
+
"name": "meta.module.crystal"
|
69
|
+
},
|
70
|
+
{
|
71
|
+
"captures": {
|
72
|
+
"1": {
|
73
|
+
"name": "keyword.control.enum.crystal"
|
74
|
+
},
|
75
|
+
"2": {
|
76
|
+
"name": "entity.name.type.enum.crystal"
|
77
|
+
}
|
78
|
+
},
|
79
|
+
"match": "^\\s*(enum)\\s+([.\\w\\d_:]+)",
|
80
|
+
"name": "meta.enum.crystal"
|
81
|
+
},
|
82
|
+
{
|
83
|
+
"captures": {
|
84
|
+
"1": {
|
85
|
+
"name": "keyword.control.lib.crystal"
|
86
|
+
},
|
87
|
+
"2": {
|
88
|
+
"name": "entity.name.type.lib.crystal"
|
89
|
+
}
|
90
|
+
},
|
91
|
+
"match": "^\\s*(lib)\\s+([.\\w\\d_]+)",
|
92
|
+
"name": "meta.module.crystal"
|
93
|
+
},
|
94
|
+
{
|
95
|
+
"captures": {
|
96
|
+
"1": {
|
97
|
+
"name": "punctuation.definition.constant.hashkey.crystal"
|
98
|
+
}
|
99
|
+
},
|
100
|
+
"comment": "symbols as hash key (1.9 syntax)",
|
101
|
+
"match": "(?>[a-zA-Z_]\\w*(?>[?!])?)(:)(?!:)",
|
102
|
+
"name": "constant.other.symbol.hashkey.crystal"
|
103
|
+
},
|
104
|
+
{
|
105
|
+
"captures": {
|
106
|
+
"1": {
|
107
|
+
"name": "punctuation.definition.constant.crystal"
|
108
|
+
}
|
109
|
+
},
|
110
|
+
"comment": "symbols as hash key (1.8 syntax)",
|
111
|
+
"match": "(?<!:)(:)(?>[a-zA-Z_]\\w*(?>[?!])?)(?=\\s*=>)",
|
112
|
+
"name": "constant.other.symbol.hashkey.crystal"
|
113
|
+
},
|
114
|
+
{
|
115
|
+
"comment": "everything being a reserved word, not a value and needing a 'end' is a..",
|
116
|
+
"match": "(?<!\\.)\\b(BEGIN|begin|case|class|else|elsif|END|end|ensure|for|if|ifdef|in|module|rescue|then|unless|until|when|while)\\b(?![?!])",
|
117
|
+
"name": "keyword.control.crystal"
|
118
|
+
},
|
119
|
+
{
|
120
|
+
"comment": "contextual smart pair support for block parameters",
|
121
|
+
"match": "(?<!\\.)\\bdo\\b\\s*",
|
122
|
+
"name": "keyword.control.start-block.crystal"
|
123
|
+
},
|
124
|
+
{
|
125
|
+
"comment": "contextual smart pair support",
|
126
|
+
"match": "(?<=\\{)(\\s+)",
|
127
|
+
"name": "meta.syntax.crystal.start-block"
|
128
|
+
},
|
129
|
+
{
|
130
|
+
"comment": " as above, just doesn't need a 'end' and does a logic operation",
|
131
|
+
"match": "(?<!\\.)\\b(and|not|or)\\b",
|
132
|
+
"name": "keyword.operator.logical.crystal"
|
133
|
+
},
|
134
|
+
{
|
135
|
+
"comment": " just as above but being not a logical operation",
|
136
|
+
"match": "(?<!\\.)\\b(alias|alias_method|break|next|redo|retry|return|super|type|undef|yield)\\b(?![?!])|\\bdefined\\?|\\bblock_given\\?",
|
137
|
+
"name": "keyword.control.pseudo-method.crystal"
|
138
|
+
},
|
139
|
+
{
|
140
|
+
"match": "\\bnil\\b(?![?!])",
|
141
|
+
"name": "constant.language.nil.crystal"
|
142
|
+
},
|
143
|
+
{
|
144
|
+
"match": "\\b(true|false)\\b(?![?!])",
|
145
|
+
"name": "constant.language.boolean.crystal"
|
146
|
+
},
|
147
|
+
{
|
148
|
+
"match": "\\b(__(FILE|LINE)__)\\b(?![?!])",
|
149
|
+
"name": "variable.language.crystal"
|
150
|
+
},
|
151
|
+
{
|
152
|
+
"match": "\\bself\\b(?![?!])",
|
153
|
+
"name": "variable.language.self.crystal"
|
154
|
+
},
|
155
|
+
{
|
156
|
+
"match": "\\b(initialize|new|loop|include|extend|prepend|raise|fail|getter(?:[?])?|setter(?:[?])?|property(?:[?])?|catch|throw)\\s+",
|
157
|
+
"name": "keyword.other.special-method.crystal"
|
158
|
+
},
|
159
|
+
{
|
160
|
+
"begin": "\\b(?<!\\.|::)(require)\\b",
|
161
|
+
"captures": {
|
162
|
+
"1": {
|
163
|
+
"name": "keyword.other.special-method.crystal"
|
164
|
+
}
|
165
|
+
},
|
166
|
+
"end": "$|(?=#|\\})",
|
167
|
+
"name": "meta.require.crystal",
|
168
|
+
"patterns": [
|
169
|
+
{
|
170
|
+
"include": "$self"
|
171
|
+
}
|
172
|
+
]
|
173
|
+
},
|
174
|
+
{
|
175
|
+
"captures": {
|
176
|
+
"1": {
|
177
|
+
"name": "punctuation.definition.variable.crystal"
|
178
|
+
}
|
179
|
+
},
|
180
|
+
"match": "(@)[a-zA-Z_]\\w*",
|
181
|
+
"name": "variable.other.readwrite.instance.crystal"
|
182
|
+
},
|
183
|
+
{
|
184
|
+
"captures": {
|
185
|
+
"1": {
|
186
|
+
"name": "punctuation.definition.variable.crystal"
|
187
|
+
}
|
188
|
+
},
|
189
|
+
"match": "(@@)[a-zA-Z_]\\w*",
|
190
|
+
"name": "variable.other.readwrite.class.crystal"
|
191
|
+
},
|
192
|
+
{
|
193
|
+
"captures": {
|
194
|
+
"1": {
|
195
|
+
"name": "punctuation.definition.variable.crystal"
|
196
|
+
}
|
197
|
+
},
|
198
|
+
"match": "(\\$)[a-zA-Z_]\\w*",
|
199
|
+
"name": "variable.other.readwrite.global.crystal"
|
200
|
+
},
|
201
|
+
{
|
202
|
+
"captures": {
|
203
|
+
"1": {
|
204
|
+
"name": "punctuation.definition.variable.crystal"
|
205
|
+
}
|
206
|
+
},
|
207
|
+
"match": "(\\$)(!|@|&|`|'|\\+|\\d+|~|=|/|\\\\|,|;|\\.|<|>|_|\\*|\\$|\\?|:|\"|-[0adFiIlpv])",
|
208
|
+
"name": "variable.other.readwrite.global.pre-defined.crystal"
|
209
|
+
},
|
210
|
+
{
|
211
|
+
"begin": "\\b(ENV)\\[",
|
212
|
+
"beginCaptures": {
|
213
|
+
"1": {
|
214
|
+
"name": "variable.other.constant.crystal"
|
215
|
+
}
|
216
|
+
},
|
217
|
+
"end": "\\]",
|
218
|
+
"name": "meta.environment-variable.crystal",
|
219
|
+
"patterns": [
|
220
|
+
{
|
221
|
+
"include": "$self"
|
222
|
+
}
|
223
|
+
]
|
224
|
+
},
|
225
|
+
{
|
226
|
+
"match": "\\b[A-Z]\\w*(?=((\\.|::)[A-Za-z]|\\[))",
|
227
|
+
"name": "support.class.crystal"
|
228
|
+
},
|
229
|
+
{
|
230
|
+
"match": "\\b(abort|at_exit|autoload\\??|binding|callcc|caller|caller_locations|chomp|chop|eval|exec|exit|exit!|fork|format|gets|global_variables|gsub|iterator\\?|lambda|load|local_variables|open|p|print|printf|proc|putc|puts|rand|readline|readlines|select|set_trace_func|sleep|spawn|sprintf|srand|sub|syscall|system|test|trace_var|trap|untrace_var|warn)\\b(?![?!])",
|
231
|
+
"name": "support.function.kernel.crystal"
|
232
|
+
},
|
233
|
+
{
|
234
|
+
"match": "\\b[A-Z]\\w*\\b",
|
235
|
+
"name": "variable.other.constant.crystal"
|
236
|
+
},
|
237
|
+
{
|
238
|
+
"begin": "\\b(?:(private|protected)\\s+)?(def|macro)\\s+(\\S+)\\s*(\\()",
|
239
|
+
"beginCaptures": {
|
240
|
+
"1": {
|
241
|
+
"name": "keyword.control.visibility.crystal"
|
242
|
+
},
|
243
|
+
"2": {
|
244
|
+
"name": "keyword.control.def.crystal"
|
245
|
+
},
|
246
|
+
"3": {
|
247
|
+
"name": "entity.name.function.crystal"
|
248
|
+
},
|
249
|
+
"4": {
|
250
|
+
"name": "punctuation.definition.parameters.crystal"
|
251
|
+
}
|
252
|
+
},
|
253
|
+
"comment": "The method pattern comes from the symbol pattern. See there for an explanation.",
|
254
|
+
"end": "\\)",
|
255
|
+
"endCaptures": {
|
256
|
+
"0": {
|
257
|
+
"name": "punctuation.definition.parameters.crystal"
|
258
|
+
}
|
259
|
+
},
|
260
|
+
"name": "meta.function.method.with-arguments.crystal",
|
261
|
+
"patterns": [
|
262
|
+
{
|
263
|
+
"begin": "(?![\\s,)])",
|
264
|
+
"end": "(?=[,)])",
|
265
|
+
"patterns": [
|
266
|
+
{
|
267
|
+
"captures": {
|
268
|
+
"1": {
|
269
|
+
"name": "storage.type.variable.crystal"
|
270
|
+
},
|
271
|
+
"2": {
|
272
|
+
"name": "variable.parameter.function.crystal"
|
273
|
+
}
|
274
|
+
},
|
275
|
+
"match": "\\G([&*]?)([_a-zA-Z][_a-zA-Z0-9]*)"
|
276
|
+
},
|
277
|
+
{
|
278
|
+
"include": "$self"
|
279
|
+
}
|
280
|
+
]
|
281
|
+
}
|
282
|
+
]
|
283
|
+
},
|
284
|
+
{
|
285
|
+
"begin": "\\b(fun)\\s+(\\S+)(?:\\s+(=)\\s+(\\S+))?\\s*(\\()",
|
286
|
+
"beginCaptures": {
|
287
|
+
"1": {
|
288
|
+
"name": "keyword.control.function.crystal"
|
289
|
+
},
|
290
|
+
"2": {
|
291
|
+
"name": "entity.name.function.crystal"
|
292
|
+
},
|
293
|
+
"4": {
|
294
|
+
"name": "entity.name.function.crystal"
|
295
|
+
},
|
296
|
+
"5": {
|
297
|
+
"name": "punctuation.definition.parameters.crystal"
|
298
|
+
}
|
299
|
+
},
|
300
|
+
"comment": "The method pattern comes from the symbol pattern. See there for an explanation.",
|
301
|
+
"end": "\\)",
|
302
|
+
"endCaptures": {
|
303
|
+
"0": {
|
304
|
+
"name": "punctuation.definition.parameters.crystal"
|
305
|
+
}
|
306
|
+
},
|
307
|
+
"name": "meta.function.method.with-arguments.crystal",
|
308
|
+
"patterns": [
|
309
|
+
{
|
310
|
+
"begin": "(?![\\s,)])",
|
311
|
+
"end": "(?=[,)])",
|
312
|
+
"patterns": [
|
313
|
+
{
|
314
|
+
"captures": {
|
315
|
+
"1": {
|
316
|
+
"name": "storage.type.variable.crystal"
|
317
|
+
},
|
318
|
+
"2": {
|
319
|
+
"name": "variable.parameter.function.crystal"
|
320
|
+
}
|
321
|
+
},
|
322
|
+
"match": "\\G([&*]?)([_a-zA-Z][_a-zA-Z0-9]*)"
|
323
|
+
},
|
324
|
+
{
|
325
|
+
"include": "$self"
|
326
|
+
}
|
327
|
+
]
|
328
|
+
}
|
329
|
+
]
|
330
|
+
},
|
331
|
+
{
|
332
|
+
"begin": "\\b(?:(private|protected)\\s+)?(def|macro)\\s+(\\S+)",
|
333
|
+
"beginCaptures": {
|
334
|
+
"1": {
|
335
|
+
"name": "keyword.control.visibility.crystal"
|
336
|
+
},
|
337
|
+
"2": {
|
338
|
+
"name": "keyword.control.def.crystal"
|
339
|
+
},
|
340
|
+
"3": {
|
341
|
+
"name": "entity.name.function.crystal"
|
342
|
+
}
|
343
|
+
},
|
344
|
+
"comment": "same as the previous rule, but without parentheses around the arguments",
|
345
|
+
"end": "$",
|
346
|
+
"name": "meta.function.method.with-arguments.crystal",
|
347
|
+
"patterns": [
|
348
|
+
{
|
349
|
+
"begin": "(?![\\s,])",
|
350
|
+
"end": "(?=,|$)",
|
351
|
+
"patterns": [
|
352
|
+
{
|
353
|
+
"captures": {
|
354
|
+
"1": {
|
355
|
+
"name": "punctuation.definition.variable.crystal"
|
356
|
+
}
|
357
|
+
},
|
358
|
+
"match": "\\G([&*]?)[_a-zA-Z][_a-zA-Z0-9]*",
|
359
|
+
"name": "variable.parameter.function.crystal"
|
360
|
+
},
|
361
|
+
{
|
362
|
+
"include": "$self"
|
363
|
+
}
|
364
|
+
]
|
365
|
+
}
|
366
|
+
]
|
367
|
+
},
|
368
|
+
{
|
369
|
+
"captures": {
|
370
|
+
"1": {
|
371
|
+
"name": "keyword.control.visibility.crystal"
|
372
|
+
},
|
373
|
+
"2": {
|
374
|
+
"name": "keyword.control.def.crystal"
|
375
|
+
},
|
376
|
+
"3": {
|
377
|
+
"name": "entity.name.function.crystal"
|
378
|
+
}
|
379
|
+
},
|
380
|
+
"comment": " the optional name is just to catch the def also without a method-name",
|
381
|
+
"match": "\\b(?:(private|protected)\\s+)?(def|macro)\\s+(\\S+)",
|
382
|
+
"name": "meta.function.method.without-arguments.crystal"
|
383
|
+
},
|
384
|
+
{
|
385
|
+
"match": "\\b(0[xX]\\h(?>_?\\h)*|\\d(?>_?\\d)*(\\.(?![^[:space:][:digit:]])(?>_?\\d)*)?([eE][-+]?\\d(?>_?\\d)*)?|0[bB][01]+)\\b",
|
386
|
+
"name": "constant.numeric.crystal"
|
387
|
+
},
|
388
|
+
{
|
389
|
+
"begin": ":'",
|
390
|
+
"beginCaptures": {
|
391
|
+
"0": {
|
392
|
+
"name": "punctuation.definition.symbol.begin.crystal"
|
393
|
+
}
|
394
|
+
},
|
395
|
+
"comment": "symbol literal with '' delimitor",
|
396
|
+
"end": "'",
|
397
|
+
"endCaptures": {
|
398
|
+
"0": {
|
399
|
+
"name": "punctuation.definition.symbol.end.crystal"
|
400
|
+
}
|
401
|
+
},
|
402
|
+
"name": "constant.other.symbol.crystal",
|
403
|
+
"patterns": [
|
404
|
+
{
|
405
|
+
"match": "\\\\['\\\\]",
|
406
|
+
"name": "constant.character.escape.crystal"
|
407
|
+
}
|
408
|
+
]
|
409
|
+
},
|
410
|
+
{
|
411
|
+
"begin": ":\"",
|
412
|
+
"beginCaptures": {
|
413
|
+
"0": {
|
414
|
+
"name": "punctuation.section.symbol.begin.crystal"
|
415
|
+
}
|
416
|
+
},
|
417
|
+
"comment": "symbol literal with \"\" delimitor",
|
418
|
+
"end": "\"",
|
419
|
+
"endCaptures": {
|
420
|
+
"0": {
|
421
|
+
"name": "punctuation.section.symbol.end.crystal"
|
422
|
+
}
|
423
|
+
},
|
424
|
+
"name": "constant.other.symbol.interpolated.crystal",
|
425
|
+
"patterns": [
|
426
|
+
{
|
427
|
+
"include": "#interpolated_crystal"
|
428
|
+
},
|
429
|
+
{
|
430
|
+
"include": "#escaped_char"
|
431
|
+
}
|
432
|
+
]
|
433
|
+
},
|
434
|
+
{
|
435
|
+
"comment": "Needs higher precidence than regular expressions.",
|
436
|
+
"match": "(?<!\\()/=",
|
437
|
+
"name": "keyword.operator.assignment.augmented.crystal"
|
438
|
+
},
|
439
|
+
{
|
440
|
+
"begin": "'",
|
441
|
+
"beginCaptures": {
|
442
|
+
"0": {
|
443
|
+
"name": "punctuation.definition.char.begin.crystal"
|
444
|
+
}
|
445
|
+
},
|
446
|
+
"end": "'",
|
447
|
+
"endCaptures": {
|
448
|
+
"0": {
|
449
|
+
"name": "punctuation.definition.char.end.crystal"
|
450
|
+
}
|
451
|
+
},
|
452
|
+
"name": "string.quoted.single.crystal",
|
453
|
+
"patterns": [
|
454
|
+
{
|
455
|
+
"match": "\\\\'|\\\\\\\\",
|
456
|
+
"name": "constant.character.escape.crystal"
|
457
|
+
}
|
458
|
+
]
|
459
|
+
},
|
460
|
+
{
|
461
|
+
"begin": "\"",
|
462
|
+
"beginCaptures": {
|
463
|
+
"0": {
|
464
|
+
"name": "punctuation.definition.string.begin.crystal"
|
465
|
+
}
|
466
|
+
},
|
467
|
+
"end": "\"",
|
468
|
+
"endCaptures": {
|
469
|
+
"0": {
|
470
|
+
"name": "punctuation.definition.string.end.crystal"
|
471
|
+
}
|
472
|
+
},
|
473
|
+
"name": "string.quoted.double.crystal",
|
474
|
+
"patterns": [
|
475
|
+
{
|
476
|
+
"include": "#interpolated_crystal"
|
477
|
+
},
|
478
|
+
{
|
479
|
+
"include": "#escaped_char"
|
480
|
+
}
|
481
|
+
]
|
482
|
+
},
|
483
|
+
{
|
484
|
+
"begin": "`",
|
485
|
+
"beginCaptures": {
|
486
|
+
"0": {
|
487
|
+
"name": "punctuation.definition.string.begin.crystal"
|
488
|
+
}
|
489
|
+
},
|
490
|
+
"comment": "execute string (allows for interpolation)",
|
491
|
+
"end": "`",
|
492
|
+
"endCaptures": {
|
493
|
+
"0": {
|
494
|
+
"name": "punctuation.definition.string.end.crystal"
|
495
|
+
}
|
496
|
+
},
|
497
|
+
"name": "string.interpolated.crystal",
|
498
|
+
"patterns": [
|
499
|
+
{
|
500
|
+
"include": "#interpolated_crystal"
|
501
|
+
},
|
502
|
+
{
|
503
|
+
"include": "#escaped_char"
|
504
|
+
}
|
505
|
+
]
|
506
|
+
},
|
507
|
+
{
|
508
|
+
"begin": "%x\\{",
|
509
|
+
"beginCaptures": {
|
510
|
+
"0": {
|
511
|
+
"name": "punctuation.definition.string.begin.crystal"
|
512
|
+
}
|
513
|
+
},
|
514
|
+
"comment": "execute string (allow for interpolation)",
|
515
|
+
"end": "\\}",
|
516
|
+
"endCaptures": {
|
517
|
+
"0": {
|
518
|
+
"name": "punctuation.definition.string.end.crystal"
|
519
|
+
}
|
520
|
+
},
|
521
|
+
"name": "string.interpolated.crystal",
|
522
|
+
"patterns": [
|
523
|
+
{
|
524
|
+
"include": "#interpolated_crystal"
|
525
|
+
},
|
526
|
+
{
|
527
|
+
"include": "#escaped_char"
|
528
|
+
},
|
529
|
+
{
|
530
|
+
"include": "#nest_curly_i"
|
531
|
+
}
|
532
|
+
]
|
533
|
+
},
|
534
|
+
{
|
535
|
+
"begin": "%x\\[",
|
536
|
+
"beginCaptures": {
|
537
|
+
"0": {
|
538
|
+
"name": "punctuation.definition.string.begin.crystal"
|
539
|
+
}
|
540
|
+
},
|
541
|
+
"comment": "execute string (allow for interpolation)",
|
542
|
+
"end": "\\]",
|
543
|
+
"endCaptures": {
|
544
|
+
"0": {
|
545
|
+
"name": "punctuation.definition.string.end.crystal"
|
546
|
+
}
|
547
|
+
},
|
548
|
+
"name": "string.interpolated.crystal",
|
549
|
+
"patterns": [
|
550
|
+
{
|
551
|
+
"include": "#interpolated_crystal"
|
552
|
+
},
|
553
|
+
{
|
554
|
+
"include": "#escaped_char"
|
555
|
+
},
|
556
|
+
{
|
557
|
+
"include": "#nest_brackets_i"
|
558
|
+
}
|
559
|
+
]
|
560
|
+
},
|
561
|
+
{
|
562
|
+
"begin": "%x\\<",
|
563
|
+
"beginCaptures": {
|
564
|
+
"0": {
|
565
|
+
"name": "punctuation.definition.string.begin.crystal"
|
566
|
+
}
|
567
|
+
},
|
568
|
+
"comment": "execute string (allow for interpolation)",
|
569
|
+
"end": "\\>",
|
570
|
+
"endCaptures": {
|
571
|
+
"0": {
|
572
|
+
"name": "punctuation.definition.string.end.crystal"
|
573
|
+
}
|
574
|
+
},
|
575
|
+
"name": "string.interpolated.crystal",
|
576
|
+
"patterns": [
|
577
|
+
{
|
578
|
+
"include": "#interpolated_crystal"
|
579
|
+
},
|
580
|
+
{
|
581
|
+
"include": "#escaped_char"
|
582
|
+
},
|
583
|
+
{
|
584
|
+
"include": "#nest_ltgt_i"
|
585
|
+
}
|
586
|
+
]
|
587
|
+
},
|
588
|
+
{
|
589
|
+
"begin": "%x\\(",
|
590
|
+
"beginCaptures": {
|
591
|
+
"0": {
|
592
|
+
"name": "punctuation.definition.string.begin.crystal"
|
593
|
+
}
|
594
|
+
},
|
595
|
+
"comment": "execute string (allow for interpolation)",
|
596
|
+
"end": "\\)",
|
597
|
+
"endCaptures": {
|
598
|
+
"0": {
|
599
|
+
"name": "punctuation.definition.string.end.crystal"
|
600
|
+
}
|
601
|
+
},
|
602
|
+
"name": "string.interpolated.crystal",
|
603
|
+
"patterns": [
|
604
|
+
{
|
605
|
+
"include": "#interpolated_crystal"
|
606
|
+
},
|
607
|
+
{
|
608
|
+
"include": "#escaped_char"
|
609
|
+
},
|
610
|
+
{
|
611
|
+
"include": "#nest_parens_i"
|
612
|
+
}
|
613
|
+
]
|
614
|
+
},
|
615
|
+
{
|
616
|
+
"begin": "%x([^\\w])",
|
617
|
+
"beginCaptures": {
|
618
|
+
"0": {
|
619
|
+
"name": "punctuation.definition.string.begin.crystal"
|
620
|
+
}
|
621
|
+
},
|
622
|
+
"comment": "execute string (allow for interpolation)",
|
623
|
+
"end": "\\1",
|
624
|
+
"endCaptures": {
|
625
|
+
"0": {
|
626
|
+
"name": "punctuation.definition.string.end.crystal"
|
627
|
+
}
|
628
|
+
},
|
629
|
+
"name": "string.interpolated.crystal",
|
630
|
+
"patterns": [
|
631
|
+
{
|
632
|
+
"include": "#interpolated_crystal"
|
633
|
+
},
|
634
|
+
{
|
635
|
+
"include": "#escaped_char"
|
636
|
+
}
|
637
|
+
]
|
638
|
+
},
|
639
|
+
{
|
640
|
+
"begin": "(?<![\\w)])((/))(?![*+?])(?=(?:\\\\/|[^/])*/[eimnosux]*\\s*([\\]#).,?:}]|$|\\|\\||&&|<=>|=>|==|=~|!~|!=|;|if|else|elsif|then|do|end|unless|while|until|or|and))",
|
641
|
+
"captures": {
|
642
|
+
"1": {
|
643
|
+
"name": "string.regexp.interpolated.crystal"
|
644
|
+
},
|
645
|
+
"2": {
|
646
|
+
"name": "punctuation.section.regexp.crystal"
|
647
|
+
}
|
648
|
+
},
|
649
|
+
"comment": "regular expression literal with interpolation",
|
650
|
+
"contentName": "string.regexp.interpolated.crystal",
|
651
|
+
"end": "((/[eimnosux]*))(?=[^eimnosux])",
|
652
|
+
"patterns": [
|
653
|
+
{
|
654
|
+
"include": "#regex_sub"
|
655
|
+
}
|
656
|
+
]
|
657
|
+
},
|
658
|
+
{
|
659
|
+
"begin": "%r\\{",
|
660
|
+
"beginCaptures": {
|
661
|
+
"0": {
|
662
|
+
"name": "punctuation.section.regexp.begin.crystal"
|
663
|
+
}
|
664
|
+
},
|
665
|
+
"comment": "regular expression literal with interpolation and {} delimitor",
|
666
|
+
"end": "\\}[eimnosux]*",
|
667
|
+
"endCaptures": {
|
668
|
+
"0": {
|
669
|
+
"name": "punctuation.section.regexp.end.crystal"
|
670
|
+
}
|
671
|
+
},
|
672
|
+
"name": "string.regexp.interpolated.crystal",
|
673
|
+
"patterns": [
|
674
|
+
{
|
675
|
+
"include": "#regex_sub"
|
676
|
+
},
|
677
|
+
{
|
678
|
+
"include": "#nest_curly_r"
|
679
|
+
}
|
680
|
+
]
|
681
|
+
},
|
682
|
+
{
|
683
|
+
"begin": "%r\\[",
|
684
|
+
"beginCaptures": {
|
685
|
+
"0": {
|
686
|
+
"name": "punctuation.section.regexp.begin.crystal"
|
687
|
+
}
|
688
|
+
},
|
689
|
+
"comment": "regular expression literal with interpolation and [] delimitor",
|
690
|
+
"end": "\\][eimnosux]*",
|
691
|
+
"endCaptures": {
|
692
|
+
"0": {
|
693
|
+
"name": "punctuation.section.regexp.end.crystal"
|
694
|
+
}
|
695
|
+
},
|
696
|
+
"name": "string.regexp.interpolated.crystal",
|
697
|
+
"patterns": [
|
698
|
+
{
|
699
|
+
"include": "#regex_sub"
|
700
|
+
},
|
701
|
+
{
|
702
|
+
"include": "#nest_brackets_r"
|
703
|
+
}
|
704
|
+
]
|
705
|
+
},
|
706
|
+
{
|
707
|
+
"begin": "%r\\(",
|
708
|
+
"beginCaptures": {
|
709
|
+
"0": {
|
710
|
+
"name": "punctuation.section.regexp.begin.crystal"
|
711
|
+
}
|
712
|
+
},
|
713
|
+
"comment": "regular expression literal with interpolation and () delimitor",
|
714
|
+
"end": "\\)[eimnosux]*",
|
715
|
+
"endCaptures": {
|
716
|
+
"0": {
|
717
|
+
"name": "punctuation.section.regexp.end.crystal"
|
718
|
+
}
|
719
|
+
},
|
720
|
+
"name": "string.regexp.interpolated.crystal",
|
721
|
+
"patterns": [
|
722
|
+
{
|
723
|
+
"include": "#regex_sub"
|
724
|
+
},
|
725
|
+
{
|
726
|
+
"include": "#nest_parens_r"
|
727
|
+
}
|
728
|
+
]
|
729
|
+
},
|
730
|
+
{
|
731
|
+
"begin": "%r\\<",
|
732
|
+
"beginCaptures": {
|
733
|
+
"0": {
|
734
|
+
"name": "punctuation.section.regexp.begin.crystal"
|
735
|
+
}
|
736
|
+
},
|
737
|
+
"comment": "regular expression literal with interpolation and <> delimitor",
|
738
|
+
"end": "\\>[eimnosux]*",
|
739
|
+
"endCaptures": {
|
740
|
+
"0": {
|
741
|
+
"name": "punctuation.section.regexp.end.crystal"
|
742
|
+
}
|
743
|
+
},
|
744
|
+
"name": "string.regexp.interpolated.crystal",
|
745
|
+
"patterns": [
|
746
|
+
{
|
747
|
+
"include": "#regex_sub"
|
748
|
+
},
|
749
|
+
{
|
750
|
+
"include": "#nest_ltgt_r"
|
751
|
+
}
|
752
|
+
]
|
753
|
+
},
|
754
|
+
{
|
755
|
+
"begin": "%r([^\\w])",
|
756
|
+
"beginCaptures": {
|
757
|
+
"0": {
|
758
|
+
"name": "punctuation.section.regexp.begin.crystal"
|
759
|
+
}
|
760
|
+
},
|
761
|
+
"comment": "regular expression literal with interpolation and {} delimitor",
|
762
|
+
"end": "\\1[eimnosux]*",
|
763
|
+
"endCaptures": {
|
764
|
+
"0": {
|
765
|
+
"name": "punctuation.section.regexp.end.crystal"
|
766
|
+
}
|
767
|
+
},
|
768
|
+
"name": "string.regexp.interpolated.crystal",
|
769
|
+
"patterns": [
|
770
|
+
{
|
771
|
+
"include": "#regex_sub"
|
772
|
+
}
|
773
|
+
]
|
774
|
+
},
|
775
|
+
{
|
776
|
+
"begin": "%I\\[",
|
777
|
+
"beginCaptures": {
|
778
|
+
"0": {
|
779
|
+
"name": "punctuation.section.array.begin.crystal"
|
780
|
+
}
|
781
|
+
},
|
782
|
+
"comment": "array of symbols literal with interpolation and [] delimitor",
|
783
|
+
"end": "\\]",
|
784
|
+
"endCaptures": {
|
785
|
+
"0": {
|
786
|
+
"name": "punctuation.section.array.end.crystal"
|
787
|
+
}
|
788
|
+
},
|
789
|
+
"name": "constant.other.symbol.interpolated.crystal",
|
790
|
+
"patterns": [
|
791
|
+
{
|
792
|
+
"include": "#interpolated_crystal"
|
793
|
+
},
|
794
|
+
{
|
795
|
+
"include": "#escaped_char"
|
796
|
+
},
|
797
|
+
{
|
798
|
+
"include": "#nest_brackets_i"
|
799
|
+
}
|
800
|
+
]
|
801
|
+
},
|
802
|
+
{
|
803
|
+
"begin": "%I\\(",
|
804
|
+
"beginCaptures": {
|
805
|
+
"0": {
|
806
|
+
"name": "punctuation.section.array.begin.crystal"
|
807
|
+
}
|
808
|
+
},
|
809
|
+
"comment": "array of symbols literal with interpolation and () delimitor",
|
810
|
+
"end": "\\)",
|
811
|
+
"endCaptures": {
|
812
|
+
"0": {
|
813
|
+
"name": "punctuation.section.array.end.crystal"
|
814
|
+
}
|
815
|
+
},
|
816
|
+
"name": "constant.other.symbol.interpolated.crystal",
|
817
|
+
"patterns": [
|
818
|
+
{
|
819
|
+
"include": "#interpolated_crystal"
|
820
|
+
},
|
821
|
+
{
|
822
|
+
"include": "#escaped_char"
|
823
|
+
},
|
824
|
+
{
|
825
|
+
"include": "#nest_parens_i"
|
826
|
+
}
|
827
|
+
]
|
828
|
+
},
|
829
|
+
{
|
830
|
+
"begin": "%I\\<",
|
831
|
+
"beginCaptures": {
|
832
|
+
"0": {
|
833
|
+
"name": "punctuation.section.array.begin.crystal"
|
834
|
+
}
|
835
|
+
},
|
836
|
+
"comment": "array of symbols literal with interpolation and <> delimitor",
|
837
|
+
"end": "\\>",
|
838
|
+
"endCaptures": {
|
839
|
+
"0": {
|
840
|
+
"name": "punctuation.section.array.end.crystal"
|
841
|
+
}
|
842
|
+
},
|
843
|
+
"name": "constant.other.symbol.interpolated.crystal",
|
844
|
+
"patterns": [
|
845
|
+
{
|
846
|
+
"include": "#interpolated_crystal"
|
847
|
+
},
|
848
|
+
{
|
849
|
+
"include": "#escaped_char"
|
850
|
+
},
|
851
|
+
{
|
852
|
+
"include": "#nest_ltgt_i"
|
853
|
+
}
|
854
|
+
]
|
855
|
+
},
|
856
|
+
{
|
857
|
+
"begin": "%I\\{",
|
858
|
+
"beginCaptures": {
|
859
|
+
"0": {
|
860
|
+
"name": "punctuation.section.array.begin.crystal"
|
861
|
+
}
|
862
|
+
},
|
863
|
+
"comment": "array of symbols literal with interpolation and {} delimitor",
|
864
|
+
"end": "\\}",
|
865
|
+
"endCaptures": {
|
866
|
+
"0": {
|
867
|
+
"name": "punctuation.section.array.end.crystal"
|
868
|
+
}
|
869
|
+
},
|
870
|
+
"name": "constant.other.symbol.interpolated.crystal",
|
871
|
+
"patterns": [
|
872
|
+
{
|
873
|
+
"include": "#interpolated_crystal"
|
874
|
+
},
|
875
|
+
{
|
876
|
+
"include": "#escaped_char"
|
877
|
+
},
|
878
|
+
{
|
879
|
+
"include": "#nest_curly_i"
|
880
|
+
}
|
881
|
+
]
|
882
|
+
},
|
883
|
+
{
|
884
|
+
"begin": "%I([^\\w])",
|
885
|
+
"beginCaptures": {
|
886
|
+
"0": {
|
887
|
+
"name": "punctuation.section.array.begin.crystal"
|
888
|
+
}
|
889
|
+
},
|
890
|
+
"comment": "array of symbols literal with interpolation and wildcard delimitor",
|
891
|
+
"end": "\\1",
|
892
|
+
"endCaptures": {
|
893
|
+
"0": {
|
894
|
+
"name": "punctuation.section.array.end.crystal"
|
895
|
+
}
|
896
|
+
},
|
897
|
+
"name": "constant.other.symbol.interpolated.crystal",
|
898
|
+
"patterns": [
|
899
|
+
{
|
900
|
+
"include": "#interpolated_crystal"
|
901
|
+
},
|
902
|
+
{
|
903
|
+
"include": "#escaped_char"
|
904
|
+
}
|
905
|
+
]
|
906
|
+
},
|
907
|
+
{
|
908
|
+
"begin": "%i\\[",
|
909
|
+
"beginCaptures": {
|
910
|
+
"0": {
|
911
|
+
"name": "punctuation.section.array.begin.crystal"
|
912
|
+
}
|
913
|
+
},
|
914
|
+
"comment": "array of symbols literal with [] delimitor",
|
915
|
+
"end": "\\]",
|
916
|
+
"endCaptures": {
|
917
|
+
"0": {
|
918
|
+
"name": "punctuation.section.array.end.crystal"
|
919
|
+
}
|
920
|
+
},
|
921
|
+
"name": "constant.other.symbol.crystal",
|
922
|
+
"patterns": [
|
923
|
+
{
|
924
|
+
"match": "\\\\\\]|\\\\\\\\",
|
925
|
+
"name": "constant.character.escape.crystal"
|
926
|
+
},
|
927
|
+
{
|
928
|
+
"include": "#nest_brackets"
|
929
|
+
}
|
930
|
+
]
|
931
|
+
},
|
932
|
+
{
|
933
|
+
"begin": "%i\\(",
|
934
|
+
"beginCaptures": {
|
935
|
+
"0": {
|
936
|
+
"name": "punctuation.section.array.begin.crystal"
|
937
|
+
}
|
938
|
+
},
|
939
|
+
"comment": "array of symbols literal with () delimitor",
|
940
|
+
"end": "\\)",
|
941
|
+
"endCaptures": {
|
942
|
+
"0": {
|
943
|
+
"name": "punctuation.section.array.end.crystal"
|
944
|
+
}
|
945
|
+
},
|
946
|
+
"name": "constant.other.symbol.crystal",
|
947
|
+
"patterns": [
|
948
|
+
{
|
949
|
+
"match": "\\\\\\)|\\\\\\\\",
|
950
|
+
"name": "constant.character.escape.crystal"
|
951
|
+
},
|
952
|
+
{
|
953
|
+
"include": "#nest_parens"
|
954
|
+
}
|
955
|
+
]
|
956
|
+
},
|
957
|
+
{
|
958
|
+
"begin": "%i\\<",
|
959
|
+
"beginCaptures": {
|
960
|
+
"0": {
|
961
|
+
"name": "punctuation.section.array.begin.crystal"
|
962
|
+
}
|
963
|
+
},
|
964
|
+
"comment": "array of symbols literal with <> delimitor",
|
965
|
+
"end": "\\>",
|
966
|
+
"endCaptures": {
|
967
|
+
"0": {
|
968
|
+
"name": "punctuation.section.array.end.crystal"
|
969
|
+
}
|
970
|
+
},
|
971
|
+
"name": "constant.other.symbol.crystal",
|
972
|
+
"patterns": [
|
973
|
+
{
|
974
|
+
"match": "\\\\\\>|\\\\\\\\",
|
975
|
+
"name": "constant.character.escape.crystal"
|
976
|
+
},
|
977
|
+
{
|
978
|
+
"include": "#nest_ltgt"
|
979
|
+
}
|
980
|
+
]
|
981
|
+
},
|
982
|
+
{
|
983
|
+
"begin": "%i\\{",
|
984
|
+
"beginCaptures": {
|
985
|
+
"0": {
|
986
|
+
"name": "punctuation.section.array.begin.crystal"
|
987
|
+
}
|
988
|
+
},
|
989
|
+
"comment": "array of symbols literal with {} delimitor",
|
990
|
+
"end": "\\}",
|
991
|
+
"endCaptures": {
|
992
|
+
"0": {
|
993
|
+
"name": "punctuation.section.array.end.crystal"
|
994
|
+
}
|
995
|
+
},
|
996
|
+
"name": "constant.other.symbol.crystal",
|
997
|
+
"patterns": [
|
998
|
+
{
|
999
|
+
"match": "\\\\\\}|\\\\\\\\",
|
1000
|
+
"name": "constant.character.escape.crystal"
|
1001
|
+
},
|
1002
|
+
{
|
1003
|
+
"include": "#nest_curly"
|
1004
|
+
}
|
1005
|
+
]
|
1006
|
+
},
|
1007
|
+
{
|
1008
|
+
"begin": "%i([^\\w])",
|
1009
|
+
"beginCaptures": {
|
1010
|
+
"0": {
|
1011
|
+
"name": "punctuation.section.array.begin.crystal"
|
1012
|
+
}
|
1013
|
+
},
|
1014
|
+
"comment": "array of symbols literal with wildcard delimitor",
|
1015
|
+
"end": "\\1",
|
1016
|
+
"endCaptures": {
|
1017
|
+
"0": {
|
1018
|
+
"name": "punctuation.section.array.end.crystal"
|
1019
|
+
}
|
1020
|
+
},
|
1021
|
+
"name": "constant.other.symbol.crystal",
|
1022
|
+
"patterns": [
|
1023
|
+
{
|
1024
|
+
"comment": "Cant be named because its not neccesarily an escape.",
|
1025
|
+
"match": "\\\\."
|
1026
|
+
}
|
1027
|
+
]
|
1028
|
+
},
|
1029
|
+
{
|
1030
|
+
"begin": "%W\\[",
|
1031
|
+
"beginCaptures": {
|
1032
|
+
"0": {
|
1033
|
+
"name": "punctuation.section.array.begin.crystal"
|
1034
|
+
}
|
1035
|
+
},
|
1036
|
+
"comment": "array of strings literal with interpolation and [] delimitor",
|
1037
|
+
"end": "\\]",
|
1038
|
+
"endCaptures": {
|
1039
|
+
"0": {
|
1040
|
+
"name": "punctuation.section.array.end.crystal"
|
1041
|
+
}
|
1042
|
+
},
|
1043
|
+
"name": "string.quoted.other.interpolated.crystal",
|
1044
|
+
"patterns": [
|
1045
|
+
{
|
1046
|
+
"include": "#interpolated_crystal"
|
1047
|
+
},
|
1048
|
+
{
|
1049
|
+
"include": "#escaped_char"
|
1050
|
+
},
|
1051
|
+
{
|
1052
|
+
"include": "#nest_brackets_i"
|
1053
|
+
}
|
1054
|
+
]
|
1055
|
+
},
|
1056
|
+
{
|
1057
|
+
"begin": "%W\\(",
|
1058
|
+
"beginCaptures": {
|
1059
|
+
"0": {
|
1060
|
+
"name": "punctuation.section.array.begin.crystal"
|
1061
|
+
}
|
1062
|
+
},
|
1063
|
+
"comment": "array of strings literal with interpolation and () delimitor",
|
1064
|
+
"end": "\\)",
|
1065
|
+
"endCaptures": {
|
1066
|
+
"0": {
|
1067
|
+
"name": "punctuation.section.array.end.crystal"
|
1068
|
+
}
|
1069
|
+
},
|
1070
|
+
"name": "string.quoted.other.interpolated.crystal",
|
1071
|
+
"patterns": [
|
1072
|
+
{
|
1073
|
+
"include": "#interpolated_crystal"
|
1074
|
+
},
|
1075
|
+
{
|
1076
|
+
"include": "#escaped_char"
|
1077
|
+
},
|
1078
|
+
{
|
1079
|
+
"include": "#nest_parens_i"
|
1080
|
+
}
|
1081
|
+
]
|
1082
|
+
},
|
1083
|
+
{
|
1084
|
+
"begin": "%W\\<",
|
1085
|
+
"beginCaptures": {
|
1086
|
+
"0": {
|
1087
|
+
"name": "punctuation.section.array.begin.crystal"
|
1088
|
+
}
|
1089
|
+
},
|
1090
|
+
"comment": "array of strings literal with interpolation and <> delimitor",
|
1091
|
+
"end": "\\>",
|
1092
|
+
"endCaptures": {
|
1093
|
+
"0": {
|
1094
|
+
"name": "punctuation.section.array.end.crystal"
|
1095
|
+
}
|
1096
|
+
},
|
1097
|
+
"name": "string.quoted.other.interpolated.crystal",
|
1098
|
+
"patterns": [
|
1099
|
+
{
|
1100
|
+
"include": "#interpolated_crystal"
|
1101
|
+
},
|
1102
|
+
{
|
1103
|
+
"include": "#escaped_char"
|
1104
|
+
},
|
1105
|
+
{
|
1106
|
+
"include": "#nest_ltgt_i"
|
1107
|
+
}
|
1108
|
+
]
|
1109
|
+
},
|
1110
|
+
{
|
1111
|
+
"begin": "%W\\{",
|
1112
|
+
"beginCaptures": {
|
1113
|
+
"0": {
|
1114
|
+
"name": "punctuation.section.array.begin.crystal"
|
1115
|
+
}
|
1116
|
+
},
|
1117
|
+
"comment": "array of strings literal with interpolation and {} delimitor",
|
1118
|
+
"end": "\\}",
|
1119
|
+
"endCaptures": {
|
1120
|
+
"0": {
|
1121
|
+
"name": "punctuation.section.array.end.crystal"
|
1122
|
+
}
|
1123
|
+
},
|
1124
|
+
"name": "string.quoted.other.interpolated.crystal",
|
1125
|
+
"patterns": [
|
1126
|
+
{
|
1127
|
+
"include": "#interpolated_crystal"
|
1128
|
+
},
|
1129
|
+
{
|
1130
|
+
"include": "#escaped_char"
|
1131
|
+
},
|
1132
|
+
{
|
1133
|
+
"include": "#nest_curly_i"
|
1134
|
+
}
|
1135
|
+
]
|
1136
|
+
},
|
1137
|
+
{
|
1138
|
+
"begin": "%W([^\\w])",
|
1139
|
+
"beginCaptures": {
|
1140
|
+
"0": {
|
1141
|
+
"name": "punctuation.section.array.begin.crystal"
|
1142
|
+
}
|
1143
|
+
},
|
1144
|
+
"comment": "array of strings literal with interpolation and wildcard delimitor",
|
1145
|
+
"end": "\\1",
|
1146
|
+
"endCaptures": {
|
1147
|
+
"0": {
|
1148
|
+
"name": "punctuation.section.array.end.crystal"
|
1149
|
+
}
|
1150
|
+
},
|
1151
|
+
"name": "string.quoted.other.interpolated.crystal",
|
1152
|
+
"patterns": [
|
1153
|
+
{
|
1154
|
+
"include": "#interpolated_crystal"
|
1155
|
+
},
|
1156
|
+
{
|
1157
|
+
"include": "#escaped_char"
|
1158
|
+
}
|
1159
|
+
]
|
1160
|
+
},
|
1161
|
+
{
|
1162
|
+
"begin": "%w\\[",
|
1163
|
+
"beginCaptures": {
|
1164
|
+
"0": {
|
1165
|
+
"name": "punctuation.section.array.begin.crystal"
|
1166
|
+
}
|
1167
|
+
},
|
1168
|
+
"comment": "array of strings literal with [] delimitor",
|
1169
|
+
"end": "\\]",
|
1170
|
+
"endCaptures": {
|
1171
|
+
"0": {
|
1172
|
+
"name": "punctuation.section.array.end.crystal"
|
1173
|
+
}
|
1174
|
+
},
|
1175
|
+
"name": "string.quoted.other.crystal",
|
1176
|
+
"patterns": [
|
1177
|
+
{
|
1178
|
+
"match": "\\\\\\]|\\\\\\\\",
|
1179
|
+
"name": "constant.character.escape.crystal"
|
1180
|
+
},
|
1181
|
+
{
|
1182
|
+
"include": "#nest_brackets"
|
1183
|
+
}
|
1184
|
+
]
|
1185
|
+
},
|
1186
|
+
{
|
1187
|
+
"begin": "%w\\(",
|
1188
|
+
"beginCaptures": {
|
1189
|
+
"0": {
|
1190
|
+
"name": "punctuation.section.array.begin.crystal"
|
1191
|
+
}
|
1192
|
+
},
|
1193
|
+
"comment": "array of strings literal with () delimitor",
|
1194
|
+
"end": "\\)",
|
1195
|
+
"endCaptures": {
|
1196
|
+
"0": {
|
1197
|
+
"name": "punctuation.section.array.end.crystal"
|
1198
|
+
}
|
1199
|
+
},
|
1200
|
+
"name": "string.quoted.other.crystal",
|
1201
|
+
"patterns": [
|
1202
|
+
{
|
1203
|
+
"match": "\\\\\\)|\\\\\\\\",
|
1204
|
+
"name": "constant.character.escape.crystal"
|
1205
|
+
},
|
1206
|
+
{
|
1207
|
+
"include": "#nest_parens"
|
1208
|
+
}
|
1209
|
+
]
|
1210
|
+
},
|
1211
|
+
{
|
1212
|
+
"begin": "%w\\<",
|
1213
|
+
"beginCaptures": {
|
1214
|
+
"0": {
|
1215
|
+
"name": "punctuation.section.array.begin.crystal"
|
1216
|
+
}
|
1217
|
+
},
|
1218
|
+
"comment": "array of strings literal with <> delimitor",
|
1219
|
+
"end": "\\>",
|
1220
|
+
"endCaptures": {
|
1221
|
+
"0": {
|
1222
|
+
"name": "punctuation.section.array.end.crystal"
|
1223
|
+
}
|
1224
|
+
},
|
1225
|
+
"name": "string.quoted.other.crystal",
|
1226
|
+
"patterns": [
|
1227
|
+
{
|
1228
|
+
"match": "\\\\\\>|\\\\\\\\",
|
1229
|
+
"name": "constant.character.escape.crystal"
|
1230
|
+
},
|
1231
|
+
{
|
1232
|
+
"include": "#nest_ltgt"
|
1233
|
+
}
|
1234
|
+
]
|
1235
|
+
},
|
1236
|
+
{
|
1237
|
+
"begin": "%w\\{",
|
1238
|
+
"beginCaptures": {
|
1239
|
+
"0": {
|
1240
|
+
"name": "punctuation.section.array.begin.crystal"
|
1241
|
+
}
|
1242
|
+
},
|
1243
|
+
"comment": "array of strings literal with {} delimitor",
|
1244
|
+
"end": "\\}",
|
1245
|
+
"endCaptures": {
|
1246
|
+
"0": {
|
1247
|
+
"name": "punctuation.section.array.end.crystal"
|
1248
|
+
}
|
1249
|
+
},
|
1250
|
+
"name": "string.quoted.other.crystal",
|
1251
|
+
"patterns": [
|
1252
|
+
{
|
1253
|
+
"match": "\\\\\\}|\\\\\\\\",
|
1254
|
+
"name": "constant.character.escape.crystal"
|
1255
|
+
},
|
1256
|
+
{
|
1257
|
+
"include": "#nest_curly"
|
1258
|
+
}
|
1259
|
+
]
|
1260
|
+
},
|
1261
|
+
{
|
1262
|
+
"begin": "%w([^\\w])",
|
1263
|
+
"beginCaptures": {
|
1264
|
+
"0": {
|
1265
|
+
"name": "punctuation.section.array.begin.crystal"
|
1266
|
+
}
|
1267
|
+
},
|
1268
|
+
"comment": "array of strings literal with wildcard delimitor",
|
1269
|
+
"end": "\\1",
|
1270
|
+
"endCaptures": {
|
1271
|
+
"0": {
|
1272
|
+
"name": "punctuation.section.array.end.crystal"
|
1273
|
+
}
|
1274
|
+
},
|
1275
|
+
"name": "string.quoted.other.crystal",
|
1276
|
+
"patterns": [
|
1277
|
+
{
|
1278
|
+
"comment": "Cant be named because its not neccesarily an escape.",
|
1279
|
+
"match": "\\\\."
|
1280
|
+
}
|
1281
|
+
]
|
1282
|
+
},
|
1283
|
+
{
|
1284
|
+
"begin": "%Q\\(",
|
1285
|
+
"beginCaptures": {
|
1286
|
+
"0": {
|
1287
|
+
"name": "punctuation.definition.string.begin.crystal"
|
1288
|
+
}
|
1289
|
+
},
|
1290
|
+
"comment": "string literal with interpolation and () delimitor",
|
1291
|
+
"end": "\\)",
|
1292
|
+
"endCaptures": {
|
1293
|
+
"0": {
|
1294
|
+
"name": "punctuation.definition.string.end.crystal"
|
1295
|
+
}
|
1296
|
+
},
|
1297
|
+
"name": "string.quoted.other.interpolated.crystal",
|
1298
|
+
"patterns": [
|
1299
|
+
{
|
1300
|
+
"include": "#interpolated_crystal"
|
1301
|
+
},
|
1302
|
+
{
|
1303
|
+
"include": "#escaped_char"
|
1304
|
+
},
|
1305
|
+
{
|
1306
|
+
"include": "#nest_parens_i"
|
1307
|
+
}
|
1308
|
+
]
|
1309
|
+
},
|
1310
|
+
{
|
1311
|
+
"begin": "%Q\\[",
|
1312
|
+
"beginCaptures": {
|
1313
|
+
"0": {
|
1314
|
+
"name": "punctuation.definition.string.begin.crystal"
|
1315
|
+
}
|
1316
|
+
},
|
1317
|
+
"comment": "string literal with interpolation and [] delimitor",
|
1318
|
+
"end": "\\]",
|
1319
|
+
"endCaptures": {
|
1320
|
+
"0": {
|
1321
|
+
"name": "punctuation.definition.string.end.crystal"
|
1322
|
+
}
|
1323
|
+
},
|
1324
|
+
"name": "string.quoted.other.interpolated.crystal",
|
1325
|
+
"patterns": [
|
1326
|
+
{
|
1327
|
+
"include": "#interpolated_crystal"
|
1328
|
+
},
|
1329
|
+
{
|
1330
|
+
"include": "#escaped_char"
|
1331
|
+
},
|
1332
|
+
{
|
1333
|
+
"include": "#nest_brackets_i"
|
1334
|
+
}
|
1335
|
+
]
|
1336
|
+
},
|
1337
|
+
{
|
1338
|
+
"begin": "%Q\\<",
|
1339
|
+
"beginCaptures": {
|
1340
|
+
"0": {
|
1341
|
+
"name": "punctuation.definition.string.begin.crystal"
|
1342
|
+
}
|
1343
|
+
},
|
1344
|
+
"comment": "string literal with interpolation and <> delimitor",
|
1345
|
+
"end": "\\>",
|
1346
|
+
"endCaptures": {
|
1347
|
+
"0": {
|
1348
|
+
"name": "punctuation.definition.string.end.crystal"
|
1349
|
+
}
|
1350
|
+
},
|
1351
|
+
"name": "string.quoted.other.interpolated.crystal",
|
1352
|
+
"patterns": [
|
1353
|
+
{
|
1354
|
+
"include": "#interpolated_crystal"
|
1355
|
+
},
|
1356
|
+
{
|
1357
|
+
"include": "#escaped_char"
|
1358
|
+
},
|
1359
|
+
{
|
1360
|
+
"include": "#nest_ltgt_i"
|
1361
|
+
}
|
1362
|
+
]
|
1363
|
+
},
|
1364
|
+
{
|
1365
|
+
"begin": "%Q\\{",
|
1366
|
+
"beginCaptures": {
|
1367
|
+
"0": {
|
1368
|
+
"name": "punctuation.definition.string.begin.crystal"
|
1369
|
+
}
|
1370
|
+
},
|
1371
|
+
"comment": "string literal with interpolation and {} delimitor",
|
1372
|
+
"end": "\\}",
|
1373
|
+
"endCaptures": {
|
1374
|
+
"0": {
|
1375
|
+
"name": "punctuation.definition.string.end.crystal"
|
1376
|
+
}
|
1377
|
+
},
|
1378
|
+
"name": "string.quoted.other.interpolated.crystal",
|
1379
|
+
"patterns": [
|
1380
|
+
{
|
1381
|
+
"include": "#interpolated_crystal"
|
1382
|
+
},
|
1383
|
+
{
|
1384
|
+
"include": "#escaped_char"
|
1385
|
+
},
|
1386
|
+
{
|
1387
|
+
"include": "#nest_curly_i"
|
1388
|
+
}
|
1389
|
+
]
|
1390
|
+
},
|
1391
|
+
{
|
1392
|
+
"begin": "%Q([^\\w])",
|
1393
|
+
"beginCaptures": {
|
1394
|
+
"0": {
|
1395
|
+
"name": "punctuation.definition.string.begin.crystal"
|
1396
|
+
}
|
1397
|
+
},
|
1398
|
+
"comment": "string literal with interpolation and wildcard delimitor",
|
1399
|
+
"end": "\\1",
|
1400
|
+
"endCaptures": {
|
1401
|
+
"0": {
|
1402
|
+
"name": "punctuation.definition.string.end.crystal"
|
1403
|
+
}
|
1404
|
+
},
|
1405
|
+
"name": "string.quoted.other.interpolated.crystal",
|
1406
|
+
"patterns": [
|
1407
|
+
{
|
1408
|
+
"include": "#interpolated_crystal"
|
1409
|
+
},
|
1410
|
+
{
|
1411
|
+
"include": "#escaped_char"
|
1412
|
+
}
|
1413
|
+
]
|
1414
|
+
},
|
1415
|
+
{
|
1416
|
+
"begin": "%\\{",
|
1417
|
+
"beginCaptures": {
|
1418
|
+
"0": {
|
1419
|
+
"name": "punctuation.definition.string.begin.crystal"
|
1420
|
+
}
|
1421
|
+
},
|
1422
|
+
"end": "\\}",
|
1423
|
+
"endCaptures": {
|
1424
|
+
"0": {
|
1425
|
+
"name": "punctuation.definition.string.end.crystal"
|
1426
|
+
}
|
1427
|
+
},
|
1428
|
+
"name": "string.quoted.other.interpolated.crystal",
|
1429
|
+
"patterns": [
|
1430
|
+
{
|
1431
|
+
"include": "#interpolated_crystal"
|
1432
|
+
},
|
1433
|
+
{
|
1434
|
+
"include": "#escaped_char"
|
1435
|
+
},
|
1436
|
+
{
|
1437
|
+
"include": "#nest_curly"
|
1438
|
+
}
|
1439
|
+
]
|
1440
|
+
},
|
1441
|
+
{
|
1442
|
+
"begin": "%\\[",
|
1443
|
+
"beginCaptures": {
|
1444
|
+
"0": {
|
1445
|
+
"name": "punctuation.definition.string.begin.crystal"
|
1446
|
+
}
|
1447
|
+
},
|
1448
|
+
"end": "\\]",
|
1449
|
+
"endCaptures": {
|
1450
|
+
"0": {
|
1451
|
+
"name": "punctuation.definition.string.end.crystal"
|
1452
|
+
}
|
1453
|
+
},
|
1454
|
+
"name": "string.quoted.other.interpolated.crystal",
|
1455
|
+
"patterns": [
|
1456
|
+
{
|
1457
|
+
"include": "#interpolated_crystal"
|
1458
|
+
},
|
1459
|
+
{
|
1460
|
+
"include": "#escaped_char"
|
1461
|
+
},
|
1462
|
+
{
|
1463
|
+
"include": "#nest_brackets"
|
1464
|
+
}
|
1465
|
+
]
|
1466
|
+
},
|
1467
|
+
{
|
1468
|
+
"begin": "%\\(",
|
1469
|
+
"beginCaptures": {
|
1470
|
+
"0": {
|
1471
|
+
"name": "punctuation.definition.string.begin.crystal"
|
1472
|
+
}
|
1473
|
+
},
|
1474
|
+
"end": "\\)",
|
1475
|
+
"endCaptures": {
|
1476
|
+
"0": {
|
1477
|
+
"name": "punctuation.definition.string.end.crystal"
|
1478
|
+
}
|
1479
|
+
},
|
1480
|
+
"name": "string.quoted.other.interpolated.crystal",
|
1481
|
+
"patterns": [
|
1482
|
+
{
|
1483
|
+
"include": "#interpolated_crystal"
|
1484
|
+
},
|
1485
|
+
{
|
1486
|
+
"include": "#escaped_char"
|
1487
|
+
},
|
1488
|
+
{
|
1489
|
+
"include": "#nest_parens"
|
1490
|
+
}
|
1491
|
+
]
|
1492
|
+
},
|
1493
|
+
{
|
1494
|
+
"begin": "%\\<",
|
1495
|
+
"beginCaptures": {
|
1496
|
+
"0": {
|
1497
|
+
"name": "punctuation.definition.string.begin.crystal"
|
1498
|
+
}
|
1499
|
+
},
|
1500
|
+
"end": "\\>",
|
1501
|
+
"endCaptures": {
|
1502
|
+
"0": {
|
1503
|
+
"name": "punctuation.definition.string.end.crystal"
|
1504
|
+
}
|
1505
|
+
},
|
1506
|
+
"name": "string.quoted.other.interpolated.crystal",
|
1507
|
+
"patterns": [
|
1508
|
+
{
|
1509
|
+
"include": "#interpolated_crystal"
|
1510
|
+
},
|
1511
|
+
{
|
1512
|
+
"include": "#escaped_char"
|
1513
|
+
},
|
1514
|
+
{
|
1515
|
+
"include": "#nest_ltgt"
|
1516
|
+
}
|
1517
|
+
]
|
1518
|
+
},
|
1519
|
+
{
|
1520
|
+
"begin": "%q\\(",
|
1521
|
+
"beginCaptures": {
|
1522
|
+
"0": {
|
1523
|
+
"name": "punctuation.definition.string.begin.crystal"
|
1524
|
+
}
|
1525
|
+
},
|
1526
|
+
"comment": "string literal with () delimitor",
|
1527
|
+
"end": "\\)",
|
1528
|
+
"endCaptures": {
|
1529
|
+
"0": {
|
1530
|
+
"name": "punctuation.definition.string.end.crystal"
|
1531
|
+
}
|
1532
|
+
},
|
1533
|
+
"name": "string.quoted.other.crystal",
|
1534
|
+
"patterns": [
|
1535
|
+
{
|
1536
|
+
"match": "\\\\\\)|\\\\\\\\",
|
1537
|
+
"name": "constant.character.escape.crystal"
|
1538
|
+
},
|
1539
|
+
{
|
1540
|
+
"include": "#nest_parens"
|
1541
|
+
}
|
1542
|
+
]
|
1543
|
+
},
|
1544
|
+
{
|
1545
|
+
"begin": "%q\\<",
|
1546
|
+
"beginCaptures": {
|
1547
|
+
"0": {
|
1548
|
+
"name": "punctuation.definition.string.begin.crystal"
|
1549
|
+
}
|
1550
|
+
},
|
1551
|
+
"comment": "string literal with <> delimitor",
|
1552
|
+
"end": "\\>",
|
1553
|
+
"endCaptures": {
|
1554
|
+
"0": {
|
1555
|
+
"name": "punctuation.definition.string.end.crystal"
|
1556
|
+
}
|
1557
|
+
},
|
1558
|
+
"name": "string.quoted.other.crystal",
|
1559
|
+
"patterns": [
|
1560
|
+
{
|
1561
|
+
"match": "\\\\\\>|\\\\\\\\",
|
1562
|
+
"name": "constant.character.escape.crystal"
|
1563
|
+
},
|
1564
|
+
{
|
1565
|
+
"include": "#nest_ltgt"
|
1566
|
+
}
|
1567
|
+
]
|
1568
|
+
},
|
1569
|
+
{
|
1570
|
+
"begin": "%q\\[",
|
1571
|
+
"beginCaptures": {
|
1572
|
+
"0": {
|
1573
|
+
"name": "punctuation.definition.string.begin.crystal"
|
1574
|
+
}
|
1575
|
+
},
|
1576
|
+
"comment": "string literal with [] delimitor",
|
1577
|
+
"end": "\\]",
|
1578
|
+
"endCaptures": {
|
1579
|
+
"0": {
|
1580
|
+
"name": "punctuation.definition.string.end.crystal"
|
1581
|
+
}
|
1582
|
+
},
|
1583
|
+
"name": "string.quoted.other.crystal",
|
1584
|
+
"patterns": [
|
1585
|
+
{
|
1586
|
+
"match": "\\\\\\]|\\\\\\\\",
|
1587
|
+
"name": "constant.character.escape.crystal"
|
1588
|
+
},
|
1589
|
+
{
|
1590
|
+
"include": "#nest_brackets"
|
1591
|
+
}
|
1592
|
+
]
|
1593
|
+
},
|
1594
|
+
{
|
1595
|
+
"begin": "%q\\{",
|
1596
|
+
"beginCaptures": {
|
1597
|
+
"0": {
|
1598
|
+
"name": "punctuation.definition.string.begin.crystal"
|
1599
|
+
}
|
1600
|
+
},
|
1601
|
+
"comment": "string literal with {} delimitor",
|
1602
|
+
"end": "\\}",
|
1603
|
+
"endCaptures": {
|
1604
|
+
"0": {
|
1605
|
+
"name": "punctuation.definition.string.end.crystal"
|
1606
|
+
}
|
1607
|
+
},
|
1608
|
+
"name": "string.quoted.other.crystal",
|
1609
|
+
"patterns": [
|
1610
|
+
{
|
1611
|
+
"match": "\\\\\\}|\\\\\\\\",
|
1612
|
+
"name": "constant.character.escape.crystal"
|
1613
|
+
},
|
1614
|
+
{
|
1615
|
+
"include": "#nest_curly"
|
1616
|
+
}
|
1617
|
+
]
|
1618
|
+
},
|
1619
|
+
{
|
1620
|
+
"begin": "%q([^\\w])",
|
1621
|
+
"beginCaptures": {
|
1622
|
+
"0": {
|
1623
|
+
"name": "punctuation.definition.string.begin.crystal"
|
1624
|
+
}
|
1625
|
+
},
|
1626
|
+
"comment": "string literal with wildcard delimitor",
|
1627
|
+
"end": "\\1",
|
1628
|
+
"endCaptures": {
|
1629
|
+
"0": {
|
1630
|
+
"name": "punctuation.definition.string.end.crystal"
|
1631
|
+
}
|
1632
|
+
},
|
1633
|
+
"name": "string.quoted.other.crystal",
|
1634
|
+
"patterns": [
|
1635
|
+
{
|
1636
|
+
"comment": "Cant be named because its not neccesarily an escape.",
|
1637
|
+
"match": "\\\\."
|
1638
|
+
}
|
1639
|
+
]
|
1640
|
+
},
|
1641
|
+
{
|
1642
|
+
"begin": "%s\\(",
|
1643
|
+
"beginCaptures": {
|
1644
|
+
"0": {
|
1645
|
+
"name": "punctuation.definition.symbol.begin.crystal"
|
1646
|
+
}
|
1647
|
+
},
|
1648
|
+
"comment": "symbol literal with () delimitor",
|
1649
|
+
"end": "\\)",
|
1650
|
+
"endCaptures": {
|
1651
|
+
"0": {
|
1652
|
+
"name": "punctuation.definition.symbol.end.crystal"
|
1653
|
+
}
|
1654
|
+
},
|
1655
|
+
"name": "constant.other.symbol.crystal",
|
1656
|
+
"patterns": [
|
1657
|
+
{
|
1658
|
+
"match": "\\\\\\)|\\\\\\\\",
|
1659
|
+
"name": "constant.character.escape.crystal"
|
1660
|
+
},
|
1661
|
+
{
|
1662
|
+
"include": "#nest_parens"
|
1663
|
+
}
|
1664
|
+
]
|
1665
|
+
},
|
1666
|
+
{
|
1667
|
+
"begin": "%s\\<",
|
1668
|
+
"beginCaptures": {
|
1669
|
+
"0": {
|
1670
|
+
"name": "punctuation.definition.symbol.begin.crystal"
|
1671
|
+
}
|
1672
|
+
},
|
1673
|
+
"comment": "symbol literal with <> delimitor",
|
1674
|
+
"end": "\\>",
|
1675
|
+
"endCaptures": {
|
1676
|
+
"0": {
|
1677
|
+
"name": "punctuation.definition.symbol.end.crystal"
|
1678
|
+
}
|
1679
|
+
},
|
1680
|
+
"name": "constant.other.symbol.crystal",
|
1681
|
+
"patterns": [
|
1682
|
+
{
|
1683
|
+
"match": "\\\\\\>|\\\\\\\\",
|
1684
|
+
"name": "constant.character.escape.crystal"
|
1685
|
+
},
|
1686
|
+
{
|
1687
|
+
"include": "#nest_ltgt"
|
1688
|
+
}
|
1689
|
+
]
|
1690
|
+
},
|
1691
|
+
{
|
1692
|
+
"begin": "%s\\[",
|
1693
|
+
"beginCaptures": {
|
1694
|
+
"0": {
|
1695
|
+
"name": "punctuation.definition.symbol.begin.crystal"
|
1696
|
+
}
|
1697
|
+
},
|
1698
|
+
"comment": "symbol literal with [] delimitor",
|
1699
|
+
"end": "\\]",
|
1700
|
+
"endCaptures": {
|
1701
|
+
"0": {
|
1702
|
+
"name": "punctuation.definition.symbol.end.crystal"
|
1703
|
+
}
|
1704
|
+
},
|
1705
|
+
"name": "constant.other.symbol.crystal",
|
1706
|
+
"patterns": [
|
1707
|
+
{
|
1708
|
+
"match": "\\\\\\]|\\\\\\\\",
|
1709
|
+
"name": "constant.character.escape.crystal"
|
1710
|
+
},
|
1711
|
+
{
|
1712
|
+
"include": "#nest_brackets"
|
1713
|
+
}
|
1714
|
+
]
|
1715
|
+
},
|
1716
|
+
{
|
1717
|
+
"begin": "%s\\{",
|
1718
|
+
"beginCaptures": {
|
1719
|
+
"0": {
|
1720
|
+
"name": "punctuation.definition.symbol.begin.crystal"
|
1721
|
+
}
|
1722
|
+
},
|
1723
|
+
"comment": "symbol literal with {} delimitor",
|
1724
|
+
"end": "\\}",
|
1725
|
+
"endCaptures": {
|
1726
|
+
"0": {
|
1727
|
+
"name": "punctuation.definition.symbol.end.crystal"
|
1728
|
+
}
|
1729
|
+
},
|
1730
|
+
"name": "constant.other.symbol.crystal",
|
1731
|
+
"patterns": [
|
1732
|
+
{
|
1733
|
+
"match": "\\\\\\}|\\\\\\\\",
|
1734
|
+
"name": "constant.character.escape.crystal"
|
1735
|
+
},
|
1736
|
+
{
|
1737
|
+
"include": "#nest_curly"
|
1738
|
+
}
|
1739
|
+
]
|
1740
|
+
},
|
1741
|
+
{
|
1742
|
+
"begin": "%s([^\\w])",
|
1743
|
+
"beginCaptures": {
|
1744
|
+
"0": {
|
1745
|
+
"name": "punctuation.definition.symbol.begin.crystal"
|
1746
|
+
}
|
1747
|
+
},
|
1748
|
+
"comment": "symbol literal with wildcard delimitor",
|
1749
|
+
"end": "\\1",
|
1750
|
+
"endCaptures": {
|
1751
|
+
"0": {
|
1752
|
+
"name": "punctuation.definition.symbol.end.crystal"
|
1753
|
+
}
|
1754
|
+
},
|
1755
|
+
"name": "constant.other.symbol.crystal",
|
1756
|
+
"patterns": [
|
1757
|
+
{
|
1758
|
+
"comment": "Cant be named because its not neccesarily an escape.",
|
1759
|
+
"match": "\\\\."
|
1760
|
+
}
|
1761
|
+
]
|
1762
|
+
},
|
1763
|
+
{
|
1764
|
+
"captures": {
|
1765
|
+
"1": {
|
1766
|
+
"name": "punctuation.definition.constant.crystal"
|
1767
|
+
}
|
1768
|
+
},
|
1769
|
+
"comment": "symbols",
|
1770
|
+
"match": "(?<!:)(:)(?>[$a-zA-Z_]\\w*(?>[?!]|=(?![>=]))?|===?|<=>|>[>=]?|<[<=]?|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\]=?|@@?[a-zA-Z_]\\w*)",
|
1771
|
+
"name": "constant.other.symbol.crystal"
|
1772
|
+
},
|
1773
|
+
{
|
1774
|
+
"begin": "^=begin",
|
1775
|
+
"captures": {
|
1776
|
+
"0": {
|
1777
|
+
"name": "punctuation.definition.comment.crystal"
|
1778
|
+
}
|
1779
|
+
},
|
1780
|
+
"comment": "multiline comments",
|
1781
|
+
"end": "^=end",
|
1782
|
+
"name": "comment.block.documentation.crystal"
|
1783
|
+
},
|
1784
|
+
{
|
1785
|
+
"begin": "(^[ \\t]+)?(?=#)",
|
1786
|
+
"beginCaptures": {
|
1787
|
+
"1": {
|
1788
|
+
"name": "punctuation.whitespace.comment.leading.crystal"
|
1789
|
+
}
|
1790
|
+
},
|
1791
|
+
"end": "(?!\\G)",
|
1792
|
+
"patterns": [
|
1793
|
+
{
|
1794
|
+
"begin": "#",
|
1795
|
+
"beginCaptures": {
|
1796
|
+
"0": {
|
1797
|
+
"name": "punctuation.definition.comment.crystal"
|
1798
|
+
}
|
1799
|
+
},
|
1800
|
+
"end": "\\n",
|
1801
|
+
"name": "comment.line.number-sign.crystal",
|
1802
|
+
"patterns": [
|
1803
|
+
{
|
1804
|
+
"include": "#yard"
|
1805
|
+
}
|
1806
|
+
]
|
1807
|
+
}
|
1808
|
+
]
|
1809
|
+
},
|
1810
|
+
{
|
1811
|
+
"comment": "\n\t\t\tmatches questionmark-letters.\n\n\t\t\texamples (1st alternation = hex):\n\t\t\t?\\x1 ?\\x61\n\n\t\t\texamples (2nd alternation = octal):\n\t\t\t?\\0 ?\\07 ?\\017\n\n\t\t\texamples (3rd alternation = escaped):\n\t\t\t?\\n ?\\b\n\n\t\t\texamples (4th alternation = meta-ctrl):\n\t\t\t?\\C-a ?\\M-a ?\\C-\\M-\\C-\\M-a\n\n\t\t\texamples (4th alternation = normal):\n\t\t\t?a ?A ?0 \n\t\t\t?* ?\" ?( \n\t\t\t?. ?#\n\t\t\t\n\t\t\t\n\t\t\tthe negative lookbehind prevents against matching\n\t\t\tp(42.tainted?)\n\t\t\t",
|
1812
|
+
"match": "(?<!\\w)\\?(\\\\(x\\h{1,2}(?!\\h)\\b|0[0-7]{0,2}(?![0-7])\\b|[^x0MC])|(\\\\[MC]-)+\\w|[^\\s\\\\])",
|
1813
|
+
"name": "constant.numeric.crystal"
|
1814
|
+
},
|
1815
|
+
{
|
1816
|
+
"begin": "^__END__\\n",
|
1817
|
+
"captures": {
|
1818
|
+
"0": {
|
1819
|
+
"name": "string.unquoted.program-block.crystal"
|
1820
|
+
}
|
1821
|
+
},
|
1822
|
+
"comment": "__END__ marker",
|
1823
|
+
"contentName": "text.plain",
|
1824
|
+
"end": "(?=not)impossible",
|
1825
|
+
"patterns": [
|
1826
|
+
{
|
1827
|
+
"begin": "(?=<?xml|<(?i:html\\b)|!DOCTYPE (?i:html\\b))",
|
1828
|
+
"end": "(?=not)impossible",
|
1829
|
+
"name": "text.html.embedded.crystal",
|
1830
|
+
"patterns": [
|
1831
|
+
{
|
1832
|
+
"include": "text.html.basic"
|
1833
|
+
}
|
1834
|
+
]
|
1835
|
+
}
|
1836
|
+
]
|
1837
|
+
},
|
1838
|
+
{
|
1839
|
+
"begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)HTML)\\b\\1))",
|
1840
|
+
"comment": "Heredoc with embedded html",
|
1841
|
+
"end": "(?!\\G)",
|
1842
|
+
"name": "meta.embedded.block.html",
|
1843
|
+
"patterns": [
|
1844
|
+
{
|
1845
|
+
"begin": "(?><<-(\"?)((?:[_\\w]+_|)HTML)\\b\\1)",
|
1846
|
+
"beginCaptures": {
|
1847
|
+
"0": {
|
1848
|
+
"name": "punctuation.definition.string.begin.crystal"
|
1849
|
+
}
|
1850
|
+
},
|
1851
|
+
"contentName": "text.html",
|
1852
|
+
"end": "\\s*\\2$\\n?",
|
1853
|
+
"endCaptures": {
|
1854
|
+
"0": {
|
1855
|
+
"name": "punctuation.definition.string.end.crystal"
|
1856
|
+
}
|
1857
|
+
},
|
1858
|
+
"name": "string.unquoted.heredoc.crystal",
|
1859
|
+
"patterns": [
|
1860
|
+
{
|
1861
|
+
"include": "#heredoc"
|
1862
|
+
},
|
1863
|
+
{
|
1864
|
+
"include": "#interpolated_crystal"
|
1865
|
+
},
|
1866
|
+
{
|
1867
|
+
"include": "text.html.basic"
|
1868
|
+
},
|
1869
|
+
{
|
1870
|
+
"include": "#escaped_char"
|
1871
|
+
}
|
1872
|
+
]
|
1873
|
+
}
|
1874
|
+
]
|
1875
|
+
},
|
1876
|
+
{
|
1877
|
+
"begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)SQL)\\b\\1))",
|
1878
|
+
"comment": "Heredoc with embedded sql",
|
1879
|
+
"end": "(?!\\G)",
|
1880
|
+
"name": "meta.embedded.block.sql",
|
1881
|
+
"patterns": [
|
1882
|
+
{
|
1883
|
+
"begin": "(?><<-(\"?)((?:[_\\w]+_|)SQL)\\b\\1)",
|
1884
|
+
"beginCaptures": {
|
1885
|
+
"0": {
|
1886
|
+
"name": "punctuation.definition.string.begin.crystal"
|
1887
|
+
}
|
1888
|
+
},
|
1889
|
+
"contentName": "source.sql",
|
1890
|
+
"end": "\\s*\\2$\\n?",
|
1891
|
+
"endCaptures": {
|
1892
|
+
"0": {
|
1893
|
+
"name": "punctuation.definition.string.end.crystal"
|
1894
|
+
}
|
1895
|
+
},
|
1896
|
+
"name": "string.unquoted.heredoc.crystal",
|
1897
|
+
"patterns": [
|
1898
|
+
{
|
1899
|
+
"include": "#heredoc"
|
1900
|
+
},
|
1901
|
+
{
|
1902
|
+
"include": "#interpolated_crystal"
|
1903
|
+
},
|
1904
|
+
{
|
1905
|
+
"include": "source.sql"
|
1906
|
+
},
|
1907
|
+
{
|
1908
|
+
"include": "#escaped_char"
|
1909
|
+
}
|
1910
|
+
]
|
1911
|
+
}
|
1912
|
+
]
|
1913
|
+
},
|
1914
|
+
{
|
1915
|
+
"begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)CSS)\\b\\1))",
|
1916
|
+
"comment": "Heredoc with embedded css",
|
1917
|
+
"end": "(?!\\G)",
|
1918
|
+
"name": "meta.embedded.block.css",
|
1919
|
+
"patterns": [
|
1920
|
+
{
|
1921
|
+
"begin": "(?><<-(\"?)((?:[_\\w]+_|)CSS)\\b\\1)",
|
1922
|
+
"beginCaptures": {
|
1923
|
+
"0": {
|
1924
|
+
"name": "punctuation.definition.string.begin.crystal"
|
1925
|
+
}
|
1926
|
+
},
|
1927
|
+
"contentName": "source.css",
|
1928
|
+
"end": "\\s*\\2$\\n?",
|
1929
|
+
"endCaptures": {
|
1930
|
+
"0": {
|
1931
|
+
"name": "punctuation.definition.string.end.crystal"
|
1932
|
+
}
|
1933
|
+
},
|
1934
|
+
"name": "string.unquoted.heredoc.crystal",
|
1935
|
+
"patterns": [
|
1936
|
+
{
|
1937
|
+
"include": "#heredoc"
|
1938
|
+
},
|
1939
|
+
{
|
1940
|
+
"include": "#interpolated_crystal"
|
1941
|
+
},
|
1942
|
+
{
|
1943
|
+
"include": "source.css"
|
1944
|
+
},
|
1945
|
+
{
|
1946
|
+
"include": "#escaped_char"
|
1947
|
+
}
|
1948
|
+
]
|
1949
|
+
}
|
1950
|
+
]
|
1951
|
+
},
|
1952
|
+
{
|
1953
|
+
"begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)CPP)\\b\\1))",
|
1954
|
+
"comment": "Heredoc with embedded c++",
|
1955
|
+
"end": "(?!\\G)",
|
1956
|
+
"name": "meta.embedded.block.cpp",
|
1957
|
+
"patterns": [
|
1958
|
+
{
|
1959
|
+
"begin": "(?><<-(\"?)((?:[_\\w]+_|)CPP)\\b\\1)",
|
1960
|
+
"beginCaptures": {
|
1961
|
+
"0": {
|
1962
|
+
"name": "punctuation.definition.string.begin.crystal"
|
1963
|
+
}
|
1964
|
+
},
|
1965
|
+
"contentName": "source.cpp",
|
1966
|
+
"end": "\\s*\\2$\\n?",
|
1967
|
+
"endCaptures": {
|
1968
|
+
"0": {
|
1969
|
+
"name": "punctuation.definition.string.end.crystal"
|
1970
|
+
}
|
1971
|
+
},
|
1972
|
+
"name": "string.unquoted.heredoc.crystal",
|
1973
|
+
"patterns": [
|
1974
|
+
{
|
1975
|
+
"include": "#heredoc"
|
1976
|
+
},
|
1977
|
+
{
|
1978
|
+
"include": "#interpolated_crystal"
|
1979
|
+
},
|
1980
|
+
{
|
1981
|
+
"include": "source.cpp"
|
1982
|
+
},
|
1983
|
+
{
|
1984
|
+
"include": "#escaped_char"
|
1985
|
+
}
|
1986
|
+
]
|
1987
|
+
}
|
1988
|
+
]
|
1989
|
+
},
|
1990
|
+
{
|
1991
|
+
"begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)C)\\b\\1))",
|
1992
|
+
"comment": "Heredoc with embedded c",
|
1993
|
+
"end": "(?!\\G)",
|
1994
|
+
"name": "meta.embedded.block.c",
|
1995
|
+
"patterns": [
|
1996
|
+
{
|
1997
|
+
"begin": "(?><<-(\"?)((?:[_\\w]+_|)C)\\b\\1)",
|
1998
|
+
"beginCaptures": {
|
1999
|
+
"0": {
|
2000
|
+
"name": "punctuation.definition.string.begin.crystal"
|
2001
|
+
}
|
2002
|
+
},
|
2003
|
+
"contentName": "source.c",
|
2004
|
+
"end": "\\s*\\2$\\n?",
|
2005
|
+
"endCaptures": {
|
2006
|
+
"0": {
|
2007
|
+
"name": "punctuation.definition.string.end.crystal"
|
2008
|
+
}
|
2009
|
+
},
|
2010
|
+
"name": "string.unquoted.heredoc.crystal",
|
2011
|
+
"patterns": [
|
2012
|
+
{
|
2013
|
+
"include": "#heredoc"
|
2014
|
+
},
|
2015
|
+
{
|
2016
|
+
"include": "#interpolated_crystal"
|
2017
|
+
},
|
2018
|
+
{
|
2019
|
+
"include": "source.c"
|
2020
|
+
},
|
2021
|
+
{
|
2022
|
+
"include": "#escaped_char"
|
2023
|
+
}
|
2024
|
+
]
|
2025
|
+
}
|
2026
|
+
]
|
2027
|
+
},
|
2028
|
+
{
|
2029
|
+
"begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)(?:JS|JAVASCRIPT))\\b\\1))",
|
2030
|
+
"comment": "Heredoc with embedded javascript",
|
2031
|
+
"end": "(?!\\G)",
|
2032
|
+
"name": "meta.embedded.block.js",
|
2033
|
+
"patterns": [
|
2034
|
+
{
|
2035
|
+
"begin": "(?><<-(\"?)((?:[_\\w]+_|)(?:JS|JAVASCRIPT))\\b\\1)",
|
2036
|
+
"beginCaptures": {
|
2037
|
+
"0": {
|
2038
|
+
"name": "punctuation.definition.string.begin.crystal"
|
2039
|
+
}
|
2040
|
+
},
|
2041
|
+
"contentName": "source.js",
|
2042
|
+
"end": "\\s*\\2$\\n?",
|
2043
|
+
"endCaptures": {
|
2044
|
+
"0": {
|
2045
|
+
"name": "punctuation.definition.string.end.crystal"
|
2046
|
+
}
|
2047
|
+
},
|
2048
|
+
"name": "string.unquoted.heredoc.crystal",
|
2049
|
+
"patterns": [
|
2050
|
+
{
|
2051
|
+
"include": "#heredoc"
|
2052
|
+
},
|
2053
|
+
{
|
2054
|
+
"include": "#interpolated_crystal"
|
2055
|
+
},
|
2056
|
+
{
|
2057
|
+
"include": "source.js"
|
2058
|
+
},
|
2059
|
+
{
|
2060
|
+
"include": "#escaped_char"
|
2061
|
+
}
|
2062
|
+
]
|
2063
|
+
}
|
2064
|
+
]
|
2065
|
+
},
|
2066
|
+
{
|
2067
|
+
"begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)JQUERY)\\b\\1))",
|
2068
|
+
"comment": "Heredoc with embedded jQuery javascript",
|
2069
|
+
"end": "(?!\\G)",
|
2070
|
+
"name": "meta.embedded.block.js.jquery",
|
2071
|
+
"patterns": [
|
2072
|
+
{
|
2073
|
+
"begin": "(?><<-(\"?)((?:[_\\w]+_|)JQUERY)\\b\\1)",
|
2074
|
+
"beginCaptures": {
|
2075
|
+
"0": {
|
2076
|
+
"name": "punctuation.definition.string.begin.crystal"
|
2077
|
+
}
|
2078
|
+
},
|
2079
|
+
"contentName": "source.js.jquery",
|
2080
|
+
"end": "\\s*\\2$\\n?",
|
2081
|
+
"endCaptures": {
|
2082
|
+
"0": {
|
2083
|
+
"name": "punctuation.definition.string.end.crystal"
|
2084
|
+
}
|
2085
|
+
},
|
2086
|
+
"name": "string.unquoted.heredoc.crystal",
|
2087
|
+
"patterns": [
|
2088
|
+
{
|
2089
|
+
"include": "#heredoc"
|
2090
|
+
},
|
2091
|
+
{
|
2092
|
+
"include": "#interpolated_crystal"
|
2093
|
+
},
|
2094
|
+
{
|
2095
|
+
"include": "source.js.jquery"
|
2096
|
+
},
|
2097
|
+
{
|
2098
|
+
"include": "#escaped_char"
|
2099
|
+
}
|
2100
|
+
]
|
2101
|
+
}
|
2102
|
+
]
|
2103
|
+
},
|
2104
|
+
{
|
2105
|
+
"begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)(?:SH|SHELL))\\b\\1))",
|
2106
|
+
"comment": "Heredoc with embedded shell",
|
2107
|
+
"end": "(?!\\G)",
|
2108
|
+
"name": "meta.embedded.block.shell",
|
2109
|
+
"patterns": [
|
2110
|
+
{
|
2111
|
+
"begin": "(?><<-(\"?)((?:[_\\w]+_|)(?:SH|SHELL))\\b\\1)",
|
2112
|
+
"beginCaptures": {
|
2113
|
+
"0": {
|
2114
|
+
"name": "punctuation.definition.string.begin.crystal"
|
2115
|
+
}
|
2116
|
+
},
|
2117
|
+
"contentName": "source.shell",
|
2118
|
+
"end": "\\s*\\2$\\n?",
|
2119
|
+
"endCaptures": {
|
2120
|
+
"0": {
|
2121
|
+
"name": "punctuation.definition.string.end.crystal"
|
2122
|
+
}
|
2123
|
+
},
|
2124
|
+
"name": "string.unquoted.heredoc.crystal",
|
2125
|
+
"patterns": [
|
2126
|
+
{
|
2127
|
+
"include": "#heredoc"
|
2128
|
+
},
|
2129
|
+
{
|
2130
|
+
"include": "#interpolated_crystal"
|
2131
|
+
},
|
2132
|
+
{
|
2133
|
+
"include": "source.shell"
|
2134
|
+
},
|
2135
|
+
{
|
2136
|
+
"include": "#escaped_char"
|
2137
|
+
}
|
2138
|
+
]
|
2139
|
+
}
|
2140
|
+
]
|
2141
|
+
},
|
2142
|
+
{
|
2143
|
+
"begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)LUA)\\b\\1))",
|
2144
|
+
"comment": "Heredoc with embedded lua",
|
2145
|
+
"end": "(?!\\G)",
|
2146
|
+
"name": "meta.embedded.block.lua",
|
2147
|
+
"patterns": [
|
2148
|
+
{
|
2149
|
+
"begin": "(?><<-(\"?)((?:[_\\w]+_|)LUA)\\b\\1)",
|
2150
|
+
"beginCaptures": {
|
2151
|
+
"0": {
|
2152
|
+
"name": "punctuation.definition.string.begin.crystal"
|
2153
|
+
}
|
2154
|
+
},
|
2155
|
+
"contentName": "source.lua",
|
2156
|
+
"end": "\\s*\\2$\\n?",
|
2157
|
+
"endCaptures": {
|
2158
|
+
"0": {
|
2159
|
+
"name": "punctuation.definition.string.end.crystal"
|
2160
|
+
}
|
2161
|
+
},
|
2162
|
+
"name": "string.unquoted.heredoc.crystal",
|
2163
|
+
"patterns": [
|
2164
|
+
{
|
2165
|
+
"include": "#heredoc"
|
2166
|
+
},
|
2167
|
+
{
|
2168
|
+
"include": "#interpolated_crystal"
|
2169
|
+
},
|
2170
|
+
{
|
2171
|
+
"include": "source.lua"
|
2172
|
+
},
|
2173
|
+
{
|
2174
|
+
"include": "#escaped_char"
|
2175
|
+
}
|
2176
|
+
]
|
2177
|
+
}
|
2178
|
+
]
|
2179
|
+
},
|
2180
|
+
{
|
2181
|
+
"begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)crystal)\\b\\1))",
|
2182
|
+
"comment": "Heredoc with embedded crystal",
|
2183
|
+
"end": "(?!\\G)",
|
2184
|
+
"name": "meta.embedded.block.crystal",
|
2185
|
+
"patterns": [
|
2186
|
+
{
|
2187
|
+
"begin": "(?><<-(\"?)((?:[_\\w]+_|)crystal)\\b\\1)",
|
2188
|
+
"beginCaptures": {
|
2189
|
+
"0": {
|
2190
|
+
"name": "punctuation.definition.string.begin.crystal"
|
2191
|
+
}
|
2192
|
+
},
|
2193
|
+
"contentName": "source.crystal",
|
2194
|
+
"end": "\\s*\\2$\\n?",
|
2195
|
+
"endCaptures": {
|
2196
|
+
"0": {
|
2197
|
+
"name": "punctuation.definition.string.end.crystal"
|
2198
|
+
}
|
2199
|
+
},
|
2200
|
+
"name": "string.unquoted.heredoc.crystal",
|
2201
|
+
"patterns": [
|
2202
|
+
{
|
2203
|
+
"include": "#heredoc"
|
2204
|
+
},
|
2205
|
+
{
|
2206
|
+
"include": "#interpolated_crystal"
|
2207
|
+
},
|
2208
|
+
{
|
2209
|
+
"include": "source.crystal"
|
2210
|
+
},
|
2211
|
+
{
|
2212
|
+
"include": "#escaped_char"
|
2213
|
+
}
|
2214
|
+
]
|
2215
|
+
}
|
2216
|
+
]
|
2217
|
+
},
|
2218
|
+
{
|
2219
|
+
"begin": "(?>\\=\\s*<<(\\w+))",
|
2220
|
+
"beginCaptures": {
|
2221
|
+
"0": {
|
2222
|
+
"name": "punctuation.definition.string.begin.crystal"
|
2223
|
+
}
|
2224
|
+
},
|
2225
|
+
"end": "^\\1$",
|
2226
|
+
"endCaptures": {
|
2227
|
+
"0": {
|
2228
|
+
"name": "punctuation.definition.string.end.crystal"
|
2229
|
+
}
|
2230
|
+
},
|
2231
|
+
"name": "string.unquoted.heredoc.crystal",
|
2232
|
+
"patterns": [
|
2233
|
+
{
|
2234
|
+
"include": "#heredoc"
|
2235
|
+
},
|
2236
|
+
{
|
2237
|
+
"include": "#interpolated_crystal"
|
2238
|
+
},
|
2239
|
+
{
|
2240
|
+
"include": "#escaped_char"
|
2241
|
+
}
|
2242
|
+
]
|
2243
|
+
},
|
2244
|
+
{
|
2245
|
+
"begin": "(?><<-(\\w+))",
|
2246
|
+
"beginCaptures": {
|
2247
|
+
"0": {
|
2248
|
+
"name": "punctuation.definition.string.begin.crystal"
|
2249
|
+
}
|
2250
|
+
},
|
2251
|
+
"comment": "heredoc with indented terminator",
|
2252
|
+
"end": "\\s*\\1$",
|
2253
|
+
"endCaptures": {
|
2254
|
+
"0": {
|
2255
|
+
"name": "punctuation.definition.string.end.crystal"
|
2256
|
+
}
|
2257
|
+
},
|
2258
|
+
"name": "string.unquoted.heredoc.crystal",
|
2259
|
+
"patterns": [
|
2260
|
+
{
|
2261
|
+
"include": "#heredoc"
|
2262
|
+
},
|
2263
|
+
{
|
2264
|
+
"include": "#interpolated_crystal"
|
2265
|
+
},
|
2266
|
+
{
|
2267
|
+
"include": "#escaped_char"
|
2268
|
+
}
|
2269
|
+
]
|
2270
|
+
},
|
2271
|
+
{
|
2272
|
+
"begin": "(?<=\\{|do|\\{\\s|do\\s)(\\|)",
|
2273
|
+
"captures": {
|
2274
|
+
"1": {
|
2275
|
+
"name": "punctuation.separator.variable.crystal"
|
2276
|
+
}
|
2277
|
+
},
|
2278
|
+
"end": "(\\|)",
|
2279
|
+
"patterns": [
|
2280
|
+
{
|
2281
|
+
"match": "[_a-zA-Z][_a-zA-Z0-9]*",
|
2282
|
+
"name": "variable.other.block.crystal"
|
2283
|
+
},
|
2284
|
+
{
|
2285
|
+
"match": ",",
|
2286
|
+
"name": "punctuation.separator.variable.crystal"
|
2287
|
+
}
|
2288
|
+
]
|
2289
|
+
},
|
2290
|
+
{
|
2291
|
+
"match": "=>",
|
2292
|
+
"name": "punctuation.separator.key-value"
|
2293
|
+
},
|
2294
|
+
{
|
2295
|
+
"match": "<<=|%=|&{1,2}=|\\*=|\\*\\*=|\\+=|\\-=|\\^=|\\|{1,2}=|<<",
|
2296
|
+
"name": "keyword.operator.assignment.augmented.crystal"
|
2297
|
+
},
|
2298
|
+
{
|
2299
|
+
"match": "<=>|<(?!<|=)|>(?!<|=|>)|<=|>=|===|==|=~|!=|!~|(?<=[ \\t])\\?",
|
2300
|
+
"name": "keyword.operator.comparison.crystal"
|
2301
|
+
},
|
2302
|
+
{
|
2303
|
+
"match": "(?<=[ \\t])!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\^",
|
2304
|
+
"name": "keyword.operator.logical.crystal"
|
2305
|
+
},
|
2306
|
+
{
|
2307
|
+
"match": "(%|&|\\*\\*|\\*|\\+|\\-|/)",
|
2308
|
+
"name": "keyword.operator.arithmetic.crystal"
|
2309
|
+
},
|
2310
|
+
{
|
2311
|
+
"match": "=",
|
2312
|
+
"name": "keyword.operator.assignment.crystal"
|
2313
|
+
},
|
2314
|
+
{
|
2315
|
+
"match": "\\||~|>>",
|
2316
|
+
"name": "keyword.operator.other.crystal"
|
2317
|
+
},
|
2318
|
+
{
|
2319
|
+
"match": "\\;",
|
2320
|
+
"name": "punctuation.separator.statement.crystal"
|
2321
|
+
},
|
2322
|
+
{
|
2323
|
+
"match": ",",
|
2324
|
+
"name": "punctuation.separator.object.crystal"
|
2325
|
+
},
|
2326
|
+
{
|
2327
|
+
"comment": "Mark as namespace separator if double colons followed by capital letter",
|
2328
|
+
"match": "(::)\\s*(?=[A-Z])",
|
2329
|
+
"captures": {
|
2330
|
+
"1": {
|
2331
|
+
"name": "punctuation.separator.namespace.crystal"
|
2332
|
+
}
|
2333
|
+
}
|
2334
|
+
},
|
2335
|
+
{
|
2336
|
+
"comment": "Mark as method separator if double colons not followed by capital letter",
|
2337
|
+
"match": "(\\.|::)\\s*(?![A-Z])",
|
2338
|
+
"captures": {
|
2339
|
+
"1": {
|
2340
|
+
"name": "punctuation.separator.method.crystal"
|
2341
|
+
}
|
2342
|
+
}
|
2343
|
+
},
|
2344
|
+
{
|
2345
|
+
"comment": "Must come after method and constant separators to prefer double colons",
|
2346
|
+
"match": ":",
|
2347
|
+
"name": "punctuation.separator.other.crystal"
|
2348
|
+
},
|
2349
|
+
{
|
2350
|
+
"match": "\\{",
|
2351
|
+
"name": "punctuation.section.scope.begin.crystal"
|
2352
|
+
},
|
2353
|
+
{
|
2354
|
+
"match": "\\}",
|
2355
|
+
"name": "punctuation.section.scope.end.crystal"
|
2356
|
+
},
|
2357
|
+
{
|
2358
|
+
"match": "\\[",
|
2359
|
+
"name": "punctuation.section.array.begin.crystal"
|
2360
|
+
},
|
2361
|
+
{
|
2362
|
+
"match": "\\]",
|
2363
|
+
"name": "punctuation.section.array.end.crystal"
|
2364
|
+
},
|
2365
|
+
{
|
2366
|
+
"match": "\\(|\\)",
|
2367
|
+
"name": "punctuation.section.function.crystal"
|
2368
|
+
}
|
2369
|
+
],
|
2370
|
+
"repository": {
|
2371
|
+
"escaped_char": {
|
2372
|
+
"match": "\\\\(?:[0-7]{1,3}|x[\\da-fA-F]{1,2}|.)",
|
2373
|
+
"name": "constant.character.escape.crystal"
|
2374
|
+
},
|
2375
|
+
"heredoc": {
|
2376
|
+
"begin": "^<<-?\\w+",
|
2377
|
+
"end": "$",
|
2378
|
+
"patterns": [
|
2379
|
+
{
|
2380
|
+
"include": "$self"
|
2381
|
+
}
|
2382
|
+
]
|
2383
|
+
},
|
2384
|
+
"interpolated_crystal": {
|
2385
|
+
"patterns": [
|
2386
|
+
{
|
2387
|
+
"begin": "(#\\{)",
|
2388
|
+
"beginCaptures": {
|
2389
|
+
"0": {
|
2390
|
+
"name": "punctuation.section.embedded.begin.crystal"
|
2391
|
+
},
|
2392
|
+
"1": {
|
2393
|
+
"name": "source.crystal"
|
2394
|
+
}
|
2395
|
+
},
|
2396
|
+
"contentName": "source.crystal",
|
2397
|
+
"end": "(\\})",
|
2398
|
+
"endCaptures": {
|
2399
|
+
"0": {
|
2400
|
+
"name": "punctuation.section.embedded.end.crystal"
|
2401
|
+
},
|
2402
|
+
"1": {
|
2403
|
+
"name": "source.crystal"
|
2404
|
+
}
|
2405
|
+
},
|
2406
|
+
"name": "meta.embedded.line.crystal",
|
2407
|
+
"patterns": [
|
2408
|
+
{
|
2409
|
+
"include": "#nest_curly_and_self"
|
2410
|
+
},
|
2411
|
+
{
|
2412
|
+
"include": "$self"
|
2413
|
+
}
|
2414
|
+
]
|
2415
|
+
},
|
2416
|
+
{
|
2417
|
+
"captures": {
|
2418
|
+
"1": {
|
2419
|
+
"name": "punctuation.definition.variable.crystal"
|
2420
|
+
}
|
2421
|
+
},
|
2422
|
+
"match": "(#@)[a-zA-Z_]\\w*",
|
2423
|
+
"name": "variable.other.readwrite.instance.crystal"
|
2424
|
+
},
|
2425
|
+
{
|
2426
|
+
"captures": {
|
2427
|
+
"1": {
|
2428
|
+
"name": "punctuation.definition.variable.crystal"
|
2429
|
+
}
|
2430
|
+
},
|
2431
|
+
"match": "(#@@)[a-zA-Z_]\\w*",
|
2432
|
+
"name": "variable.other.readwrite.class.crystal"
|
2433
|
+
},
|
2434
|
+
{
|
2435
|
+
"captures": {
|
2436
|
+
"1": {
|
2437
|
+
"name": "punctuation.definition.variable.crystal"
|
2438
|
+
}
|
2439
|
+
},
|
2440
|
+
"match": "(#\\$)[a-zA-Z_]\\w*",
|
2441
|
+
"name": "variable.other.readwrite.global.crystal"
|
2442
|
+
}
|
2443
|
+
]
|
2444
|
+
},
|
2445
|
+
"nest_brackets": {
|
2446
|
+
"begin": "\\[",
|
2447
|
+
"captures": {
|
2448
|
+
"0": {
|
2449
|
+
"name": "punctuation.section.scope.crystal"
|
2450
|
+
}
|
2451
|
+
},
|
2452
|
+
"end": "\\]",
|
2453
|
+
"patterns": [
|
2454
|
+
{
|
2455
|
+
"include": "#nest_brackets"
|
2456
|
+
}
|
2457
|
+
]
|
2458
|
+
},
|
2459
|
+
"nest_brackets_i": {
|
2460
|
+
"begin": "\\[",
|
2461
|
+
"captures": {
|
2462
|
+
"0": {
|
2463
|
+
"name": "punctuation.section.scope.crystal"
|
2464
|
+
}
|
2465
|
+
},
|
2466
|
+
"end": "\\]",
|
2467
|
+
"patterns": [
|
2468
|
+
{
|
2469
|
+
"include": "#interpolated_crystal"
|
2470
|
+
},
|
2471
|
+
{
|
2472
|
+
"include": "#escaped_char"
|
2473
|
+
},
|
2474
|
+
{
|
2475
|
+
"include": "#nest_brackets_i"
|
2476
|
+
}
|
2477
|
+
]
|
2478
|
+
},
|
2479
|
+
"nest_brackets_r": {
|
2480
|
+
"begin": "\\[",
|
2481
|
+
"captures": {
|
2482
|
+
"0": {
|
2483
|
+
"name": "punctuation.section.scope.crystal"
|
2484
|
+
}
|
2485
|
+
},
|
2486
|
+
"end": "\\]",
|
2487
|
+
"patterns": [
|
2488
|
+
{
|
2489
|
+
"include": "#regex_sub"
|
2490
|
+
},
|
2491
|
+
{
|
2492
|
+
"include": "#nest_brackets_r"
|
2493
|
+
}
|
2494
|
+
]
|
2495
|
+
},
|
2496
|
+
"nest_curly": {
|
2497
|
+
"begin": "\\{",
|
2498
|
+
"captures": {
|
2499
|
+
"0": {
|
2500
|
+
"name": "punctuation.section.scope.crystal"
|
2501
|
+
}
|
2502
|
+
},
|
2503
|
+
"end": "\\}",
|
2504
|
+
"patterns": [
|
2505
|
+
{
|
2506
|
+
"include": "#nest_curly"
|
2507
|
+
}
|
2508
|
+
]
|
2509
|
+
},
|
2510
|
+
"nest_curly_and_self": {
|
2511
|
+
"patterns": [
|
2512
|
+
{
|
2513
|
+
"begin": "\\{",
|
2514
|
+
"captures": {
|
2515
|
+
"0": {
|
2516
|
+
"name": "punctuation.section.scope.crystal"
|
2517
|
+
}
|
2518
|
+
},
|
2519
|
+
"end": "\\}",
|
2520
|
+
"patterns": [
|
2521
|
+
{
|
2522
|
+
"include": "#nest_curly_and_self"
|
2523
|
+
}
|
2524
|
+
]
|
2525
|
+
},
|
2526
|
+
{
|
2527
|
+
"include": "$self"
|
2528
|
+
}
|
2529
|
+
]
|
2530
|
+
},
|
2531
|
+
"nest_curly_i": {
|
2532
|
+
"begin": "\\{",
|
2533
|
+
"captures": {
|
2534
|
+
"0": {
|
2535
|
+
"name": "punctuation.section.scope.crystal"
|
2536
|
+
}
|
2537
|
+
},
|
2538
|
+
"end": "\\}",
|
2539
|
+
"patterns": [
|
2540
|
+
{
|
2541
|
+
"include": "#interpolated_crystal"
|
2542
|
+
},
|
2543
|
+
{
|
2544
|
+
"include": "#escaped_char"
|
2545
|
+
},
|
2546
|
+
{
|
2547
|
+
"include": "#nest_curly_i"
|
2548
|
+
}
|
2549
|
+
]
|
2550
|
+
},
|
2551
|
+
"nest_curly_r": {
|
2552
|
+
"begin": "\\{",
|
2553
|
+
"captures": {
|
2554
|
+
"0": {
|
2555
|
+
"name": "punctuation.section.scope.crystal"
|
2556
|
+
}
|
2557
|
+
},
|
2558
|
+
"end": "\\}",
|
2559
|
+
"patterns": [
|
2560
|
+
{
|
2561
|
+
"include": "#regex_sub"
|
2562
|
+
},
|
2563
|
+
{
|
2564
|
+
"include": "#nest_curly_r"
|
2565
|
+
}
|
2566
|
+
]
|
2567
|
+
},
|
2568
|
+
"nest_ltgt": {
|
2569
|
+
"begin": "\\<",
|
2570
|
+
"captures": {
|
2571
|
+
"0": {
|
2572
|
+
"name": "punctuation.section.scope.crystal"
|
2573
|
+
}
|
2574
|
+
},
|
2575
|
+
"end": "\\>",
|
2576
|
+
"patterns": [
|
2577
|
+
{
|
2578
|
+
"include": "#nest_ltgt"
|
2579
|
+
}
|
2580
|
+
]
|
2581
|
+
},
|
2582
|
+
"nest_ltgt_i": {
|
2583
|
+
"begin": "\\<",
|
2584
|
+
"captures": {
|
2585
|
+
"0": {
|
2586
|
+
"name": "punctuation.section.scope.crystal"
|
2587
|
+
}
|
2588
|
+
},
|
2589
|
+
"end": "\\>",
|
2590
|
+
"patterns": [
|
2591
|
+
{
|
2592
|
+
"include": "#interpolated_crystal"
|
2593
|
+
},
|
2594
|
+
{
|
2595
|
+
"include": "#escaped_char"
|
2596
|
+
},
|
2597
|
+
{
|
2598
|
+
"include": "#nest_ltgt_i"
|
2599
|
+
}
|
2600
|
+
]
|
2601
|
+
},
|
2602
|
+
"nest_ltgt_r": {
|
2603
|
+
"begin": "\\<",
|
2604
|
+
"captures": {
|
2605
|
+
"0": {
|
2606
|
+
"name": "punctuation.section.scope.crystal"
|
2607
|
+
}
|
2608
|
+
},
|
2609
|
+
"end": "\\>",
|
2610
|
+
"patterns": [
|
2611
|
+
{
|
2612
|
+
"include": "#regex_sub"
|
2613
|
+
},
|
2614
|
+
{
|
2615
|
+
"include": "#nest_ltgt_r"
|
2616
|
+
}
|
2617
|
+
]
|
2618
|
+
},
|
2619
|
+
"nest_parens": {
|
2620
|
+
"begin": "\\(",
|
2621
|
+
"captures": {
|
2622
|
+
"0": {
|
2623
|
+
"name": "punctuation.section.scope.crystal"
|
2624
|
+
}
|
2625
|
+
},
|
2626
|
+
"end": "\\)",
|
2627
|
+
"patterns": [
|
2628
|
+
{
|
2629
|
+
"include": "#nest_parens"
|
2630
|
+
}
|
2631
|
+
]
|
2632
|
+
},
|
2633
|
+
"nest_parens_i": {
|
2634
|
+
"begin": "\\(",
|
2635
|
+
"captures": {
|
2636
|
+
"0": {
|
2637
|
+
"name": "punctuation.section.scope.crystal"
|
2638
|
+
}
|
2639
|
+
},
|
2640
|
+
"end": "\\)",
|
2641
|
+
"patterns": [
|
2642
|
+
{
|
2643
|
+
"include": "#interpolated_crystal"
|
2644
|
+
},
|
2645
|
+
{
|
2646
|
+
"include": "#escaped_char"
|
2647
|
+
},
|
2648
|
+
{
|
2649
|
+
"include": "#nest_parens_i"
|
2650
|
+
}
|
2651
|
+
]
|
2652
|
+
},
|
2653
|
+
"nest_parens_r": {
|
2654
|
+
"begin": "\\(",
|
2655
|
+
"captures": {
|
2656
|
+
"0": {
|
2657
|
+
"name": "punctuation.section.scope.crystal"
|
2658
|
+
}
|
2659
|
+
},
|
2660
|
+
"end": "\\)",
|
2661
|
+
"patterns": [
|
2662
|
+
{
|
2663
|
+
"include": "#regex_sub"
|
2664
|
+
},
|
2665
|
+
{
|
2666
|
+
"include": "#nest_parens_r"
|
2667
|
+
}
|
2668
|
+
]
|
2669
|
+
},
|
2670
|
+
"regex_sub": {
|
2671
|
+
"patterns": [
|
2672
|
+
{
|
2673
|
+
"include": "#interpolated_crystal"
|
2674
|
+
},
|
2675
|
+
{
|
2676
|
+
"include": "#escaped_char"
|
2677
|
+
},
|
2678
|
+
{
|
2679
|
+
"captures": {
|
2680
|
+
"1": {
|
2681
|
+
"name": "punctuation.definition.arbitrary-repetition.crystal"
|
2682
|
+
},
|
2683
|
+
"3": {
|
2684
|
+
"name": "punctuation.definition.arbitrary-repetition.crystal"
|
2685
|
+
}
|
2686
|
+
},
|
2687
|
+
"match": "(\\{)\\d+(,\\d+)?(\\})",
|
2688
|
+
"name": "string.regexp.arbitrary-repetition.crystal"
|
2689
|
+
},
|
2690
|
+
{
|
2691
|
+
"begin": "\\[(?:\\^?\\])?",
|
2692
|
+
"captures": {
|
2693
|
+
"0": {
|
2694
|
+
"name": "punctuation.definition.character-class.crystal"
|
2695
|
+
}
|
2696
|
+
},
|
2697
|
+
"end": "\\]",
|
2698
|
+
"name": "string.regexp.character-class.crystal",
|
2699
|
+
"patterns": [
|
2700
|
+
{
|
2701
|
+
"include": "#escaped_char"
|
2702
|
+
}
|
2703
|
+
]
|
2704
|
+
},
|
2705
|
+
{
|
2706
|
+
"begin": "\\(\\?#",
|
2707
|
+
"beginCaptures": {
|
2708
|
+
"0": {
|
2709
|
+
"name": "punctuation.definition.comment.begin.crystal"
|
2710
|
+
}
|
2711
|
+
},
|
2712
|
+
"end": "\\)",
|
2713
|
+
"endCaptures": {
|
2714
|
+
"0": {
|
2715
|
+
"name": "punctuation.definition.comment.end.crystal"
|
2716
|
+
}
|
2717
|
+
},
|
2718
|
+
"name": "comment.line.number-sign.crystal",
|
2719
|
+
"patterns": [
|
2720
|
+
{
|
2721
|
+
"include": "#escaped_char"
|
2722
|
+
}
|
2723
|
+
]
|
2724
|
+
},
|
2725
|
+
{
|
2726
|
+
"begin": "\\(",
|
2727
|
+
"captures": {
|
2728
|
+
"0": {
|
2729
|
+
"name": "punctuation.definition.group.crystal"
|
2730
|
+
}
|
2731
|
+
},
|
2732
|
+
"end": "\\)",
|
2733
|
+
"name": "string.regexp.group.crystal",
|
2734
|
+
"patterns": [
|
2735
|
+
{
|
2736
|
+
"include": "#regex_sub"
|
2737
|
+
}
|
2738
|
+
]
|
2739
|
+
},
|
2740
|
+
{
|
2741
|
+
"begin": "(?<=^|\\s)(#)\\s(?=[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$)",
|
2742
|
+
"beginCaptures": {
|
2743
|
+
"1": {
|
2744
|
+
"name": "punctuation.definition.comment.crystal"
|
2745
|
+
}
|
2746
|
+
},
|
2747
|
+
"comment": "We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.",
|
2748
|
+
"end": "$\\n?",
|
2749
|
+
"endCaptures": {
|
2750
|
+
"0": {
|
2751
|
+
"name": "punctuation.definition.comment.crystal"
|
2752
|
+
}
|
2753
|
+
},
|
2754
|
+
"name": "comment.line.number-sign.crystal"
|
2755
|
+
}
|
2756
|
+
]
|
2757
|
+
}
|
2758
|
+
},
|
2759
|
+
"uuid": "13aed1ba-1656-4b29-a18c-07739f166db7"
|
2760
|
+
}
|