github-linguist 9.6.0 → 9.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/grammars/documentation.markdown.injection.haxe.json +1 -1
- data/grammars/gno.mod.json +1 -0
- data/grammars/inline.hbs.json +1 -1
- data/grammars/inline.template.json +1 -1
- data/grammars/markdown.glimmer.codeblock.json +1 -1
- data/grammars/markdown.goose.codeblock.json +1 -0
- data/grammars/markdown.nextflow.codeblock.json +1 -0
- data/grammars/markdown.ocaml.codeblock.json +1 -0
- data/grammars/markdown.reason.codeblock.json +1 -0
- data/grammars/markdown.roc.codeblock.json +1 -0
- data/grammars/nextflow.interpolation.injection.json +1 -0
- data/grammars/nextflow.script.injection.json +1 -0
- data/grammars/source.abl.json +1 -1
- data/grammars/source.abnf.json +1 -1
- data/grammars/source.action.menhir.json +1 -0
- data/grammars/source.aleo.json +1 -0
- data/grammars/source.ampl.dat.json +1 -0
- data/grammars/source.ampl.json +1 -1
- data/grammars/source.apl.json +1 -1
- data/grammars/source.armasm.json +1 -0
- data/grammars/source.astro.json +1 -1
- data/grammars/source.astylerc.json +1 -0
- data/grammars/source.atd.json +1 -0
- data/grammars/source.avisynth.json +1 -0
- data/grammars/source.baml.json +1 -1
- data/grammars/source.bbcbasic.json +1 -0
- data/grammars/source.bend.json +1 -0
- data/grammars/source.bird2.json +1 -0
- data/grammars/source.blueprint.json +1 -0
- data/grammars/source.bnd.json +1 -1
- data/grammars/source.bsl.json +1 -1
- data/grammars/source.c++.json +1 -1
- data/grammars/source.c.json +1 -1
- data/grammars/source.c3.json +1 -1
- data/grammars/source.carbon.json +1 -0
- data/grammars/source.cedar.json +1 -0
- data/grammars/source.cj.json +1 -1
- data/grammars/source.cl.json +1 -1
- data/grammars/source.clar.json +1 -1
- data/grammars/source.cmake.json +1 -1
- data/grammars/source.cmd.json +1 -1
- data/grammars/source.cmhg.json +1 -0
- data/grammars/source.comment-string.wesl.json +1 -1
- data/grammars/source.comment-string.wgsl.json +1 -1
- data/grammars/source.compact.json +1 -0
- data/grammars/source.cram.json +1 -0
- data/grammars/source.cs.json +1 -1
- data/grammars/source.csswg.json +1 -1
- data/grammars/source.cue.json +1 -1
- data/grammars/source.curlrc.json +1 -1
- data/grammars/source.dart.json +1 -1
- data/grammars/source.dataflex.json +1 -0
- data/grammars/source.dax.json +1 -0
- data/grammars/source.dds.dspf.json +1 -1
- data/grammars/source.dds.icff.json +1 -1
- data/grammars/source.dds.lf.json +1 -1
- data/grammars/source.dds.pf.json +1 -1
- data/grammars/source.dds.prtf.json +1 -1
- data/grammars/source.deq.json +1 -0
- data/grammars/source.ditroff.desc.json +1 -1
- data/grammars/source.dm.json +1 -1
- data/grammars/source.dml.json +1 -0
- data/grammars/source.dune-project.json +1 -0
- data/grammars/source.dune-workspace.json +1 -0
- data/grammars/source.dune.json +1 -1
- data/grammars/source.easycrypt.json +1 -0
- data/grammars/source.emacs.lisp.json +1 -1
- data/grammars/source.env-spec.json +1 -0
- data/grammars/source.erlang.json +1 -1
- data/grammars/source.ets.json +1 -0
- data/grammars/source.fift.json +1 -0
- data/grammars/source.flix.json +1 -1
- data/grammars/source.fpp.json +1 -0
- data/grammars/source.func.json +1 -0
- data/grammars/source.gdscript.json +1 -1
- data/grammars/source.gedcom.json +1 -1
- data/grammars/source.gitconfig.json +1 -1
- data/grammars/source.gjs.json +1 -1
- data/grammars/source.gno.json +1 -0
- data/grammars/source.goose.json +1 -0
- data/grammars/source.graphql.json +1 -1
- data/grammars/source.gts.json +1 -1
- data/grammars/source.hack.json +1 -1
- data/grammars/source.hx.json +1 -1
- data/grammars/source.hxml.json +1 -1
- data/grammars/source.ice.json +1 -1
- data/grammars/source.ifc.json +1 -0
- data/grammars/source.indent-profile.json +1 -0
- data/grammars/source.ink.json +1 -1
- data/grammars/source.jac.json +1 -1
- data/grammars/source.jass.json +1 -0
- data/grammars/source.julia.console.json +1 -1
- data/grammars/source.julia.json +1 -1
- data/grammars/source.kcl.json +1 -1
- data/grammars/source.kerml.json +1 -0
- data/grammars/source.koka.json +1 -1
- data/grammars/source.leo.json +1 -1
- data/grammars/source.liquidsoap.json +1 -1
- data/grammars/source.lobster.json +1 -0
- data/grammars/source.logos.json +1 -1
- data/grammars/source.lsf.json +1 -0
- data/grammars/source.luau.json +1 -1
- data/grammars/source.lumscript.json +1 -0
- data/grammars/source.m2.json +1 -1
- data/grammars/source.maple.json +1 -0
- data/grammars/source.metafont.json +1 -0
- data/grammars/source.metapost.json +1 -0
- data/grammars/source.mi.json +1 -1
- data/grammars/source.mo.json +1 -1
- data/grammars/source.mojo.json +1 -1
- data/grammars/source.moonbit.config.json +1 -1
- data/grammars/source.moonbit.json +1 -1
- data/grammars/source.ms.json +1 -0
- data/grammars/source.nextflow-config.json +1 -0
- data/grammars/source.nextflow-groovy.json +1 -1
- data/grammars/source.nextflow-log.json +1 -0
- data/grammars/source.nextflow.json +1 -1
- data/grammars/source.nim.json +1 -1
- data/grammars/source.nushell.json +1 -1
- data/grammars/source.ocaml.META.json +1 -0
- data/grammars/source.ocaml.interface.json +1 -0
- data/grammars/source.ocaml.json +1 -1
- data/grammars/source.ocaml.menhir.json +1 -0
- data/grammars/source.ocaml.merlin.json +1 -0
- data/grammars/source.ocaml.mlx.json +1 -0
- data/grammars/source.ocaml.oasis.json +1 -0
- data/grammars/source.ocaml.ocamlbuild.json +1 -0
- data/grammars/source.ocaml.ocamldoc.json +1 -0
- data/grammars/source.ocaml.ocamlformat.json +1 -0
- data/grammars/source.ocaml.ocamllex.json +1 -0
- data/grammars/source.ocaml.opam-install.json +1 -0
- data/grammars/source.ocaml.opam.json +1 -0
- data/grammars/source.openqasm.json +1 -1
- data/grammars/source.opy.json +1 -1
- data/grammars/source.paperspecs.json +1 -0
- data/grammars/source.pkl.json +1 -1
- data/grammars/source.pl.json +1 -0
- data/grammars/source.pnlgrp.json +1 -1
- data/grammars/source.prisma.json +1 -1
- data/grammars/source.qsharp.json +1 -1
- data/grammars/source.quint.json +1 -1
- data/grammars/source.rarlist.json +1 -0
- data/grammars/source.rascal.json +1 -1
- data/grammars/source.rascript.json +1 -1
- data/grammars/source.reason.json +1 -1
- data/grammars/source.rego.json +1 -1
- data/grammars/source.rhai.json +1 -0
- data/grammars/source.roc.json +1 -1
- data/grammars/source.ron.json +1 -1
- data/grammars/source.rpg.json +1 -1
- data/grammars/source.rpgle.json +1 -1
- data/grammars/source.rpm-spec.json +1 -1
- data/grammars/source.rust.json +1 -1
- data/grammars/source.scala.json +1 -1
- data/grammars/source.skip.json +1 -0
- data/grammars/source.skript.json +1 -0
- data/grammars/source.slice.json +1 -1
- data/grammars/source.smithy.json +1 -1
- data/grammars/source.spicedb.json +1 -1
- data/grammars/source.stim.json +1 -0
- data/grammars/source.surrealql.json +1 -1
- data/grammars/source.swift.json +1 -1
- data/grammars/source.sysml.json +1 -0
- data/grammars/source.tablegen.json +1 -0
- data/grammars/source.tasm.json +1 -0
- data/grammars/source.tlb.json +1 -0
- data/grammars/source.tolk.json +1 -0
- data/grammars/source.tsp.json +1 -1
- data/grammars/source.tsq.json +1 -0
- data/grammars/source.tsrx.json +1 -0
- data/grammars/source.ucode-template.json +1 -0
- data/grammars/source.ucode.json +1 -0
- data/grammars/source.uiua.json +1 -0
- data/grammars/source.vento.json +1 -1
- data/grammars/source.verse.json +1 -0
- data/grammars/source.veryl.json +1 -0
- data/grammars/source.vespaSchema.json +1 -0
- data/grammars/source.vespaYQL.json +1 -0
- data/grammars/source.vhs.json +1 -0
- data/grammars/source.vim9.json +1 -0
- data/grammars/source.wdl.json +1 -1
- data/grammars/source.webassembly.json +1 -1
- data/grammars/source.wesl.json +1 -1
- data/grammars/source.wgsl.json +1 -1
- data/grammars/source.yaml.salt.json +1 -1
- data/grammars/text.bbcode.json +1 -0
- data/grammars/text.html.cobmd.json +1 -0
- data/grammars/text.html.ember-handlebars.json +1 -1
- data/grammars/text.html.handlebars.json +1 -1
- data/grammars/text.html.jte.json +1 -1
- data/grammars/text.html.markdown.json +1 -0
- data/grammars/text.html.pfm.json +1 -0
- data/grammars/text.html.ss.json +1 -0
- data/grammars/text.html.statamic.json +1 -1
- data/grammars/text.marko.json +1 -1
- data/grammars/text.recfile.json +1 -0
- data/grammars/text.roff.json +1 -1
- data/grammars/text.valve-cfg.json +1 -1
- data/grammars/text.vtt.json +1 -1
- data/grammars/version +1 -1
- data/lib/linguist/VERSION +1 -1
- data/lib/linguist/blob_helper.rb +21 -2
- data/lib/linguist/documentation.yml +3 -0
- data/lib/linguist/generated.rb +99 -8
- data/lib/linguist/generic.yml +3 -0
- data/lib/linguist/heuristics.yml +239 -62
- data/lib/linguist/language.rb +5 -9
- data/lib/linguist/languages.yml +610 -30
- data/lib/linguist/languages_data.rb +7965 -0
- data/lib/linguist/lazy_blob.rb +6 -1
- data/lib/linguist/samples.rb +4 -10
- data/lib/linguist/samples_data.rb +203998 -0
- data/lib/linguist/strategy/modeline.rb +0 -1
- data/lib/linguist/vendor.yml +3 -0
- metadata +95 -25
- data/grammars/markdown.bicep.codeblock.json +0 -1
- data/grammars/source.baml-jinja.json +0 -1
- data/grammars/source.camlp4.ocaml.json +0 -1
- data/grammars/source.ocamllex.json +0 -1
- data/grammars/source.ocamlyacc.json +0 -1
- data/grammars/source.reason.hover.type.json +0 -1
- data/grammars/source.scm.json +0 -1
- data/grammars/text.plain.json +0 -1
- data/lib/linguist/languages.json +0 -1
- data/lib/linguist/samples.json +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"SysML v2","scopeName":"source.sysml","patterns":[{"include":"#comments"},{"include":"#strings"},{"include":"#quoted-names"},{"include":"#declaration-names"},{"include":"#type-references"},{"include":"#constants"},{"include":"#keywords-declaration"},{"include":"#keywords-control"},{"include":"#keywords-modifier"},{"include":"#keywords-relationship"},{"include":"#keywords-operator"},{"include":"#keywords-other"},{"include":"#keywords-contextual"},{"include":"#qualified-names"},{"include":"#numbers"},{"include":"#operators"}],"repository":{"comments":{"patterns":[{"name":"comment.block.note.source.sysml","begin":"//\\*","end":"\\*/"},{"name":"comment.line.double-slash.source.sysml","match":"//.*$"},{"name":"comment.block.source.sysml","begin":"/\\*","end":"\\*/"}]},"constants":{"name":"constant.language.source.sysml","match":"\\b(?:false|null|true)\\b"},"declaration-names":{"match":"\\b(alias|def|namespace|package)\\s+([A-Za-z_][A-Za-z0-9_]*|'[^']*')","captures":{"1":{"name":"keyword.declaration.source.sysml"},"2":{"name":"entity.name.type.source.sysml"}}},"keywords-contextual":{"name":"keyword.other.contextual.source.sysml","match":"\\b(?:junction|history|shallow|choice|chain|deep|done)\\b"},"keywords-control":{"name":"keyword.control.source.sysml","match":"\\b(?:succession|transition|terminate|parallel|exhibit|include|perform|require|satisfy|accept|assert|assign|decide|render|return|after|entry|first|merge|until|while|else|exit|fork|join|loop|send|then|when|for|via|at|do|if|to)\\b"},"keywords-declaration":{"name":"keyword.declaration.source.sysml","match":"\\b(?:multiplicity|verification|interaction|requirement|allocation|classifier|connection|constraint|dependency|occurrence|attribute|connector|interface|metaclass|namespace|predicate|rendering|viewpoint|analysis|behavior|datatype|function|language|metadata|binding|comment|concern|feature|package|action|struct|assoc|class|event|state|calc|case|enum|expr|flow|item|part|port|step|type|view|def|doc|rep)\\b"},"keywords-modifier":{"name":"storage.modifier.source.sysml","match":"\\b(?:individual|composite|nonunique|protected|timeslice|variation|abstract|constant|snapshot|standard|default|derived|library|ordered|portion|private|variant|member|public|const|inout|all|end|new|out|ref|in)\\b"},"keywords-operator":{"name":"keyword.operator.word.source.sysml","match":"\\b(?:defined|hastype|implies|chains|istype|meta|and|not|xor|as|or)\\b"},"keywords-other":{"name":"keyword.other.source.sysml","match":"\\b(?:stakeholder|objective|allocate|connect|message|subject|assume|expose|filter|locale|verify|about|actor|frame|bind|bool|from|inv|use|by|of)\\b"},"keywords-relationship":{"name":"keyword.other.relationship.source.sysml","match":"\\b(?:specialization|subclassifier|redefinition|conjugation|differences|specializes|conjugates|disjoining|intersects|references|conjugate|featuring|inverting|redefines|disjoint|featured|crosses|inverse|subsets|subtype|import|subset|typing|unions|alias|typed)\\b"},"numbers":{"name":"constant.numeric.source.sysml","match":"\\b\\d+(\\.\\d+)?([eE][+-]?\\d+)?\\b"},"operators":{"name":"keyword.operator.source.sysml","match":":\u003e\u003e|::\u003e|:\u003e|=\u003e|-\u003e|\\.\\.|\\*\\*|[=+\\-*/\u003c\u003e!\u0026|^~?@]"},"qualified-names":{"name":"entity.name.namespace.source.sysml","match":"\\b[A-Za-z_][A-Za-z0-9_]*(?=\\s*::)"},"quoted-names":{"name":"entity.name.quoted.source.sysml","begin":"'","end":"'","patterns":[{"name":"constant.character.escape.source.sysml","match":"\\\\."}]},"strings":{"name":"string.quoted.double.source.sysml","begin":"\"","end":"\"","patterns":[{"name":"constant.character.escape.source.sysml","match":"\\\\."}]},"type-references":{"match":"(:\u003e\u003e|::\u003e|:\u003e|:)\\s*((?:[A-Za-z_][A-Za-z0-9_]*::)*(?:[A-Za-z_][A-Za-z0-9_]*|'[^']*'))","captures":{"1":{"name":"keyword.operator.source.sysml"},"2":{"name":"entity.name.type.source.sysml"}}}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"TableGen","scopeName":"source.tablegen","patterns":[{"include":"#comments"},{"include":"#preprocessor"},{"include":"#strings"},{"include":"#integer"},{"include":"#builtin_types"},{"include":"#keywords"},{"include":"#classes"},{"include":"#defs"},{"include":"#values"}],"repository":{"bang_operators":{"patterns":[{"begin":"(\\!cast|\\!getdagop|\\!isa)\\\u003c","end":"\\\u003e","patterns":[{"include":"#types"}],"beginCaptures":{"1":{"name":"entity.name.function"}}},{"name":"entity.name.function","match":"(\\!\\w+)\\b"}]},"builtin_types":{"patterns":[{"name":"entity.name.type.tablegen","match":"\\b(?:bit|code|dag|int|string)\\b"},{"begin":"\\b(bits)\\\u003c","end":"\\\u003e","patterns":[{"include":"#integer"}],"beginCaptures":{"1":{"name":"entity.name.type.tablegen"}}},{"begin":"\\b(list)\\\u003c","end":"\\\u003e","patterns":[{"include":"#types"}],"beginCaptures":{"1":{"name":"entity.name.type.tablegen"}}}]},"classes":{"begin":"\\b(multiclass|class)\\b\\s+(\\w+)\\b","end":"(\\;|\\})","patterns":[{"begin":"\\\u003c","end":"\\\u003e","patterns":[{"include":"#builtin_types"},{"match":"\\b(\\w+\\s+)?\\b(\\w+)\\b","captures":{"1":{"name":"entity.name.type.tablegen"},"2":{"name":"variable.other.tablegen"}}},{"begin":"=","end":"(?=\\\u003e|\\,)","patterns":[{"include":"#values"}]}]},{"include":"#record_body"}],"beginCaptures":{"1":{"name":"keyword.other.class.tablegen"},"2":{"name":"entity.name.type.tablegen"}}},"comments":{"patterns":[{"name":"comment.line.double-slash.tablegen","match":"//.*$"},{"name":"comment.block.tablegen","begin":"/\\*","end":"\\*/","patterns":[{"include":"#comments"}],"captures":{"0":{"name":"comment.block.tablegen"}}}]},"defs":{"begin":"\\b(defm|def)\\b","end":"(\\;|\\})","patterns":[{"include":"#record_body"},{"include":"#values"}],"beginCaptures":{"1":{"name":"keyword.other.def.tablegen"}}},"integer":{"patterns":[{"name":"constant.numeric.tablegen","match":"\\b\\d+\\b"},{"name":"constant.numeric.hex.tablegen","match":"\\b0[xX][a-fA-F0-9]+\\b"},{"name":"constant.numeric.binary.tablegen","match":"\\b0b[01]+\\b"}]},"keywords":{"patterns":[{"name":"keyword.other.tablegen","match":"\\b(assert|else|foreach|defset|defvar|field|if|in|let|then)\\b"}]},"preprocessor":{"patterns":[{"name":"keyword.control.ifdef.tablegen","match":"^#ifdef\\s+(\\w+)","captures":{"1":{"name":"entity.name.function.preprocessor.tablegen"}}},{"name":"keyword.control.ifndef.tablegen","match":"^#ifndef\\s+(\\w+)","captures":{"1":{"name":"entity.name.function.preprocessor.tablegen"}}},{"name":"keyword.control.else.tablegen","match":"^#else"},{"name":"keyword.control.endif.tablegen","match":"#endif"},{"name":"keyword.control.ifndef.tablegen","match":"#define\\s+(\\w+)","captures":{"1":{"name":"entity.name.function.preprocessor.tablegen"}}},{"name":"keyword.control.include.tablegen","match":"^include\\s+"}]},"record_body":{"patterns":[{"begin":"\\:","end":"(?=\\;|\\{)","patterns":[{"name":"entity.name.type.tablegen","match":"\\b(\\w+)\\b"},{"begin":"\\\u003c","end":"\\\u003e","patterns":[{"include":"#values"}]}]},{"begin":"\\{","end":"(?=\\})","patterns":[{"include":"#keywords"},{"include":"#builtin_types"},{"match":"\\b(\\w+\\s+)?\\b(\\w+)\\b\\s+\\=","captures":{"1":{"name":"entity.name.type.tablegen"},"2":{"name":"variable.other.tablegen"}}},{"include":"#values"}]}]},"strings":{"patterns":[{"name":"string.quoted.double.tablegen","begin":"\"","end":"\"","patterns":[{"name":"constant.character.escape.tablegen","match":"\\\\['nt\"]"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.tablegen"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.tablegen"}}},{"name":"string.quoted.triple.tablegen","begin":"\\[{","end":"}]","patterns":[{"name":"constant.character.escape.tablegen","match":"\\\\[nt\"]"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.tablegen"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.tablegen"}}}]},"types":{"patterns":[{"include":"#builtin_types"},{"name":"entity.name.type.tablegen","match":"\\b(\\w+)\\b"}]},"values":{"patterns":[{"include":"#builtin_types"},{"include":"#bang_operators"},{"include":"#classes"},{"include":"#defs"},{"include":"#comments"},{"include":"#integer"},{"include":"#strings"},{"name":"keyword.other.tablegen","match":"\\b(?:false|true)\\b"},{"name":"keyword.other.tablegen","match":"(\\?)"},{"begin":"\\{","end":"\\}","patterns":[{"include":"#values"}]},{"begin":"\\[","end":"(?=\\])","patterns":[{"include":"#values"}]},{"begin":"\\]\\s*\\\u003c","end":"\\\u003e","patterns":[{"include":"#types"}]},{"begin":"\\(","end":"\\)","patterns":[{"include":"#values"}]},{"include":"#keywords"},{"begin":"\\b(\\w+)\\\u003c","end":"\\\u003e","patterns":[{"include":"#values"}],"beginCaptures":{"1":{"name":"entity.name.type.tablegen"}}},{"name":"variable.other.enummember.tablegen","match":"(\\$\\w+)\\b"},{"name":"variable.other.tablegen","match":"\\b(\\w+)\\b"},{"include":"#preprocessor"}]}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"tasm","scopeName":"source.tasm","patterns":[{"include":"#comment"},{"include":"#keyword"},{"include":"#instruction"},{"include":"#literal"},{"include":"#register"},{"include":"#code_block"},{"include":"#dictionary"},{"include":"#punctuation"}],"repository":{"code_block":{"name":"meta.code-block.tasm","begin":"\\{","end":"\\}","patterns":[{"include":"$self"}],"beginCaptures":{"0":{"name":"punctuation.section.code.begin.tasm"}},"endCaptures":{"0":{"name":"punctuation.section.code.end.tasm"}}},"comment":{"patterns":[{"name":"comment.line.double-slash.tasm","begin":"//","end":"$","beginCaptures":{"0":{"name":"punctuation.definition.comment.tasm"}}}]},"dictionary":{"name":"meta.dictionary.tasm","begin":"\\[","end":"\\]","patterns":[{"name":"keyword.operator.mapsto.tasm","match":"=\u003e"},{"include":"#literal"},{"include":"#code_block"},{"include":"#punctuation"}],"beginCaptures":{"0":{"name":"punctuation.section.dictionary.begin.tasm"}},"endCaptures":{"0":{"name":"punctuation.section.dictionary.end.tasm"}}},"instruction":{"patterns":[{"name":"keyword.control.instruction.tasm","match":"\\b([A-Z_][A-Z0-9_]*)\\b"}]},"keyword":{"patterns":[{"name":"keyword.other.ref.tasm","match":"\\b(ref)(?!\\w)"},{"name":"keyword.other.embed.tasm","match":"\\b(embed)(?!\\w)"},{"name":"keyword.other.exotic.tasm","match":"\\b(exotic)(?!\\w)"},{"name":"keyword.other.library.tasm","match":"\\b(library)(?!\\w)"}]},"literal":{"patterns":[{"name":"constant.numeric.hex.tasm","match":"\\b(0[xX][a-fA-F0-9](?:_?[a-fA-F0-9])*)\\b"},{"name":"constant.numeric.binary.tasm","match":"\\b(0[bB][01](?:_?[01])*)\\b"},{"name":"constant.numeric.octal.tasm","match":"\\b(0[oO][0-7](?:_?[0-7])*)\\b"},{"name":"constant.numeric.decimal.tasm","match":"\\b(-?(?:[0-9](?:_?[0-9])*))\\b"},{"name":"constant.other.hex.tasm","match":"x\\{[a-fA-F0-9_]*\\}"},{"name":"constant.other.binary.tasm","match":"b\\{[01_]*\\}"},{"name":"constant.other.boc.tasm","match":"boc\\{[a-fA-F0-9_]*\\}"},{"name":"string.quoted.double.tasm","begin":"\"","end":"\"","patterns":[{"name":"constant.character.escape.tasm","match":"\\\\."}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.tasm"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.tasm"}}}]},"punctuation":{"patterns":[{"name":"punctuation.comma.tasm","match":","},{"name":"punctuation.semi.tasm","match":";"},{"name":"punctuation.colon.tasm","match":":"}]},"register":{"patterns":[{"name":"variable.parameter.register.stack.tasm","match":"\\b(s-?[0-9]+)\\b"},{"name":"variable.parameter.register.control.tasm","match":"\\b(c[0-9]+)\\b"}]}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"tlb","scopeName":"source.tlb","patterns":[{"include":"#comment"},{"include":"#constructors"},{"include":"#typeDefinitions"},{"include":"#typeParameters"},{"include":"#fields"},{"include":"#hashExpressions"},{"include":"#operators"},{"include":"#primitiveTypes"},{"include":"#arrays"},{"include":"#numbers"},{"include":"#declarations"}],"repository":{"arrays":{"patterns":[{"name":"meta.array.tlb","begin":"\\[","end":"\\]","patterns":[{"include":"#expressions"}]}]},"comment":{"patterns":[{"name":"comment.line.double-slash.tlb","begin":"//","end":"$","beginCaptures":{"0":{"name":"punctuation.definition.comment.line.double-slash.tlb"}}},{"name":"comment.block.tlb","begin":"\\s*/\\*","end":"\\*/","beginCaptures":{"0":{"name":"comment.block.begin.tlb punctuation.definition.comment.begin.tlb"}},"endCaptures":{"0":{"name":"comment.block.end.tlb punctuation.definition.comment.end.tlb"}}}]},"constructors":{"patterns":[{"match":"([a-zA-Z_][a-zA-Z0-9_]*)\\s*(\\$[01_]+|#[0-9a-fA-F_]*)","captures":{"1":{"name":"entity.name.type.constructor.tlb"},"2":{"name":"constant.numeric.constructor-tag.tlb"}}}]},"declarations":{"patterns":[{"match":"([a-zA-Z_][a-zA-Z0-9_]*)#([0-9a-fA-F]+)","captures":{"1":{"name":"entity.name.type.tlb"},"2":{"name":"constant.numeric.hex.tlb"}}}]},"expressions":{"patterns":[{"include":"#hashExpressions"},{"include":"#operators"},{"include":"#primitiveTypes"},{"include":"#arrays"},{"include":"#numbers"},{"name":"variable.other.tlb","match":"\\b[a-zA-Z_][a-zA-Z0-9_]*\\b"}]},"fields":{"patterns":[{"match":"([a-zA-Z_][a-zA-Z0-9_]*)\\s*(:)","captures":{"1":{"name":"variable.other.property.tlb"},"2":{"name":"keyword.operator.colon.tlb"}}},{"match":"\\^\\s*\\(([^)]+)\\)","captures":{"0":{"name":"keyword.operator.reference.tlb"},"1":{"patterns":[{"include":"#expressions"}]}}}]},"hashExpressions":{"patterns":[{"match":"(##)\\s*\\(([^)]+)\\)","captures":{"1":{"name":"entity.name.function.macro.tlb"},"2":{"patterns":[{"include":"#expressions"}]}}},{"name":"entity.name.function.macro.tlb","match":"(##|~)"}]},"numbers":{"patterns":[{"name":"constant.numeric.decimal.tlb","match":"\\b\\d+\\b"},{"name":"constant.numeric.hex.tlb","match":"\\b0x[0-9a-fA-F]+\\b"}]},"operators":{"patterns":[{"name":"keyword.operator.tlb","match":"(\\+|\\-|\\*|\\|\u003c=|\u003e=|!=|=|\u003c|\u003e|\\^|~|\\?)"}]},"primitiveTypes":{"patterns":[{"name":"support.type.primitive.tlb","match":"\\b((u)?int\\d+|Type|Bit|Maybe)\\b"}]},"typeDefinitions":{"patterns":[{"match":"=\\s*([A-Z][a-zA-Z0-9]*)(?:\\s+([a-zA-Z0-9_\\s]+))?\\s*(?:X)?\\s*;","captures":{"1":{"name":"entity.name.class.tlb"},"2":{"patterns":[{"include":"#expressions"}]}}}]},"typeParameters":{"patterns":[{"match":"\\{([A-Z][a-zA-Z0-9]*):Type\\}","captures":{"1":{"name":"support.type.parameter.tlb"}}},{"match":"\\{([a-z][a-zA-Z0-9]*):([^}]+)\\}","captures":{"1":{"name":"variable.parameter.tlb"},"2":{"name":"support.type.parameter.tlb"}}}]}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"Tolk","scopeName":"source.tolk","patterns":[{"name":"comment.line.double-slash","match":"//(.*)"},{"name":"comment.block","begin":"/\\*","end":"\\*/"},{"name":"string.quoted.triple.tolk","begin":"\"\"\"","end":"\"\"\"","patterns":[{"name":"constant.character.escape.tolk","match":"\\\\."}]},{"name":"string.quoted.double.tolk","begin":"\"","end":"\"","patterns":[{"name":"constant.character.escape.tolk","match":"\\\\([nrt\\\\'\"])"}]},{"name":"constant.numeric","match":"\\b(-?(0x[0-9a-fA-F_]*|0b[01_]*|[0-9][0-9_]*))\\b"},{"name":"keyword.control","match":"\\b(do|if|try|else|while|for|break|throw|catch|return|assert|repeat|continue|asm|builtin|match|lazy)\\b"},{"name":"keyword.operator","match":"\\+|-|\\*|/|%|\\?|:|,|;|\\(|\\)|\\[|\\]|{|}|=|\u003c|\u003e|!|\u0026|\\||\\^|==|!=|\u003c=|\u003e=|\u003c\u003c|\u003e\u003e|\u0026\u0026|\\|\\||~/|\\^/|\\+=|-=|\\*=|/=|%=|\u0026=|\\|=|\\^=|-\u003e|\u003c=\u003e|~\u003e\u003e|\\^\u003e\u003e|\u003c\u003c=|\u003e\u003e=|=\u003e|\\?\\?"},{"name":"keyword.other","match":"\\b(import|export|namespace|true|false|null|mutate|tolk|as|is|private|readonly)\\b"},{"name":"keyword.other","match":"\\bself\\b"},{"name":"entity.name.type.parameter","match":"(?\u003c!\\.)\\b[TUKV]\\b"},{"match":"\\b(val|var)\\s+(?:type|enum|int|map|array|cell|Cell|void|dict|bool|any_address|slice|string|tuple|builder|continuation|never|unknown|coins|address|varint16|varint32|varuint16|varuint32|int\\d+|uint\\d+|bits\\d+|bytes\\d+)\\b","captures":{"1":{"name":"storage.modifier"}}},{"name":"constant.other","match":"\\b[A-Z][A-Z0-9_]{2,}\\b"},{"name":"storage.type","match":"(?\u003c!\\.)\\b(type|enum|int|map|array|cell|Cell|void|dict|bool|any_address|slice|string|tuple|builder|continuation|never|unknown|coins|varint16|varint32|varuint16|varuint32|int\\d+|uint\\d+|bits\\d+|bytes\\d+)\\b"},{"name":"storage.type","match":"(?\u003c!\\.)\\baddress\\b(?!\\s*:)"},{"name":"storage.modifier","match":"\\b(global|const|var|val|fun|get|struct|contract)\\b"},{"begin":"(@)(?=[A-Za-z0-9_])","end":"(?![A-Za-z0-9_.])","patterns":[{"name":"entity.name.function.decorator","match":"[A-Za-z0-9_]+"}],"beginCaptures":{"1":{"name":"entity.name.function.decorator"}}},{"match":"(\\.)?(`[^`]+`|[a-zA-Z$_][a-zA-Z0-9$_]*)(?=\\s*(?:\u003c[^()\\n]*\u003e)?\\s*\\()","captures":{"1":{"name":"keyword.operator.accessor"},"2":{"name":"entity.name.function"}}},{"match":"(\\.)(`[^`]+`|[a-zA-Z$_][a-zA-Z0-9$_]*)","captures":{"1":{"name":"keyword.operator.accessor"},"2":{"name":"variable.other.property"}}},{"name":"entity.name.type","match":"(?\u003c!\\.)\\b[A-Z][a-zA-Z0-9]*\\b"}]}
|
data/grammars/source.tsp.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"TypeSpec","scopeName":"source.tsp","patterns":[{"include":"#statement"}],"repository":{"alias-id":{"name":"meta.alias-id.typespec","begin":"(=)\\s*","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#expression"}],"beginCaptures":{"1":{"name":"keyword.operator.assignment.tsp"}}},"alias-statement":{"name":"meta.alias-statement.typespec","begin":"(?:(internal)\\s+)?\\b(alias)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)\\s*","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#alias-id"},{"include":"#type-parameters"}],"beginCaptures":{"1":{"name":"storage.modifier.tsp"},"2":{"name":"keyword.other.tsp"},"3":{"name":"entity.name.type.tsp"}}},"augment-decorator-statement":{"name":"meta.augment-decorator-statement.typespec","begin":"((@@)\\b[_$[:alpha:]](?:[_$[:alnum:]]|\\.[_$[:alpha:]])*\\b)","end":"(?=([_$[:alpha:]]|`))|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#parenthesized-expression"}],"beginCaptures":{"1":{"name":"entity.name.tag.tsp"},"2":{"name":"entity.name.tag.tsp"}}},"block-comment":{"name":"comment.block.tsp","begin":"/\\*","end":"\\*/"},"boolean-literal":{"name":"constant.language.tsp","match":"\\b(true|false)\\b"},"callExpression":{"name":"meta.callExpression.typespec","begin":"(\\b[_$[:alpha:]](?:[_$[:alnum:]]|\\.[_$[:alpha:]])*\\b)\\s*(\\()","end":"\\)","patterns":[{"include":"#token"},{"include":"#expression"},{"include":"#punctuation-comma"}],"beginCaptures":{"1":{"name":"entity.name.function.tsp"},"2":{"name":"punctuation.parenthesis.open.tsp"}},"endCaptures":{"0":{"name":"punctuation.parenthesis.close.tsp"}}},"const-statement":{"name":"meta.const-statement.typespec","begin":"(?:(internal)\\s+)?\\b(const)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#type-annotation"},{"include":"#operator-assignment"},{"include":"#expression"}],"beginCaptures":{"1":{"name":"storage.modifier.tsp"},"2":{"name":"keyword.other.tsp"},"3":{"name":"variable.name.tsp"}}},"decorator":{"name":"meta.decorator.typespec","begin":"((@)\\b[_$[:alpha:]](?:[_$[:alnum:]]|\\.[_$[:alpha:]])*\\b)","end":"(?=([_$[:alpha:]]|`))|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#parenthesized-expression"}],"beginCaptures":{"1":{"name":"entity.name.tag.tsp"},"2":{"name":"entity.name.tag.tsp"}}},"decorator-declaration-statement":{"name":"meta.decorator-declaration-statement.typespec","begin":"(?:(internal)\\s+)?(?:(extern)\\s+)?\\b(dec)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#operation-parameters"}],"beginCaptures":{"1":{"name":"storage.modifier.tsp"},"2":{"name":"keyword.other.tsp"},"3":{"name":"keyword.other.tsp"},"4":{"name":"entity.name.function.tsp"}}},"directive":{"name":"meta.directive.typespec","begin":"\\s*(#)(\\b[_$[:alpha:]][_$[:alnum:]]*\\b)","end":"$|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#string-literal"},{"include":"#identifier-expression"}],"beginCaptures":{"1":{"name":"keyword.directive.name.tsp"},"2":{"name":"keyword.directive.name.tsp"}}},"doc-comment":{"name":"comment.block.tsp","begin":"/\\*\\*","end":"\\*/","patterns":[{"include":"#doc-comment-block"}],"beginCaptures":{"0":{"name":"comment.block.tsp"}},"endCaptures":{"0":{"name":"comment.block.tsp"}}},"doc-comment-block":{"patterns":[{"include":"#doc-comment-param"},{"include":"#doc-comment-return-tag"},{"include":"#doc-comment-unknown-tag"}]},"doc-comment-param":{"name":"comment.block.tsp","match":"(?x)((@)(?:param|template|prop))\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)\\b","captures":{"1":{"name":"keyword.tag.tspdoc"},"2":{"name":"keyword.tag.tspdoc"},"3":{"name":"variable.name.tsp"}}},"doc-comment-return-tag":{"name":"comment.block.tsp","match":"(?x)((@)(?:returns))\\b","captures":{"1":{"name":"keyword.tag.tspdoc"},"2":{"name":"keyword.tag.tspdoc"}}},"doc-comment-unknown-tag":{"name":"comment.block.tsp","match":"(?x)((@)(?:\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`))\\b","captures":{"1":{"name":"entity.name.tag.tsp"},"2":{"name":"entity.name.tag.tsp"}}},"enum-body":{"name":"meta.enum-body.typespec","begin":"\\{","end":"\\}","patterns":[{"include":"#enum-member"},{"include":"#token"},{"include":"#directive"},{"include":"#decorator"},{"include":"#punctuation-comma"}],"beginCaptures":{"0":{"name":"punctuation.curlybrace.open.tsp"}},"endCaptures":{"0":{"name":"punctuation.curlybrace.close.tsp"}}},"enum-member":{"name":"meta.enum-member.typespec","begin":"(?:(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)\\s*(:?))","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#type-annotation"}],"beginCaptures":{"1":{"name":"variable.name.tsp"},"2":{"name":"keyword.operator.type.annotation.tsp"}}},"enum-statement":{"name":"meta.enum-statement.typespec","begin":"(?:(internal)\\s+)?\\b(enum)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)","end":"(?\u003c=\\})|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#enum-body"}],"beginCaptures":{"1":{"name":"storage.modifier.tsp"},"2":{"name":"keyword.other.tsp"},"3":{"name":"entity.name.type.tsp"}}},"escape-character":{"name":"constant.character.escape.tsp","match":"\\\\."},"expression":{"patterns":[{"include":"#token"},{"include":"#directive"},{"include":"#parenthesized-expression"},{"include":"#valueof"},{"include":"#typeof"},{"include":"#type-arguments"},{"include":"#object-literal"},{"include":"#tuple-literal"},{"include":"#tuple-expression"},{"include":"#model-expression"},{"include":"#callExpression"},{"include":"#identifier-expression"}]},"function-declaration-statement":{"name":"meta.function-declaration-statement.typespec","begin":"(?:(internal)\\s+)?(?:(extern)\\s+)?\\b(fn)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#operation-parameters"},{"include":"#type-annotation"}],"beginCaptures":{"1":{"name":"storage.modifier.tsp"},"2":{"name":"keyword.other.tsp"},"3":{"name":"keyword.other.tsp"},"4":{"name":"entity.name.function.tsp"}}},"identifier-expression":{"name":"entity.name.type.tsp","match":"\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`"},"import-statement":{"name":"meta.import-statement.typespec","begin":"\\b(import)\\b","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#token"}],"beginCaptures":{"1":{"name":"keyword.other.tsp"}}},"interface-body":{"name":"meta.interface-body.typespec","begin":"\\{","end":"\\}","patterns":[{"include":"#token"},{"include":"#directive"},{"include":"#decorator"},{"include":"#interface-member"},{"include":"#punctuation-semicolon"}],"beginCaptures":{"0":{"name":"punctuation.curlybrace.open.tsp"}},"endCaptures":{"0":{"name":"punctuation.curlybrace.close.tsp"}}},"interface-heritage":{"name":"meta.interface-heritage.typespec","begin":"\\b(extends)\\b","end":"((?=\\{)|(?=;|@|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b))","patterns":[{"include":"#expression"},{"include":"#punctuation-comma"}],"beginCaptures":{"1":{"name":"keyword.other.tsp"}}},"interface-member":{"name":"meta.interface-member.typespec","begin":"(?:\\b(op)\\b\\s+)?(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#operation-signature"}],"beginCaptures":{"1":{"name":"keyword.other.tsp"},"2":{"name":"entity.name.function.tsp"}}},"interface-statement":{"name":"meta.interface-statement.typespec","begin":"(?:(internal)\\s+)?\\b(interface)\\b","end":"(?\u003c=\\})|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#type-parameters"},{"include":"#interface-heritage"},{"include":"#interface-body"},{"include":"#expression"}],"beginCaptures":{"1":{"name":"storage.modifier.tsp"},"2":{"name":"keyword.other.tsp"}}},"line-comment":{"name":"comment.line.double-slash.tsp","match":"//.*$"},"model-expression":{"name":"meta.model-expression.typespec","begin":"\\{","end":"\\}","patterns":[{"include":"#model-property"},{"include":"#token"},{"include":"#directive"},{"include":"#decorator"},{"include":"#spread-operator"},{"include":"#punctuation-semicolon"}],"beginCaptures":{"0":{"name":"punctuation.curlybrace.open.tsp"}},"endCaptures":{"0":{"name":"punctuation.curlybrace.close.tsp"}}},"model-heritage":{"name":"meta.model-heritage.typespec","begin":"\\b(extends|is)\\b","end":"((?=\\{)|(?=;|@|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b))","patterns":[{"include":"#expression"},{"include":"#punctuation-comma"}],"beginCaptures":{"1":{"name":"keyword.other.tsp"}}},"model-property":{"name":"meta.model-property.typespec","begin":"(?:(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)|(\\\"(?:[^\\\"\\\\]|\\\\.)*\\\"))","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#type-annotation"},{"include":"#operator-assignment"},{"include":"#expression"}],"beginCaptures":{"1":{"name":"variable.name.tsp"},"2":{"name":"string.quoted.double.tsp"}}},"model-statement":{"name":"meta.model-statement.typespec","begin":"(?:(internal)\\s+)?\\b(model)\\b","end":"(?\u003c=\\})|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#type-parameters"},{"include":"#model-heritage"},{"include":"#expression"}],"beginCaptures":{"1":{"name":"storage.modifier.tsp"},"2":{"name":"keyword.other.tsp"}}},"namespace-body":{"name":"meta.namespace-body.typespec","begin":"\\{","end":"\\}","patterns":[{"include":"#statement"}],"beginCaptures":{"0":{"name":"punctuation.curlybrace.open.tsp"}},"endCaptures":{"0":{"name":"punctuation.curlybrace.close.tsp"}}},"namespace-name":{"name":"meta.namespace-name.typespec","begin":"(?=([_$[:alpha:]]|`))","end":"((?=\\{)|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b))","patterns":[{"include":"#identifier-expression"},{"include":"#punctuation-accessor"}]},"namespace-statement":{"name":"meta.namespace-statement.typespec","begin":"\\b(namespace)\\b","end":"((?\u003c=\\})|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b))","patterns":[{"include":"#token"},{"include":"#namespace-name"},{"include":"#namespace-body"}],"beginCaptures":{"1":{"name":"keyword.other.tsp"}}},"numeric-literal":{"name":"constant.numeric.tsp","match":"(?:\\b(?\u003c!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$)|\\b(?\u003c!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$)|(?\u003c!\\$)(?:(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)|(?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)|(?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)|(?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)|(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)|(?:\\b[0-9][0-9_]*(\\.)(n)?\\B)|(?:\\B(\\.)[0-9][0-9_]*(n)?\\b)|(?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)))(?!\\$))"},"object-literal":{"name":"meta.object-literal.typespec","begin":"#\\{","end":"\\}","patterns":[{"include":"#token"},{"include":"#object-literal-property"},{"include":"#directive"},{"include":"#spread-operator"},{"include":"#punctuation-comma"}],"beginCaptures":{"0":{"name":"punctuation.hashcurlybrace.open.tsp"}},"endCaptures":{"0":{"name":"punctuation.curlybrace.close.tsp"}}},"object-literal-property":{"name":"meta.object-literal-property.typespec","begin":"(?:(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)\\s*(:))","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#expression"}],"beginCaptures":{"1":{"name":"variable.name.tsp"},"2":{"name":"keyword.operator.type.annotation.tsp"}}},"operation-heritage":{"name":"meta.operation-heritage.typespec","begin":"\\b(is)\\b","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#expression"}],"beginCaptures":{"1":{"name":"keyword.other.tsp"}}},"operation-parameters":{"name":"meta.operation-parameters.typespec","begin":"\\(","end":"\\)","patterns":[{"include":"#token"},{"include":"#decorator"},{"include":"#model-property"},{"include":"#spread-operator"},{"include":"#punctuation-comma"}],"beginCaptures":{"0":{"name":"punctuation.parenthesis.open.tsp"}},"endCaptures":{"0":{"name":"punctuation.parenthesis.close.tsp"}}},"operation-signature":{"patterns":[{"include":"#type-parameters"},{"include":"#operation-heritage"},{"include":"#operation-parameters"},{"include":"#type-annotation"}]},"operation-statement":{"name":"meta.operation-statement.typespec","begin":"(?:(internal)\\s+)?\\b(op)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#operation-signature"}],"beginCaptures":{"1":{"name":"storage.modifier.tsp"},"2":{"name":"keyword.other.tsp"},"3":{"name":"entity.name.function.tsp"}}},"operator-assignment":{"name":"keyword.operator.assignment.tsp","match":"="},"parenthesized-expression":{"name":"meta.parenthesized-expression.typespec","begin":"\\(","end":"\\)","patterns":[{"include":"#expression"},{"include":"#punctuation-comma"}],"beginCaptures":{"0":{"name":"punctuation.parenthesis.open.tsp"}},"endCaptures":{"0":{"name":"punctuation.parenthesis.close.tsp"}}},"punctuation-accessor":{"name":"punctuation.accessor.tsp","match":"\\."},"punctuation-comma":{"name":"punctuation.comma.tsp","match":","},"punctuation-semicolon":{"name":"punctuation.terminator.statement.tsp","match":";"},"scalar-body":{"name":"meta.scalar-body.typespec","begin":"\\{","end":"\\}","patterns":[{"include":"#token"},{"include":"#directive"},{"include":"#scalar-constructor"},{"include":"#punctuation-semicolon"}],"beginCaptures":{"0":{"name":"punctuation.curlybrace.open.tsp"}},"endCaptures":{"0":{"name":"punctuation.curlybrace.close.tsp"}}},"scalar-constructor":{"name":"meta.scalar-constructor.typespec","begin":"\\b(init)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#operation-parameters"}],"beginCaptures":{"1":{"name":"keyword.other.tsp"},"2":{"name":"entity.name.function.tsp"}}},"scalar-extends":{"name":"meta.scalar-extends.typespec","begin":"\\b(extends)\\b","end":"(?=;|@|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#expression"},{"include":"#punctuation-comma"}],"beginCaptures":{"1":{"name":"keyword.other.tsp"}}},"scalar-statement":{"name":"meta.scalar-statement.typespec","begin":"(?:(internal)\\s+)?\\b(scalar)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)","end":"(?\u003c=\\})|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#type-parameters"},{"include":"#scalar-extends"},{"include":"#scalar-body"}],"beginCaptures":{"1":{"name":"storage.modifier.tsp"},"2":{"name":"keyword.other.tsp"},"3":{"name":"entity.name.type.tsp"}}},"spread-operator":{"name":"meta.spread-operator.typespec","begin":"\\.\\.\\.","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#expression"}],"beginCaptures":{"0":{"name":"keyword.operator.spread.tsp"}}},"statement":{"patterns":[{"include":"#token"},{"include":"#directive"},{"include":"#augment-decorator-statement"},{"include":"#decorator"},{"include":"#model-statement"},{"include":"#scalar-statement"},{"include":"#union-statement"},{"include":"#interface-statement"},{"include":"#enum-statement"},{"include":"#alias-statement"},{"include":"#const-statement"},{"include":"#namespace-statement"},{"include":"#operation-statement"},{"include":"#import-statement"},{"include":"#using-statement"},{"include":"#decorator-declaration-statement"},{"include":"#function-declaration-statement"},{"include":"#punctuation-semicolon"}]},"string-literal":{"name":"string.quoted.double.tsp","begin":"\"","end":"\"|$","patterns":[{"include":"#template-expression"},{"include":"#escape-character"}]},"template-expression":{"name":"meta.template-expression.typespec","begin":"\\$\\{","end":"\\}","patterns":[{"include":"#expression"}],"beginCaptures":{"0":{"name":"punctuation.definition.template-expression.begin.tsp"}},"endCaptures":{"0":{"name":"punctuation.definition.template-expression.end.tsp"}}},"token":{"patterns":[{"include":"#doc-comment"},{"include":"#line-comment"},{"include":"#block-comment"},{"include":"#triple-quoted-string-literal"},{"include":"#string-literal"},{"include":"#boolean-literal"},{"include":"#numeric-literal"}]},"triple-quoted-string-literal":{"name":"string.quoted.triple.tsp","begin":"\"\"\"","end":"\"\"\"","patterns":[{"include":"#template-expression"},{"include":"#escape-character"}]},"tuple-expression":{"name":"meta.tuple-expression.typespec","begin":"\\[","end":"\\]","patterns":[{"include":"#expression"}],"beginCaptures":{"0":{"name":"punctuation.squarebracket.open.tsp"}},"endCaptures":{"0":{"name":"punctuation.squarebracket.close.tsp"}}},"tuple-literal":{"name":"meta.tuple-literal.typespec","begin":"#\\[","end":"\\]","patterns":[{"include":"#expression"},{"include":"#punctuation-comma"}],"beginCaptures":{"0":{"name":"punctuation.hashsquarebracket.open.tsp"}},"endCaptures":{"0":{"name":"punctuation.squarebracket.close.tsp"}}},"type-annotation":{"name":"meta.type-annotation.typespec","begin":"\\s*(\\??)\\s*(:)","end":"(?=,|;|@|\\)|\\}|=|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#expression"}],"beginCaptures":{"1":{"name":"keyword.operator.optional.tsp"},"2":{"name":"keyword.operator.type.annotation.tsp"}}},"type-argument":{"name":"meta.type-argument.typespec","begin":"(?:(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)\\s*(=))","end":"(?=\u003e)|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#expression"},{"include":"#punctuation-comma"}],"beginCaptures":{"1":{"name":"entity.name.type.tsp"},"2":{"name":"keyword.operator.assignment.tsp"}},"endCaptures":{"0":{"name":"keyword.operator.assignment.tsp"}}},"type-arguments":{"name":"meta.type-arguments.typespec","begin":"\u003c","end":"\u003e","patterns":[{"include":"#type-argument"},{"include":"#expression"},{"include":"#punctuation-comma"}],"beginCaptures":{"0":{"name":"punctuation.definition.typeparameters.begin.tsp"}},"endCaptures":{"0":{"name":"punctuation.definition.typeparameters.end.tsp"}}},"type-parameter":{"name":"meta.type-parameter.typespec","begin":"(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)","end":"(?=\u003e)|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#type-parameter-constraint"},{"include":"#type-parameter-default"}],"beginCaptures":{"1":{"name":"entity.name.type.tsp"}}},"type-parameter-constraint":{"name":"meta.type-parameter-constraint.typespec","begin":"extends","end":"(?=\u003e)|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#expression"}],"beginCaptures":{"0":{"name":"keyword.other.tsp"}}},"type-parameter-default":{"name":"meta.type-parameter-default.typespec","begin":"=","end":"(?=\u003e)|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#expression"}],"beginCaptures":{"0":{"name":"keyword.operator.assignment.tsp"}}},"type-parameters":{"name":"meta.type-parameters.typespec","begin":"\u003c","end":"\u003e","patterns":[{"include":"#type-parameter"},{"include":"#punctuation-comma"}],"beginCaptures":{"0":{"name":"punctuation.definition.typeparameters.begin.tsp"}},"endCaptures":{"0":{"name":"punctuation.definition.typeparameters.end.tsp"}}},"typeof":{"name":"meta.typeof.typespec","begin":"\\b(typeof)","end":"(?=\u003e)|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#expression"}],"beginCaptures":{"1":{"name":"keyword.other.tsp"}}},"union-body":{"name":"meta.union-body.typespec","begin":"\\{","end":"\\}","patterns":[{"include":"#union-variant"},{"include":"#token"},{"include":"#directive"},{"include":"#decorator"},{"include":"#expression"},{"include":"#punctuation-comma"}],"beginCaptures":{"0":{"name":"punctuation.curlybrace.open.tsp"}},"endCaptures":{"0":{"name":"punctuation.curlybrace.close.tsp"}}},"union-statement":{"name":"meta.union-statement.typespec","begin":"(?:(internal)\\s+)?\\b(union)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)","end":"(?\u003c=\\})|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#union-body"}],"beginCaptures":{"1":{"name":"storage.modifier.tsp"},"2":{"name":"keyword.other.tsp"},"3":{"name":"entity.name.type.tsp"}}},"union-variant":{"name":"meta.union-variant.typespec","begin":"(?:(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)\\s*(:))","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#expression"}],"beginCaptures":{"1":{"name":"variable.name.tsp"},"2":{"name":"keyword.operator.type.annotation.tsp"}}},"using-statement":{"name":"meta.using-statement.typespec","begin":"\\b(using)\\b","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#identifier-expression"},{"include":"#punctuation-accessor"}],"beginCaptures":{"1":{"name":"keyword.other.tsp"}}},"valueof":{"name":"meta.valueof.typespec","begin":"\\b(valueof)","end":"(?=\u003e)|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)","patterns":[{"include":"#expression"}],"beginCaptures":{"1":{"name":"keyword.other.tsp"}}}}}
|
|
1
|
+
{"name":"TypeSpec","scopeName":"source.tsp","patterns":[{"include":"#statement"}],"repository":{"alias-id":{"name":"meta.alias-id.typespec","begin":"(=)\\s*","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#expression"}],"beginCaptures":{"1":{"name":"keyword.operator.assignment.tsp"}}},"alias-statement":{"name":"meta.alias-statement.typespec","begin":"(?:(internal)\\s+)?\\b(alias)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)\\s*","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#alias-id"},{"include":"#type-parameters"}],"beginCaptures":{"1":{"name":"storage.modifier.tsp"},"2":{"name":"keyword.other.tsp"},"3":{"name":"entity.name.type.tsp"}}},"augment-decorator-statement":{"name":"meta.augment-decorator-statement.typespec","begin":"((@@)\\b[_$[:alpha:]](?:[_$[:alnum:]]|\\.[_$[:alpha:]])*\\b)","end":"(?=([_$[:alpha:]]|`))|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#parenthesized-expression"}],"beginCaptures":{"1":{"name":"entity.name.tag.tsp"},"2":{"name":"entity.name.tag.tsp"}}},"block-comment":{"name":"comment.block.tsp","begin":"/\\*","end":"\\*/"},"boolean-literal":{"name":"constant.language.tsp","match":"\\b(true|false)\\b"},"callExpression":{"name":"meta.callExpression.typespec","begin":"(\\b[_$[:alpha:]](?:[_$[:alnum:]]|\\.[_$[:alpha:]])*\\b)\\s*(\\()","end":"\\)","patterns":[{"include":"#token"},{"include":"#expression"},{"include":"#punctuation-comma"}],"beginCaptures":{"1":{"name":"entity.name.function.tsp"},"2":{"name":"punctuation.parenthesis.open.tsp"}},"endCaptures":{"0":{"name":"punctuation.parenthesis.close.tsp"}}},"const-statement":{"name":"meta.const-statement.typespec","begin":"(?:(internal)\\s+)?\\b(const)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#type-annotation"},{"include":"#operator-assignment"},{"include":"#expression"}],"beginCaptures":{"1":{"name":"storage.modifier.tsp"},"2":{"name":"keyword.other.tsp"},"3":{"name":"variable.name.tsp"}}},"decorator":{"name":"meta.decorator.typespec","begin":"((@)\\b[_$[:alpha:]](?:[_$[:alnum:]]|\\.[_$[:alpha:]])*\\b)","end":"(?=([_$[:alpha:]]|`))|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#parenthesized-expression"}],"beginCaptures":{"1":{"name":"entity.name.tag.tsp"},"2":{"name":"entity.name.tag.tsp"}}},"decorator-declaration-statement":{"name":"meta.decorator-declaration-statement.typespec","begin":"(?:(internal)\\s+)?(?:(extern)\\s+)?\\b(dec)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#operation-parameters"}],"beginCaptures":{"1":{"name":"storage.modifier.tsp"},"2":{"name":"keyword.other.tsp"},"3":{"name":"keyword.other.tsp"},"4":{"name":"entity.name.function.tsp"}}},"directive":{"name":"meta.directive.typespec","begin":"\\s*(#)(\\b[_$[:alpha:]][_$[:alnum:]]*\\b)","end":"$|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#string-literal"},{"include":"#identifier-expression"}],"beginCaptures":{"1":{"name":"keyword.directive.name.tsp"},"2":{"name":"keyword.directive.name.tsp"}}},"doc-comment":{"name":"comment.block.tsp","begin":"/\\*\\*","end":"\\*/","patterns":[{"include":"#doc-comment-block"}],"beginCaptures":{"0":{"name":"comment.block.tsp"}},"endCaptures":{"0":{"name":"comment.block.tsp"}}},"doc-comment-block":{"patterns":[{"include":"#doc-comment-param"},{"include":"#doc-comment-return-tag"},{"include":"#doc-comment-unknown-tag"}]},"doc-comment-param":{"name":"comment.block.tsp","match":"(?x)((@)(?:param|template|prop))\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)\\b","captures":{"1":{"name":"keyword.tag.tspdoc"},"2":{"name":"keyword.tag.tspdoc"},"3":{"name":"variable.name.tsp"}}},"doc-comment-return-tag":{"name":"comment.block.tsp","match":"(?x)((@)(?:returns))\\b","captures":{"1":{"name":"keyword.tag.tspdoc"},"2":{"name":"keyword.tag.tspdoc"}}},"doc-comment-unknown-tag":{"name":"comment.block.tsp","match":"(?x)((@)(?:\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`))\\b","captures":{"1":{"name":"entity.name.tag.tsp"},"2":{"name":"entity.name.tag.tsp"}}},"enum-body":{"name":"meta.enum-body.typespec","begin":"\\{","end":"\\}","patterns":[{"include":"#enum-member"},{"include":"#token"},{"include":"#directive"},{"include":"#decorator"},{"include":"#punctuation-comma"}],"beginCaptures":{"0":{"name":"punctuation.curlybrace.open.tsp"}},"endCaptures":{"0":{"name":"punctuation.curlybrace.close.tsp"}}},"enum-expression":{"name":"meta.enum-expression.typespec","begin":"\\b(enum)\\b(?:\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`))?","end":"(?\u003c=\\})|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#enum-body"}],"beginCaptures":{"1":{"name":"keyword.other.tsp"},"2":{"name":"entity.name.type.tsp"}}},"enum-member":{"name":"meta.enum-member.typespec","begin":"(?:(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)\\s*(:?))","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#type-annotation"}],"beginCaptures":{"1":{"name":"variable.name.tsp"},"2":{"name":"keyword.operator.type.annotation.tsp"}}},"enum-statement":{"name":"meta.enum-statement.typespec","begin":"(?:(internal)\\s+)?\\b(enum)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)","end":"(?\u003c=\\})|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#enum-body"}],"beginCaptures":{"1":{"name":"storage.modifier.tsp"},"2":{"name":"keyword.other.tsp"},"3":{"name":"entity.name.type.tsp"}}},"escape-character":{"name":"constant.character.escape.tsp","match":"\\\\."},"expression":{"patterns":[{"include":"#token"},{"include":"#directive"},{"include":"#parenthesized-expression"},{"include":"#valueof"},{"include":"#typeof"},{"include":"#type-arguments"},{"include":"#object-literal"},{"include":"#tuple-literal"},{"include":"#tuple-expression"},{"include":"#model-expression-keyword"},{"include":"#scalar-expression"},{"include":"#enum-expression"},{"include":"#union-expression"},{"include":"#model-expression"},{"include":"#callExpression"},{"include":"#identifier-expression"}]},"function-declaration-statement":{"name":"meta.function-declaration-statement.typespec","begin":"(?:(internal)\\s+)?(?:(extern)\\s+)?\\b(fn)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#operation-parameters"},{"include":"#type-annotation"}],"beginCaptures":{"1":{"name":"storage.modifier.tsp"},"2":{"name":"keyword.other.tsp"},"3":{"name":"keyword.other.tsp"},"4":{"name":"entity.name.function.tsp"}}},"identifier-expression":{"name":"entity.name.type.tsp","match":"\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`"},"import-statement":{"name":"meta.import-statement.typespec","begin":"\\b(import)\\b","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#token"}],"beginCaptures":{"1":{"name":"keyword.other.tsp"}}},"interface-body":{"name":"meta.interface-body.typespec","begin":"\\{","end":"\\}","patterns":[{"include":"#token"},{"include":"#directive"},{"include":"#decorator"},{"include":"#interface-member"},{"include":"#punctuation-semicolon"}],"beginCaptures":{"0":{"name":"punctuation.curlybrace.open.tsp"}},"endCaptures":{"0":{"name":"punctuation.curlybrace.close.tsp"}}},"interface-heritage":{"name":"meta.interface-heritage.typespec","begin":"\\b(extends)\\b","end":"((?=\\{)|(?=;|@|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b))","patterns":[{"include":"#expression"},{"include":"#punctuation-comma"}],"beginCaptures":{"1":{"name":"keyword.other.tsp"}}},"interface-member":{"name":"meta.interface-member.typespec","begin":"(?:\\b(op)\\b\\s+)?(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#operation-signature"}],"beginCaptures":{"1":{"name":"keyword.other.tsp"},"2":{"name":"entity.name.function.tsp"}}},"interface-statement":{"name":"meta.interface-statement.typespec","begin":"(?:(internal)\\s+)?\\b(interface)\\b","end":"(?\u003c=\\})|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#type-parameters"},{"include":"#interface-heritage"},{"include":"#interface-body"},{"include":"#expression"}],"beginCaptures":{"1":{"name":"storage.modifier.tsp"},"2":{"name":"keyword.other.tsp"}}},"line-comment":{"name":"comment.line.double-slash.tsp","match":"//.*$"},"model-expression":{"name":"meta.model-expression.typespec","begin":"\\{","end":"\\}","patterns":[{"include":"#model-property"},{"include":"#token"},{"include":"#directive"},{"include":"#decorator"},{"include":"#spread-operator"},{"include":"#punctuation-semicolon"}],"beginCaptures":{"0":{"name":"punctuation.curlybrace.open.tsp"}},"endCaptures":{"0":{"name":"punctuation.curlybrace.close.tsp"}}},"model-expression-keyword":{"name":"meta.model-expression-keyword.typespec","begin":"\\b(model)\\b(?:\\s+(?!extends\\b|is\\b)(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`))?","end":"(?\u003c=\\})|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#type-parameters"},{"include":"#model-heritage"},{"include":"#expression"}],"beginCaptures":{"1":{"name":"keyword.other.tsp"},"2":{"name":"entity.name.type.tsp"}}},"model-heritage":{"name":"meta.model-heritage.typespec","begin":"\\b(extends|is)\\b","end":"((?=\\{)|(?=;|@|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b))","patterns":[{"include":"#expression"},{"include":"#punctuation-comma"}],"beginCaptures":{"1":{"name":"keyword.other.tsp"}}},"model-property":{"name":"meta.model-property.typespec","begin":"(?:(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)|(\\\"(?:[^\\\"\\\\]|\\\\.)*\\\"))","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#type-annotation"},{"include":"#operator-assignment"},{"include":"#expression"}],"beginCaptures":{"1":{"name":"variable.name.tsp"},"2":{"name":"string.quoted.double.tsp"}}},"model-statement":{"name":"meta.model-statement.typespec","begin":"(?:(internal)\\s+)?\\b(model)\\b","end":"(?\u003c=\\})|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#type-parameters"},{"include":"#model-heritage"},{"include":"#expression"}],"beginCaptures":{"1":{"name":"storage.modifier.tsp"},"2":{"name":"keyword.other.tsp"}}},"namespace-body":{"name":"meta.namespace-body.typespec","begin":"\\{","end":"\\}","patterns":[{"include":"#statement"}],"beginCaptures":{"0":{"name":"punctuation.curlybrace.open.tsp"}},"endCaptures":{"0":{"name":"punctuation.curlybrace.close.tsp"}}},"namespace-name":{"name":"meta.namespace-name.typespec","begin":"(?=([_$[:alpha:]]|`))","end":"((?=\\{)|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b))","patterns":[{"include":"#identifier-expression"},{"include":"#punctuation-accessor"}]},"namespace-statement":{"name":"meta.namespace-statement.typespec","begin":"\\b(namespace)\\b","end":"((?\u003c=\\})|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b))","patterns":[{"include":"#token"},{"include":"#namespace-name"},{"include":"#namespace-body"}],"beginCaptures":{"1":{"name":"keyword.other.tsp"}}},"numeric-literal":{"name":"constant.numeric.tsp","match":"(?:\\b(?\u003c!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$)|\\b(?\u003c!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$)|(?\u003c!\\$)(?:(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)|(?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)|(?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)|(?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)|(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)|(?:\\b[0-9][0-9_]*(\\.)(n)?\\B)|(?:\\B(\\.)[0-9][0-9_]*(n)?\\b)|(?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)))(?!\\$))"},"object-literal":{"name":"meta.object-literal.typespec","begin":"#\\{","end":"\\}","patterns":[{"include":"#token"},{"include":"#object-literal-property"},{"include":"#directive"},{"include":"#spread-operator"},{"include":"#punctuation-comma"}],"beginCaptures":{"0":{"name":"punctuation.hashcurlybrace.open.tsp"}},"endCaptures":{"0":{"name":"punctuation.curlybrace.close.tsp"}}},"object-literal-property":{"name":"meta.object-literal-property.typespec","begin":"(?:(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)\\s*(:))","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#expression"}],"beginCaptures":{"1":{"name":"variable.name.tsp"},"2":{"name":"keyword.operator.type.annotation.tsp"}}},"operation-heritage":{"name":"meta.operation-heritage.typespec","begin":"\\b(is)\\b","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#expression"}],"beginCaptures":{"1":{"name":"keyword.other.tsp"}}},"operation-parameters":{"name":"meta.operation-parameters.typespec","begin":"\\(","end":"\\)","patterns":[{"include":"#token"},{"include":"#decorator"},{"include":"#model-property"},{"include":"#spread-operator"},{"include":"#punctuation-comma"}],"beginCaptures":{"0":{"name":"punctuation.parenthesis.open.tsp"}},"endCaptures":{"0":{"name":"punctuation.parenthesis.close.tsp"}}},"operation-signature":{"patterns":[{"include":"#type-parameters"},{"include":"#operation-heritage"},{"include":"#operation-parameters"},{"include":"#type-annotation"}]},"operation-statement":{"name":"meta.operation-statement.typespec","begin":"(?:(internal)\\s+)?\\b(op)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#operation-signature"}],"beginCaptures":{"1":{"name":"storage.modifier.tsp"},"2":{"name":"keyword.other.tsp"},"3":{"name":"entity.name.function.tsp"}}},"operator-assignment":{"name":"keyword.operator.assignment.tsp","match":"="},"parenthesized-expression":{"name":"meta.parenthesized-expression.typespec","begin":"\\(","end":"\\)","patterns":[{"include":"#expression"},{"include":"#punctuation-comma"}],"beginCaptures":{"0":{"name":"punctuation.parenthesis.open.tsp"}},"endCaptures":{"0":{"name":"punctuation.parenthesis.close.tsp"}}},"punctuation-accessor":{"name":"punctuation.accessor.tsp","match":"\\."},"punctuation-comma":{"name":"punctuation.comma.tsp","match":","},"punctuation-semicolon":{"name":"punctuation.terminator.statement.tsp","match":";"},"scalar-body":{"name":"meta.scalar-body.typespec","begin":"\\{","end":"\\}","patterns":[{"include":"#token"},{"include":"#directive"},{"include":"#scalar-constructor"},{"include":"#punctuation-semicolon"}],"beginCaptures":{"0":{"name":"punctuation.curlybrace.open.tsp"}},"endCaptures":{"0":{"name":"punctuation.curlybrace.close.tsp"}}},"scalar-constructor":{"name":"meta.scalar-constructor.typespec","begin":"\\b(init)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#operation-parameters"}],"beginCaptures":{"1":{"name":"keyword.other.tsp"},"2":{"name":"entity.name.function.tsp"}}},"scalar-expression":{"name":"meta.scalar-expression.typespec","begin":"\\b(scalar)\\b(?:\\s+(?!extends\\b)(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`))?","end":"(?\u003c=\\})|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#type-parameters"},{"include":"#scalar-extends"},{"include":"#scalar-body"}],"beginCaptures":{"1":{"name":"keyword.other.tsp"},"2":{"name":"entity.name.type.tsp"}}},"scalar-extends":{"name":"meta.scalar-extends.typespec","begin":"\\b(extends)\\b","end":"(?=;|@|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#expression"},{"include":"#punctuation-comma"}],"beginCaptures":{"1":{"name":"keyword.other.tsp"}}},"scalar-statement":{"name":"meta.scalar-statement.typespec","begin":"(?:(internal)\\s+)?\\b(scalar)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)","end":"(?\u003c=\\})|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#type-parameters"},{"include":"#scalar-extends"},{"include":"#scalar-body"}],"beginCaptures":{"1":{"name":"storage.modifier.tsp"},"2":{"name":"keyword.other.tsp"},"3":{"name":"entity.name.type.tsp"}}},"spread-operator":{"name":"meta.spread-operator.typespec","begin":"\\.\\.\\.","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#expression"}],"beginCaptures":{"0":{"name":"keyword.operator.spread.tsp"}}},"statement":{"patterns":[{"include":"#token"},{"include":"#directive"},{"include":"#augment-decorator-statement"},{"include":"#decorator"},{"include":"#model-statement"},{"include":"#scalar-statement"},{"include":"#union-statement"},{"include":"#interface-statement"},{"include":"#enum-statement"},{"include":"#alias-statement"},{"include":"#const-statement"},{"include":"#namespace-statement"},{"include":"#operation-statement"},{"include":"#import-statement"},{"include":"#using-statement"},{"include":"#decorator-declaration-statement"},{"include":"#function-declaration-statement"},{"include":"#punctuation-semicolon"}]},"string-literal":{"name":"string.quoted.double.tsp","begin":"\"","end":"\"|$","patterns":[{"include":"#template-expression"},{"include":"#escape-character"}]},"template-expression":{"name":"meta.template-expression.typespec","begin":"\\$\\{","end":"\\}","patterns":[{"include":"#expression"}],"beginCaptures":{"0":{"name":"punctuation.definition.template-expression.begin.tsp"}},"endCaptures":{"0":{"name":"punctuation.definition.template-expression.end.tsp"}}},"token":{"patterns":[{"include":"#doc-comment"},{"include":"#line-comment"},{"include":"#block-comment"},{"include":"#triple-quoted-string-literal"},{"include":"#string-literal"},{"include":"#boolean-literal"},{"include":"#numeric-literal"}]},"triple-quoted-string-literal":{"name":"string.quoted.triple.tsp","begin":"\"\"\"","end":"\"\"\"","patterns":[{"include":"#template-expression"},{"include":"#escape-character"}]},"tuple-expression":{"name":"meta.tuple-expression.typespec","begin":"\\[","end":"\\]","patterns":[{"include":"#expression"}],"beginCaptures":{"0":{"name":"punctuation.squarebracket.open.tsp"}},"endCaptures":{"0":{"name":"punctuation.squarebracket.close.tsp"}}},"tuple-literal":{"name":"meta.tuple-literal.typespec","begin":"#\\[","end":"\\]","patterns":[{"include":"#expression"},{"include":"#punctuation-comma"}],"beginCaptures":{"0":{"name":"punctuation.hashsquarebracket.open.tsp"}},"endCaptures":{"0":{"name":"punctuation.squarebracket.close.tsp"}}},"type-annotation":{"name":"meta.type-annotation.typespec","begin":"\\s*(\\??)\\s*(:)","end":"(?=,|;|@|\\)|\\}|=|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#expression"}],"beginCaptures":{"1":{"name":"keyword.operator.optional.tsp"},"2":{"name":"keyword.operator.type.annotation.tsp"}}},"type-argument":{"name":"meta.type-argument.typespec","begin":"(?:(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)\\s*(=))","end":"(?=\u003e)|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#expression"},{"include":"#punctuation-comma"}],"beginCaptures":{"1":{"name":"entity.name.type.tsp"},"2":{"name":"keyword.operator.assignment.tsp"}},"endCaptures":{"0":{"name":"keyword.operator.assignment.tsp"}}},"type-arguments":{"name":"meta.type-arguments.typespec","begin":"\u003c","end":"\u003e","patterns":[{"include":"#type-argument"},{"include":"#expression"},{"include":"#punctuation-comma"}],"beginCaptures":{"0":{"name":"punctuation.definition.typeparameters.begin.tsp"}},"endCaptures":{"0":{"name":"punctuation.definition.typeparameters.end.tsp"}}},"type-parameter":{"name":"meta.type-parameter.typespec","begin":"(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)","end":"(?=\u003e)|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#type-parameter-constraint"},{"include":"#type-parameter-default"}],"beginCaptures":{"1":{"name":"entity.name.type.tsp"}}},"type-parameter-constraint":{"name":"meta.type-parameter-constraint.typespec","begin":"extends","end":"(?=\u003e)|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#expression"}],"beginCaptures":{"0":{"name":"keyword.other.tsp"}}},"type-parameter-default":{"name":"meta.type-parameter-default.typespec","begin":"=","end":"(?=\u003e)|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#expression"}],"beginCaptures":{"0":{"name":"keyword.operator.assignment.tsp"}}},"type-parameters":{"name":"meta.type-parameters.typespec","begin":"\u003c","end":"\u003e","patterns":[{"include":"#type-parameter"},{"include":"#punctuation-comma"}],"beginCaptures":{"0":{"name":"punctuation.definition.typeparameters.begin.tsp"}},"endCaptures":{"0":{"name":"punctuation.definition.typeparameters.end.tsp"}}},"typeof":{"name":"meta.typeof.typespec","begin":"\\b(typeof)","end":"(?=\u003e)|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#expression"}],"beginCaptures":{"1":{"name":"keyword.other.tsp"}}},"union-body":{"name":"meta.union-body.typespec","begin":"\\{","end":"\\}","patterns":[{"include":"#union-variant"},{"include":"#token"},{"include":"#directive"},{"include":"#decorator"},{"include":"#expression"},{"include":"#punctuation-comma"}],"beginCaptures":{"0":{"name":"punctuation.curlybrace.open.tsp"}},"endCaptures":{"0":{"name":"punctuation.curlybrace.close.tsp"}}},"union-expression":{"name":"meta.union-expression.typespec","begin":"\\b(union)\\b(?:\\s+(?!extends\\b)(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`))?","end":"(?\u003c=\\})|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#type-parameters"},{"include":"#union-extends"},{"include":"#union-body"}],"beginCaptures":{"1":{"name":"keyword.other.tsp"},"2":{"name":"entity.name.type.tsp"}}},"union-extends":{"name":"meta.union-extends.typespec","begin":"\\b(extends)\\b","end":"((?=\\{)|(?=;|@|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b))","patterns":[{"include":"#expression"},{"include":"#punctuation-comma"}],"beginCaptures":{"1":{"name":"keyword.other.tsp"}}},"union-statement":{"name":"meta.union-statement.typespec","begin":"(?:(internal)\\s+)?\\b(union)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)","end":"(?\u003c=\\})|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#type-parameters"},{"include":"#union-extends"},{"include":"#union-body"}],"beginCaptures":{"1":{"name":"storage.modifier.tsp"},"2":{"name":"keyword.other.tsp"},"3":{"name":"entity.name.type.tsp"}}},"union-variant":{"name":"meta.union-variant.typespec","begin":"(?:(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)\\s*(:))","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#expression"}],"beginCaptures":{"1":{"name":"variable.name.tsp"},"2":{"name":"keyword.operator.type.annotation.tsp"}}},"using-statement":{"name":"meta.using-statement.typespec","begin":"\\b(using)\\b","end":"(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#token"},{"include":"#identifier-expression"},{"include":"#punctuation-accessor"}],"beginCaptures":{"1":{"name":"keyword.other.tsp"}}},"valueof":{"name":"meta.valueof.typespec","begin":"\\b(valueof)","end":"(?=\u003e)|(?=,|;|@|#[a-z]|\\)|\\}|\\b(?:extern|internal)\\b|\\b(?:namespace|op|using|import|alias|interface|dec|fn)\\b)","patterns":[{"include":"#expression"}],"beginCaptures":{"1":{"name":"keyword.other.tsp"}}}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"Tree-sitter Query","scopeName":"source.tsq","patterns":[{"include":"#expression"}],"repository":{"anchor":{"name":"keyword.operator.anchor.tsq","match":"(?\u003c!\\w)\\.(?!\\w)"},"capture":{"match":"(@)([a-zA-Z_][a-zA-Z0-9_.]*)","captures":{"1":{"name":"punctuation.definition.capture.tsq"},"2":{"name":"entity.name.type.capture.tsq"}}},"comment":{"name":"comment.line.semicolon.tsq","begin":";","end":"(?=\\n)","beginCaptures":{"0":{"name":"punctuation.definition.comment.tsq"}}},"comment-extends":{"name":"keyword.control.directive.tsq","match":"^[ \\t]*;+[ \\t]*extends[ \\t]*$"},"comment-format-ignore":{"name":"keyword.control.directive.tsq","match":"^[ \\t]*;+[ \\t]*format-ignore[ \\t]*$"},"comment-inherits":{"name":"keyword.control.import.tsq","match":"^[ \\t]*;+[ \\t]*inherits[ \\t]*:[^\\n]*$"},"escape-sequence":{"name":"constant.character.escape.tsq","match":"\\\\."},"expression":{"patterns":[{"include":"#comment-inherits"},{"include":"#comment-extends"},{"include":"#comment-format-ignore"},{"include":"#comment"},{"include":"#predicate-regex"},{"include":"#predicate-set"},{"include":"#predicate-call"},{"include":"#expression-paren"},{"include":"#expression-bracket"},{"include":"#string"},{"include":"#capture"},{"include":"#anchor"},{"include":"#quantifier"},{"include":"#field-negated"},{"include":"#field"},{"include":"#keyword-missing"},{"include":"#keyword-error"},{"include":"#wildcard"},{"include":"#node"}]},"expression-bracket":{"name":"meta.expression.alternative.tsq","begin":"\\[","end":"\\]","patterns":[{"include":"#expression"}],"beginCaptures":{"0":{"name":"punctuation.section.brackets.begin.tsq"}},"endCaptures":{"0":{"name":"punctuation.section.brackets.end.tsq"}}},"expression-paren":{"name":"meta.expression.group.tsq","begin":"\\(","end":"\\)","patterns":[{"include":"#expression"}],"beginCaptures":{"0":{"name":"punctuation.section.parens.begin.tsq"}},"endCaptures":{"0":{"name":"punctuation.section.parens.end.tsq"}}},"field":{"match":"([a-zA-Z_][a-zA-Z0-9_-]*)(:)","captures":{"1":{"name":"variable.other.member.tsq"},"2":{"name":"punctuation.separator.field.tsq"}}},"field-negated":{"match":"(!)([a-zA-Z_][a-zA-Z0-9_-]*)","captures":{"1":{"name":"keyword.operator.negation.tsq"},"2":{"name":"variable.other.property.tsq"}}},"keyword-error":{"name":"keyword.control.error.tsq","match":"\\bERROR\\b"},"keyword-missing":{"name":"keyword.control.missing.tsq","match":"\\bMISSING\\b"},"node":{"name":"variable.other.node.tsq","match":"[a-zA-Z_][a-zA-Z0-9_-]*"},"predicate-call":{"begin":"(\\()\\s*(#)([a-zA-Z_][a-zA-Z0-9_-]*)([?!]?)","end":"\\)","patterns":[{"include":"#capture"},{"include":"#string"},{"include":"#predicate-number"},{"include":"#predicate-identifier"}],"beginCaptures":{"1":{"name":"punctuation.section.parens.begin.tsq"},"2":{"name":"punctuation.definition.predicate.tsq"},"3":{"name":"entity.name.function.predicate.tsq"},"4":{"name":"punctuation.definition.predicate-type.tsq"}},"endCaptures":{"0":{"name":"punctuation.section.parens.end.tsq"}}},"predicate-identifier":{"name":"variable.parameter.tsq","match":"[a-zA-Z_][a-zA-Z0-9_-]*"},"predicate-number":{"name":"constant.numeric.tsq","match":"(?\u003c!\\w)[-+]?[0-9]+(?:\\.[0-9]+)?(?!\\w)"},"predicate-property":{"name":"variable.other.property.tsq","match":"[a-zA-Z_][a-zA-Z0-9_-]*"},"predicate-regex":{"begin":"(\\()\\s*(#)((?:not-)?(?:match|vim-match|lua-match|gsub)\\??)","end":"\\)","patterns":[{"include":"#capture"},{"include":"#regex-string"}],"beginCaptures":{"1":{"name":"punctuation.section.parens.begin.tsq"},"2":{"name":"punctuation.definition.predicate.tsq"},"3":{"name":"entity.name.function.predicate.tsq"}},"endCaptures":{"0":{"name":"punctuation.section.parens.end.tsq"}}},"predicate-set":{"begin":"(\\()\\s*(#)(set!)","end":"\\)","patterns":[{"include":"#capture"},{"include":"#string"},{"include":"#predicate-number"},{"include":"#predicate-property"}],"beginCaptures":{"1":{"name":"punctuation.section.parens.begin.tsq"},"2":{"name":"punctuation.definition.predicate.tsq"},"3":{"name":"entity.name.function.predicate.tsq"}},"endCaptures":{"0":{"name":"punctuation.section.parens.end.tsq"}}},"quantifier":{"name":"keyword.operator.quantifier.tsq","match":"[?*+]"},"regex-string":{"name":"string.regexp.tsq","begin":"\"","end":"\"","patterns":[{"include":"#escape-sequence"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.tsq"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.tsq"}}},"string":{"name":"string.quoted.double.tsq","begin":"\"","end":"\"","patterns":[{"include":"#escape-sequence"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.tsq"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.tsq"}}},"wildcard":{"name":"constant.language.wildcard.tsq","match":"\\b_\\b"}}}
|