github-linguist 9.7.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/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.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.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.c++.json +1 -1
- data/grammars/source.c.json +1 -1
- data/grammars/source.c3.json +1 -1
- data/grammars/source.carbon.json +1 -1
- data/grammars/source.cedar.json +1 -0
- data/grammars/source.cj.json +1 -1
- data/grammars/source.clarion.json +1 -1
- data/grammars/source.cmake.json +1 -1
- data/grammars/source.cmhg.json +1 -0
- data/grammars/source.compact.json +1 -0
- data/grammars/source.cram.json +1 -0
- data/grammars/source.cs.json +1 -1
- data/grammars/source.cue.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.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.fpp.json +1 -1
- data/grammars/source.gjs.json +1 -1
- data/grammars/source.goose.json +1 -0
- data/grammars/source.graphql.json +1 -1
- data/grammars/source.gts.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.jac.json +1 -1
- data/grammars/source.julia.console.json +1 -1
- data/grammars/source.kerml.json +1 -0
- data/grammars/source.liquidsoap.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.mo.json +1 -1
- data/grammars/source.moonbit.config.json +1 -1
- data/grammars/source.moonbit.json +1 -1
- 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.pkl.json +1 -1
- data/grammars/source.pl.json +1 -1
- data/grammars/source.prisma.json +1 -1
- data/grammars/source.quint.json +1 -1
- data/grammars/source.rascript.json +1 -1
- data/grammars/source.reason.json +1 -1
- data/grammars/source.roc.json +1 -1
- data/grammars/source.ron.json +1 -1
- data/grammars/source.rpgle.json +1 -1
- data/grammars/source.rpm-spec.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.stim.json +1 -1
- data/grammars/source.surrealql.json +1 -1
- data/grammars/source.sysml.json +1 -0
- data/grammars/source.tablegen.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.uiua.json +1 -0
- data/grammars/source.veryl.json +1 -0
- data/grammars/source.vespaSchema.json +1 -1
- data/grammars/source.vespaYQL.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/text.html.cobmd.json +1 -0
- data/grammars/text.html.ember-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.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 +2 -2
- data/lib/linguist/documentation.yml +3 -0
- data/lib/linguist/generated.rb +75 -8
- data/lib/linguist/generic.yml +2 -0
- data/lib/linguist/heuristics.yml +159 -57
- data/lib/linguist/languages.yml +382 -6
- data/lib/linguist/languages_data.rb +318 -16
- data/lib/linguist/samples_data.rb +201875 -193977
- data/lib/linguist/strategy/modeline.rb +0 -1
- data/lib/linguist/vendor.yml +3 -0
- metadata +65 -7
- 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/grammars/source.slice.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"Slice","scopeName":"source.slice","patterns":[{"include":"#slice"}],"repository":{"attribute":{"patterns":[{"include":"#attribute.file"},{"include":"#attribute.local"}]},"attribute.directive":{"begin":"[\\w]+(?:(::)\\w+)*","end":"(?=\\])|$","patterns":[{"include":"#comment"},{"name":"meta.attribute.arguments.slice","begin":"\\(","end":"(?=\\])|$","patterns":[{"include":"#comment"},{"include":"#string-literal"},{"name":"variable.other.constant.attribute.slice","match":"\\b\\w+\\b"},{"name":"punctuation.separator.comma.slice","match":","},{"begin":"\\)","end":"(?=\\])|$","patterns":[{"include":"#comment"},{"include":"#error"}],"beginCaptures":{"0":{"name":"punctuation.parenthesis.close.attribute.slice"}}},{"include":"#error"}],"beginCaptures":{"0":{"name":"punctuation.parenthesis.open.attribute.slice"}}},{"include":"#error"}],"beginCaptures":{"0":{"name":"entity.name.function.attribute.slice"},"1":{"name":"punctuation.separator.double-colon.slice"}}},"attribute.file":{"name":"meta.attribute.file.slice","begin":"\\[\\[","end":"(\\]\\])|$","patterns":[{"include":"#comment"},{"include":"#attribute.directive"},{"include":"#error"}],"beginCaptures":{"0":{"name":"punctuation.double-bracket.open.attribute.slice"}},"endCaptures":{"1":{"name":"punctuation.double-bracket.close.attribute.slice"}}},"attribute.local":{"name":"meta.attribute.local.slice","begin":"\\[","end":"(\\]|$)","patterns":[{"include":"#comment"},{"include":"#attribute.directive"},{"include":"#error"}],"beginCaptures":{"0":{"name":"punctuation.bracket.open.attribute.slice"}},"endCaptures":{"1":{"name":"punctuation.bracket.close.attribute.slice"}}},"class":{"name":"meta.class.slice","begin":"(?\u003c!\\\\)\\bclass\\b","end":"}","patterns":[{"include":"#standard"},{"begin":"\\\\?\\b\\w+\\b","end":"(?=})","patterns":[{"include":"#standard"},{"include":"#id-value"},{"include":"#field-container-inheritance"},{"include":"#field-container"},{"include":"#error"}],"beginCaptures":{"0":{"patterns":[{"include":"#storage.identifier"}]}}},{"include":"#field-container"},{"include":"#error"}],"beginCaptures":{"0":{"name":"storage.type.class.slice"}},"endCaptures":{"0":{"name":"punctuation.brace.close.slice"}}},"comment":{"patterns":[{"include":"#doc-comment.line"},{"include":"#comment.line"},{"include":"#comment.block"}]},"comment.block":{"name":"comment.block.slice","contentName":"text.slice","begin":"\\/\\*","end":"\\*\\/","beginCaptures":{"0":{"name":"punctuation.definition.comment.block.begin.slice"}},"endCaptures":{"0":{"name":"punctuation.definition.comment.block.end.slice"}}},"comment.line":{"name":"comment.line.double-slash.slice","contentName":"text.slice","begin":"\\/\\/","end":"$","beginCaptures":{"0":{"name":"punctuation.definition.comment.line.double-slash.begin.slice"}}},"compilation-mode":{"name":"meta.mode.slice","begin":"(?\u003c!\\\\)\\bmode\\b","end":"$","patterns":[{"include":"#standard"},{"begin":"=","end":"$","patterns":[{"include":"#standard"},{"begin":"\\\\?(\\w+)","end":"$","patterns":[{"include":"#standard"}],"beginCaptures":{"1":{"patterns":[{"name":"variable.other.constant.mode.slice","match":"Slice1|Slice2"},{"include":"#error"}]}}},{"include":"#error"}],"beginCaptures":{"0":{"name":"keyword.operator.assignment.slice"}}},{"include":"#error"}],"beginCaptures":{"0":{"name":"keyword.other.mode.slice"}}},"custom-type":{"name":"meta.custom.slice","begin":"(?\u003c!\\\\)\\bcustom\\b","end":"$","patterns":[{"include":"#standard"},{"begin":"\\\\?\\b\\w+\\b","end":"$","patterns":[{"include":"#standard"}],"beginCaptures":{"0":{"patterns":[{"include":"#storage.identifier"}]}}},{"include":"#error"}],"beginCaptures":{"0":{"name":"storage.type.custom.slice"}}},"doc-comment.line":{"name":"comment.line.documentation.slice","begin":"\\/\\/\\/","end":"$","patterns":[{"include":"#documentation.param-tag"},{"include":"#documentation.returns-tag"},{"include":"#documentation.throws-tag"},{"include":"#documentation.see-tag"},{"include":"#documentation.text"}],"beginCaptures":{"0":{"name":"punctuation.definition.comment.line.documentation.begin.slice"}}},"documentation.identifier":{"patterns":[{"name":"variable.link.slice","match":"(?:\\b|(::))(?:[a-zA-Z_]\\w*(::)?)+\\b","captures":{"1":{"name":"punctuation.separator.double-colon.slice"},"2":{"name":"punctuation.separator.double-colon.slice"}}},{"include":"#error"}]},"documentation.identifier-with-section":{"begin":"\\b\\w+\\b","end":"$","patterns":[{"include":"#documentation.section"},{"include":"#error"}],"beginCaptures":{"0":{"patterns":[{"include":"#documentation.identifier"}]}}},"documentation.inline-tags":{"begin":"{(?=\\s*@)","end":"}","patterns":[{"include":"#documentation.link-tag"},{"include":"#error"}],"beginCaptures":{"0":{"name":"punctuation.brace.open.documentation.slice"}},"endCaptures":{"0":{"name":"punctuation.brace.close.documentation.slice"}}},"documentation.link-tag":{"name":"meta.documentation.link.slice","begin":"(@)link\\b","end":"(?=})","patterns":[{"begin":"(?:\\b|::)(?:\\w+(?:::)?)+\\b","end":"(?=})","patterns":[{"include":"#error"}],"beginCaptures":{"0":{"patterns":[{"include":"#documentation.identifier"}]}}},{"include":"#error"}],"beginCaptures":{"0":{"name":"keyword.other.documentation.link.slice"},"1":{"name":"punctuation.definition.annotation.documentation.slice"}}},"documentation.param-tag":{"name":"meta.documentation.param.slice","begin":"(@)param\\b","end":"$","patterns":[{"include":"#documentation.identifier-with-section"},{"include":"#error"}],"beginCaptures":{"0":{"name":"keyword.other.documentation.param.slice"},"1":{"name":"punctuation.definition.annotation.documentation.slice"}}},"documentation.returns-tag":{"name":"meta.documentation.returns.slice","begin":"(@)returns\\b","end":"$","patterns":[{"include":"#documentation.identifier-with-section"},{"include":"#documentation.section"},{"include":"#error"}],"beginCaptures":{"0":{"name":"keyword.other.documentation.returns.slice"},"1":{"name":"punctuation.definition.annotation.documentation.slice"}}},"documentation.section":{"begin":":","end":"$","patterns":[{"include":"#documentation.text"}],"beginCaptures":{"0":{"name":"punctuation.separator.colon.documentation.slice"}}},"documentation.see-tag":{"name":"meta.documentation.see.slice","begin":"(@)see\\b","end":"$","patterns":[{"begin":"(?:\\b|::)(?:\\w+(?:::)?)+\\b","end":"$","patterns":[{"include":"#error"}],"beginCaptures":{"0":{"patterns":[{"include":"#documentation.identifier"}]}}},{"include":"#error"}],"beginCaptures":{"0":{"name":"keyword.other.documentation.see.slice"},"1":{"name":"punctuation.definition.annotation.documentation.slice"}}},"documentation.text":{"begin":"(?=\\S)","end":"$","patterns":[{"include":"#documentation.inline-tags"},{"name":"text.slice","match":"."}]},"documentation.throws-tag":{"name":"meta.documentation.throws.slice","begin":"(@)throws\\b","end":"$","patterns":[{"begin":"(?:\\b|::)(?:\\w+(?:::)?)+\\b","end":"$","patterns":[{"include":"#documentation.section"},{"include":"#error"}],"beginCaptures":{"0":{"patterns":[{"include":"#documentation.identifier"}]}}},{"include":"#error"}],"beginCaptures":{"0":{"name":"keyword.other.documentation.throws.slice"},"1":{"name":"punctuation.definition.annotation.documentation.slice"}}},"enum":{"name":"meta.enum.slice","begin":"(?\u003c!\\\\)\\benum\\b","end":"}","patterns":[{"include":"#standard"},{"begin":"\\\\?\\b\\w+\\b","end":"(?=})","patterns":[{"include":"#standard"},{"begin":":","end":"(?=})","patterns":[{"include":"#standard"},{"include":"#enumerator-container"},{"include":"#type.identifier"},{"include":"#error"}],"beginCaptures":{"0":{"name":"punctuation.separator.colon.slice"}}},{"include":"#enumerator-container"},{"include":"#error"}],"beginCaptures":{"0":{"patterns":[{"include":"#storage.identifier"}]}}},{"include":"#enumerator-container"},{"include":"#error"}],"beginCaptures":{"0":{"name":"storage.type.enum.slice"}},"endCaptures":{"0":{"name":"punctuation.brace.close.slice"}}},"enumerator":{"name":"meta.enumerator.slice","begin":"\\\\?\\w+","end":"(?=[,}])|$","patterns":[{"include":"#standard"},{"begin":"\\(","end":"\\)","patterns":[{"include":"#tag"},{"include":"#field"},{"name":"punctuation.separator.comma.slice","match":","},{"include":"#slice"}],"beginCaptures":{"0":{"name":"punctuation.parenthesis.open.slice"}},"endCaptures":{"0":{"name":"punctuation.parenthesis.close.slice"}}},{"include":"#enumerator-value"}],"beginCaptures":{"0":{"name":"variable.other.constant.enum.slice","patterns":[{"include":"#field.identifier"}]}}},"enumerator-container":{"begin":"{","end":"(?=})","patterns":[{"include":"#enumerator"},{"name":"punctuation.separator.comma.slice","match":","},{"include":"#slice"}],"beginCaptures":{"0":{"name":"punctuation.brace.open.slice"}}},"enumerator-value":{"begin":"=","end":"(?=[,}])|$","patterns":[{"include":"#standard"},{"begin":"(?=-|\\b)[\\w-]+\\b","end":"(?=[,}])|$","patterns":[{"include":"#standard"}],"beginCaptures":{"0":{"patterns":[{"include":"#integer-literal"}]}}},{"include":"#error"}],"beginCaptures":{"0":{"name":"keyword.operator.assignment.slice"}}},"error":{"name":"invalid","match":"\\S"},"exception":{"name":"meta.exception.slice","begin":"(?\u003c!\\\\)\\bexception\\b","end":"}","patterns":[{"include":"#standard"},{"begin":"\\\\?\\b\\w+\\b","end":"(?=})","patterns":[{"include":"#standard"},{"include":"#field-container-inheritance"},{"include":"#field-container"},{"include":"#error"}],"beginCaptures":{"0":{"patterns":[{"include":"#storage.identifier"}]}}},{"include":"#field-container"},{"include":"#error"}],"beginCaptures":{"0":{"name":"storage.type.exception.slice"}},"endCaptures":{"0":{"name":"punctuation.brace.close.slice"}}},"field":{"name":"meta.field.slice","begin":"\\\\?\\w+","end":"(?=[,}\\)])|$","patterns":[{"include":"#standard"},{"begin":":","end":"(?=[,}\\)])|$","patterns":[{"include":"#standard"},{"include":"#type.identifier"},{"include":"#error"}],"beginCaptures":{"0":{"name":"punctuation.separator.colon.slice"}}},{"include":"#error"}],"beginCaptures":{"0":{"name":"entity.name.variable.slice","patterns":[{"include":"#field.identifier"}]}}},"field-container":{"begin":"{","end":"(?=})","patterns":[{"include":"#tag"},{"include":"#field"},{"name":"punctuation.separator.comma.slice","match":","},{"include":"#slice"}],"beginCaptures":{"0":{"name":"punctuation.brace.open.slice"}}},"field-container-inheritance":{"begin":":","end":"(?=})","patterns":[{"include":"#standard"},{"include":"#field-container"},{"include":"#type.identifier"},{"include":"#error"}],"beginCaptures":{"0":{"name":"punctuation.separator.colon.slice"}}},"field.identifier":{"patterns":[{"match":"(\\\\?)\\b([a-zA-Z_]\\w*)\\b","captures":{"1":{"name":"punctuation.definition.identifier.escape.slice"},"2":{"patterns":[{"include":"#reserved-identifiers"}]}}},{"include":"#error"}]},"id-value":{"begin":"\\(","end":"\\)","patterns":[{"include":"#standard"},{"begin":"[^\\s\\)]+","end":"(?=\\))","patterns":[{"include":"#standard"},{"include":"#error"}],"beginCaptures":{"0":{"patterns":[{"include":"#integer-literal"}]}}},{"include":"#error"}],"beginCaptures":{"0":{"name":"punctuation.parenthesis.open.slice"}},"endCaptures":{"0":{"name":"punctuation.parenthesis.close.slice"}}},"integer-literal":{"patterns":[{"name":"constant.numeric.bin.slice","match":"(-)?\\b(0b)(?:[0-1_]+)\\b","captures":{"1":{"name":"punctuation.definition.numeric.negative.slice"},"2":{"name":"punctuation.definition.numeric.bin.slice"}}},{"name":"constant.numeric.dec.slice","match":"(-)?\\b(?:[\\d_]+)\\b","captures":{"1":{"name":"punctuation.definition.numeric.negative.slice"}}},{"name":"constant.numeric.hex.slice","match":"(-)?\\b(0x)(?:[\\da-fA-F_]+)\\b","captures":{"1":{"name":"punctuation.definition.numeric.negative.slice"},"2":{"name":"punctuation.definition.numeric.hex.slice"}}},{"include":"#error"}]},"interface":{"name":"meta.interface.slice","begin":"(?\u003c!\\\\)\\binterface\\b","end":"}","patterns":[{"include":"#standard"},{"begin":"\\\\?\\b\\w+\\b","end":"(?=})","patterns":[{"include":"#standard"},{"begin":":","end":"(?=})","patterns":[{"include":"#standard"},{"include":"#operation-container"},{"name":"punctuation.separator.comma.slice","match":","},{"include":"#type.identifier"},{"include":"#error"}],"beginCaptures":{"0":{"name":"punctuation.separator.colon.slice"}}},{"include":"#operation-container"},{"include":"#error"}],"beginCaptures":{"0":{"patterns":[{"include":"#storage.identifier"}]}}},{"include":"#operation-container"},{"include":"#error"}],"beginCaptures":{"0":{"name":"storage.type.interface.slice"}},"endCaptures":{"0":{"name":"punctuation.brace.close.slice"}}},"modifier-keywords":{"match":"(?\u003c!\\\\)\\b(?:(compact)|(idempotent)|(stream)|(tag\\([-\\w]+\\))|(throws)|(unchecked))(\\b|(?\u003c=\\W))","captures":{"1":{"name":"storage.modifier.compact.slice"},"2":{"name":"storage.modifier.idempotent.slice"},"3":{"name":"storage.modifier.stream.slice"},"4":{"name":"meta.tag.slice","patterns":[{"include":"#tag"}]},"5":{"name":"storage.modifier.throws.slice"},"6":{"name":"storage.modifier.unchecked.slice"}}},"module-declaration":{"name":"meta.module.slice","begin":"(?\u003c!\\\\)\\bmodule\\b","end":"$","patterns":[{"include":"#standard"},{"begin":"(?=\\b|\\\\)[\\\\\\w:]+(?\u003c=\\b|\\W)","end":"$","patterns":[{"include":"#standard"}],"beginCaptures":{"0":{"patterns":[{"include":"#storage.identifier"}]}}},{"include":"#error"}],"beginCaptures":{"0":{"name":"keyword.other.module.slice"}}},"operation":{"patterns":[{"include":"#tag"},{"name":"storage.modifier.stream.slice","match":"\\bstream\\b"},{"contentName":"meta.exception-list.slice","begin":"\\b(throws)\\b\\s*(\\()","end":"\\)","patterns":[{"include":"#standard"},{"name":"punctuation.separator.comma.slice","match":","},{"include":"#storage.identifier"},{"include":"#slice"}],"beginCaptures":{"1":{"name":"storage.modifier.throws.slice"},"2":{"name":"punctuation.parenthesis.open.slice"}},"endCaptures":{"0":{"name":"punctuation.parenthesis.close.slice"}}},{"name":"storage.modifier.throws.slice","match":"\\bthrows\\b"},{"name":"punctuation.definition.returns.slice","match":"-\u003e"},{"name":"punctuation.separator.comma.slice","match":","},{"name":"meta.parameter-list.slice","begin":"\\(","end":"\\)","patterns":[{"include":"#tag"},{"include":"#parameter"},{"name":"punctuation.separator.comma.slice","match":","},{"include":"#slice"}],"beginCaptures":{"0":{"name":"punctuation.parenthesis.open.slice"}},"endCaptures":{"0":{"name":"punctuation.parenthesis.close.slice"}}},{"match":"\\\\?\\w+(?=\\s*\\()","captures":{"0":{"name":"entity.name.function.slice","patterns":[{"include":"#field.identifier"}]}}}]},"operation-container":{"begin":"{","end":"(?=})","patterns":[{"include":"#slice"}],"beginCaptures":{"0":{"name":"punctuation.brace.open.slice"}}},"parameter":{"name":"meta.parameter.slice","begin":"\\\\?\\w+","end":"(?=[,\\)])|$","patterns":[{"include":"#standard"},{"begin":":","end":"(?=[,\\)])|$","patterns":[{"include":"#standard"},{"name":"storage.modifier.stream.slice","match":"\\bstream\\b"},{"include":"#type.identifier"},{"include":"#error"}],"beginCaptures":{"0":{"name":"punctuation.separator.colon.slice"}}},{"include":"#error"}],"beginCaptures":{"0":{"name":"entity.name.variable.slice","patterns":[{"include":"#field.identifier"}]}}},"preprocessor":{"patterns":[{"include":"#preprocessor.define"},{"include":"#preprocessor.undef"},{"include":"#preprocessor.if"},{"include":"#preprocessor.elif"},{"include":"#preprocessor.else"},{"include":"#preprocessor.endif"},{"include":"#preprocessor.unknown"},{"include":"#preprocessor.unknown"}]},"preprocessor.define":{"name":"meta.preprocessor.define.slice","begin":"^\\s*((#)\\s*define)\\b","end":"$","patterns":[{"include":"#comment.line"},{"include":"#preprocessor.single-identifier"},{"include":"#error"}],"beginCaptures":{"1":{"name":"keyword.control.preprocessor.undef.slice"},"2":{"name":"punctuation.definition.preprocessor.slice"}}},"preprocessor.elif":{"name":"meta.preprocessor.elif.slice","begin":"^\\s*((#)\\s*elif)\\b","end":"$","patterns":[{"include":"#preprocessor.expression"}],"beginCaptures":{"1":{"name":"keyword.control.preprocessor.elif.slice"},"2":{"name":"punctuation.definition.preprocessor.slice"}}},"preprocessor.else":{"name":"meta.preprocessor.else.slice","begin":"^\\s*((#)\\s*else)\\b","end":"$","patterns":[{"include":"#comment.line"},{"include":"#error"}],"beginCaptures":{"1":{"name":"keyword.control.preprocessor.else.slice"},"2":{"name":"punctuation.definition.preprocessor.slice"}}},"preprocessor.endif":{"name":"meta.preprocessor.endif.slice","begin":"^\\s*((#)\\s*endif)\\b","end":"$","patterns":[{"include":"#comment.line"},{"include":"#error"}],"beginCaptures":{"1":{"name":"keyword.control.preprocessor.endif.slice"},"2":{"name":"punctuation.definition.preprocessor.slice"}}},"preprocessor.expression":{"patterns":[{"include":"#comment.line"},{"match":"(!)|(\u0026\u0026)|(\\|\\|)|(\\()|(\\))","captures":{"1":{"name":"keyword.operator.logical.not.slice"},"2":{"name":"keyword.operator.logical.and.slice"},"3":{"name":"keyword.operator.logical.or.slice"},"4":{"name":"punctuation.parenthesis.open.slice"},"5":{"name":"punctuation.parenthesis.close.slice"}}},{"include":"#preprocessor.identifier"},{"include":"#error"}]},"preprocessor.identifier":{"patterns":[{"name":"constant.other.symbol.preprocessor.slice","match":"\\b[a-zA-Z_]\\w*\\b"},{"include":"#error"}]},"preprocessor.if":{"name":"meta.preprocessor.if.slice","begin":"^\\s*((#)\\s*if)\\b","end":"$","patterns":[{"include":"#preprocessor.expression"}],"beginCaptures":{"1":{"name":"keyword.control.preprocessor.if.slice"},"2":{"name":"punctuation.definition.preprocessor.slice"}}},"preprocessor.single-identifier":{"begin":"\\b\\w+\\b","end":"$","patterns":[{"include":"#comment.line"},{"include":"#error"}],"beginCaptures":{"0":{"patterns":[{"include":"#preprocessor.identifier"}]}}},"preprocessor.undef":{"name":"meta.preprocessor.undef.slice","begin":"^\\s*((#)\\s*undef)\\b","end":"$","patterns":[{"include":"#comment.line"},{"include":"#preprocessor.single-identifier"},{"include":"#error"}],"beginCaptures":{"1":{"name":"keyword.control.preprocessor.undef.slice"},"2":{"name":"punctuation.definition.preprocessor.slice"}}},"preprocessor.unknown":{"name":"meta.preprocessor.unknown.slice","begin":"^\\s*((#)\\s*\\w*)\\b","end":"$","patterns":[{"include":"#comment.line"},{"include":"#error"}],"beginCaptures":{"1":{"name":"invalid.illegal.slice"},"2":{"name":"punctuation.definition.preprocessor.slice"}}},"reserved-identifiers":{"name":"invalid.illegal.identifier.slice","match":"(?\u003c!\\\\)\\b(?:module|struct|exception|class|interface|enum|custom|typealias|Sequence|Dictionary|Result|bool|int8|uint8|int16|uint16|int32|uint32|varint32|varuint32|int64|uint64|varint62|varuint62|float32|float64|string|AnyClass|compact|idempotent|mode|stream|tag|throws|unchecked)\\b"},"slice":{"patterns":[{"include":"#standard"},{"include":"#string-literal"},{"include":"#compilation-mode"},{"include":"#module-declaration"},{"include":"#struct"},{"include":"#class"},{"include":"#exception"},{"include":"#enum"},{"include":"#interface"},{"include":"#custom-type"},{"include":"#type-alias"},{"include":"#modifier-keywords"},{"include":"#operation"},{"include":"#type.identifier"}]},"standard":{"patterns":[{"include":"#comment"},{"include":"#preprocessor"},{"include":"#attribute"}]},"storage.identifier":{"patterns":[{"name":"entity.name.class.slice","match":"(?:\\b|(::)|(?=\\\\))(?:(\\\\?)([a-zA-Z_]\\w*)(::)?)+\\b","captures":{"1":{"name":"punctuation.separator.double-colon.slice"},"2":{"name":"punctuation.definition.identifier.escape.slice"},"3":{"patterns":[{"include":"#reserved-identifiers"}]},"4":{"name":"punctuation.separator.double-colon.slice"}}},{"include":"#error"}]},"string-literal":{"name":"string.quoted.double.slice","begin":"\"","end":"(\")|$","patterns":[{"name":"constant.character.escape.slice","match":"\\\\."}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.slice"}},"endCaptures":{"1":{"name":"punctuation.definition.string.end.slice"}}},"struct":{"name":"meta.struct.slice","begin":"(?\u003c!\\\\)\\bstruct\\b","end":"}","patterns":[{"include":"#standard"},{"begin":"\\\\?\\b\\w+\\b","end":"(?=})","patterns":[{"include":"#standard"},{"include":"#field-container"},{"include":"#error"}],"beginCaptures":{"0":{"patterns":[{"include":"#storage.identifier"}]}}},{"include":"#field-container"},{"include":"#error"}],"beginCaptures":{"0":{"name":"storage.type.struct.slice"}},"endCaptures":{"0":{"name":"punctuation.brace.close.slice"}}},"tag":{"begin":"\\b(tag)\\s*(?=\\()","end":"(?\u003c=\\))","patterns":[{"include":"#id-value"}],"beginCaptures":{"1":{"name":"storage.modifier.tag.slice"}}},"type-alias":{"name":"meta.typealias.slice","begin":"(?\u003c!\\\\)\\btypealias\\b","end":"$","patterns":[{"include":"#standard"},{"begin":"\\\\?\\b\\w+\\b","end":"$","patterns":[{"include":"#standard"},{"begin":"=","end":"$","patterns":[{"include":"#standard"},{"include":"#type.identifier"},{"include":"#error"}],"beginCaptures":{"0":{"name":"keyword.operator.assignment.slice"}}},{"include":"#error"}],"beginCaptures":{"0":{"patterns":[{"include":"#storage.identifier"}]}}},{"include":"#error"}],"beginCaptures":{"0":{"name":"storage.type.alias.slice"}}},"type-keywords":{"match":"(?\u003c!\\\\)\\b(?:(bool)|(int8)|(uint8)|(int16)|(uint16)|(int32)|(uint32)|(varint32)|(varuint32)|(int64)|(uint64)|(varint62)|(varuint62)|(float32)|(float64)|(string)|(AnyClass)|(Sequence)|(Dictionary)|(Result))\\b","captures":{"1":{"name":"storage.type.bool.slice"},"10":{"name":"storage.type.int64.slice"},"11":{"name":"storage.type.uint64.slice"},"12":{"name":"storage.type.varint62.slice"},"13":{"name":"storage.type.varuint62.slice"},"14":{"name":"storage.type.float32.slice"},"15":{"name":"storage.type.float64.slice"},"16":{"name":"storage.type.string.slice"},"17":{"name":"storage.type.AnyClass.slice"},"18":{"name":"storage.type.sequence.slice"},"19":{"name":"storage.type.dictionary.slice"},"2":{"name":"storage.type.int8.slice"},"20":{"name":"storage.type.result.slice"},"3":{"name":"storage.type.uint8.slice"},"4":{"name":"storage.type.int16.slice"},"5":{"name":"storage.type.uint16.slice"},"6":{"name":"storage.type.int32.slice"},"7":{"name":"storage.type.uint32.slice"},"8":{"name":"storage.type.varint32.slice"},"9":{"name":"storage.type.varuint32.slice"}}},"type-name":{"patterns":[{"include":"#type-keywords"},{"include":"#storage.identifier"}]},"type.identifier":{"patterns":[{"name":"meta.generic.parameters.slice","begin":"(?=\\b|\\W)([\\\\\\w:]+)\\s*(\\\u003c)","end":"(\\\u003e)\\s*(\\?)?","patterns":[{"include":"#standard"},{"name":"punctuation.separator.comma.slice","match":","},{"include":"#type.identifier"},{"include":"#error"}],"beginCaptures":{"1":{"patterns":[{"include":"#type-name"}]},"2":{"name":"punctuation.angle.open.slice"}},"endCaptures":{"1":{"name":"punctuation.angle.close.slice"},"2":{"name":"punctuation.definition.optional.slice"}}},{"match":"(?=\\b|\\W)([\\\\\\w:]+)\\s*(\\?)?(?\u003c=\\b|\\W)","captures":{"1":{"patterns":[{"include":"#type-name"}]},"2":{"name":"punctuation.definition.optional.slice"}}}]}}}
|
|
1
|
+
{"name":"Slice","scopeName":"source.slice","patterns":[{"include":"#slice"}],"repository":{"attribute":{"patterns":[{"include":"#attribute.file"},{"include":"#attribute.local"}]},"attribute.directive":{"begin":"[\\w]+(?:(::)\\w+)*","end":"(?=\\])|$","patterns":[{"include":"#comment"},{"name":"meta.attribute.arguments.slice","begin":"\\(","end":"(?=\\])|$","patterns":[{"include":"#comment"},{"include":"#string-literal"},{"name":"variable.other.constant.attribute.slice","match":"\\b\\w+\\b"},{"name":"punctuation.separator.comma.slice","match":","},{"begin":"\\)","end":"(?=\\])|$","patterns":[{"include":"#comment"},{"include":"#error"}],"beginCaptures":{"0":{"name":"punctuation.parenthesis.close.attribute.slice"}}},{"include":"#error"}],"beginCaptures":{"0":{"name":"punctuation.parenthesis.open.attribute.slice"}}},{"include":"#error"}],"beginCaptures":{"0":{"name":"entity.name.function.attribute.slice"},"1":{"name":"punctuation.separator.double-colon.slice"}}},"attribute.file":{"name":"meta.attribute.file.slice","begin":"\\[\\[","end":"(\\]\\])|$","patterns":[{"include":"#comment"},{"include":"#attribute.directive"},{"include":"#error"}],"beginCaptures":{"0":{"name":"punctuation.double-bracket.open.attribute.slice"}},"endCaptures":{"1":{"name":"punctuation.double-bracket.close.attribute.slice"}}},"attribute.local":{"name":"meta.attribute.local.slice","begin":"\\[","end":"(\\]|$)","patterns":[{"include":"#comment"},{"include":"#attribute.directive"},{"include":"#error"}],"beginCaptures":{"0":{"name":"punctuation.bracket.open.attribute.slice"}},"endCaptures":{"1":{"name":"punctuation.bracket.close.attribute.slice"}}},"comment":{"patterns":[{"include":"#doc-comment.line"},{"include":"#comment.line"},{"include":"#comment.block"}]},"comment.block":{"name":"comment.block.slice","contentName":"text.slice","begin":"\\/\\*","end":"\\*\\/","beginCaptures":{"0":{"name":"punctuation.definition.comment.block.begin.slice"}},"endCaptures":{"0":{"name":"punctuation.definition.comment.block.end.slice"}}},"comment.line":{"name":"comment.line.double-slash.slice","contentName":"text.slice","begin":"\\/\\/","end":"$","beginCaptures":{"0":{"name":"punctuation.definition.comment.line.double-slash.begin.slice"}}},"custom-type":{"name":"meta.custom.slice","begin":"(?\u003c!\\\\)\\bcustom\\b","end":"$","patterns":[{"include":"#standard"},{"begin":"\\\\?\\b\\w+\\b","end":"$","patterns":[{"include":"#standard"}],"beginCaptures":{"0":{"patterns":[{"include":"#storage.identifier"}]}}},{"include":"#error"}],"beginCaptures":{"0":{"name":"storage.type.custom.slice"}}},"doc-comment.line":{"name":"comment.line.documentation.slice","begin":"\\/\\/\\/","end":"$","patterns":[{"include":"#documentation.param-tag"},{"include":"#documentation.returns-tag"},{"include":"#documentation.see-tag"},{"include":"#documentation.text"}],"beginCaptures":{"0":{"name":"punctuation.definition.comment.line.documentation.begin.slice"}}},"documentation.identifier":{"patterns":[{"name":"variable.link.slice","match":"(?:\\b|(::))(?:[a-zA-Z_]\\w*(::)?)+\\b","captures":{"1":{"name":"punctuation.separator.double-colon.slice"},"2":{"name":"punctuation.separator.double-colon.slice"}}},{"include":"#error"}]},"documentation.identifier-with-section":{"begin":"\\b\\w+\\b","end":"$","patterns":[{"include":"#documentation.section"},{"include":"#error"}],"beginCaptures":{"0":{"patterns":[{"include":"#documentation.identifier"}]}}},"documentation.inline-tags":{"begin":"{(?=\\s*@)","end":"}","patterns":[{"include":"#documentation.link-tag"},{"include":"#error"}],"beginCaptures":{"0":{"name":"punctuation.brace.open.documentation.slice"}},"endCaptures":{"0":{"name":"punctuation.brace.close.documentation.slice"}}},"documentation.link-tag":{"name":"meta.documentation.link.slice","begin":"(@)link\\b","end":"(?=})","patterns":[{"begin":"(?:\\b|::)(?:\\w+(?:::)?)+\\b","end":"(?=})","patterns":[{"include":"#error"}],"beginCaptures":{"0":{"patterns":[{"include":"#documentation.identifier"}]}}},{"include":"#error"}],"beginCaptures":{"0":{"name":"keyword.other.documentation.link.slice"},"1":{"name":"punctuation.definition.annotation.documentation.slice"}}},"documentation.param-tag":{"name":"meta.documentation.param.slice","begin":"(@)param\\b","end":"$","patterns":[{"include":"#documentation.identifier-with-section"},{"include":"#error"}],"beginCaptures":{"0":{"name":"keyword.other.documentation.param.slice"},"1":{"name":"punctuation.definition.annotation.documentation.slice"}}},"documentation.returns-tag":{"name":"meta.documentation.returns.slice","begin":"(@)returns\\b","end":"$","patterns":[{"include":"#documentation.identifier-with-section"},{"include":"#documentation.section"},{"include":"#error"}],"beginCaptures":{"0":{"name":"keyword.other.documentation.returns.slice"},"1":{"name":"punctuation.definition.annotation.documentation.slice"}}},"documentation.section":{"begin":":","end":"$","patterns":[{"include":"#documentation.text"}],"beginCaptures":{"0":{"name":"punctuation.separator.colon.documentation.slice"}}},"documentation.see-tag":{"name":"meta.documentation.see.slice","begin":"(@)see\\b","end":"$","patterns":[{"begin":"(?:\\b|::)(?:\\w+(?:::)?)+\\b","end":"$","patterns":[{"include":"#error"}],"beginCaptures":{"0":{"patterns":[{"include":"#documentation.identifier"}]}}},{"include":"#error"}],"beginCaptures":{"0":{"name":"keyword.other.documentation.see.slice"},"1":{"name":"punctuation.definition.annotation.documentation.slice"}}},"documentation.text":{"begin":"(?=\\S)","end":"$","patterns":[{"include":"#documentation.inline-tags"},{"name":"text.slice","match":"."}]},"enum":{"name":"meta.enum.slice","begin":"(?\u003c!\\\\)\\benum\\b","end":"}","patterns":[{"include":"#standard"},{"begin":"\\\\?\\b\\w+\\b","end":"(?=})","patterns":[{"include":"#standard"},{"begin":":","end":"(?=})","patterns":[{"include":"#standard"},{"include":"#enumerator-container"},{"include":"#type.identifier"},{"include":"#error"}],"beginCaptures":{"0":{"name":"punctuation.separator.colon.slice"}}},{"include":"#enumerator-container"},{"include":"#error"}],"beginCaptures":{"0":{"patterns":[{"include":"#storage.identifier"}]}}},{"include":"#enumerator-container"},{"include":"#error"}],"beginCaptures":{"0":{"name":"storage.type.enum.slice"}},"endCaptures":{"0":{"name":"punctuation.brace.close.slice"}}},"enumerator":{"name":"meta.enumerator.slice","begin":"\\\\?\\w+","end":"(?=[,}])|$","patterns":[{"include":"#standard"},{"begin":"\\(","end":"\\)","patterns":[{"include":"#tag"},{"include":"#field"},{"name":"punctuation.separator.comma.slice","match":","},{"include":"#slice"}],"beginCaptures":{"0":{"name":"punctuation.parenthesis.open.slice"}},"endCaptures":{"0":{"name":"punctuation.parenthesis.close.slice"}}},{"include":"#enumerator-value"}],"beginCaptures":{"0":{"name":"variable.other.constant.enum.slice","patterns":[{"include":"#field.identifier"}]}}},"enumerator-container":{"begin":"{","end":"(?=})","patterns":[{"include":"#enumerator"},{"name":"punctuation.separator.comma.slice","match":","},{"include":"#slice"}],"beginCaptures":{"0":{"name":"punctuation.brace.open.slice"}}},"enumerator-value":{"begin":"=","end":"(?=[,}])|$","patterns":[{"include":"#standard"},{"begin":"(?=-|\\b)[\\w-]+\\b","end":"(?=[,}])|$","patterns":[{"include":"#standard"}],"beginCaptures":{"0":{"patterns":[{"include":"#integer-literal"}]}}},{"include":"#error"}],"beginCaptures":{"0":{"name":"keyword.operator.assignment.slice"}}},"error":{"name":"invalid","match":"\\S"},"field":{"name":"meta.field.slice","begin":"\\\\?\\w+","end":"(?=[,}\\)])|$","patterns":[{"include":"#standard"},{"begin":":","end":"(?=[,}\\)])|$","patterns":[{"include":"#standard"},{"include":"#type.identifier"},{"include":"#error"}],"beginCaptures":{"0":{"name":"punctuation.separator.colon.slice"}}},{"include":"#error"}],"beginCaptures":{"0":{"name":"entity.name.variable.slice","patterns":[{"include":"#field.identifier"}]}}},"field-container":{"begin":"{","end":"(?=})","patterns":[{"include":"#tag"},{"include":"#field"},{"name":"punctuation.separator.comma.slice","match":","},{"include":"#slice"}],"beginCaptures":{"0":{"name":"punctuation.brace.open.slice"}}},"field.identifier":{"patterns":[{"match":"(\\\\?)\\b([a-zA-Z_]\\w*)\\b","captures":{"1":{"name":"punctuation.definition.identifier.escape.slice"},"2":{"patterns":[{"include":"#reserved-identifiers"}]}}},{"include":"#error"}]},"id-value":{"begin":"\\(","end":"\\)","patterns":[{"include":"#standard"},{"begin":"[^\\s\\)]+","end":"(?=\\))","patterns":[{"include":"#standard"},{"include":"#error"}],"beginCaptures":{"0":{"patterns":[{"include":"#integer-literal"}]}}},{"include":"#error"}],"beginCaptures":{"0":{"name":"punctuation.parenthesis.open.slice"}},"endCaptures":{"0":{"name":"punctuation.parenthesis.close.slice"}}},"integer-literal":{"patterns":[{"name":"constant.numeric.bin.slice","match":"(-)?\\b(0b)(?:[0-1_]+)\\b","captures":{"1":{"name":"punctuation.definition.numeric.negative.slice"},"2":{"name":"punctuation.definition.numeric.bin.slice"}}},{"name":"constant.numeric.dec.slice","match":"(-)?\\b(?:[\\d_]+)\\b","captures":{"1":{"name":"punctuation.definition.numeric.negative.slice"}}},{"name":"constant.numeric.hex.slice","match":"(-)?\\b(0x)(?:[\\da-fA-F_]+)\\b","captures":{"1":{"name":"punctuation.definition.numeric.negative.slice"},"2":{"name":"punctuation.definition.numeric.hex.slice"}}},{"include":"#error"}]},"interface":{"name":"meta.interface.slice","begin":"(?\u003c!\\\\)\\binterface\\b","end":"}","patterns":[{"include":"#standard"},{"begin":"\\\\?\\b\\w+\\b","end":"(?=})","patterns":[{"include":"#standard"},{"begin":":","end":"(?=})","patterns":[{"include":"#standard"},{"include":"#operation-container"},{"name":"punctuation.separator.comma.slice","match":","},{"include":"#type.identifier"},{"include":"#error"}],"beginCaptures":{"0":{"name":"punctuation.separator.colon.slice"}}},{"include":"#operation-container"},{"include":"#error"}],"beginCaptures":{"0":{"patterns":[{"include":"#storage.identifier"}]}}},{"include":"#operation-container"},{"include":"#error"}],"beginCaptures":{"0":{"name":"storage.type.interface.slice"}},"endCaptures":{"0":{"name":"punctuation.brace.close.slice"}}},"modifier-keywords":{"match":"(?\u003c!\\\\)\\b(?:(compact)|(idempotent)|(stream)|(tag\\([-\\w]+\\))|(unchecked))(\\b|(?\u003c=\\W))","captures":{"1":{"name":"storage.modifier.compact.slice"},"2":{"name":"storage.modifier.idempotent.slice"},"3":{"name":"storage.modifier.stream.slice"},"4":{"name":"meta.tag.slice","patterns":[{"include":"#tag"}]},"5":{"name":"storage.modifier.unchecked.slice"}}},"module-declaration":{"name":"meta.module.slice","begin":"(?\u003c!\\\\)\\bmodule\\b","end":"$","patterns":[{"include":"#standard"},{"begin":"(?=\\b|\\\\)[\\\\\\w:]+(?\u003c=\\b|\\W)","end":"$","patterns":[{"include":"#standard"}],"beginCaptures":{"0":{"patterns":[{"include":"#storage.identifier"}]}}},{"include":"#error"}],"beginCaptures":{"0":{"name":"keyword.other.module.slice"}}},"operation":{"patterns":[{"include":"#tag"},{"name":"storage.modifier.stream.slice","match":"\\bstream\\b"},{"name":"punctuation.definition.returns.slice","match":"-\u003e"},{"name":"punctuation.separator.comma.slice","match":","},{"name":"meta.parameter-list.slice","begin":"\\(","end":"\\)","patterns":[{"include":"#tag"},{"include":"#parameter"},{"name":"punctuation.separator.comma.slice","match":","},{"include":"#slice"}],"beginCaptures":{"0":{"name":"punctuation.parenthesis.open.slice"}},"endCaptures":{"0":{"name":"punctuation.parenthesis.close.slice"}}},{"match":"\\\\?\\w+(?=\\s*\\()","captures":{"0":{"name":"entity.name.function.slice","patterns":[{"include":"#field.identifier"}]}}}]},"operation-container":{"begin":"{","end":"(?=})","patterns":[{"include":"#slice"}],"beginCaptures":{"0":{"name":"punctuation.brace.open.slice"}}},"parameter":{"name":"meta.parameter.slice","begin":"\\\\?\\w+","end":"(?=[,\\)])|$","patterns":[{"include":"#standard"},{"begin":":","end":"(?=[,\\)])|$","patterns":[{"include":"#standard"},{"name":"storage.modifier.stream.slice","match":"\\bstream\\b"},{"include":"#type.identifier"},{"include":"#error"}],"beginCaptures":{"0":{"name":"punctuation.separator.colon.slice"}}},{"include":"#error"}],"beginCaptures":{"0":{"name":"entity.name.variable.slice","patterns":[{"include":"#field.identifier"}]}}},"preprocessor":{"patterns":[{"include":"#preprocessor.define"},{"include":"#preprocessor.undef"},{"include":"#preprocessor.if"},{"include":"#preprocessor.elif"},{"include":"#preprocessor.else"},{"include":"#preprocessor.endif"},{"include":"#preprocessor.unknown"},{"include":"#preprocessor.unknown"}]},"preprocessor.define":{"name":"meta.preprocessor.define.slice","begin":"^\\s*((#)\\s*define)\\b","end":"$","patterns":[{"include":"#comment.line"},{"include":"#preprocessor.single-identifier"},{"include":"#error"}],"beginCaptures":{"1":{"name":"keyword.control.preprocessor.undef.slice"},"2":{"name":"punctuation.definition.preprocessor.slice"}}},"preprocessor.elif":{"name":"meta.preprocessor.elif.slice","begin":"^\\s*((#)\\s*elif)\\b","end":"$","patterns":[{"include":"#preprocessor.expression"}],"beginCaptures":{"1":{"name":"keyword.control.preprocessor.elif.slice"},"2":{"name":"punctuation.definition.preprocessor.slice"}}},"preprocessor.else":{"name":"meta.preprocessor.else.slice","begin":"^\\s*((#)\\s*else)\\b","end":"$","patterns":[{"include":"#comment.line"},{"include":"#error"}],"beginCaptures":{"1":{"name":"keyword.control.preprocessor.else.slice"},"2":{"name":"punctuation.definition.preprocessor.slice"}}},"preprocessor.endif":{"name":"meta.preprocessor.endif.slice","begin":"^\\s*((#)\\s*endif)\\b","end":"$","patterns":[{"include":"#comment.line"},{"include":"#error"}],"beginCaptures":{"1":{"name":"keyword.control.preprocessor.endif.slice"},"2":{"name":"punctuation.definition.preprocessor.slice"}}},"preprocessor.expression":{"patterns":[{"include":"#comment.line"},{"match":"(!)|(\u0026\u0026)|(\\|\\|)|(\\()|(\\))","captures":{"1":{"name":"keyword.operator.logical.not.slice"},"2":{"name":"keyword.operator.logical.and.slice"},"3":{"name":"keyword.operator.logical.or.slice"},"4":{"name":"punctuation.parenthesis.open.slice"},"5":{"name":"punctuation.parenthesis.close.slice"}}},{"include":"#preprocessor.identifier"},{"include":"#error"}]},"preprocessor.identifier":{"patterns":[{"name":"constant.other.symbol.preprocessor.slice","match":"\\b[a-zA-Z_]\\w*\\b"},{"include":"#error"}]},"preprocessor.if":{"name":"meta.preprocessor.if.slice","begin":"^\\s*((#)\\s*if)\\b","end":"$","patterns":[{"include":"#preprocessor.expression"}],"beginCaptures":{"1":{"name":"keyword.control.preprocessor.if.slice"},"2":{"name":"punctuation.definition.preprocessor.slice"}}},"preprocessor.single-identifier":{"begin":"\\b\\w+\\b","end":"$","patterns":[{"include":"#comment.line"},{"include":"#error"}],"beginCaptures":{"0":{"patterns":[{"include":"#preprocessor.identifier"}]}}},"preprocessor.undef":{"name":"meta.preprocessor.undef.slice","begin":"^\\s*((#)\\s*undef)\\b","end":"$","patterns":[{"include":"#comment.line"},{"include":"#preprocessor.single-identifier"},{"include":"#error"}],"beginCaptures":{"1":{"name":"keyword.control.preprocessor.undef.slice"},"2":{"name":"punctuation.definition.preprocessor.slice"}}},"preprocessor.unknown":{"name":"meta.preprocessor.unknown.slice","begin":"^\\s*((#)\\s*\\w*)\\b","end":"$","patterns":[{"include":"#comment.line"},{"include":"#error"}],"beginCaptures":{"1":{"name":"invalid.illegal.slice"},"2":{"name":"punctuation.definition.preprocessor.slice"}}},"reserved-identifiers":{"name":"invalid.illegal.identifier.slice","match":"(?\u003c!\\\\)\\b(?:module|struct|interface|enum|custom|typealias|Sequence|Dictionary|Result|bool|int8|uint8|int16|uint16|int32|uint32|varint32|varuint32|int64|uint64|varint62|varuint62|float32|float64|string|compact|idempotent|stream|tag|unchecked)\\b"},"slice":{"patterns":[{"include":"#standard"},{"include":"#string-literal"},{"include":"#module-declaration"},{"include":"#struct"},{"include":"#enum"},{"include":"#interface"},{"include":"#custom-type"},{"include":"#type-alias"},{"include":"#modifier-keywords"},{"include":"#operation"},{"include":"#type.identifier"}]},"standard":{"patterns":[{"include":"#comment"},{"include":"#preprocessor"},{"include":"#attribute"}]},"storage.identifier":{"patterns":[{"name":"entity.name.class.slice","match":"(?:\\b|(::)|(?=\\\\))(?:(\\\\?)([a-zA-Z_]\\w*)(::)?)+\\b","captures":{"1":{"name":"punctuation.separator.double-colon.slice"},"2":{"name":"punctuation.definition.identifier.escape.slice"},"3":{"patterns":[{"include":"#reserved-identifiers"}]},"4":{"name":"punctuation.separator.double-colon.slice"}}},{"include":"#error"}]},"string-literal":{"name":"string.quoted.double.slice","begin":"\"","end":"(\")|$","patterns":[{"name":"constant.character.escape.slice","match":"\\\\."}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.slice"}},"endCaptures":{"1":{"name":"punctuation.definition.string.end.slice"}}},"struct":{"name":"meta.struct.slice","begin":"(?\u003c!\\\\)\\bstruct\\b","end":"}","patterns":[{"include":"#standard"},{"begin":"\\\\?\\b\\w+\\b","end":"(?=})","patterns":[{"include":"#standard"},{"include":"#field-container"},{"include":"#error"}],"beginCaptures":{"0":{"patterns":[{"include":"#storage.identifier"}]}}},{"include":"#field-container"},{"include":"#error"}],"beginCaptures":{"0":{"name":"storage.type.struct.slice"}},"endCaptures":{"0":{"name":"punctuation.brace.close.slice"}}},"tag":{"begin":"\\b(tag)\\s*(?=\\()","end":"(?\u003c=\\))","patterns":[{"include":"#id-value"}],"beginCaptures":{"1":{"name":"storage.modifier.tag.slice"}}},"type-alias":{"name":"meta.typealias.slice","begin":"(?\u003c!\\\\)\\btypealias\\b","end":"$","patterns":[{"include":"#standard"},{"begin":"\\\\?\\b\\w+\\b","end":"$","patterns":[{"include":"#standard"},{"begin":"=","end":"$","patterns":[{"include":"#standard"},{"include":"#type.identifier"},{"include":"#error"}],"beginCaptures":{"0":{"name":"keyword.operator.assignment.slice"}}},{"include":"#error"}],"beginCaptures":{"0":{"patterns":[{"include":"#storage.identifier"}]}}},{"include":"#error"}],"beginCaptures":{"0":{"name":"storage.type.alias.slice"}}},"type-keywords":{"match":"(?\u003c!\\\\)\\b(?:(bool)|(int8)|(uint8)|(int16)|(uint16)|(int32)|(uint32)|(varint32)|(varuint32)|(int64)|(uint64)|(varint62)|(varuint62)|(float32)|(float64)|(string)|(Sequence)|(Dictionary)|(Result))\\b","captures":{"1":{"name":"storage.type.bool.slice"},"10":{"name":"storage.type.int64.slice"},"11":{"name":"storage.type.uint64.slice"},"12":{"name":"storage.type.varint62.slice"},"13":{"name":"storage.type.varuint62.slice"},"14":{"name":"storage.type.float32.slice"},"15":{"name":"storage.type.float64.slice"},"16":{"name":"storage.type.string.slice"},"17":{"name":"storage.type.sequence.slice"},"18":{"name":"storage.type.dictionary.slice"},"19":{"name":"storage.type.result.slice"},"2":{"name":"storage.type.int8.slice"},"3":{"name":"storage.type.uint8.slice"},"4":{"name":"storage.type.int16.slice"},"5":{"name":"storage.type.uint16.slice"},"6":{"name":"storage.type.int32.slice"},"7":{"name":"storage.type.uint32.slice"},"8":{"name":"storage.type.varint32.slice"},"9":{"name":"storage.type.varuint32.slice"}}},"type-name":{"patterns":[{"include":"#type-keywords"},{"include":"#storage.identifier"}]},"type.identifier":{"patterns":[{"name":"meta.generic.parameters.slice","begin":"(?=\\b|\\W)([\\\\\\w:]+)\\s*(\\\u003c)","end":"(\\\u003e)\\s*(\\?)?","patterns":[{"include":"#standard"},{"name":"punctuation.separator.comma.slice","match":","},{"include":"#type.identifier"},{"include":"#error"}],"beginCaptures":{"1":{"patterns":[{"include":"#type-name"}]},"2":{"name":"punctuation.angle.open.slice"}},"endCaptures":{"1":{"name":"punctuation.angle.close.slice"},"2":{"name":"punctuation.definition.optional.slice"}}},{"match":"(?=\\b|\\W)([\\\\\\w:]+)\\s*(\\?)?(?\u003c=\\b|\\W)","captures":{"1":{"patterns":[{"include":"#type-name"}]},"2":{"name":"punctuation.definition.optional.slice"}}}]}}}
|
data/grammars/source.smithy.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"Smithy","scopeName":"source.smithy","patterns":[{"include":"#comment"},{"name":"meta.keyword.statement.control.smithy","begin":"^(\\$)([A-Za-z_][A-Za-z0-9_]*)(:)\\s*","end":"\\n","patterns":[{"include":"#value"},{"name":"invalid.illegal.control.smithy","match":"[^\\n]"}],"beginCaptures":{"1":{"name":"keyword.statement.control.smithy"},"2":{"name":"support.type.property-name.smithy"},"3":{"name":"punctuation.separator.dictionary.pair.smithy"}}},{"name":"meta.keyword.statement.metadata.smithy","begin":"^(metadata)\\s+(\"(?:[^\"\\\\]|\\\\.)*\"|[A-Za-z_][A-Za-z0-9_]*)\\s*(=)\\s*","end":"\\n","patterns":[{"include":"#value"}],"beginCaptures":{"1":{"name":"keyword.statement.smithy"},"2":{"name":"variable.other.smithy"},"3":{"name":"keyword.operator.smithy"}}},{"name":"meta.keyword.statement.namespace.smithy","begin":"^(namespace)\\s+","end":"\\n","patterns":[{"name":"entity.name.type.smithy","match":"[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*"},{"include":"#comment"},{"name":"invalid.illegal.namespace.smithy","match":"[^\\n]"}],"beginCaptures":{"1":{"name":"keyword.statement.smithy"}}},{"name":"meta.keyword.statement.use.smithy","begin":"^(use)\\s+","end":"\\n","patterns":[{"name":"entity.name.type.smithy","match":"[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*#[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*"},{"include":"#comment"},{"name":"invalid.illegal.use.smithy","match":"[^\\n]"}],"beginCaptures":{"1":{"name":"keyword.statement.smithy"}}},{"include":"#trait"},{"name":"meta.keyword.statement.shape.smithy","begin":"^(byte|short|integer|long|float|double|bigInteger|bigDecimal|boolean|blob|string|timestamp|document|list|set|map|union|service|operation|resource|enum|intEnum)\\s+([A-Za-z_][A-Za-z0-9_]*)\\s+(with)\\s+(\\[)","end":"\\]","patterns":[{"name":"entity.name.type.smithy","include":"#shapeid"},{"include":"#comment"},{"name":"punctuation.separator.array.smithy","match":","}],"beginCaptures":{"1":{"name":"keyword.statement.smithy"},"2":{"name":"entity.name.type.smithy"},"3":{"name":"keyword.statement.with.smithy"},"4":{"name":"punctuation.definition.array.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.array.end.smithy"}}},{"name":"meta.keyword.statement.shape.smithy","match":"^(byte|short|integer|long|float|double|bigInteger|bigDecimal|boolean|blob|string|timestamp|document|list|set|map|union|service|operation|resource|enum|intEnum)\\s+([A-Za-z_][A-Za-z0-9_]*)","captures":{"1":{"name":"keyword.statement.smithy"},"2":{"name":"entity.name.type.smithy"}}},{"name":"meta.keyword.statement.shape.smithy","begin":"^(structure)\\s+([A-Za-z_][A-Za-z0-9_]*)(?:\\s+(for)\\s+([0-9a-zA-Z_\\.#]+))?\\s+(with)\\s+(\\[)","end":"\\]","patterns":[{"name":"entity.name.type.smithy","include":"#shapeid"},{"include":"#comment"},{"name":"punctuation.separator.array.smithy","match":","}],"beginCaptures":{"1":{"name":"keyword.statement.smithy"},"2":{"name":"entity.name.type.smithy"},"3":{"name":"keyword.statement.for-resource.smithy"},"4":{"name":"entity.name.type.smithy"},"5":{"name":"keyword.statement.with.smithy"},"6":{"name":"punctuation.definition.array.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.array.end.smithy"}}},{"name":"meta.keyword.statement.shape.smithy","match":"^(structure)\\s+([A-Za-z_][A-Za-z0-9_]*)(?:\\s+(for)\\s+([0-9a-zA-Z_\\.#]+))?","captures":{"1":{"name":"keyword.statement.smithy"},"2":{"name":"entity.name.type.smithy"},"3":{"name":"keyword.statement.for-resource.smithy"},"4":{"name":"entity.name.type.smithy"}}},{"begin":"\\{","end":"\\}","patterns":[{"include":"#shape_inner"}],"beginCaptures":{"0":{"name":"punctuation.definition.dictionary.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.dictionary.end.smithy"}}},{"name":"meta.keyword.statement.apply.smithy","begin":"^(apply)\\s+([A-Za-z_][A-Za-z0-9_\\.#$]*)\\s*(\\{)","end":"\\}","patterns":[{"include":"#trait"},{"include":"#comment"}],"beginCaptures":{"1":{"name":"keyword.statement.smithy"},"2":{"name":"entity.name.type.smithy"},"3":{"name":"punctuation.definition.dictionary.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.dictionary.end.smithy"}}},{"name":"meta.keyword.statement.apply.smithy","begin":"^(apply)\\s+","end":"\\n","patterns":[{"include":"#trait"},{"include":"#shapeid"},{"include":"#comment"},{"name":"invalid.illegal.apply.smithy","match":"[^\\n]"}],"beginCaptures":{"1":{"name":"keyword.statement.smithy"}}},{"name":"meta.keyword.statement.member.smithy","begin":"^([A-Za-z_][A-Za-z0-9_]*)(:)\\s*","end":"\\n","patterns":[{"include":"#shapeid"},{"include":"#comment"}],"beginCaptures":{"1":{"name":"support.type.property-name.smithy"},"2":{"name":"punctuation.separator.dictionary.pair.smithy"}}}],"repository":{"array":{"name":"meta.structure.array.smithy","begin":"\\[","end":"\\]","patterns":[{"include":"#value"},{"name":"punctuation.separator.array.smithy","match":","},{"name":"invalid.illegal.array.smithy","match":"[^\\s\\]]"}],"beginCaptures":{"0":{"name":"punctuation.definition.array.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.array.end.smithy"}}},"comment":{"patterns":[{"include":"#doc_comment"},{"include":"#line_comment"}]},"doc_comment":{"name":"comment.block.documentation.smithy","match":"(///.*)"},"dquote":{"name":"string.quoted.double.smithy","begin":"\"","end":"\"","patterns":[{"name":"constant.character.escape.smithy","match":"\\\\."}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.smithy"}}},"dquote_key":{"name":"support.type.property-name.smithy","match":"\"(?:[^\"\\\\]|\\\\.)*\"(?=\\s*:)"},"elided_target":{"match":"(\\$)([A-Za-z0-9_\\.#$]+)","captures":{"1":{"name":"keyword.statement.elision.smithy"},"2":{"name":"support.type.property-name.smithy"}}},"identifier":{"name":"entity.name.type.smithy","match":"[A-Za-z_][A-Za-z0-9_]*"},"identifier_key":{"name":"support.type.property-name.smithy","match":"[A-Za-z0-9_\\.#$]+(?=\\s*:)"},"keywords":{"name":"constant.language.smithy","match":"\\b(?:true|false|null)\\b"},"line_comment":{"name":"comment.line.double-slash.smithy","match":"(//.*)"},"number":{"name":"constant.numeric.smithy","match":"(?x: # turn on extended mode\n -? # an optional minus\n (?:\n 0 # a zero\n | # ...or...\n [1-9] # a 1-9 character\n \\d* # followed by zero or more digits\n )\n (?:\n (?:\n \\. # a period\n \\d+ # followed by one or more digits\n )?\n (?:\n [eE] # an e character\n [+-]? # followed by an option +/-\n \\d+ # followed by one or more digits\n )? # make exponent optional\n )? # make decimal portion optional\n )"},"object":{"name":"meta.structure.dictionary.smithy","begin":"\\{","end":"\\}","patterns":[{"include":"#object_inner"}],"beginCaptures":{"0":{"name":"punctuation.definition.dictionary.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.dictionary.end.smithy"}}},"object_inner":{"patterns":[{"include":"#comment"},{"include":"#string_key"},{"name":"punctuation.separator.dictionary.key-value.smithy","match":":"},{"name":"keyword.operator.smithy","match":"="},{"name":"meta.structure.dictionary.value.smithy","include":"#value"},{"name":"punctuation.separator.dictionary.pair.smithy","match":","}]},"shape_inner":{"patterns":[{"include":"#trait"},{"name":"punctuation.separator.dictionary.inline-struct.smithy","match":":="},{"include":"#with_statement"},{"include":"#elided_target"},{"include":"#object_inner"}]},"shapeid":{"name":"entity.name.type.smithy","match":"[A-Za-z_][A-Za-z0-9_\\.#$]*"},"string":{"patterns":[{"include":"#textblock"},{"include":"#dquote"},{"include":"#shapeid"}]},"string_key":{"patterns":[{"include":"#identifier_key"},{"include":"#dquote_key"}]},"textblock":{"name":"string.quoted.double.smithy","begin":"\"\"\"","end":"\"\"\"","patterns":[{"name":"constant.character.escape.smithy","match":"\\\\."}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.smithy"}}},"trait":{"patterns":[{"name":"meta.keyword.statement.trait.smithy","begin":"(@)([0-9a-zA-Z_\\.#]+)(\\()","end":"\\)","patterns":[{"include":"#object_inner"},{"include":"#value"}],"beginCaptures":{"1":{"name":"punctuation.definition.annotation.smithy"},"2":{"name":"storage.type.annotation.smithy"},"3":{"name":"punctuation.definition.dictionary.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.dictionary.end.smithy"}}},{"name":"meta.keyword.statement.trait.smithy","match":"(@)([0-9a-zA-Z_\\.#]+)","captures":{"1":{"name":"punctuation.definition.annotation.smithy"},"2":{"name":"storage.type.annotation.smithy"}}}]},"value":{"patterns":[{"include":"#comment"},{"include":"#keywords"},{"include":"#number"},{"include":"#string"},{"include":"#array"},{"include":"#object"}]},"with_statement":{"begin":"(with)\\s+(\\[)","end":"\\]","patterns":[{"name":"punctuation.separator.array.smithy","match":","},{"include":"#shapeid"},{"include":"#comment"}],"beginCaptures":{"1":{"name":"keyword.statement.with.smithy"},"2":{"name":"punctuation.definition.array.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.array.end.smithy"}}}}}
|
|
1
|
+
{"name":"Smithy","scopeName":"source.smithy","patterns":[{"include":"#comment"},{"name":"meta.keyword.statement.control.smithy","begin":"^(\\$)(\"(?:[^\"\\\\]|\\\\.)*\"|[A-Za-z_][A-Za-z0-9_]*)[ \\t]*(:)[ \\t]*","end":"\\n","patterns":[{"include":"#value"},{"name":"invalid.illegal.control.smithy","match":"[^\\s,]"}],"beginCaptures":{"1":{"name":"keyword.statement.control.smithy"},"2":{"name":"support.type.property-name.smithy"},"3":{"name":"punctuation.separator.dictionary.pair.smithy"}}},{"name":"meta.keyword.statement.metadata.smithy","begin":"^(metadata)\\s+(\"(?:[^\"\\\\]|\\\\.)*\"|[A-Za-z_][A-Za-z0-9_]*)\\s*(=)\\s*","end":"\\n","patterns":[{"include":"#value"}],"beginCaptures":{"1":{"name":"keyword.statement.smithy"},"2":{"name":"variable.other.smithy"},"3":{"name":"keyword.operator.smithy"}}},{"name":"meta.keyword.statement.namespace.smithy","begin":"^(namespace)\\s+","end":"\\n","patterns":[{"name":"entity.name.type.smithy","match":"[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*"},{"include":"#comment"},{"name":"invalid.illegal.namespace.smithy","match":"[^\\s,]"}],"beginCaptures":{"1":{"name":"keyword.statement.smithy"}}},{"name":"meta.keyword.statement.use.smithy","begin":"^(use)\\s+","end":"\\n","patterns":[{"name":"entity.name.type.smithy","match":"[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*#[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*"},{"include":"#comment"},{"name":"invalid.illegal.use.smithy","match":"[^\\s,]"}],"beginCaptures":{"1":{"name":"keyword.statement.smithy"}}},{"include":"#trait"},{"name":"meta.keyword.statement.shape.smithy","begin":"(?:^|(?\u003c=[\\s)]))(byte|short|integer|long|float|double|bigInteger|bigDecimal|boolean|blob|string|timestamp|document)\\s+([A-Za-z_][A-Za-z0-9_]*)","end":"(?\u003c=\\])|(?=^[ \\t]*(?!with\\b|\\[|$)\\S)","patterns":[{"include":"#shape_header"}],"beginCaptures":{"1":{"name":"keyword.statement.smithy"},"2":{"name":"entity.name.type.smithy"}}},{"name":"meta.keyword.statement.shape.smithy","begin":"(?:^|(?\u003c=[\\s)]))(list|set|map|structure|union)\\s+([A-Za-z_][A-Za-z0-9_]*)","end":"(?\u003c=\\})|(?=^[ \\t]*(?!with\\b|//|\\{|$)\\S)","patterns":[{"include":"#shape_header"},{"begin":"\\{","end":"\\}|(?=^(?:apply|byte|short|integer|long|float|double|bigInteger|bigDecimal|boolean|blob|string|timestamp|document|list|set|map|structure|union|enum|intEnum|service|resource|operation)[ \\t]+[A-Za-z_])","patterns":[{"include":"#member_body"}],"beginCaptures":{"0":{"name":"punctuation.definition.dictionary.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.dictionary.end.smithy"}}}],"beginCaptures":{"1":{"name":"keyword.statement.smithy"},"2":{"name":"entity.name.type.smithy"}}},{"name":"meta.keyword.statement.shape.smithy","begin":"(?:^|(?\u003c=[\\s)]))(enum|intEnum)\\s+([A-Za-z_][A-Za-z0-9_]*)","end":"(?\u003c=\\})|(?=^[ \\t]*(?!with\\b|//|\\{|$)\\S)","patterns":[{"include":"#shape_header"},{"begin":"\\{","end":"\\}|(?=^(?:apply|byte|short|integer|long|float|double|bigInteger|bigDecimal|boolean|blob|string|timestamp|document|list|set|map|structure|union|enum|intEnum|service|resource|operation)[ \\t]+[A-Za-z_])","patterns":[{"include":"#enum_body"}],"beginCaptures":{"0":{"name":"punctuation.definition.dictionary.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.dictionary.end.smithy"}}}],"beginCaptures":{"1":{"name":"keyword.statement.smithy"},"2":{"name":"entity.name.type.smithy"}}},{"name":"meta.keyword.statement.shape.smithy","begin":"(?:^|(?\u003c=[\\s)]))(service|resource|operation)\\s+([A-Za-z_][A-Za-z0-9_]*)","end":"(?\u003c=\\})|(?=^[ \\t]*(?!with\\b|//|\\{|$)\\S)","patterns":[{"include":"#shape_header"},{"begin":"\\{","end":"\\}|(?=^(?:apply|byte|short|integer|long|float|double|bigInteger|bigDecimal|boolean|blob|string|timestamp|document|list|set|map|structure|union|enum|intEnum|service|resource|operation)[ \\t]+[A-Za-z_])","patterns":[{"include":"#node_body"}],"beginCaptures":{"0":{"name":"punctuation.definition.dictionary.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.dictionary.end.smithy"}}}],"beginCaptures":{"1":{"name":"keyword.statement.smithy"},"2":{"name":"entity.name.type.smithy"}}},{"begin":"\\{","end":"\\}|(?=^(?:apply|byte|short|integer|long|float|double|bigInteger|bigDecimal|boolean|blob|string|timestamp|document|list|set|map|structure|union|enum|intEnum|service|resource|operation)[ \\t]+[A-Za-z_])","patterns":[{"include":"#member_body"}],"beginCaptures":{"0":{"name":"punctuation.definition.dictionary.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.dictionary.end.smithy"}}},{"name":"meta.keyword.statement.apply.smithy","begin":"^(apply)\\s+([A-Za-z_][A-Za-z0-9_\\.#$]*)\\s*(\\{)","end":"\\}","patterns":[{"include":"#trait"},{"include":"#comment"}],"beginCaptures":{"1":{"name":"keyword.statement.smithy"},"2":{"name":"entity.name.type.smithy"},"3":{"name":"punctuation.definition.dictionary.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.dictionary.end.smithy"}}},{"name":"meta.keyword.statement.apply.smithy","begin":"^(apply)\\s+","end":"\\n","patterns":[{"include":"#trait"},{"include":"#shapeid"},{"include":"#comment"},{"name":"invalid.illegal.apply.smithy","match":"[^\\s,]"}],"beginCaptures":{"1":{"name":"keyword.statement.smithy"}}},{"name":"meta.keyword.statement.member.smithy","begin":"^(?:([1-9][0-9]*)(\\.)[ \\t]+)?([A-Za-z_][A-Za-z0-9_]*)(:)\\s*","end":"\\n","patterns":[{"include":"#member_target"},{"include":"#comment"}],"beginCaptures":{"1":{"name":"constant.numeric.member-index.smithy"},"2":{"name":"punctuation.separator.member-index.smithy"},"3":{"name":"support.type.property-name.smithy"},"4":{"name":"punctuation.separator.dictionary.pair.smithy"}}}],"repository":{"array":{"name":"meta.structure.array.smithy","begin":"\\[","end":"\\]","patterns":[{"include":"#value"},{"name":"punctuation.separator.array.smithy","match":","},{"name":"invalid.illegal.array.smithy","match":"[^\\s\\]]"}],"beginCaptures":{"0":{"name":"punctuation.definition.array.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.array.end.smithy"}}},"comment":{"patterns":[{"include":"#doc_comment"},{"include":"#line_comment"}]},"doc_comment":{"name":"comment.block.documentation.smithy","match":"(///.*)"},"dquote":{"name":"string.quoted.double.smithy","begin":"\"","end":"\"","patterns":[{"name":"constant.character.escape.smithy","match":"\\\\(?:[\"\\\\/bfnrt]|u[0-9A-Fa-f]{4})"},{"name":"constant.character.escape.smithy","match":"\\\\$"},{"name":"invalid.illegal.escape.smithy","match":"\\\\."}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.smithy"}}},"dquote_key":{"name":"support.type.property-name.smithy","match":"\"(?:[^\"\\\\]|\\\\.)*\"(?=\\s*:)"},"elided_target":{"match":"(\\$)([A-Za-z0-9_\\.#$]+)","captures":{"1":{"name":"keyword.statement.elision.smithy"},"2":{"name":"support.type.property-name.smithy"}}},"enum_body":{"patterns":[{"include":"#trait"},{"include":"#object_inner"}]},"for_resource":{"match":"\\b(for)\\s+([A-Za-z_][A-Za-z0-9_]*(?:[.#][A-Za-z_][A-Za-z0-9_]*)*)","captures":{"1":{"name":"keyword.statement.for-resource.smithy"},"2":{"name":"entity.name.type.smithy"}}},"identifier_key":{"name":"support.type.property-name.smithy","match":"(?\u003c![A-Za-z0-9_.#$])[A-Za-z_][A-Za-z0-9_]*(?:[.#$][A-Za-z_][A-Za-z0-9_]*)*(?=\\s*:)"},"inline_list_inner":{"patterns":[{"include":"#member_target"},{"name":"punctuation.separator.array.smithy","match":","},{"name":"invalid.illegal.inline-list.smithy","match":"[^\\s\\]]"}]},"inline_list_member":{"name":"meta.structure.inline-list.smithy","begin":"([A-Za-z_][A-Za-z0-9_]*)[ \\t]*(:)[ \\t]*(\\[)","end":"\\]|(?=^[^\\s])","patterns":[{"include":"#inline_list_inner"}],"beginCaptures":{"1":{"name":"support.type.property-name.smithy"},"2":{"name":"punctuation.separator.dictionary.key-value.smithy"},"3":{"name":"punctuation.definition.array.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.array.end.smithy"}}},"inline_list_target":{"name":"meta.structure.inline-list.smithy","begin":"\\[","end":"\\]|(?=^[^\\s])","patterns":[{"include":"#inline_list_inner"}],"beginCaptures":{"0":{"name":"punctuation.definition.array.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.array.end.smithy"}}},"inline_map_inner":{"patterns":[{"name":"punctuation.separator.dictionary.key-value.smithy","match":":"},{"include":"#member_target"},{"name":"punctuation.separator.dictionary.pair.smithy","match":","},{"name":"invalid.illegal.inline-map.smithy","match":"[^\\s\\}]"}]},"inline_map_member":{"name":"meta.structure.inline-map.smithy","begin":"([A-Za-z_][A-Za-z0-9_]*)[ \\t]*(:)[ \\t]*(\\{)","end":"\\}|(?=^[^\\s])","patterns":[{"include":"#inline_map_inner"}],"beginCaptures":{"1":{"name":"support.type.property-name.smithy"},"2":{"name":"punctuation.separator.dictionary.key-value.smithy"},"3":{"name":"punctuation.definition.dictionary.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.dictionary.end.smithy"}}},"inline_map_target":{"name":"meta.structure.inline-map.smithy","begin":"\\{","end":"\\}|(?=^[^\\s])","patterns":[{"include":"#inline_map_inner"}],"beginCaptures":{"0":{"name":"punctuation.definition.dictionary.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.dictionary.end.smithy"}}},"inline_structure":{"begin":"(:=)","end":"(?\u003c=\\})|(?=^(?!\\s|\\{|//))","patterns":[{"include":"#trait"},{"include":"#for_resource"},{"include":"#with_statement"},{"include":"#comment"},{"begin":"\\{","end":"\\}|(?=^(?:apply|byte|short|integer|long|float|double|bigInteger|bigDecimal|boolean|blob|string|timestamp|document|list|set|map|structure|union|enum|intEnum|service|resource|operation)[ \\t]+[A-Za-z_])","patterns":[{"include":"#member_body"}],"beginCaptures":{"0":{"name":"punctuation.definition.dictionary.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.dictionary.end.smithy"}}}],"beginCaptures":{"1":{"name":"punctuation.separator.dictionary.inline-struct.smithy"}}},"keywords":{"name":"constant.language.smithy","match":"\\b(?:true|false|null)\\b"},"line_comment":{"name":"comment.line.double-slash.smithy","match":"(//.*)"},"member_body":{"patterns":[{"include":"#trait"},{"include":"#member_index"},{"include":"#elided_target"},{"include":"#inline_list_member"},{"include":"#inline_map_member"},{"include":"#object_inner"}]},"member_index":{"match":"(?\u003c![-+0-9A-Za-z_.$#])([1-9][0-9]*)(\\.)(?=[ \\t])","captures":{"1":{"name":"constant.numeric.member-index.smithy"},"2":{"name":"punctuation.separator.member-index.smithy"}}},"member_target":{"patterns":[{"include":"#inline_list_target"},{"include":"#inline_map_target"},{"include":"#comment"},{"include":"#shapeid"}]},"node_body":{"patterns":[{"include":"#trait"},{"include":"#inline_structure"},{"include":"#object_inner"}]},"number":{"name":"constant.numeric.smithy","match":"(?x: # turn on extended mode\n -? # an optional minus\n (?:\n 0 # a zero\n | # ...or...\n [1-9] # a 1-9 character\n \\d* # followed by zero or more digits\n )\n (?:\n (?:\n \\. # a period\n \\d+ # followed by one or more digits\n )?\n (?:\n [eE] # an e character\n [+-]? # followed by an option +/-\n \\d+ # followed by one or more digits\n )? # make exponent optional\n )? # make decimal portion optional\n )"},"object":{"name":"meta.structure.dictionary.smithy","begin":"\\{","end":"\\}","patterns":[{"include":"#object_inner"}],"beginCaptures":{"0":{"name":"punctuation.definition.dictionary.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.dictionary.end.smithy"}}},"object_inner":{"patterns":[{"include":"#comment"},{"include":"#string_key"},{"name":"punctuation.separator.dictionary.key-value.smithy","match":":"},{"name":"keyword.operator.smithy","match":"="},{"name":"meta.structure.dictionary.value.smithy","include":"#value"},{"name":"punctuation.separator.dictionary.pair.smithy","match":","}]},"shape_header":{"patterns":[{"include":"#for_resource"},{"include":"#with_statement"},{"include":"#comment"}]},"shapeid":{"name":"entity.name.type.smithy","match":"[A-Za-z_][A-Za-z0-9_\\.#$]*"},"string":{"patterns":[{"include":"#tagged_literal"},{"include":"#textblock"},{"include":"#dquote"},{"include":"#shapeid"}]},"string_key":{"patterns":[{"include":"#identifier_key"},{"include":"#dquote_key"}]},"tagged_literal":{"patterns":[{"name":"string.quoted.double.raw.smithy","begin":"(#)(timestamp|hex|re|b)(?![A-Za-z0-9_])[ \\t]*(\"\"\")","end":"\"\"\"","patterns":[{"name":"constant.character.escape.smithy","match":"\\\\\""},{"match":"\\\\."}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.smithy"},"2":{"name":"storage.type.tag.smithy"},"3":{"name":"punctuation.definition.string.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.smithy"}}},{"name":"string.quoted.double.raw.smithy","begin":"(#)(timestamp|hex|re|b)(?![A-Za-z0-9_])[ \\t]*(\")","end":"\"","patterns":[{"name":"constant.character.escape.smithy","match":"\\\\\""},{"match":"\\\\."}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.smithy"},"2":{"name":"storage.type.tag.smithy"},"3":{"name":"punctuation.definition.string.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.smithy"}}}]},"textblock":{"name":"string.quoted.double.smithy","begin":"\"\"\"","end":"\"\"\"","patterns":[{"name":"constant.character.escape.smithy","match":"\\\\(?:[\"\\\\/bfnrt]|u[0-9A-Fa-f]{4})"},{"name":"constant.character.escape.smithy","match":"\\\\$"},{"name":"invalid.illegal.escape.smithy","match":"\\\\."}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.smithy"}}},"trait":{"patterns":[{"name":"meta.keyword.statement.trait.smithy","begin":"(@)([A-Za-z_][A-Za-z0-9_]*(?:[.#][A-Za-z_][A-Za-z0-9_]*)*)(\\()","end":"\\)","patterns":[{"include":"#object_inner"},{"include":"#value"}],"beginCaptures":{"1":{"name":"punctuation.definition.annotation.smithy"},"2":{"name":"storage.type.annotation.smithy"},"3":{"name":"punctuation.definition.dictionary.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.dictionary.end.smithy"}}},{"name":"meta.keyword.statement.trait.smithy","match":"(@)([A-Za-z_][A-Za-z0-9_]*(?:[.#][A-Za-z_][A-Za-z0-9_]*)*)","captures":{"1":{"name":"punctuation.definition.annotation.smithy"},"2":{"name":"storage.type.annotation.smithy"}}}]},"value":{"patterns":[{"include":"#comment"},{"include":"#keywords"},{"include":"#number"},{"include":"#string"},{"include":"#array"},{"include":"#object"}]},"with_statement":{"begin":"\\b(with)\\b","end":"\\]|(?=^[^\\s])","patterns":[{"name":"punctuation.definition.array.begin.smithy","match":"\\["},{"name":"punctuation.separator.array.smithy","match":","},{"include":"#shapeid"},{"include":"#comment"}],"beginCaptures":{"1":{"name":"keyword.statement.with.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.array.end.smithy"}}}}}
|
data/grammars/source.stim.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"Stim","scopeName":"source.stim","patterns":[{"include":"#comment"},{"include":"#control-flow"},{"include":"#annotation"},{"include":"#noise-channel"},{"include":"#measurement"},{"include":"#gate"},{"include":"#tag"},{"include":"#measurement-record"},{"include":"#sweep-bit"},{"include":"#negation"},{"include":"#pauli-target"},{"include":"#combiner"},{"include":"#number"},{"include":"#bracket"}],"repository":{"annotation":{"name":"keyword.other.annotation.stim","match":"\\b(DETECTOR|MPAD|OBSERVABLE_INCLUDE|QUBIT_COORDS|SHIFT_COORDS|TICK)\\b"},"bracket":{"name":"punctuation.section.brackets.stim","match":"[(){}]"},"combiner":{"name":"keyword.operator.combiner.stim","match":"\\*"},"comment":{"name":"comment.line.number-sign.stim","match":"#.*$"},"control-flow":{"name":"keyword.control.stim","match":"\\b(REPEAT|SELECT|REQUIRE|NOTLEAKED)\\b"},"gate":{"name":"keyword.other.gate.stim","match":"\\b(C_NXYZ|C_NZYX|C_XNYZ|C_XYNZ|C_XYZ|C_ZNYX|C_ZYNX|C_ZYX|CXSWAP|CX|CNOT|ZCX|CY|ZCY|CZSWAP|CZ|ZCZ|SWAPCZ|SWAPCX|SWAP|H_XZ|H_NXY|H_NXZ|H_NYZ|H_XY|H_YZ|H|SQRT_X_DAG|SQRT_X|SQRT_Y_DAG|SQRT_Y|SQRT_Z_DAG|SQRT_Z|SQRT_XX_DAG|SQRT_XX|SQRT_YY_DAG|SQRT_YY|SQRT_ZZ_DAG|SQRT_ZZ|S_DAG|S|ISWAP_DAG|ISWAP|II|XCX|XCY|XCZ|YCX|YCY|YCZ|MPP|SPP_DAG|SPP|I|X|Y|Z)\\b"},"measurement":{"name":"keyword.other.measurement.stim","match":"\\b(MRX|MRY|MRZ|MR|MXX|MYY|MZZ|MX|MY|MZ|M|RX|RY|RZ|R)\\b"},"measurement-record":{"match":"\\b(rec)(\\[)(-?\\d+)(\\])","captures":{"1":{"name":"support.function.record.stim"},"2":{"name":"punctuation.section.brackets.stim"},"3":{"name":"constant.numeric.stim"},"4":{"name":"punctuation.section.brackets.stim"}}},"negation":{"name":"keyword.operator.negation.stim","match":"!"},"noise-channel":{"name":"keyword.other.noise.stim","match":"\\b(CORRELATED_ERROR|ELSE_CORRELATED_ERROR|DEPOLARIZE1|DEPOLARIZE2|HERALDED_ERASE|HERALDED_PAULI_CHANNEL_1|II_ERROR|I_ERROR|PAULI_CHANNEL_1|PAULI_CHANNEL_2|X_ERROR|Y_ERROR|Z_ERROR|LOSS_ERROR|E)\\b"},"number":{"name":"constant.numeric.stim","match":"[+-]?\\b\\d+(\\.\\d+)?([eE][+-]?\\d+)?\\b"},"pauli-target":{"match":"([XYZL])(\\d+)","captures":{"1":{"name":"support.class.pauli.stim"},"2":{"name":"constant.numeric.stim"}}},"sweep-bit":{"match":"\\b(sweep)(\\[)(\\d+)(\\])","captures":{"1":{"name":"support.function.sweep.stim"},"2":{"name":"punctuation.section.brackets.stim"},"3":{"name":"constant.numeric.stim"},"4":{"name":"punctuation.section.brackets.stim"}}},"tag":{"name":"string.other.tag.stim","match":"\\[[^\\]]*\\]"}}}
|
|
1
|
+
{"name":"Stim","scopeName":"source.stim","patterns":[{"include":"#comment"},{"include":"#control-flow"},{"include":"#annotation"},{"include":"#noise-channel"},{"include":"#measurement"},{"include":"#gate"},{"include":"#tag"},{"include":"#measurement-record"},{"include":"#sweep-bit"},{"include":"#negation"},{"include":"#pauli-target"},{"include":"#combiner"},{"include":"#number"},{"include":"#bracket"}],"repository":{"annotation":{"name":"keyword.other.annotation.stim","match":"\\b(DETECTOR|MPAD|OBSERVABLE_INCLUDE|QUBIT_COORDS|SHIFT_COORDS|TICK)\\b"},"bracket":{"name":"punctuation.section.brackets.stim","match":"[(){}]"},"combiner":{"name":"keyword.operator.combiner.stim","match":"\\*"},"comment":{"name":"comment.line.number-sign.stim","match":"#.*$"},"control-flow":{"name":"keyword.control.stim","match":"\\b(REPEAT|SELECT|REQUIRE|NOTLEAKED)\\b"},"gate":{"name":"keyword.other.gate.stim","match":"\\b(C_NXYZ|C_NZYX|C_XNYZ|C_XYNZ|C_XYZ|C_ZNYX|C_ZYNX|C_ZYX|CXSWAP|CX|CNOT|ZCX|CY|ZCY|CZSWAP|CZ|ZCZ|SWAPCZ|SWAPCX|SWAP|H_XZ|H_NXY|H_NXZ|H_NYZ|H_XY|H_YZ|H|SQRT_X_DAG|SQRT_X|SQRT_Y_DAG|SQRT_Y|SQRT_Z_DAG|SQRT_Z|SQRT_XX_DAG|SQRT_XX|SQRT_YY_DAG|SQRT_YY|SQRT_ZZ_DAG|SQRT_ZZ|S_DAG|S|ISWAP_DAG|ISWAP|II|XCX|XCY|XCZ|YCX|YCY|YCZ|MPP|SPP_DAG|SPP|T_DAG|T|TPP_DAG|TPP|CH|CCX|CCZ|R_X|R_Y|R_Z|U3|U|R_XX|R_YY|R_ZZ|R_PAULI|I|X|Y|Z)\\b"},"measurement":{"name":"keyword.other.measurement.stim","match":"\\b(MRX|MRY|MRZ|MR|MXX|MYY|MZZ|MX|MY|MZ|M|RX|RY|RZ|R)\\b"},"measurement-record":{"match":"\\b(rec)(\\[)(-?\\d+)(\\])","captures":{"1":{"name":"support.function.record.stim"},"2":{"name":"punctuation.section.brackets.stim"},"3":{"name":"constant.numeric.stim"},"4":{"name":"punctuation.section.brackets.stim"}}},"negation":{"name":"keyword.operator.negation.stim","match":"!"},"noise-channel":{"name":"keyword.other.noise.stim","match":"\\b(CORRELATED_ERROR|ELSE_CORRELATED_ERROR|DEPOLARIZE1|DEPOLARIZE2|HERALDED_ERASE|HERALDED_PAULI_CHANNEL_1|II_ERROR|I_ERROR|PAULI_CHANNEL_1|PAULI_CHANNEL_2|X_ERROR|Y_ERROR|Z_ERROR|LOSS_ERROR|E)\\b"},"number":{"name":"constant.numeric.stim","match":"[+-]?\\b\\d+(\\.\\d+)?([eE][+-]?\\d+)?(rad)?\\b"},"pauli-target":{"match":"([XYZL])(\\d+)","captures":{"1":{"name":"support.class.pauli.stim"},"2":{"name":"constant.numeric.stim"}}},"sweep-bit":{"match":"\\b(sweep)(\\[)(\\d+)(\\])","captures":{"1":{"name":"support.function.sweep.stim"},"2":{"name":"punctuation.section.brackets.stim"},"3":{"name":"constant.numeric.stim"},"4":{"name":"punctuation.section.brackets.stim"}}},"tag":{"name":"string.other.tag.stim","match":"\\[[^\\]]*\\]"}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"SurrealQL","scopeName":"source.surrealql","patterns":[{"include":"#comment"},{"include":"#type-clause"},{"include":"#keywords"},{"include":"#operators"},{"include":"#js-function"},{"include":"#function"},{"include":"#value"}],"repository":{"analyzer-tokenizer":{"name":"support.constant.analyzer-tokenizer.surrealql","match":"(?i)\\b(blank|camel|class|punct)\\b"},"array":{"begin":"\\[","end":"\\]","patterns":[{"include":"#array-content"}]},"array-content":{"patterns":[{"include":"$self"},{"name":"punctuation.separator.array","match":","}]},"block":{"name":"surrealql.block","begin":"\\{","end":"\\}","patterns":[{"include":"#block-content"}]},"block-content":{"patterns":[{"include":"#string"},{"include":"#object-key"},{"include":"$self"}]},"boolean":{"name":"constant.language.bool","match":"\\b(true|TRUE|false|FALSE|True|False)\\b"},"comment":{"patterns":[{"include":"#comment.line.dash"},{"include":"#comment.line.slash"},{"include":"#comment.line.hash"},{"include":"#comment.block"}]},"comment.block":{"name":"comment.block.surrealql","begin":"/\\*","end":"\\*/"},"comment.line.dash":{"name":"comment.line.double-dash","begin":"--","end":"\\n"},"comment.line.hash":{"name":"comment.line.number-sign","begin":"#","end":"\\n"},"comment.line.slash":{"name":"comment.line.double-slash","begin":"//","end":"\\n"},"distance-name":{"name":"support.constant.distance.surrealql","match":"(?i)\\b(chebyshev|euclidean|manhattan|minkowski|hamming|jaccard|pearson|cosine)\\b"},"duration":{"name":"constant.other","match":"(\\d+(?:_\\d+)* *(?:ns|µs|ms|s|m|h|d|w|y)(?![A-Za-z_]))+"},"filter-name":{"name":"support.constant.filter.surrealql","match":"(?i)\\b(edgengram|uppercase|snowball|ascii|ngram)\\b"},"function":{"begin":"(?=((?:\\b\\w+(?:::\\b\\w+)+)|count|rand)\\s*\\()","end":"(?\u003c=\\))","patterns":[{"include":"#comment"},{"name":"meta.function.arguments","begin":"\\(","end":"\\)","patterns":[{"include":"#value"}]}],"beginCaptures":{"1":{"name":"support.function"}}},"ident":{"patterns":[{"name":"support.type.property-name","begin":"`","end":"(?\u003c!\\\\)`"},{"name":"support.type.property-name","begin":"⟨","end":"(?\u003c!\\\\)⟩"}]},"identifier":{"name":"variable.other.surrealql","match":"\\b[a-zA-Z_][a-zA-Z0-9_]*\\b"},"index-type":{"name":"constant.language.index-type.surrealql","match":"(?i)\\b(f32|f64|i16|i32|i64)\\b"},"js-function":{"begin":"(?=(\\bfunction\\b))","end":"(?\u003c=})","patterns":[{"include":"#comment"},{"name":"meta.function.arguments","begin":"\\(","end":"\\)","patterns":[{"include":"#value"}]},{"name":"meta.embedded.block.javascript","begin":"{","end":"}","patterns":[{"include":"source.js"}]}],"beginCaptures":{"1":{"name":"support.function.js"}}},"keywords":{"patterns":[{"name":"keyword.control keyword.control.surrealql","match":"(?i)\\b(keep_pruned_connections|doc_lengths_cache|doc_lengths_order|extend_candidates|postings_cache|postings_order|doc_ids_cache|doc_ids_order|authenticate|concurrently|mtree_cache|permissions|terms_cache|terms_order|transaction|changefeed|highlights|middleware|schemafull|schemaless|tokenizers|algorithm|dimension|duplicate|functions|namespace|overwrite|reference|structure|tempfiles|analyzer|capacity|computed|continue|database)\\b"},{"name":"keyword.control keyword.control.surrealql","match":"(?i)\\b(duration|enforced|flexible|function|parallel|passhash|password|readonly|relation|backend|cascade|changes|collate|columns|comment|content|default|exclude|explain|expunge|filters|graphql|include|noindex|numeric|rebuild|replace|session|timeout|version|access|always|assert|bucket|cancel)\\b"},{"name":"keyword.control keyword.control.surrealql","match":"(?i)\\b(commit|config|create|define|delete|exists|fields|ignore|insert|issuer|normal|option|record|reject|relate|remove|return|search|select|signin|signup|strict|tables|unique|update|upsert|values|alter|async|begin|break|defer|event|fetch|field)\\b"},{"name":"keyword.control keyword.control.surrealql","match":"(?i)\\b(group|index|limit|merge|mtree|order|param|patch|roles|scope|since|sleep|split|start|table|throw|token|trace|unset|value|where|auto|bm25|desc|dist|drop|else|from|hnsw|info|into|kill|live|omit|only)\\b"},{"name":"keyword.control keyword.control.surrealql","match":"(?i)\\b(root|show|then|type|user|when|with|all|any|api|asc|efc|end|for|get|jwt|key|let|not|out|put|set|url|use|as|at|by|db|if|in|lm|m0|ns|on|sc)\\b"},{"name":"keyword.control keyword.control.surrealql","match":"(?i)\\b(tb|to|m)\\b"}]},"literal-keyword":{"name":"constant.language.literal.surrealql","match":"(?i)\\b(diff|full)\\b"},"number":{"patterns":[{"name":"constant.numeric.decimal","match":"\\b\\d+(?:_\\d+)*(?:\\.\\d+(?:_\\d+)*)?(?:[eE][+-]?\\d+(?:_\\d+)*)?dec\\b"},{"name":"constant.numeric.decimal","match":"\\b(?:\\d+(?:_\\d+)*f|\\d+(?:_\\d+)*(?:\\.\\d+(?:_\\d+)*(?:[eE][+-]?\\d+(?:_\\d+)*)?|[eE][+-]?\\d+(?:_\\d+)*)(?:f)?)\\b"},{"name":"constant.numeric.int","match":"\\b\\d+(?:_\\d+)*\\b"}]},"object-key":{"patterns":[{"match":"(?:^|{|,)[ \t]*(\"[^(?:\\\")]+\")(?=:(?!:))","captures":{"1":{"name":"string.quoted.double"}}},{"match":"(?:^|{|,)[ \t]*('[^(?:\\')]+')(?=:(?!:))","captures":{"1":{"name":"string.quoted.single"}}},{"match":"(^|\\{|\\,)[ \t]*([a-zA-Z_0-9]+)(?=:(?!:))","captures":{"2":{"name":"meta.object-literal.key"}}}]},"operators":{"patterns":[{"name":"keyword.operator.arrow.surrealql","match":"\u003c-\u003e|-\u003e|\u003c-|\u003c~"},{"include":"#regex-literal"},{"name":"keyword.operator.range.surrealql","match":"\\.\\.(?=\\=)"},{"name":"keyword.operator.range.surrealql","match":"\\.\\.(?!\\.)"},{"name":"keyword.operator.word.surrealql","match":"(?i)\\b(containsnone|containsnot|containsall|containsany|noneinside|intersects|notinside|allinside|anyinside|contains|outside|inside|and|or)\\b"},{"name":"keyword.operator.logical-and.surrealql","match":"\u0026\u0026"},{"name":"keyword.operator.logical-or.surrealql","match":"\\|\\|"},{"name":"keyword.operator.is-not.surrealql","match":"\\b(IS NOT|is not)\\b|!="},{"name":"keyword.operator.is.surrealql","match":"\\b(IS|is)\\b|="},{"name":"keyword.operator.containssome.surrealql","match":"\\b(CONTAINSSOME|containssome)\\b"},{"name":"keyword.operator.contains.surrealql","match":"∋"},{"name":"keyword.operator.containsall.surrealql","match":"⊇"},{"name":"keyword.operator.containsany.surrealql","match":"⊃"},{"name":"keyword.operator.containsnone.surrealql","match":"⊅"},{"name":"keyword.operator.containsnot.surrealql","match":"∌"},{"name":"keyword.operator.allinside.surrealql","match":"⊆"},{"name":"keyword.operator.anyinside.surrealql","match":"⊂"},{"name":"keyword.operator.noneinside.surrealql","match":"⊄"},{"name":"keyword.operator.notinside.surrealql","match":"∉"},{"name":"keyword.operator.inside.surrealql","match":"∈"},{"name":"keyword.operator.equal.surrealql","match":"=="},{"name":"keyword.operator.all-equal.surrealql","match":"\\*="},{"name":"keyword.operator.any-equal.surrealql","match":"\\?="},{"name":"keyword.operator.fuzzy-inequal.surrealql","match":"!~"},{"name":"keyword.operator.fuzzy-all-equal.surrealql","match":"\\*~"},{"name":"keyword.operator.fuzzy-any-equal.surrealql","match":"\\?~"},{"name":"keyword.operator.fuzzy-equal.surrealql","match":"~"},{"name":"keyword.operator.less-or-equal.surrealql","match":"\u003c="},{"name":"keyword.operator.less.surrealql","match":"\u003c(?!-|[a-z]+[^:])"},{"name":"keyword.operator.more-or-equal.surrealql","match":"\u003e="},{"name":"keyword.operator.more.surrealql","match":"(?\u003c!-)\u003e"},{"name":"keyword.operator.add.surrealql","match":"\\+"},{"name":"keyword.operator.subtract.surrealql","match":"-"},{"name":"keyword.operator.multiply.surrealql","match":"\\*|×|∙"},{"name":"keyword.operator.devide.surrealql","match":"\\/|÷"},{"name":"keyword.operator.matches.surrealql","match":"@([0-9]+)?@","captures":{"1":{"name":"constant.numeric.int"}}},{"name":"keyword.operator.optional.surrealql","match":"\\.\\?"},{"name":"keyword.operator.either.surrealql","match":"\\?:"},{"name":"keyword.operator.truthy.surrealql","match":"\\?\\?"},{"name":"keyword.operator.knn.surrealql","match":"\\\u003c\\|([a-zA-Z|\\d|,])+\\|\\\u003e"}]},"positional":{"name":"constant.language.positional","match":"\\b(AFTER|after|BEFORE|before)\\b"},"query":{"patterns":[{"include":"$self"}]},"record":{"patterns":[{"match":"(\\b\\w+\\b):⟨([^⟩]+)⟩","captures":{"1":{"name":"entity.name.class"},"2":{"name":"entity.name.class"}}},{"match":"(\\b\\w+\\b):`([^`]+)`","captures":{"1":{"name":"entity.name.class"},"2":{"name":"entity.name.class"}}},{"begin":"(\\b\\w+\\b):(?=(\\b[\\w:]+\\b)\\s*\\()","end":"(?\u003c=\\))","patterns":[{"include":"#comment"},{"name":"meta.function.arguments","begin":"\\(","end":"\\)","patterns":[{"include":"#value"}]}],"beginCaptures":{"1":{"name":"entity.name.class"},"2":{"name":"support.function"}}},{"match":"(\\b\\w+\\b):(\\b\\w+\\b)","captures":{"1":{"name":"entity.name.class"},"2":{"name":"entity.name.class"}}},{"begin":"(\\b\\w+\\b):\\[","end":"\\]","patterns":[{"include":"#array-content"}],"captures":{"1":{"name":"entity.name.class"}}},{"begin":"(\\b\\w+\\b):(?=\\{)","end":"\\}","patterns":[{"include":"#block-content"}],"captures":{"1":{"name":"entity.name.class"}}}]},"regex-literal":{"name":"string.regexp.surrealql","match":"(?\u003c![A-Za-z0-9])(\\/)(?:[^\\\\/]|\\\\.|\\[(?:[^\\]\\\\]|\\\\.)*\\])*(\\/)([a-z]*)"},"string":{"patterns":[{"name":"string.quoted.double","begin":"[a-z]?\"","end":"(?\u003c!\\\\)\""},{"name":"string.quoted.single","begin":"[a-z]?'","end":"(?\u003c!\\\\)'"}]},"subquery":{"begin":"\\(","end":"\\)","patterns":[{"include":"#query"},{"include":"#value"}]},"token-type":{"name":"support.constant.token-type.surrealql","match":"(?i)\\b(eddsa|es256|es384|es512|ps256|ps384|ps512|rs256|rs384|rs512|jwks)\\b"},"type":{"name":"meta.type.annotation.surrealql","match":"[a-z]*\u003c[a-zA-Z][a-zA-Z0-9\u003c\u003e|, _]+[a-zA-Z0-9\u003e]+\u003e","captures":{"0":{"patterns":[{"name":"entity.name.type.surrealql","match":"\u003c|\u003e"},{"include":"#number"},{"include":"#void-type"}]}}},"type-clause":{"name":"meta.type.annotation.surrealql","begin":"(?i)\\b(TYPE)\\b","end":"(?=\\b(DEFAULT|ASSERT|VALUE|COMMENT|PERMISSIONS|REFERENCE|READONLY|FLEXIBLE|COMPUTED|DIST|DIMENSION|EFC|M|LM|M0)\\b|;|$)","patterns":[{"include":"#comment"},{"include":"#string"},{"include":"#number"},{"include":"#void-type"},{"name":"keyword.operator.union.surrealql","match":"\\|"},{"name":"punctuation.definition.type.surrealql","match":"[\\[\\]\u003c\u003e]"},{"name":"punctuation.separator.type.surrealql","match":","},{"include":"#index-type"},{"name":"entity.name.type.surrealql","match":"\\b[a-zA-Z_][a-zA-Z0-9_]*\\b"}],"beginCaptures":{"1":{"name":"keyword.control.surrealql"}}},"value":{"patterns":[{"include":"#comment"},{"include":"#js-function"},{"include":"#function"},{"include":"#block"},{"include":"#array"},{"include":"#var-name"},{"include":"#boolean"},{"include":"#string"},{"include":"#ident"},{"include":"#void-type"},{"include":"#positional"},{"include":"#duration"},{"include":"#number"},{"include":"#record"},{"include":"#subquery"},{"include":"#type"},{"include":"#index-type"},{"include":"#token-type"},{"include":"#distance-name"},{"include":"#filter-name"},{"include":"#analyzer-tokenizer"},{"include":"#literal-keyword"},{"include":"#regex-literal"},{"include":"#identifier"}]},"var-name":{"patterns":[{"name":"variable.name","match":"\\$\\w+"},{"name":"variable.name","match":"\\$`\\w+`"},{"name":"variable.name","match":"\\$⟨\\w+⟩"}]},"void-type":{"name":"constant.language.void","match":"\\b(null|NULL|none|NONE)\\b"}}}
|
|
1
|
+
{"name":"SurrealQL","scopeName":"source.surrealql","patterns":[{"include":"#comment"},{"include":"#property"},{"include":"#define-type"},{"include":"#type-clause"},{"include":"#keywords"},{"include":"#version"},{"include":"#return-type"},{"include":"#operators"},{"include":"#js-function"},{"include":"#function"},{"include":"#value"}],"repository":{"analyzer-tokenizer":{"name":"support.constant.analyzer-tokenizer.surrealql","match":"(?i)\\b(segment|blank|camel|class|punct)\\b"},"array":{"begin":"\\[","end":"\\]","patterns":[{"include":"#array-content"}]},"array-content":{"patterns":[{"include":"$self"},{"name":"punctuation.separator.array","match":","}]},"block":{"name":"surrealql.block","begin":"\\{","end":"\\}","patterns":[{"include":"#block-content"}]},"block-content":{"patterns":[{"include":"#string"},{"include":"#object-key"},{"include":"$self"}]},"boolean":{"name":"constant.language.bool","match":"\\b(true|TRUE|false|FALSE|True|False)\\b"},"comment":{"patterns":[{"include":"#comment.line.dash"},{"include":"#comment.line.slash"},{"include":"#comment.line.hash"},{"include":"#comment.block"}]},"comment.block":{"name":"comment.block.surrealql","begin":"/\\*","end":"\\*/"},"comment.line.dash":{"name":"comment.line.double-dash","begin":"--","end":"\\n"},"comment.line.hash":{"name":"comment.line.number-sign","begin":"#","end":"\\n"},"comment.line.slash":{"name":"comment.line.double-slash","begin":"//","end":"\\n"},"define-type":{"name":"meta.type.annotation.surrealql","begin":"(?i)\\b(DEFINE|ALTER)\\s+(TYPE)\\s+(?:(IF\\s+NOT\\s+EXISTS|IF\\s+EXISTS|OVERWRITE)\\s+)?(\\w+)\\s+(AS)\\b","end":"(?=(?i)\\b(DEFAULT|ASSERT|VALUE|COMMENT|PERMISSIONS|REFERENCE|READONLY|FLEXIBLE|COMPUTED|INLINE|MATERIALIZE|MIGRATE|SQL|GRAPHQL_ALIAS|GRAPHQL_DEPRECATED|CONSTRAINT|IN|OUT|FROM|TO|ENFORCED|LIGHTWEIGHT|SCHEMAFULL|SCHEMAFUL|SCHEMALESS|CHANGEFEED|DROP|AS|DIST|DISTANCE|DIMENSION|EFC|M|LM|M0|CAPACITY|EXTEND_CANDIDATES|KEEP_PRUNED_CONNECTIONS|HASHED_VECTOR|DEGREE|L_BUILD|ALPHA|SIGNUP|SIGNIN|WITH|ALGORITHM|URL|KEY|FOR|AUTHENTICATE|DURATION|IF|ADD|RENAME|PREPARE)\\b|;|$)","patterns":[{"include":"#type-content"}],"beginCaptures":{"1":{"name":"keyword.control.surrealql"},"2":{"name":"keyword.control.surrealql"},"3":{"name":"keyword.control.surrealql"},"4":{"name":"entity.name.type.surrealql"},"5":{"name":"keyword.control.surrealql"}}},"distance-name":{"name":"support.constant.distance.surrealql","match":"(?i)\\b(cosine_normalized|inner_product|chebyshev|euclidean|manhattan|minkowski|hamming|jaccard|pearson|cosine)\\b"},"duration":{"name":"constant.other","match":"(\\d+(?:_\\d+)* *(?:ns|µs|ms|s|m|h|d|w|y)(?![A-Za-z_]))+"},"filter-name":{"name":"support.constant.filter.surrealql","match":"(?i)\\b(edgengram|lowercase|uppercase|snowball|mapper|ascii|ngram)\\b"},"function":{"begin":"\\b(\\w+(?:::\\w+)+|count|rand|\\w+(?=\u003c\\d+(?:_\\d+)*(?:\\.\\d+(?:_\\d+)*){0,2}\u003e::))(\u003c\\d+(?:_\\d+)*(?:\\.\\d+(?:_\\d+)*){0,2}\u003e)?(?:(::)(\\w+))?(?=\\s*\\()","end":"(?\u003c=\\))","patterns":[{"include":"#comment"},{"name":"meta.function.arguments","begin":"\\(","end":"\\)","patterns":[{"include":"#value"}]}],"beginCaptures":{"1":{"name":"support.function"},"2":{"name":"constant.numeric.version.surrealql"},"3":{"name":"support.function"},"4":{"name":"support.function"}}},"function-name":{"name":"support.function","match":"\\b[a-zA-Z_]\\w*(?:::\\w+)+\\b(?!\\s*\\()"},"ident":{"patterns":[{"name":"support.type.property-name","begin":"`","end":"`","patterns":[{"name":"constant.character.escape.surrealql","match":"\\\\."}]},{"name":"support.type.property-name","begin":"⟨","end":"⟩","patterns":[{"name":"constant.character.escape.surrealql","match":"\\\\."}]}]},"identifier":{"name":"variable.other.surrealql","match":"\\b[a-zA-Z_][a-zA-Z0-9_]*\\b"},"index-type":{"name":"constant.language.index-type.surrealql","match":"(?i)\\b(f16|f32|f64|i8|i16|i32|i64|u8)\\b"},"js-function":{"begin":"(?=(\\bfunction\\b))","end":"(?\u003c=})","patterns":[{"include":"#comment"},{"name":"meta.function.arguments","begin":"\\(","end":"\\)","patterns":[{"include":"#value"}]},{"name":"meta.embedded.block.javascript","begin":"{","end":"}","patterns":[{"include":"source.js"}]}],"beginCaptures":{"1":{"name":"support.function.js"}}},"keywords":{"patterns":[{"name":"keyword.control keyword.control.surrealql","match":"(?i)\\b(keep_pruned_connections|graphql_deprecated|doc_lengths_cache|doc_lengths_order|extend_candidates|postings_cache|postings_order|compatibility|doc_ids_cache|doc_ids_order|graphql_alias|hashed_vector|introspection|query_timeout|authenticate|capabilities|concurrently|lightweight|materialize|mtree_cache|permissions|terms_cache|terms_order|transaction|changefeed|complexity|constraint|descending|highlights|middleware|references|schemafull|schemaless|signatures|tokenizers)\\b"},{"name":"keyword.control keyword.control.surrealql","match":"(?i)\\b(undeclared|withaccess|algorithm|ascending|dimension|duplicate|extension|functions|isolation|namespace|overwrite|passscram|reference|schemaful|staleness|structure|tempfiles|analyzer|audience|bindings|capacity|computed|continue|database|distance|distinct|duration|enforced|existing|fallback|flexible|fulltext|function|maxdepth|original)\\b"},{"name":"keyword.control keyword.control.surrealql","match":"(?i)\\b(parallel|passhash|password|readonly|relation|security|sequence|unsigned|analyze|backend|cascade|changes|collate|columns|comment|compact|content|context|default|definer|diskann|exclude|expired|explain|expunge|filters|graphql|include|invoker|l_build|migrate|noindex|numeric|prepare|rebuild)\\b"},{"name":"keyword.control keyword.control.surrealql","match":"(?i)\\b(refresh|replace|revoked|session|spatial|timeout|version|access|always|assert|bearer|bucket|cancel|commit|config|create|define|degree|delete|digest|exists|fields|format|ignore|inline|insert|issuer|module|normal|option|record|reject|relate|remove|rename)\\b"},{"name":"keyword.control keyword.control.surrealql","match":"(?i)\\b(return|revoke|search|select|signer|signin|signup|strict|system|tables|unique|update|upsert|values|alpha|alter|async|batch|begin|break|defer|depth|edges|event|fetch|field|grant|group|index|level|limit|merge|mtree|nulls|order)\\b"},{"name":"keyword.control keyword.control.surrealql","match":"(?i)\\b(param|patch|purge|retry|roles|scope|since|sleep|split|start|table|throw|token|trace|unset|using|value|where|auto|bm25|desc|dist|drop|else|from|hnsw|info|into|kill|live|omit|only|read|root|rows)\\b"},{"name":"keyword.control keyword.control.surrealql","match":"(?i)\\b(show|then|type|user|when|with|add|all|any|api|asc|efc|end|for|get|jwt|key|let|max|not|out|put|set|sql|url|use|as|at|by|db|if|in|kv|lm|m0)\\b"},{"name":"keyword.control keyword.control.surrealql","match":"(?i)\\b(no|ns|on|sc|tb|to|m)\\b"}]},"literal-keyword":{"name":"constant.language.literal.surrealql","match":"(?i)\\b(diff|full)\\b"},"number":{"patterns":[{"name":"constant.numeric.decimal","match":"\\b\\d+(?:_\\d+)*(?:\\.\\d+(?:_\\d+)*)?(?:[eE][+-]?\\d+(?:_\\d+)*)?(?:bigdec|dec)\\b"},{"name":"constant.numeric.decimal","match":"\\b(?:\\d+(?:_\\d+)*f(?:16|32|64)?|\\d+(?:_\\d+)*(?:\\.\\d+(?:_\\d+)*(?:[eE][+-]?\\d+(?:_\\d+)*)?|[eE][+-]?\\d+(?:_\\d+)*)(?:f(?:16|32|64)?)?)\\b"},{"name":"constant.numeric.int","match":"\\b\\d+(?:_\\d+)*(?:[iu](?:8|16|32|64))?\\b"}]},"object-key":{"patterns":[{"match":"(?:(?\u003c=[{,])|^)[ \\t]*(\"(?:[^\"\\\\]|\\\\.)*\")(?=\\s*:(?!:))","captures":{"1":{"name":"string.quoted.double"}}},{"match":"(?:(?\u003c=[{,])|^)[ \\t]*('(?:[^'\\\\]|\\\\.)*')(?=\\s*:(?!:))","captures":{"1":{"name":"string.quoted.single"}}},{"match":"(?:(?\u003c=[{,])|^)[ \\t]*([a-zA-Z_][a-zA-Z0-9_]*)(?=\\s*:(?!:))","captures":{"1":{"name":"meta.object-literal.key"}}}]},"operators":{"patterns":[{"name":"keyword.operator.arrow.surrealql","match":"\u003c-\u003e|-\u003e|\u003c-|\u003c~"},{"include":"#regex-literal"},{"name":"keyword.operator.flatten.surrealql","match":"\\.\\.\\.|…"},{"name":"keyword.operator.range.surrealql","match":"\\.\\.(?=\\=)"},{"name":"keyword.operator.range.surrealql","match":"\\.\\.(?!\\.)"},{"name":"keyword.operator.word.surrealql","match":"(?i)\\b(containsnone|containsnot|containsall|containsany|noneinside|intersects|notinside|allinside|anyinside|contains|outside|inside|and|or)\\b"},{"name":"keyword.operator.logical-and.surrealql","match":"\u0026\u0026"},{"name":"keyword.operator.logical-or.surrealql","match":"\\|\\|"},{"name":"keyword.operator.assignment.surrealql","match":"\\+\\?=|\\+=|-="},{"name":"keyword.operator.is-not.surrealql","match":"\\b(IS NOT|is not)\\b|!="},{"name":"keyword.operator.is.surrealql","match":"\\b(IS|is)\\b|="},{"name":"keyword.operator.containssome.surrealql","match":"\\b(CONTAINSSOME|containssome)\\b"},{"name":"keyword.operator.contains.surrealql","match":"∋"},{"name":"keyword.operator.containsall.surrealql","match":"⊇"},{"name":"keyword.operator.containsany.surrealql","match":"⊃"},{"name":"keyword.operator.containsnone.surrealql","match":"⊅"},{"name":"keyword.operator.containsnot.surrealql","match":"∌"},{"name":"keyword.operator.allinside.surrealql","match":"⊆"},{"name":"keyword.operator.anyinside.surrealql","match":"⊂"},{"name":"keyword.operator.noneinside.surrealql","match":"⊄"},{"name":"keyword.operator.notinside.surrealql","match":"∉"},{"name":"keyword.operator.inside.surrealql","match":"∈"},{"name":"keyword.operator.equal.surrealql","match":"=="},{"name":"keyword.operator.all-equal.surrealql","match":"\\*="},{"name":"keyword.operator.any-equal.surrealql","match":"\\?="},{"name":"keyword.operator.logical-not.surrealql","match":"!(?![=~])"},{"name":"keyword.operator.fuzzy-inequal.surrealql","match":"!~"},{"name":"keyword.operator.fuzzy-all-equal.surrealql","match":"\\*~"},{"name":"keyword.operator.fuzzy-any-equal.surrealql","match":"\\?~"},{"name":"keyword.operator.fuzzy-equal.surrealql","match":"~"},{"name":"keyword.operator.less-or-equal.surrealql","match":"\u003c="},{"name":"keyword.operator.less.surrealql","match":"\u003c(?!-|[a-z]+[^:])"},{"name":"keyword.operator.more-or-equal.surrealql","match":"\u003e="},{"name":"keyword.operator.more.surrealql","match":"(?\u003c!-)\u003e"},{"name":"keyword.operator.add.surrealql","match":"\\+"},{"name":"keyword.operator.subtract.surrealql","match":"-"},{"name":"keyword.operator.multiply.surrealql","match":"\\*|×|∙"},{"name":"keyword.operator.devide.surrealql","match":"\\/|÷"},{"name":"keyword.operator.modulo.surrealql","match":"%"},{"name":"keyword.operator.matches.surrealql","match":"@(?:([0-9]+)(?:,((?i:and|or)))?|((?i:and|or)))?@","captures":{"1":{"name":"constant.numeric.int"},"2":{"name":"keyword.operator.word.surrealql"},"3":{"name":"keyword.operator.word.surrealql"}}},{"name":"keyword.operator.optional.surrealql","match":"\\.\\?"},{"name":"keyword.operator.either.surrealql","match":"\\?:"},{"name":"keyword.operator.truthy.surrealql","match":"\\?\\?"},{"name":"keyword.operator.knn.surrealql","match":"\\\u003c\\|([a-zA-Z|\\d|,])+\\|\\\u003e"}]},"param-type":{"name":"meta.type.annotation.surrealql","begin":"(\\$\\w+)\\s*(:)(?!:)","end":"(?=[)|]|,(?![^\u003c(]*\u003e))","patterns":[{"include":"#type-content"}],"beginCaptures":{"1":{"name":"variable.name"},"2":{"name":"punctuation.separator.type.surrealql"}}},"positional":{"name":"constant.language.positional","match":"\\b(AFTER|after|BEFORE|before)\\b"},"property":{"patterns":[{"match":"(?\u003c=[^.]\\.|\\.\\.\\.|…)([a-zA-Z_][a-zA-Z0-9_]*)(?=\\s*\\()","captures":{"1":{"name":"support.function"}}},{"name":"variable.other.property.surrealql","match":"(?\u003c=[^.]\\.|\\.\\.\\.|…)[a-zA-Z_][a-zA-Z0-9_]*\\b"},{"name":"variable.other.surrealql","match":"(?\u003c=-\u003e|\u003c-|\u003c~)[a-zA-Z_][a-zA-Z0-9_]*\\b(?!:)"}]},"query":{"patterns":[{"include":"$self"}]},"record":{"patterns":[{"match":"(\\b\\w+\\b):⟨([^⟩]+)⟩","captures":{"1":{"name":"entity.name.class"},"2":{"name":"entity.name.class"}}},{"match":"(\\b\\w+\\b):`([^`]+)`","captures":{"1":{"name":"entity.name.class"},"2":{"name":"entity.name.class"}}},{"begin":"(\\b\\w+\\b):(?=(\\b[\\w:]+\\b)\\s*\\()","end":"(?\u003c=\\))","patterns":[{"include":"#comment"},{"name":"meta.function.arguments","begin":"\\(","end":"\\)","patterns":[{"include":"#value"}]}],"beginCaptures":{"1":{"name":"entity.name.class"},"2":{"name":"support.function"}}},{"match":"(\\b\\w+\\b):(\\b\\w+\\b)","captures":{"1":{"name":"entity.name.class"},"2":{"name":"entity.name.class"}}},{"begin":"(\\b\\w+\\b):\\[","end":"\\]","patterns":[{"include":"#array-content"}],"captures":{"1":{"name":"entity.name.class"}}},{"begin":"(\\b\\w+\\b):(\\{)","end":"\\}","patterns":[{"include":"#block-content"}],"captures":{"1":{"name":"entity.name.class"}}}]},"regex-literal":{"name":"string.regexp.surrealql","match":"(?\u003c![A-Za-z0-9])(\\/)(?:[^\\\\/]|\\\\.|\\[(?:[^\\]\\\\]|\\\\.)*\\])*(\\/)([a-z]*)"},"return-type":{"name":"meta.type.annotation.surrealql","begin":"(?\u003c=[)|])\\s*(-\u003e)(?=[\\w\u003c\u003e|,\\s]+\\{)","end":"(?=\\{)","patterns":[{"include":"#type-content"}],"beginCaptures":{"1":{"name":"keyword.operator.arrow.surrealql"}}},"string":{"patterns":[{"name":"string.quoted.double","begin":"(?:\\b(?:ivl|pd|pt|ts)|[a-z])?\"","end":"\"","patterns":[{"name":"constant.character.escape.surrealql","match":"\\\\."}]},{"name":"string.quoted.single","begin":"(?:\\b(?:ivl|pd|pt|ts)|[a-z])?'","end":"'","patterns":[{"name":"constant.character.escape.surrealql","match":"\\\\."}]}]},"subquery":{"begin":"\\(","end":"\\)","patterns":[{"include":"#query"},{"include":"#value"}]},"token-type":{"name":"support.constant.token-type.surrealql","match":"(?i)\\b(eddsa|es256|es384|es512|hs256|hs384|hs512|ps256|ps384|ps512|rs256|rs384|rs512|jwks)\\b"},"type":{"name":"meta.type.annotation.surrealql","match":"[a-z]*\u003c[a-zA-Z][a-zA-Z0-9\u003c\u003e|, _]+[a-zA-Z0-9\u003e]+\u003e","captures":{"0":{"patterns":[{"include":"#type-content"}]}}},"type-clause":{"name":"meta.type.annotation.surrealql","begin":"(?i)\\b(TYPE)\\b(?!\\s*:(?!:))","end":"(?=(?i)\\b(DEFAULT|ASSERT|VALUE|COMMENT|PERMISSIONS|REFERENCE|READONLY|FLEXIBLE|COMPUTED|INLINE|MATERIALIZE|MIGRATE|SQL|GRAPHQL_ALIAS|GRAPHQL_DEPRECATED|CONSTRAINT|IN|OUT|FROM|TO|ENFORCED|LIGHTWEIGHT|SCHEMAFULL|SCHEMAFUL|SCHEMALESS|CHANGEFEED|DROP|AS|DIST|DISTANCE|DIMENSION|EFC|M|LM|M0|CAPACITY|EXTEND_CANDIDATES|KEEP_PRUNED_CONNECTIONS|HASHED_VECTOR|DEGREE|L_BUILD|ALPHA|SIGNUP|SIGNIN|WITH|ALGORITHM|URL|KEY|FOR|AUTHENTICATE|DURATION|IF|ADD|RENAME|PREPARE)\\b|;|$)","patterns":[{"include":"#type-content"}],"beginCaptures":{"1":{"name":"keyword.control.surrealql"}}},"type-content":{"patterns":[{"include":"#comment"},{"include":"#string"},{"include":"#number"},{"include":"#void-type"},{"name":"keyword.operator.union.surrealql","match":"\\|"},{"name":"punctuation.definition.type.surrealql","match":"[\\[\\]\u003c\u003e]"},{"name":"punctuation.separator.type.surrealql","match":","},{"include":"#index-type"},{"name":"entity.name.type.surrealql","match":"\\b[a-zA-Z_][a-zA-Z0-9_]*\\b"}]},"value":{"patterns":[{"include":"#comment"},{"include":"#property"},{"include":"#js-function"},{"include":"#function"},{"include":"#function-name"},{"include":"#block"},{"include":"#array"},{"include":"#param-type"},{"include":"#return-type"},{"include":"#var-name"},{"include":"#boolean"},{"include":"#string"},{"include":"#ident"},{"include":"#void-type"},{"include":"#positional"},{"include":"#duration"},{"include":"#number"},{"include":"#record"},{"include":"#subquery"},{"include":"#version"},{"include":"#type"},{"include":"#index-type"},{"include":"#token-type"},{"include":"#distance-name"},{"include":"#filter-name"},{"include":"#analyzer-tokenizer"},{"include":"#literal-keyword"},{"include":"#regex-literal"},{"include":"#identifier"}]},"var-name":{"patterns":[{"name":"variable.name","match":"\\$\\w+"},{"name":"variable.name","match":"\\$`\\w+`"},{"name":"variable.name","match":"\\$⟨\\w+⟩"}]},"version":{"name":"constant.numeric.version.surrealql","match":"(?\u003c=\\w)\u003c\\d+(?:_\\d+)*(?:\\.\\d+(?:_\\d+)*){0,2}\u003e"},"void-type":{"name":"constant.language.void","match":"\\b(null|NULL|none|NONE)\\b"}}}
|
|
@@ -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"}]}}}
|