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,1324 @@
|
|
1
|
+
{
|
2
|
+
"fileTypes": [
|
3
|
+
"tsx"
|
4
|
+
],
|
5
|
+
"name": "TypeScriptReact",
|
6
|
+
"patterns": [
|
7
|
+
{
|
8
|
+
"include": "#expression"
|
9
|
+
}
|
10
|
+
],
|
11
|
+
"repository": {
|
12
|
+
"access-modifier": {
|
13
|
+
"match": "\\b(public|protected|private)\\b",
|
14
|
+
"name": "storage.modifier.tsx"
|
15
|
+
},
|
16
|
+
"arithmetic-operator": {
|
17
|
+
"match": "\\*|/|\\-\\-|\\-|\\+\\+|\\+|%",
|
18
|
+
"name": "keyword.operator.arithmetic.tsx"
|
19
|
+
},
|
20
|
+
"array-literal": {
|
21
|
+
"begin": "\\[",
|
22
|
+
"beginCaptures": {
|
23
|
+
"0": {
|
24
|
+
"name": "meta.brace.square.tsx"
|
25
|
+
}
|
26
|
+
},
|
27
|
+
"end": "\\]",
|
28
|
+
"endCaptures": {
|
29
|
+
"0": {
|
30
|
+
"name": "meta.brace.square.tsx"
|
31
|
+
}
|
32
|
+
},
|
33
|
+
"name": "meta.array.literal.tsx",
|
34
|
+
"patterns": [
|
35
|
+
{
|
36
|
+
"include": "#expression"
|
37
|
+
}
|
38
|
+
]
|
39
|
+
},
|
40
|
+
"assignment-operator": {
|
41
|
+
"match": "<<=|>>=|>>>=|\\*=|(?<!\\()/=|%=|\\+=|\\-=|&=|\\^=",
|
42
|
+
"name": "keyword.operator.assignment.tsx"
|
43
|
+
},
|
44
|
+
"block": {
|
45
|
+
"begin": "\\{",
|
46
|
+
"beginCaptures": {
|
47
|
+
"0": {
|
48
|
+
"name": "meta.brace.curly.tsx"
|
49
|
+
}
|
50
|
+
},
|
51
|
+
"end": "\\}",
|
52
|
+
"endCaptures": {
|
53
|
+
"0": {
|
54
|
+
"name": "meta.brace.curly.tsx"
|
55
|
+
}
|
56
|
+
},
|
57
|
+
"name": "meta.block.tsx",
|
58
|
+
"patterns": [
|
59
|
+
{
|
60
|
+
"include": "#expression"
|
61
|
+
},
|
62
|
+
{
|
63
|
+
"include": "#object-member"
|
64
|
+
}
|
65
|
+
]
|
66
|
+
},
|
67
|
+
"boolean-literal": {
|
68
|
+
"match": "\\b(false|true)\\b",
|
69
|
+
"name": "constant.language.boolean.tsx"
|
70
|
+
},
|
71
|
+
"comment": {
|
72
|
+
"name": "comment.tsx",
|
73
|
+
"patterns": [
|
74
|
+
{
|
75
|
+
"include": "#comment-block-doc"
|
76
|
+
},
|
77
|
+
{
|
78
|
+
"include": "#comment-block"
|
79
|
+
},
|
80
|
+
{
|
81
|
+
"include": "#comment-line"
|
82
|
+
}
|
83
|
+
]
|
84
|
+
},
|
85
|
+
"comment-block": {
|
86
|
+
"begin": "/\\*",
|
87
|
+
"end": "\\*/",
|
88
|
+
"name": "comment.block.tsx"
|
89
|
+
},
|
90
|
+
"comment-block-doc": {
|
91
|
+
"begin": "/\\*\\*(?!/)",
|
92
|
+
"end": "\\*/",
|
93
|
+
"name": "comment.block.documentation.tsx"
|
94
|
+
},
|
95
|
+
"comment-line": {
|
96
|
+
"match": "(//).*$\\n?",
|
97
|
+
"name": "comment.line.tsx"
|
98
|
+
},
|
99
|
+
"control-statement": {
|
100
|
+
"match": "(?<!\\.)\\b(break|catch|continue|debugger|declare|do|else|finally|for|if|return|switch|throw|try|while|with|super|switch|case)\\b",
|
101
|
+
"name": "keyword.control.tsx"
|
102
|
+
},
|
103
|
+
"decl-block": {
|
104
|
+
"begin": "\\{",
|
105
|
+
"beginCaptures": {
|
106
|
+
"0": {
|
107
|
+
"name": "meta.brace.curly.tsx"
|
108
|
+
}
|
109
|
+
},
|
110
|
+
"end": "\\}",
|
111
|
+
"endCaptures": {
|
112
|
+
"0": {
|
113
|
+
"name": "meta.brace.curly.tsx"
|
114
|
+
}
|
115
|
+
},
|
116
|
+
"name": "meta.decl.block.tsx",
|
117
|
+
"patterns": [
|
118
|
+
{
|
119
|
+
"include": "#expression"
|
120
|
+
}
|
121
|
+
]
|
122
|
+
},
|
123
|
+
"declaration": {
|
124
|
+
"name": "meta.declaration.tsx",
|
125
|
+
"patterns": [
|
126
|
+
{
|
127
|
+
"include": "#function-declaration"
|
128
|
+
},
|
129
|
+
{
|
130
|
+
"include": "#object-declaration"
|
131
|
+
},
|
132
|
+
{
|
133
|
+
"include": "#type-declaration"
|
134
|
+
},
|
135
|
+
{
|
136
|
+
"include": "#enum-declaration"
|
137
|
+
}
|
138
|
+
]
|
139
|
+
},
|
140
|
+
"enum-declaration": {
|
141
|
+
"captures": {
|
142
|
+
"1": {
|
143
|
+
"name": "storage.modifier.tsx"
|
144
|
+
},
|
145
|
+
"2": {
|
146
|
+
"name": "storage.type.tsx"
|
147
|
+
},
|
148
|
+
"3": {
|
149
|
+
"name": "entity.name.class.tsx"
|
150
|
+
}
|
151
|
+
},
|
152
|
+
"match": "(?:\\b(const)\\s+)?\\b(enum)\\s+([a-zA-Z_$][\\w$]*)",
|
153
|
+
"name": "meta.enum.declaration.tsx"
|
154
|
+
},
|
155
|
+
"expression": {
|
156
|
+
"name": "meta.expression.tsx",
|
157
|
+
"patterns": [
|
158
|
+
{
|
159
|
+
"include": "#jsx"
|
160
|
+
},
|
161
|
+
{
|
162
|
+
"include": "#for-in-simple"
|
163
|
+
},
|
164
|
+
{
|
165
|
+
"include": "#string"
|
166
|
+
},
|
167
|
+
{
|
168
|
+
"include": "#regex"
|
169
|
+
},
|
170
|
+
{
|
171
|
+
"include": "#template"
|
172
|
+
},
|
173
|
+
{
|
174
|
+
"include": "#comment"
|
175
|
+
},
|
176
|
+
{
|
177
|
+
"include": "#literal"
|
178
|
+
},
|
179
|
+
{
|
180
|
+
"include": "#paren-expression"
|
181
|
+
},
|
182
|
+
{
|
183
|
+
"include": "#var-expr"
|
184
|
+
},
|
185
|
+
{
|
186
|
+
"include": "#declaration"
|
187
|
+
},
|
188
|
+
{
|
189
|
+
"include": "#new-expr"
|
190
|
+
},
|
191
|
+
{
|
192
|
+
"include": "#block"
|
193
|
+
},
|
194
|
+
{
|
195
|
+
"include": "#expression-operator"
|
196
|
+
},
|
197
|
+
{
|
198
|
+
"include": "#relational-operator"
|
199
|
+
},
|
200
|
+
{
|
201
|
+
"include": "#arithmetic-operator"
|
202
|
+
},
|
203
|
+
{
|
204
|
+
"include": "#logic-operator"
|
205
|
+
},
|
206
|
+
{
|
207
|
+
"include": "#assignment-operator"
|
208
|
+
},
|
209
|
+
{
|
210
|
+
"include": "#storage-keyword"
|
211
|
+
},
|
212
|
+
{
|
213
|
+
"include": "#function-call"
|
214
|
+
},
|
215
|
+
{
|
216
|
+
"include": "#switch-case"
|
217
|
+
},
|
218
|
+
{
|
219
|
+
"include": "#control-statement"
|
220
|
+
}
|
221
|
+
]
|
222
|
+
},
|
223
|
+
"expression-operator": {
|
224
|
+
"match": "=>|\\b(delete|export|import|in|instanceof|module|namespace|new|typeof|void|as)\\b",
|
225
|
+
"name": "keyword.operator.tsx"
|
226
|
+
},
|
227
|
+
"field-declaration": {
|
228
|
+
"begin": "(?<!\\()\\s*\\b([a-zA-Z_$][\\w$]*)\\s*(\\?\\s*)?(?=(=|:))",
|
229
|
+
"beginCaptures": {
|
230
|
+
"1": {
|
231
|
+
"name": "variable.tsx"
|
232
|
+
},
|
233
|
+
"2": {
|
234
|
+
"name": "keyword.operator.tsx"
|
235
|
+
}
|
236
|
+
},
|
237
|
+
"end": "(?=\\}|;|,)|(?<=\\})",
|
238
|
+
"name": "meta.field.declaration.tsx",
|
239
|
+
"patterns": [
|
240
|
+
{
|
241
|
+
"include": "#expression"
|
242
|
+
}
|
243
|
+
]
|
244
|
+
},
|
245
|
+
"for-in-simple": {
|
246
|
+
"captures": {
|
247
|
+
"1": {
|
248
|
+
"name": "storage.type.tsx"
|
249
|
+
},
|
250
|
+
"3": {
|
251
|
+
"name": "keyword.operator.tsx"
|
252
|
+
}
|
253
|
+
},
|
254
|
+
"match": "(?<=\\()\\s*\\b(var|let|const)\\s+([a-zA-Z_$][\\w$]*)\\s+(in|of)\\b",
|
255
|
+
"name": "forin.expr.tsx"
|
256
|
+
},
|
257
|
+
"function-call": {
|
258
|
+
"name": "functioncall.expr.tsx",
|
259
|
+
"patterns": [
|
260
|
+
{
|
261
|
+
"include": "#type-parameters"
|
262
|
+
},
|
263
|
+
{
|
264
|
+
"include": "#paren-expression"
|
265
|
+
}
|
266
|
+
]
|
267
|
+
},
|
268
|
+
"function-declaration": {
|
269
|
+
"begin": "\\b(?:(export)\\s+)?(function\\b)(?:\\s+([a-zA-Z_$][\\w$]*))?\\s*",
|
270
|
+
"beginCaptures": {
|
271
|
+
"1": {
|
272
|
+
"name": "storage.modifier.tsx"
|
273
|
+
},
|
274
|
+
"2": {
|
275
|
+
"name": "storage.type.function.tsx"
|
276
|
+
},
|
277
|
+
"3": {
|
278
|
+
"name": "entity.name.function.tsx"
|
279
|
+
}
|
280
|
+
},
|
281
|
+
"end": "(?=;|\\})|(?<=\\})",
|
282
|
+
"name": "meta.function.tsx",
|
283
|
+
"patterns": [
|
284
|
+
{
|
285
|
+
"include": "#comment"
|
286
|
+
},
|
287
|
+
{
|
288
|
+
"include": "#type-parameters"
|
289
|
+
},
|
290
|
+
{
|
291
|
+
"include": "#function-type-parameters"
|
292
|
+
},
|
293
|
+
{
|
294
|
+
"include": "#return-type"
|
295
|
+
},
|
296
|
+
{
|
297
|
+
"include": "#function-overload-declaration"
|
298
|
+
},
|
299
|
+
{
|
300
|
+
"include": "#decl-block"
|
301
|
+
}
|
302
|
+
]
|
303
|
+
},
|
304
|
+
"function-overload-declaration": {
|
305
|
+
"captures": {
|
306
|
+
"1": {
|
307
|
+
"name": "storage.modifier.tsx"
|
308
|
+
},
|
309
|
+
"2": {
|
310
|
+
"name": "storage.type.function.tsx"
|
311
|
+
},
|
312
|
+
"3": {
|
313
|
+
"name": "entity.name.function.tsx"
|
314
|
+
}
|
315
|
+
},
|
316
|
+
"match": "\\b(?:(export)\\s+)?(function\\b)(?:\\s+([a-zA-Z_$][\\w$]*))?\\s*",
|
317
|
+
"name": "meta.function.overload.tsx"
|
318
|
+
},
|
319
|
+
"function-type-parameters": {
|
320
|
+
"begin": "\\(",
|
321
|
+
"beginCaptures": {
|
322
|
+
"0": {
|
323
|
+
"name": "meta.brace.round.tsx"
|
324
|
+
}
|
325
|
+
},
|
326
|
+
"end": "\\)",
|
327
|
+
"endCaptures": {
|
328
|
+
"0": {
|
329
|
+
"name": "meta.brace.round.tsx"
|
330
|
+
}
|
331
|
+
},
|
332
|
+
"name": "meta.function.type.parameter.tsx",
|
333
|
+
"patterns": [
|
334
|
+
{
|
335
|
+
"include": "#comment"
|
336
|
+
},
|
337
|
+
{
|
338
|
+
"include": "#parameter-name"
|
339
|
+
},
|
340
|
+
{
|
341
|
+
"include": "#type-annotation"
|
342
|
+
},
|
343
|
+
{
|
344
|
+
"include": "#variable-initializer"
|
345
|
+
}
|
346
|
+
]
|
347
|
+
},
|
348
|
+
"indexer-declaration": {
|
349
|
+
"begin": "\\[",
|
350
|
+
"beginCaptures": {
|
351
|
+
"0": {
|
352
|
+
"name": "meta.brace.square.tsx"
|
353
|
+
}
|
354
|
+
},
|
355
|
+
"end": "(\\])\\s*(\\?\\s*)?|$",
|
356
|
+
"endCaptures": {
|
357
|
+
"1": {
|
358
|
+
"name": "meta.brace.square.tsx"
|
359
|
+
},
|
360
|
+
"2": {
|
361
|
+
"name": "keyword.operator.tsx"
|
362
|
+
}
|
363
|
+
},
|
364
|
+
"name": "meta.indexer.declaration.tsx",
|
365
|
+
"patterns": [
|
366
|
+
{
|
367
|
+
"include": "#type-annotation"
|
368
|
+
},
|
369
|
+
{
|
370
|
+
"include": "#indexer-parameter"
|
371
|
+
},
|
372
|
+
{
|
373
|
+
"include": "#expression"
|
374
|
+
}
|
375
|
+
]
|
376
|
+
},
|
377
|
+
"indexer-parameter": {
|
378
|
+
"captures": {
|
379
|
+
"1": {
|
380
|
+
"name": "variable.parameter.tsx"
|
381
|
+
}
|
382
|
+
},
|
383
|
+
"match": "([a-zA-Z_$][\\w$]*)(?=\\:)",
|
384
|
+
"name": "meta.indexer.parameter.tsx"
|
385
|
+
},
|
386
|
+
"jsx": {
|
387
|
+
"name": "meta.jsx.tsx",
|
388
|
+
"patterns": [
|
389
|
+
{
|
390
|
+
"include": "#jsx-tag-without-attributes"
|
391
|
+
},
|
392
|
+
{
|
393
|
+
"include": "#jsx-tag-open"
|
394
|
+
},
|
395
|
+
{
|
396
|
+
"include": "#jsx-tag-close"
|
397
|
+
},
|
398
|
+
{
|
399
|
+
"include": "#jsx-tag-invalid"
|
400
|
+
},
|
401
|
+
{
|
402
|
+
"begin": "(?<=(?:'|\"|})>)",
|
403
|
+
"end": "(?=</)",
|
404
|
+
"name": "meta.jsx.children.tsx",
|
405
|
+
"patterns": [
|
406
|
+
{
|
407
|
+
"include": "#jsx-children"
|
408
|
+
}
|
409
|
+
]
|
410
|
+
}
|
411
|
+
]
|
412
|
+
},
|
413
|
+
"jsx-children": {
|
414
|
+
"patterns": [
|
415
|
+
{
|
416
|
+
"include": "#jsx-tag-without-attributes"
|
417
|
+
},
|
418
|
+
{
|
419
|
+
"include": "#jsx-tag-open"
|
420
|
+
},
|
421
|
+
{
|
422
|
+
"include": "#jsx-tag-close"
|
423
|
+
},
|
424
|
+
{
|
425
|
+
"include": "#jsx-tag-invalid"
|
426
|
+
},
|
427
|
+
{
|
428
|
+
"include": "#jsx-evaluated-code"
|
429
|
+
},
|
430
|
+
{
|
431
|
+
"include": "#jsx-entities"
|
432
|
+
}
|
433
|
+
]
|
434
|
+
},
|
435
|
+
"jsx-entities": {
|
436
|
+
"patterns": [
|
437
|
+
{
|
438
|
+
"captures": {
|
439
|
+
"1": {
|
440
|
+
"name": "punctuation.definition.entity.tsx"
|
441
|
+
},
|
442
|
+
"3": {
|
443
|
+
"name": "punctuation.definition.entity.tsx"
|
444
|
+
}
|
445
|
+
},
|
446
|
+
"match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)",
|
447
|
+
"name": "constant.character.entity.tsx"
|
448
|
+
},
|
449
|
+
{
|
450
|
+
"match": "&",
|
451
|
+
"name": "invalid.illegal.bad-ampersand.tsx"
|
452
|
+
}
|
453
|
+
]
|
454
|
+
},
|
455
|
+
"jsx-evaluated-code": {
|
456
|
+
"begin": "{",
|
457
|
+
"beginCaptures": {
|
458
|
+
"0": {
|
459
|
+
"name": "punctuation.definition.brace.curly.start.tsx"
|
460
|
+
}
|
461
|
+
},
|
462
|
+
"end": "}",
|
463
|
+
"endCaptures": {
|
464
|
+
"0": {
|
465
|
+
"name": "punctuation.definition.brace.curly.end.tsx"
|
466
|
+
}
|
467
|
+
},
|
468
|
+
"name": "meta.brace.curly.tsx",
|
469
|
+
"patterns": [
|
470
|
+
{
|
471
|
+
"include": "#expression"
|
472
|
+
}
|
473
|
+
]
|
474
|
+
},
|
475
|
+
"jsx-string-double-quoted": {
|
476
|
+
"begin": "\"",
|
477
|
+
"beginCaptures": {
|
478
|
+
"0": {
|
479
|
+
"name": "punctuation.definition.string.begin.tsx"
|
480
|
+
}
|
481
|
+
},
|
482
|
+
"end": "\"",
|
483
|
+
"endCaptures": {
|
484
|
+
"0": {
|
485
|
+
"name": "punctuation.definition.string.end.tsx"
|
486
|
+
}
|
487
|
+
},
|
488
|
+
"name": "string.quoted.double.tsx",
|
489
|
+
"patterns": [
|
490
|
+
{
|
491
|
+
"include": "#jsx-entities"
|
492
|
+
}
|
493
|
+
]
|
494
|
+
},
|
495
|
+
"jsx-string-single-quoted": {
|
496
|
+
"begin": "'",
|
497
|
+
"beginCaptures": {
|
498
|
+
"0": {
|
499
|
+
"name": "punctuation.definition.string.begin.tsx"
|
500
|
+
}
|
501
|
+
},
|
502
|
+
"end": "'",
|
503
|
+
"endCaptures": {
|
504
|
+
"0": {
|
505
|
+
"name": "punctuation.definition.string.end.tsx"
|
506
|
+
}
|
507
|
+
},
|
508
|
+
"name": "string.quoted.single.tsx",
|
509
|
+
"patterns": [
|
510
|
+
{
|
511
|
+
"include": "#jsx-entities"
|
512
|
+
}
|
513
|
+
]
|
514
|
+
},
|
515
|
+
"jsx-tag-attribute-assignment": {
|
516
|
+
"match": "=(?=\\s*(?:'|\"|{|/\\*|//|\\n))",
|
517
|
+
"name": "keyword.operator.assignment.tsx"
|
518
|
+
},
|
519
|
+
"jsx-tag-attribute-name": {
|
520
|
+
"captures": {
|
521
|
+
"1": {
|
522
|
+
"name": "entity.other.attribute-name.tsx"
|
523
|
+
}
|
524
|
+
},
|
525
|
+
"match": "(?x)\n \\s*\n ([_$a-zA-Z][-$\\w]*)\n (?=\\s|=|/?>|/\\*|//)",
|
526
|
+
"name": "meta.tag.attribute-name.tsx"
|
527
|
+
},
|
528
|
+
"jsx-tag-attributes": {
|
529
|
+
"patterns": [
|
530
|
+
{
|
531
|
+
"include": "#jsx-tag-attribute-name"
|
532
|
+
},
|
533
|
+
{
|
534
|
+
"include": "#jsx-tag-attribute-assignment"
|
535
|
+
},
|
536
|
+
{
|
537
|
+
"include": "#jsx-string-double-quoted"
|
538
|
+
},
|
539
|
+
{
|
540
|
+
"include": "#jsx-string-single-quoted"
|
541
|
+
},
|
542
|
+
{
|
543
|
+
"include": "#jsx-evaluated-code"
|
544
|
+
}
|
545
|
+
]
|
546
|
+
},
|
547
|
+
"jsx-tag-attributes-illegal": {
|
548
|
+
"match": "\\S+",
|
549
|
+
"name": "invalid.illegal.attribute.tsx"
|
550
|
+
},
|
551
|
+
"jsx-tag-close": {
|
552
|
+
"begin": "(</)([_$a-zA-Z][-$\\w.]*(?<!\\.|-))",
|
553
|
+
"beginCaptures": {
|
554
|
+
"1": {
|
555
|
+
"name": "punctuation.definition.tag.begin.tsx"
|
556
|
+
},
|
557
|
+
"2": {
|
558
|
+
"name": "entity.name.tag.tsx"
|
559
|
+
}
|
560
|
+
},
|
561
|
+
"end": "(>)",
|
562
|
+
"endCaptures": {
|
563
|
+
"1": {
|
564
|
+
"name": "punctuation.definition.tag.end.tsx"
|
565
|
+
}
|
566
|
+
},
|
567
|
+
"name": "tag.close.tsx",
|
568
|
+
"patterns": [
|
569
|
+
{
|
570
|
+
"include": "#comment"
|
571
|
+
}
|
572
|
+
]
|
573
|
+
},
|
574
|
+
"jsx-tag-invalid": {
|
575
|
+
"match": "<\\s*>",
|
576
|
+
"name": "invalid.illegal.tag.incomplete.tsx"
|
577
|
+
},
|
578
|
+
"jsx-tag-open": {
|
579
|
+
"begin": "(?x)\n (<)\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>)",
|
580
|
+
"beginCaptures": {
|
581
|
+
"1": {
|
582
|
+
"name": "punctuation.definition.tag.begin.tsx"
|
583
|
+
},
|
584
|
+
"2": {
|
585
|
+
"name": "entity.name.tag.tsx"
|
586
|
+
}
|
587
|
+
},
|
588
|
+
"end": "(/?>)",
|
589
|
+
"endCaptures": {
|
590
|
+
"1": {
|
591
|
+
"name": "punctuation.definition.tag.end.tsx"
|
592
|
+
}
|
593
|
+
},
|
594
|
+
"name": "tag.open.tsx",
|
595
|
+
"patterns": [
|
596
|
+
{
|
597
|
+
"include": "#comment"
|
598
|
+
},
|
599
|
+
{
|
600
|
+
"include": "#jsx-tag-attributes"
|
601
|
+
},
|
602
|
+
{
|
603
|
+
"include": "#jsx-tag-attributes-illegal"
|
604
|
+
}
|
605
|
+
]
|
606
|
+
},
|
607
|
+
"jsx-tag-without-attributes": {
|
608
|
+
"begin": "(<)([_$a-zA-Z][-$\\w.]*(?<!\\.|-))(>)",
|
609
|
+
"beginCaptures": {
|
610
|
+
"1": {
|
611
|
+
"name": "punctuation.definition.tag.begin.tsx"
|
612
|
+
},
|
613
|
+
"2": {
|
614
|
+
"name": "entity.name.tag.tsx"
|
615
|
+
},
|
616
|
+
"3": {
|
617
|
+
"name": "punctuation.definition.tag.end.tsx"
|
618
|
+
}
|
619
|
+
},
|
620
|
+
"end": "(</)([_$a-zA-Z][-$\\w.]*(?<!\\.|-))(>)",
|
621
|
+
"endCaptures": {
|
622
|
+
"1": {
|
623
|
+
"name": "punctuation.definition.tag.begin.tsx"
|
624
|
+
},
|
625
|
+
"2": {
|
626
|
+
"name": "entity.name.tag.tsx"
|
627
|
+
},
|
628
|
+
"3": {
|
629
|
+
"name": "punctuation.definition.tag.end.tsx"
|
630
|
+
}
|
631
|
+
},
|
632
|
+
"name": "tag.without-attributes.tsx",
|
633
|
+
"patterns": [
|
634
|
+
{
|
635
|
+
"include": "#jsx-children"
|
636
|
+
}
|
637
|
+
]
|
638
|
+
},
|
639
|
+
"literal": {
|
640
|
+
"name": "literal.tsx",
|
641
|
+
"patterns": [
|
642
|
+
{
|
643
|
+
"include": "#numeric-literal"
|
644
|
+
},
|
645
|
+
{
|
646
|
+
"include": "#boolean-literal"
|
647
|
+
},
|
648
|
+
{
|
649
|
+
"include": "#null-literal"
|
650
|
+
},
|
651
|
+
{
|
652
|
+
"include": "#undefined-literal"
|
653
|
+
},
|
654
|
+
{
|
655
|
+
"include": "#array-literal"
|
656
|
+
},
|
657
|
+
{
|
658
|
+
"include": "#this-literal"
|
659
|
+
}
|
660
|
+
]
|
661
|
+
},
|
662
|
+
"logic-operator": {
|
663
|
+
"match": "\\!|&|~|\\||&&|\\|\\|",
|
664
|
+
"name": "keyword.operator.arithmetic.tsx"
|
665
|
+
},
|
666
|
+
"method-declaration": {
|
667
|
+
"begin": "\\b(?:(public|private|protected)\\s+)?(?:(get|set)\\s+)?(?:(new)|(?:([a-zA-Z_$][\\.\\w$]*)\\s*(\\??)))?\\s*(?=\\(|\\<)",
|
668
|
+
"beginCaptures": {
|
669
|
+
"1": {
|
670
|
+
"name": "storage.modifier.tsx"
|
671
|
+
},
|
672
|
+
"2": {
|
673
|
+
"name": "storage.type.property.tsx"
|
674
|
+
},
|
675
|
+
"3": {
|
676
|
+
"name": "keyword.operator.tsx"
|
677
|
+
},
|
678
|
+
"4": {
|
679
|
+
"name": "entity.name.function.tsx"
|
680
|
+
},
|
681
|
+
"5": {
|
682
|
+
"name": "keyword.operator.tsx"
|
683
|
+
}
|
684
|
+
},
|
685
|
+
"end": "(?=\\}|;|,)|(?<=\\})",
|
686
|
+
"name": "meta.method.declaration.tsx",
|
687
|
+
"patterns": [
|
688
|
+
{
|
689
|
+
"include": "#comment"
|
690
|
+
},
|
691
|
+
{
|
692
|
+
"include": "#type-parameters"
|
693
|
+
},
|
694
|
+
{
|
695
|
+
"include": "#function-type-parameters"
|
696
|
+
},
|
697
|
+
{
|
698
|
+
"include": "#type-annotation"
|
699
|
+
},
|
700
|
+
{
|
701
|
+
"include": "#method-overload-declaration"
|
702
|
+
},
|
703
|
+
{
|
704
|
+
"include": "#decl-block"
|
705
|
+
}
|
706
|
+
]
|
707
|
+
},
|
708
|
+
"method-overload-declaration": {
|
709
|
+
"captures": {
|
710
|
+
"1": {
|
711
|
+
"name": "storage.modifier.tsx"
|
712
|
+
},
|
713
|
+
"2": {
|
714
|
+
"name": "keyword.operator.tsx"
|
715
|
+
},
|
716
|
+
"3": {
|
717
|
+
"name": "entity.name.function.tsx"
|
718
|
+
},
|
719
|
+
"4": {
|
720
|
+
"name": "keyword.operator.tsx"
|
721
|
+
}
|
722
|
+
},
|
723
|
+
"match": "\\b(?:(public|private|protected)\\s+)?(?:(new)|(?:([a-zA-Z_$][\\.\\w$]*)\\s*(\\??)))?\\s*(?=\\(|\\<)",
|
724
|
+
"name": "meta.method.overload.declaration.tsx"
|
725
|
+
},
|
726
|
+
"new-expr": {
|
727
|
+
"begin": "\\b(new)\\b",
|
728
|
+
"beginCaptures": {
|
729
|
+
"1": {
|
730
|
+
"name": "keyword.operator.tsx"
|
731
|
+
}
|
732
|
+
},
|
733
|
+
"end": "(?=[(;]|$)",
|
734
|
+
"name": "new.expr.tsx",
|
735
|
+
"patterns": [
|
736
|
+
{
|
737
|
+
"include": "#type"
|
738
|
+
}
|
739
|
+
]
|
740
|
+
},
|
741
|
+
"null-literal": {
|
742
|
+
"match": "\\b(null)\\b",
|
743
|
+
"name": "constant.language.null.tsx"
|
744
|
+
},
|
745
|
+
"numeric-literal": {
|
746
|
+
"match": "\\b(?<=[^$])((0(x|X)[0-9a-fA-F]+)|([0-9]+(\\.[0-9]+)?))\\b",
|
747
|
+
"name": "constant.numeric.tsx"
|
748
|
+
},
|
749
|
+
"object-body": {
|
750
|
+
"begin": "\\{",
|
751
|
+
"beginCaptures": {
|
752
|
+
"0": {
|
753
|
+
"name": "meta.brace.curly.tsx"
|
754
|
+
}
|
755
|
+
},
|
756
|
+
"end": "\\}",
|
757
|
+
"endCaptures": {
|
758
|
+
"0": {
|
759
|
+
"name": "meta.brace.curly.tsx"
|
760
|
+
}
|
761
|
+
},
|
762
|
+
"name": "meta.object.body.tsx",
|
763
|
+
"patterns": [
|
764
|
+
{
|
765
|
+
"include": "#string"
|
766
|
+
},
|
767
|
+
{
|
768
|
+
"include": "#comment"
|
769
|
+
},
|
770
|
+
{
|
771
|
+
"include": "#field-declaration"
|
772
|
+
},
|
773
|
+
{
|
774
|
+
"include": "#method-declaration"
|
775
|
+
},
|
776
|
+
{
|
777
|
+
"include": "#indexer-declaration"
|
778
|
+
},
|
779
|
+
{
|
780
|
+
"include": "#type-annotation"
|
781
|
+
},
|
782
|
+
{
|
783
|
+
"include": "#variable-initializer"
|
784
|
+
},
|
785
|
+
{
|
786
|
+
"include": "#access-modifier"
|
787
|
+
},
|
788
|
+
{
|
789
|
+
"include": "#static-modifier"
|
790
|
+
},
|
791
|
+
{
|
792
|
+
"include": "#property-accessor"
|
793
|
+
}
|
794
|
+
]
|
795
|
+
},
|
796
|
+
"object-declaration": {
|
797
|
+
"begin": "\\b(?:(export)\\s+)?\\b(class|interface)\\b",
|
798
|
+
"beginCaptures": {
|
799
|
+
"1": {
|
800
|
+
"name": "storage.modifier.tsx"
|
801
|
+
},
|
802
|
+
"2": {
|
803
|
+
"name": "storage.type.tsx"
|
804
|
+
},
|
805
|
+
"3": {
|
806
|
+
"name": "entity.name.class.tsx"
|
807
|
+
}
|
808
|
+
},
|
809
|
+
"end": "(?<=\\})",
|
810
|
+
"endCaptures": {
|
811
|
+
"1": {
|
812
|
+
"name": "brace.curly.tsx"
|
813
|
+
}
|
814
|
+
},
|
815
|
+
"name": "meta.declaration.object.tsx",
|
816
|
+
"patterns": [
|
817
|
+
{
|
818
|
+
"include": "#comment"
|
819
|
+
},
|
820
|
+
{
|
821
|
+
"include": "#object-heritage"
|
822
|
+
},
|
823
|
+
{
|
824
|
+
"include": "#object-name"
|
825
|
+
},
|
826
|
+
{
|
827
|
+
"include": "#type-parameters"
|
828
|
+
},
|
829
|
+
{
|
830
|
+
"include": "#object-body"
|
831
|
+
}
|
832
|
+
]
|
833
|
+
},
|
834
|
+
"object-heritage": {
|
835
|
+
"begin": "(?:\\b(extends|implements))",
|
836
|
+
"beginCaptures": {
|
837
|
+
"1": {
|
838
|
+
"name": "keyword.other.tsx"
|
839
|
+
}
|
840
|
+
},
|
841
|
+
"end": "(?=\\{)",
|
842
|
+
"endCaptures": {
|
843
|
+
"1": {
|
844
|
+
"name": "brace.curly.tsx"
|
845
|
+
}
|
846
|
+
},
|
847
|
+
"name": "meta.object.heritage.tsx",
|
848
|
+
"patterns": [
|
849
|
+
{
|
850
|
+
"include": "#comment"
|
851
|
+
},
|
852
|
+
{
|
853
|
+
"include": "#type-parameters"
|
854
|
+
},
|
855
|
+
{
|
856
|
+
"include": "#object-heritage-parent"
|
857
|
+
}
|
858
|
+
]
|
859
|
+
},
|
860
|
+
"object-heritage-parent": {
|
861
|
+
"captures": {
|
862
|
+
"1": {
|
863
|
+
"name": "storage.type.tsx"
|
864
|
+
}
|
865
|
+
},
|
866
|
+
"match": "(?:\\s*([a-zA-Z_$][\\w$]*))",
|
867
|
+
"name": "meta.object.heritage.parent.tsx"
|
868
|
+
},
|
869
|
+
"object-member": {
|
870
|
+
"begin": "[a-zA-Z_$][\\w$]*\\s*:",
|
871
|
+
"end": "(?=,|\\})",
|
872
|
+
"name": "meta.object.member.tsx",
|
873
|
+
"patterns": [
|
874
|
+
{
|
875
|
+
"include": "#expression"
|
876
|
+
}
|
877
|
+
]
|
878
|
+
},
|
879
|
+
"object-name": {
|
880
|
+
"captures": {
|
881
|
+
"0": {
|
882
|
+
"name": "entity.name.class.tsx"
|
883
|
+
}
|
884
|
+
},
|
885
|
+
"match": "[a-zA-Z_$][\\w$]*",
|
886
|
+
"name": "meta.object.name.tsx"
|
887
|
+
},
|
888
|
+
"parameter-name": {
|
889
|
+
"captures": {
|
890
|
+
"1": {
|
891
|
+
"name": "storage.modifier.tsx"
|
892
|
+
},
|
893
|
+
"2": {
|
894
|
+
"name": "keyword.operator.tsx"
|
895
|
+
},
|
896
|
+
"3": {
|
897
|
+
"name": "variable.parameter.tsx"
|
898
|
+
},
|
899
|
+
"4": {
|
900
|
+
"name": "keyword.operator.tsx"
|
901
|
+
}
|
902
|
+
},
|
903
|
+
"match": "(?:\\s*\\b(public|private|protected)\\b\\s+)?(\\.\\.\\.)?\\s*([a-zA-Z_$][\\w$]*)\\s*(\\??)",
|
904
|
+
"name": "parameter.name.tsx"
|
905
|
+
},
|
906
|
+
"paren-expression": {
|
907
|
+
"begin": "\\(",
|
908
|
+
"beginCaptures": {
|
909
|
+
"0": {
|
910
|
+
"name": "meta.brace.paren.tsx"
|
911
|
+
}
|
912
|
+
},
|
913
|
+
"end": "\\)",
|
914
|
+
"endCaptures": {
|
915
|
+
"0": {
|
916
|
+
"name": "meta.brace.paren.tsx"
|
917
|
+
}
|
918
|
+
},
|
919
|
+
"patterns": [
|
920
|
+
{
|
921
|
+
"include": "#expression"
|
922
|
+
}
|
923
|
+
]
|
924
|
+
},
|
925
|
+
"property-accessor": {
|
926
|
+
"match": "\\b(get|set)\\b",
|
927
|
+
"name": "storage.type.property.tsx"
|
928
|
+
},
|
929
|
+
"qstring-double": {
|
930
|
+
"begin": "\"",
|
931
|
+
"end": "\"|(?=$)",
|
932
|
+
"name": "string.double.tsx",
|
933
|
+
"patterns": [
|
934
|
+
{
|
935
|
+
"include": "#string-character-escape"
|
936
|
+
}
|
937
|
+
]
|
938
|
+
},
|
939
|
+
"qstring-single": {
|
940
|
+
"begin": "'",
|
941
|
+
"end": "'|(?=$)",
|
942
|
+
"name": "string.single.tsx",
|
943
|
+
"patterns": [
|
944
|
+
{
|
945
|
+
"include": "#string-character-escape"
|
946
|
+
}
|
947
|
+
]
|
948
|
+
},
|
949
|
+
"regex": {
|
950
|
+
"begin": "(?<=[=(:,\\[]|^|return|&&|\\|\\||!)\\s*(/)(?![/*+{}?])",
|
951
|
+
"end": "$|(/)[igm]*",
|
952
|
+
"name": "string.regex.tsx",
|
953
|
+
"patterns": [
|
954
|
+
{
|
955
|
+
"match": "\\\\.",
|
956
|
+
"name": "constant.character.escape.tsx"
|
957
|
+
},
|
958
|
+
{
|
959
|
+
"match": "\\[(\\\\\\]|[^\\]])*\\]",
|
960
|
+
"name": "constant.character.class.tsx"
|
961
|
+
}
|
962
|
+
]
|
963
|
+
},
|
964
|
+
"relational-operator": {
|
965
|
+
"match": "===|==|=|!=|!==|<=|>=|<>|<|>",
|
966
|
+
"name": "keyword.operator.comparison.tsx"
|
967
|
+
},
|
968
|
+
"return-type": {
|
969
|
+
"begin": "(?<=\\))\\s*:",
|
970
|
+
"end": "(?=$)|(?=\\{|;|//)",
|
971
|
+
"name": "meta.return.type.tsx",
|
972
|
+
"patterns": [
|
973
|
+
{
|
974
|
+
"include": "#type"
|
975
|
+
}
|
976
|
+
]
|
977
|
+
},
|
978
|
+
"static-modifier": {
|
979
|
+
"match": "\\b(static)\\b",
|
980
|
+
"name": "keyword.other.tsx"
|
981
|
+
},
|
982
|
+
"storage-keyword": {
|
983
|
+
"match": "\\b(number|boolean|string|var|let|function|const)\\b",
|
984
|
+
"name": "storage.type.tsx"
|
985
|
+
},
|
986
|
+
"string": {
|
987
|
+
"name": "string.tsx",
|
988
|
+
"patterns": [
|
989
|
+
{
|
990
|
+
"include": "#qstring-single"
|
991
|
+
},
|
992
|
+
{
|
993
|
+
"include": "#qstring-double"
|
994
|
+
}
|
995
|
+
]
|
996
|
+
},
|
997
|
+
"string-character-escape": {
|
998
|
+
"match": "\\\\(x\\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)",
|
999
|
+
"name": "constant.character.escape"
|
1000
|
+
},
|
1001
|
+
"switch-case": {
|
1002
|
+
"begin": "(?<!\\.)\\b(case|default)\\b",
|
1003
|
+
"beginCaptures": {
|
1004
|
+
"1": {
|
1005
|
+
"name": "keyword.control.tsx"
|
1006
|
+
}
|
1007
|
+
},
|
1008
|
+
"end": ":",
|
1009
|
+
"name": "case.expr.tsx",
|
1010
|
+
"patterns": [
|
1011
|
+
{
|
1012
|
+
"include": "#expression"
|
1013
|
+
}
|
1014
|
+
]
|
1015
|
+
},
|
1016
|
+
"template": {
|
1017
|
+
"begin": "`",
|
1018
|
+
"beginCaptures": {
|
1019
|
+
"0": {
|
1020
|
+
"name": "string.template.tsx"
|
1021
|
+
}
|
1022
|
+
},
|
1023
|
+
"end": "`",
|
1024
|
+
"endCaptures": {
|
1025
|
+
"0": {
|
1026
|
+
"name": "string.template.tsx"
|
1027
|
+
}
|
1028
|
+
},
|
1029
|
+
"name": "meta.template.tsx",
|
1030
|
+
"patterns": [
|
1031
|
+
{
|
1032
|
+
"include": "#template-substitution-element"
|
1033
|
+
},
|
1034
|
+
{
|
1035
|
+
"include": "#template-string-contents"
|
1036
|
+
}
|
1037
|
+
]
|
1038
|
+
},
|
1039
|
+
"template-string-contents": {
|
1040
|
+
"begin": ".*?",
|
1041
|
+
"end": "(?=(\\$\\{|`))",
|
1042
|
+
"name": "string.template.tsx",
|
1043
|
+
"patterns": [
|
1044
|
+
{
|
1045
|
+
"include": "#string-character-escape"
|
1046
|
+
}
|
1047
|
+
]
|
1048
|
+
},
|
1049
|
+
"template-substitution-element": {
|
1050
|
+
"begin": "\\$\\{",
|
1051
|
+
"beginCaptures": {
|
1052
|
+
"0": {
|
1053
|
+
"name": "keyword.operator.tsx"
|
1054
|
+
}
|
1055
|
+
},
|
1056
|
+
"end": "\\}",
|
1057
|
+
"endCaptures": {
|
1058
|
+
"0": {
|
1059
|
+
"name": "keyword.operator.tsx"
|
1060
|
+
}
|
1061
|
+
},
|
1062
|
+
"name": "template.element.tsx",
|
1063
|
+
"patterns": [
|
1064
|
+
{
|
1065
|
+
"include": "#expression"
|
1066
|
+
}
|
1067
|
+
]
|
1068
|
+
},
|
1069
|
+
"this-literal": {
|
1070
|
+
"match": "\\b(this)\\b",
|
1071
|
+
"name": "constant.language.this.tsx"
|
1072
|
+
},
|
1073
|
+
"type": {
|
1074
|
+
"name": "meta.type.tsx",
|
1075
|
+
"patterns": [
|
1076
|
+
{
|
1077
|
+
"include": "#type-primitive"
|
1078
|
+
},
|
1079
|
+
{
|
1080
|
+
"include": "#type-parameters"
|
1081
|
+
},
|
1082
|
+
{
|
1083
|
+
"include": "#type-tuple"
|
1084
|
+
},
|
1085
|
+
{
|
1086
|
+
"include": "#type-object"
|
1087
|
+
},
|
1088
|
+
{
|
1089
|
+
"include": "#type-operator"
|
1090
|
+
},
|
1091
|
+
{
|
1092
|
+
"include": "#type-paren-or-function-type-parameters"
|
1093
|
+
},
|
1094
|
+
{
|
1095
|
+
"include": "#type-function-return-type"
|
1096
|
+
},
|
1097
|
+
{
|
1098
|
+
"include": "#type-name"
|
1099
|
+
}
|
1100
|
+
]
|
1101
|
+
},
|
1102
|
+
"type-annotation": {
|
1103
|
+
"begin": ":",
|
1104
|
+
"end": "(?=$|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[a-zA-Z_$])\\s*(?=\\{)",
|
1105
|
+
"name": "meta.type.annotation.tsx",
|
1106
|
+
"patterns": [
|
1107
|
+
{
|
1108
|
+
"include": "#type"
|
1109
|
+
},
|
1110
|
+
{
|
1111
|
+
"include": "#string"
|
1112
|
+
},
|
1113
|
+
{
|
1114
|
+
"include": "#comment"
|
1115
|
+
}
|
1116
|
+
]
|
1117
|
+
},
|
1118
|
+
"type-declaration": {
|
1119
|
+
"begin": "\\b(type)\\b\\s+([a-zA-Z_$][\\w$]*)\\s*=\\s*",
|
1120
|
+
"beginCaptures": {
|
1121
|
+
"1": {
|
1122
|
+
"name": "keyword.other.tsx"
|
1123
|
+
},
|
1124
|
+
"2": {
|
1125
|
+
"name": "storage.type.tsx"
|
1126
|
+
}
|
1127
|
+
},
|
1128
|
+
"end": "(?=[,);>]|var|type|function|class|interface)",
|
1129
|
+
"name": "meta.type.declaration.tsx",
|
1130
|
+
"patterns": [
|
1131
|
+
{
|
1132
|
+
"include": "#type"
|
1133
|
+
}
|
1134
|
+
]
|
1135
|
+
},
|
1136
|
+
"type-function-return-type": {
|
1137
|
+
"begin": "=>",
|
1138
|
+
"beginCaptures": {
|
1139
|
+
"0": {
|
1140
|
+
"name": "keyword.operator.tsx"
|
1141
|
+
}
|
1142
|
+
},
|
1143
|
+
"end": "(?=\\s*[,\\)\\{=;>]|//|$)",
|
1144
|
+
"name": "meta.type.function.return.tsx",
|
1145
|
+
"patterns": [
|
1146
|
+
{
|
1147
|
+
"include": "#type"
|
1148
|
+
}
|
1149
|
+
]
|
1150
|
+
},
|
1151
|
+
"type-name": {
|
1152
|
+
"captures": {
|
1153
|
+
"1": {
|
1154
|
+
"name": "entity.name.type.tsx"
|
1155
|
+
}
|
1156
|
+
},
|
1157
|
+
"match": "[a-zA-Z_$][.\\w$]*",
|
1158
|
+
"name": "meta.type.name.tsx"
|
1159
|
+
},
|
1160
|
+
"type-object": {
|
1161
|
+
"begin": "\\{",
|
1162
|
+
"beginCaptures": {
|
1163
|
+
"0": {
|
1164
|
+
"name": "meta.brace.curly.tsx"
|
1165
|
+
}
|
1166
|
+
},
|
1167
|
+
"end": "\\}",
|
1168
|
+
"endCaptures": {
|
1169
|
+
"0": {
|
1170
|
+
"name": "meta.brace.curly.tsx"
|
1171
|
+
}
|
1172
|
+
},
|
1173
|
+
"name": "meta.object.type.tsx",
|
1174
|
+
"patterns": [
|
1175
|
+
{
|
1176
|
+
"include": "#comment"
|
1177
|
+
},
|
1178
|
+
{
|
1179
|
+
"include": "#field-declaration"
|
1180
|
+
},
|
1181
|
+
{
|
1182
|
+
"include": "#method-declaration"
|
1183
|
+
},
|
1184
|
+
{
|
1185
|
+
"include": "#indexer-declaration"
|
1186
|
+
},
|
1187
|
+
{
|
1188
|
+
"include": "#type-annotation"
|
1189
|
+
}
|
1190
|
+
]
|
1191
|
+
},
|
1192
|
+
"type-operator": {
|
1193
|
+
"match": "[.|]",
|
1194
|
+
"name": "keyword.operator.type.tsx"
|
1195
|
+
},
|
1196
|
+
"type-parameters": {
|
1197
|
+
"begin": "([a-zA-Z_$][\\w$]*)?(<)",
|
1198
|
+
"beginCaptures": {
|
1199
|
+
"1": {
|
1200
|
+
"name": "entity.name.type.tsx"
|
1201
|
+
},
|
1202
|
+
"2": {
|
1203
|
+
"name": "meta.brace.angle.tsx"
|
1204
|
+
}
|
1205
|
+
},
|
1206
|
+
"end": "(?=$)|(>)",
|
1207
|
+
"endCaptures": {
|
1208
|
+
"2": {
|
1209
|
+
"name": "meta.brace.angle.tsx"
|
1210
|
+
}
|
1211
|
+
},
|
1212
|
+
"name": "meta.type.parameters.tsx",
|
1213
|
+
"patterns": [
|
1214
|
+
{
|
1215
|
+
"match": "\\b(extends)\\b",
|
1216
|
+
"name": "keyword.other.tsx"
|
1217
|
+
},
|
1218
|
+
{
|
1219
|
+
"include": "#comment"
|
1220
|
+
},
|
1221
|
+
{
|
1222
|
+
"include": "#type"
|
1223
|
+
}
|
1224
|
+
]
|
1225
|
+
},
|
1226
|
+
"type-paren-or-function-type-parameters": {
|
1227
|
+
"begin": "(?:\\b(new)\\b)?\\s*\\(",
|
1228
|
+
"beginCaptures": {
|
1229
|
+
"1": {
|
1230
|
+
"name": "keyword.control.tsx"
|
1231
|
+
}
|
1232
|
+
},
|
1233
|
+
"end": "\\)",
|
1234
|
+
"name": "meta.type.paren.cover.tsx",
|
1235
|
+
"patterns": [
|
1236
|
+
{
|
1237
|
+
"include": "#comment"
|
1238
|
+
},
|
1239
|
+
{
|
1240
|
+
"include": "#type"
|
1241
|
+
},
|
1242
|
+
{
|
1243
|
+
"include": "#function-type-parameters"
|
1244
|
+
}
|
1245
|
+
]
|
1246
|
+
},
|
1247
|
+
"type-primitive": {
|
1248
|
+
"captures": {
|
1249
|
+
"1": {
|
1250
|
+
"name": "storage.type.tsx"
|
1251
|
+
}
|
1252
|
+
},
|
1253
|
+
"match": "\\b(string|number|boolean|symbol|any|void)\\b",
|
1254
|
+
"name": "meta.type.primitive.tsx"
|
1255
|
+
},
|
1256
|
+
"type-tuple": {
|
1257
|
+
"begin": "\\[",
|
1258
|
+
"beginCaptures": {
|
1259
|
+
"0": {
|
1260
|
+
"name": "meta.brace.square.tsx"
|
1261
|
+
}
|
1262
|
+
},
|
1263
|
+
"end": "\\]",
|
1264
|
+
"endCaptures": {
|
1265
|
+
"0": {
|
1266
|
+
"name": "meta.brace.square.tsx"
|
1267
|
+
}
|
1268
|
+
},
|
1269
|
+
"name": "meta.type.tuple.tsx",
|
1270
|
+
"patterns": [
|
1271
|
+
{
|
1272
|
+
"include": "#type"
|
1273
|
+
},
|
1274
|
+
{
|
1275
|
+
"include": "#comment"
|
1276
|
+
}
|
1277
|
+
]
|
1278
|
+
},
|
1279
|
+
"undefined-literal": {
|
1280
|
+
"match": "\\b(undefined)\\b",
|
1281
|
+
"name": "constant.language.tsx"
|
1282
|
+
},
|
1283
|
+
"var-expr": {
|
1284
|
+
"begin": "(?<!\\()\\s*\\b(var|let|const(?!\\s+enum))\\s+([a-zA-Z_$][\\w$]*)",
|
1285
|
+
"beginCaptures": {
|
1286
|
+
"1": {
|
1287
|
+
"name": "storage.type.tsx"
|
1288
|
+
},
|
1289
|
+
"2": {
|
1290
|
+
"name": "variable.tsx"
|
1291
|
+
}
|
1292
|
+
},
|
1293
|
+
"end": "(?=$|[;=\\}\\{])|(?<=\\})",
|
1294
|
+
"name": "meta.var.expr.tsx",
|
1295
|
+
"patterns": [
|
1296
|
+
{
|
1297
|
+
"include": "#type-annotation"
|
1298
|
+
},
|
1299
|
+
{
|
1300
|
+
"include": "#string"
|
1301
|
+
},
|
1302
|
+
{
|
1303
|
+
"include": "#comment"
|
1304
|
+
}
|
1305
|
+
]
|
1306
|
+
},
|
1307
|
+
"variable-initializer": {
|
1308
|
+
"begin": "(=)",
|
1309
|
+
"beginCaptures": {
|
1310
|
+
"1": {
|
1311
|
+
"name": "keyword.operator.tsx"
|
1312
|
+
}
|
1313
|
+
},
|
1314
|
+
"end": "(?=$|[,);=])",
|
1315
|
+
"patterns": [
|
1316
|
+
{
|
1317
|
+
"include": "#expression"
|
1318
|
+
}
|
1319
|
+
]
|
1320
|
+
}
|
1321
|
+
},
|
1322
|
+
"scopeName": "source.tsx",
|
1323
|
+
"uuid": "805375ec-d614-41f5-8993-5843fe63ea82"
|
1324
|
+
}
|