github-linguist 9.6.0 → 9.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/grammars/documentation.markdown.injection.haxe.json +1 -1
- data/grammars/gno.mod.json +1 -0
- data/grammars/inline.hbs.json +1 -1
- data/grammars/inline.template.json +1 -1
- data/grammars/markdown.glimmer.codeblock.json +1 -1
- data/grammars/markdown.goose.codeblock.json +1 -0
- data/grammars/markdown.nextflow.codeblock.json +1 -0
- data/grammars/markdown.ocaml.codeblock.json +1 -0
- data/grammars/markdown.reason.codeblock.json +1 -0
- data/grammars/markdown.roc.codeblock.json +1 -0
- data/grammars/nextflow.interpolation.injection.json +1 -0
- data/grammars/nextflow.script.injection.json +1 -0
- data/grammars/source.abl.json +1 -1
- data/grammars/source.abnf.json +1 -1
- data/grammars/source.action.menhir.json +1 -0
- data/grammars/source.aleo.json +1 -0
- data/grammars/source.ampl.dat.json +1 -0
- data/grammars/source.ampl.json +1 -1
- data/grammars/source.apl.json +1 -1
- data/grammars/source.armasm.json +1 -0
- data/grammars/source.astro.json +1 -1
- data/grammars/source.astylerc.json +1 -0
- data/grammars/source.atd.json +1 -0
- data/grammars/source.avisynth.json +1 -0
- data/grammars/source.baml.json +1 -1
- data/grammars/source.bbcbasic.json +1 -0
- data/grammars/source.bend.json +1 -0
- data/grammars/source.bird2.json +1 -0
- data/grammars/source.blueprint.json +1 -0
- data/grammars/source.bnd.json +1 -1
- data/grammars/source.bsl.json +1 -1
- data/grammars/source.c++.json +1 -1
- data/grammars/source.c.json +1 -1
- data/grammars/source.c3.json +1 -1
- data/grammars/source.carbon.json +1 -0
- data/grammars/source.cedar.json +1 -0
- data/grammars/source.cj.json +1 -1
- data/grammars/source.cl.json +1 -1
- data/grammars/source.clar.json +1 -1
- data/grammars/source.cmake.json +1 -1
- data/grammars/source.cmd.json +1 -1
- data/grammars/source.cmhg.json +1 -0
- data/grammars/source.comment-string.wesl.json +1 -1
- data/grammars/source.comment-string.wgsl.json +1 -1
- data/grammars/source.compact.json +1 -0
- data/grammars/source.cram.json +1 -0
- data/grammars/source.cs.json +1 -1
- data/grammars/source.csswg.json +1 -1
- data/grammars/source.cue.json +1 -1
- data/grammars/source.curlrc.json +1 -1
- data/grammars/source.dart.json +1 -1
- data/grammars/source.dataflex.json +1 -0
- data/grammars/source.dax.json +1 -0
- data/grammars/source.dds.dspf.json +1 -1
- data/grammars/source.dds.icff.json +1 -1
- data/grammars/source.dds.lf.json +1 -1
- data/grammars/source.dds.pf.json +1 -1
- data/grammars/source.dds.prtf.json +1 -1
- data/grammars/source.deq.json +1 -0
- data/grammars/source.ditroff.desc.json +1 -1
- data/grammars/source.dm.json +1 -1
- data/grammars/source.dml.json +1 -0
- data/grammars/source.dune-project.json +1 -0
- data/grammars/source.dune-workspace.json +1 -0
- data/grammars/source.dune.json +1 -1
- data/grammars/source.easycrypt.json +1 -0
- data/grammars/source.emacs.lisp.json +1 -1
- data/grammars/source.env-spec.json +1 -0
- data/grammars/source.erlang.json +1 -1
- data/grammars/source.ets.json +1 -0
- data/grammars/source.fift.json +1 -0
- data/grammars/source.flix.json +1 -1
- data/grammars/source.fpp.json +1 -0
- data/grammars/source.func.json +1 -0
- data/grammars/source.gdscript.json +1 -1
- data/grammars/source.gedcom.json +1 -1
- data/grammars/source.gitconfig.json +1 -1
- data/grammars/source.gjs.json +1 -1
- data/grammars/source.gno.json +1 -0
- data/grammars/source.goose.json +1 -0
- data/grammars/source.graphql.json +1 -1
- data/grammars/source.gts.json +1 -1
- data/grammars/source.hack.json +1 -1
- data/grammars/source.hx.json +1 -1
- data/grammars/source.hxml.json +1 -1
- data/grammars/source.ice.json +1 -1
- data/grammars/source.ifc.json +1 -0
- data/grammars/source.indent-profile.json +1 -0
- data/grammars/source.ink.json +1 -1
- data/grammars/source.jac.json +1 -1
- data/grammars/source.jass.json +1 -0
- data/grammars/source.julia.console.json +1 -1
- data/grammars/source.julia.json +1 -1
- data/grammars/source.kcl.json +1 -1
- data/grammars/source.kerml.json +1 -0
- data/grammars/source.koka.json +1 -1
- data/grammars/source.leo.json +1 -1
- data/grammars/source.liquidsoap.json +1 -1
- data/grammars/source.lobster.json +1 -0
- data/grammars/source.logos.json +1 -1
- data/grammars/source.lsf.json +1 -0
- data/grammars/source.luau.json +1 -1
- data/grammars/source.lumscript.json +1 -0
- data/grammars/source.m2.json +1 -1
- data/grammars/source.maple.json +1 -0
- data/grammars/source.metafont.json +1 -0
- data/grammars/source.metapost.json +1 -0
- data/grammars/source.mi.json +1 -1
- data/grammars/source.mo.json +1 -1
- data/grammars/source.mojo.json +1 -1
- data/grammars/source.moonbit.config.json +1 -1
- data/grammars/source.moonbit.json +1 -1
- data/grammars/source.ms.json +1 -0
- data/grammars/source.nextflow-config.json +1 -0
- data/grammars/source.nextflow-groovy.json +1 -1
- data/grammars/source.nextflow-log.json +1 -0
- data/grammars/source.nextflow.json +1 -1
- data/grammars/source.nim.json +1 -1
- data/grammars/source.nushell.json +1 -1
- data/grammars/source.ocaml.META.json +1 -0
- data/grammars/source.ocaml.interface.json +1 -0
- data/grammars/source.ocaml.json +1 -1
- data/grammars/source.ocaml.menhir.json +1 -0
- data/grammars/source.ocaml.merlin.json +1 -0
- data/grammars/source.ocaml.mlx.json +1 -0
- data/grammars/source.ocaml.oasis.json +1 -0
- data/grammars/source.ocaml.ocamlbuild.json +1 -0
- data/grammars/source.ocaml.ocamldoc.json +1 -0
- data/grammars/source.ocaml.ocamlformat.json +1 -0
- data/grammars/source.ocaml.ocamllex.json +1 -0
- data/grammars/source.ocaml.opam-install.json +1 -0
- data/grammars/source.ocaml.opam.json +1 -0
- data/grammars/source.openqasm.json +1 -1
- data/grammars/source.opy.json +1 -1
- data/grammars/source.paperspecs.json +1 -0
- data/grammars/source.pkl.json +1 -1
- data/grammars/source.pl.json +1 -0
- data/grammars/source.pnlgrp.json +1 -1
- data/grammars/source.prisma.json +1 -1
- data/grammars/source.qsharp.json +1 -1
- data/grammars/source.quint.json +1 -1
- data/grammars/source.rarlist.json +1 -0
- data/grammars/source.rascal.json +1 -1
- data/grammars/source.rascript.json +1 -1
- data/grammars/source.reason.json +1 -1
- data/grammars/source.rego.json +1 -1
- data/grammars/source.rhai.json +1 -0
- data/grammars/source.roc.json +1 -1
- data/grammars/source.ron.json +1 -1
- data/grammars/source.rpg.json +1 -1
- data/grammars/source.rpgle.json +1 -1
- data/grammars/source.rpm-spec.json +1 -1
- data/grammars/source.rust.json +1 -1
- data/grammars/source.scala.json +1 -1
- data/grammars/source.skip.json +1 -0
- data/grammars/source.skript.json +1 -0
- data/grammars/source.slice.json +1 -1
- data/grammars/source.smithy.json +1 -1
- data/grammars/source.spicedb.json +1 -1
- data/grammars/source.stim.json +1 -0
- data/grammars/source.surrealql.json +1 -1
- data/grammars/source.swift.json +1 -1
- data/grammars/source.sysml.json +1 -0
- data/grammars/source.tablegen.json +1 -0
- data/grammars/source.tasm.json +1 -0
- data/grammars/source.tlb.json +1 -0
- data/grammars/source.tolk.json +1 -0
- data/grammars/source.tsp.json +1 -1
- data/grammars/source.tsq.json +1 -0
- data/grammars/source.tsrx.json +1 -0
- data/grammars/source.ucode-template.json +1 -0
- data/grammars/source.ucode.json +1 -0
- data/grammars/source.uiua.json +1 -0
- data/grammars/source.vento.json +1 -1
- data/grammars/source.verse.json +1 -0
- data/grammars/source.veryl.json +1 -0
- data/grammars/source.vespaSchema.json +1 -0
- data/grammars/source.vespaYQL.json +1 -0
- data/grammars/source.vhs.json +1 -0
- data/grammars/source.vim9.json +1 -0
- data/grammars/source.wdl.json +1 -1
- data/grammars/source.webassembly.json +1 -1
- data/grammars/source.wesl.json +1 -1
- data/grammars/source.wgsl.json +1 -1
- data/grammars/source.yaml.salt.json +1 -1
- data/grammars/text.bbcode.json +1 -0
- data/grammars/text.html.cobmd.json +1 -0
- data/grammars/text.html.ember-handlebars.json +1 -1
- data/grammars/text.html.handlebars.json +1 -1
- data/grammars/text.html.jte.json +1 -1
- data/grammars/text.html.markdown.json +1 -0
- data/grammars/text.html.pfm.json +1 -0
- data/grammars/text.html.ss.json +1 -0
- data/grammars/text.html.statamic.json +1 -1
- data/grammars/text.marko.json +1 -1
- data/grammars/text.recfile.json +1 -0
- data/grammars/text.roff.json +1 -1
- data/grammars/text.valve-cfg.json +1 -1
- data/grammars/text.vtt.json +1 -1
- data/grammars/version +1 -1
- data/lib/linguist/VERSION +1 -1
- data/lib/linguist/blob_helper.rb +21 -2
- data/lib/linguist/documentation.yml +3 -0
- data/lib/linguist/generated.rb +99 -8
- data/lib/linguist/generic.yml +3 -0
- data/lib/linguist/heuristics.yml +239 -62
- data/lib/linguist/language.rb +5 -9
- data/lib/linguist/languages.yml +610 -30
- data/lib/linguist/languages_data.rb +7965 -0
- data/lib/linguist/lazy_blob.rb +6 -1
- data/lib/linguist/samples.rb +4 -10
- data/lib/linguist/samples_data.rb +203998 -0
- data/lib/linguist/strategy/modeline.rb +0 -1
- data/lib/linguist/vendor.yml +3 -0
- metadata +95 -25
- data/grammars/markdown.bicep.codeblock.json +0 -1
- data/grammars/source.baml-jinja.json +0 -1
- data/grammars/source.camlp4.ocaml.json +0 -1
- data/grammars/source.ocamllex.json +0 -1
- data/grammars/source.ocamlyacc.json +0 -1
- data/grammars/source.reason.hover.type.json +0 -1
- data/grammars/source.scm.json +0 -1
- data/grammars/text.plain.json +0 -1
- data/lib/linguist/languages.json +0 -1
- data/lib/linguist/samples.json +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"nushell","scopeName":"source.nushell","patterns":[{"include":"#define-variable"},{"include":"#define-alias"},{"include":"#function"},{"include":"#extern"},{"include":"#module"},{"include":"#use-module"},{"include":"#expression"},{"include":"#comment"}],"repository":{"binary":{"name":"constant.binary.nushell","begin":"\\b(0x)(\\[)","end":"\\]","patterns":[{"name":"constant.numeric.nushell","match":"[0-9a-fA-F]{2}"}],"beginCaptures":{"1":{"name":"constant.numeric.nushell"},"2":{"name":"meta.brace.square.begin.nushell"}},"endCaptures":{"0":{"name":"meta.brace.square.begin.nushell"}}},"braced-expression":{"name":"meta.expression.braced.nushell","begin":"\\{","end":"\\}","patterns":[{"name":"meta.closure.parameters.nushell","begin":"(?\u003c=\\{)\\s*\\|","end":"\\|","patterns":[{"include":"#function-parameter"}]},{"match":"(\\w+)\\s*(:)\\s*","captures":{"1":{"name":"variable.other.nushell"},"2":{"name":"keyword.control.nushell"}}},{"name":"meta.record-entry.nushell","match":"(\\$\"((?:[^\"\\\\]|\\\\.)*)\")\\s*(:)\\s*","captures":{"1":{"name":"variable.other.nushell"},"2":{"name":"variable.other.nushell","patterns":[{"include":"#paren-expression"}]},"3":{"name":"keyword.control.nushell"}}},{"name":"meta.record-entry.nushell","match":"(\"(?:[^\"\\\\]|\\\\.)*\")\\s*(:)\\s*","captures":{"1":{"name":"variable.other.nushell"},"2":{"name":"keyword.control.nushell"}}},{"name":"meta.record-entry.nushell","match":"(\\$'([^']*)')\\s*(:)\\s*","captures":{"1":{"name":"variable.other.nushell"},"2":{"name":"variable.other.nushell","patterns":[{"include":"#paren-expression"}]},"3":{"name":"keyword.control.nushell"}}},{"name":"meta.record-entry.nushell","match":"('[^']*')\\s*(:)\\s*","captures":{"1":{"name":"variable.other.nushell"},"2":{"name":"keyword.control.nushell"}}},{"include":"#spread"},{"include":"source.nushell"}],"beginCaptures":{"0":{"name":"punctuation.section.block.begin.bracket.curly.nushell"}},"endCaptures":{"0":{"name":"punctuation.section.block.end.bracket.curly.nushell"}}},"command":{"name":"meta.command.nushell","begin":"(?\u003c!\\w)(?:(\\^)|(?![0-9]|\\$))([\\w.!]+(?:(?: (?!-)[\\w\\-.!]+(?:(?= |\\))|$)|[\\w\\-.!]+))*|(?\u003c=\\^)\\$?(?:\"[^\"]+\"|'[^']+'))","end":"(?=\\||\\)|\\}|;)|$","patterns":[{"include":"#parameters"},{"include":"#spread"},{"include":"#value"}],"beginCaptures":{"1":{"name":"keyword.operator.nushell"},"2":{"patterns":[{"include":"#control-keywords"},{"match":"(?:ansi|char) \\w+","captures":{"0":{"name":"keyword.other.builtin.nushell"}}},{"match":"(a(?:l(?:ias|l)|n(?:si(?: (?:gradient|link|strip))?|y)|ppend|st|ttr(?: (?:category|deprecated|example|search-terms))?)|b(?:its(?: (?:and|not|or|ro(?:l|r)|sh(?:l|r)|xor))?|reak|ytes(?: (?:a(?:dd|t)|build|collect|ends-with|index-of|length|re(?:move|place|verse)|s(?:plit|tarts-with)))?)|c(?:al|d|h(?:ar|unk(?:-by|s))|lear|o(?:l(?:lect|umns)|m(?:mandline(?: (?:edit|get-cursor|set-cursor))?|p(?:act|lete))|n(?:fig(?: (?:env|flatten|nu|reset|use-colors))?|st|tinue))|p)|d(?:ate(?: (?:f(?:ormat|rom-human)|humanize|list-timezone|now|to-timezone))?|e(?:bug(?: (?:e(?:nv|xperimental-options)|info|profile))?|code(?: (?:base(?:32(?:hex)?|64)|hex))?|f(?:ault)?|scribe|tect(?: columns)?)|o|rop(?: (?:column|nth))?|t(?: (?:add|diff|format|now|part|to|utcnow))?|u)|e(?:ach(?: while)?|cho|moji|n(?:code(?: (?:base(?:32(?:hex)?|64)|hex))?|umerate)|rror(?: make)?|very|x(?:ec|it|p(?:l(?:ain|ore)|ort(?: (?:alias|const|def|extern|module|use)|-env)?)|tern))|f(?:i(?:l(?:e|l|ter)|nd|rst)|latten|or(?:mat(?: (?:bits|d(?:ate|uration)|filesize|number|pattern))?)?|rom(?: (?:csv|eml|i(?:cs|ni)|json|msgpack(?:z)?|nuon|ods|p(?:arquet|list)|ssv|t(?:oml|sv)|url|vcf|x(?:lsx|ml)|y(?:aml|ml)))?)|g(?:e(?:nerate|t)|lob|r(?:id|oup-by)|stat)|h(?:ash(?: (?:md5|sha256))?|e(?:aders|lp(?: (?:aliases|commands|e(?:scapes|xterns)|modules|operators|pipe-and-redirect))?)|i(?:de(?:-env)?|sto(?:gram|ry(?: (?:import|session))?))|ttp(?: (?:delete|get|head|options|p(?:atch|ost|ut)))?)|i(?:f|gnore|n(?:c|put(?: list(?:en)?)?|s(?:ert|pect)|t(?:erleave|o(?: (?:b(?:inary|ool)|cell-path|d(?:atetime|uration)|f(?:ilesize|loat)|glob|int|record|s(?:qlite|tring)|value))?))|s-(?:admin|empty|not-empty|terminal)|tems)|j(?:o(?:b(?: (?:flush|id|kill|list|recv|s(?:end|pawn)|tag|unfreeze))?|in)|son path|walk)|k(?:eybindings(?: (?:default|list(?:en)?))?|ill)|l(?:ast|e(?:ngth|t(?:-env)?)|ines|o(?:ad-env|op)|s)|m(?:at(?:ch|h(?: (?:a(?:bs|rc(?:cos(?:h)?|sin(?:h)?|tan(?:h)?)|vg)|c(?:eil|os(?:h)?)|exp|floor|l(?:n|og)|m(?:ax|edian|in|ode)|product|round|s(?:in(?:h)?|qrt|tddev|um)|tan(?:h)?|variance))?)|e(?:rge(?: deep)?|tadata(?: (?:access|set))?)|k(?:dir|temp)|o(?:dule|ve)|ut|v)|nu-(?:check|highlight)|o(?:pen|verlay(?: (?:hide|list|new|use))?)|p(?:a(?:nic|r(?:-each|se)|th(?: (?:basename|dirname|ex(?:ists|pand)|join|parse|relative-to|s(?:elf|plit)|type))?)|lugin(?: (?:add|list|rm|stop|use))?|o(?:lars(?: (?:a(?:gg(?:-groups)?|ll-(?:false|true)|ppend|rg-(?:m(?:ax|in)|sort|true|unique|where)|s(?:-date(?:time)?)?)|c(?:a(?:che|st)|o(?:l(?:lect|umns)?|n(?:cat(?:-str)?|tains|vert-time-zone)|unt(?:-null)?)|u(?:mulative|t))|d(?:atepart|ecimal|rop(?:-(?:duplicates|nulls))?|ummies)|exp(?:lode|r-not)|f(?:etch|i(?:l(?:l-n(?:an|ull)|ter(?:-with)?)|rst)|latten)|g(?:et(?:-(?:day|hour|m(?:inute|onth)|nanosecond|ordinal|second|week(?:day)?|year))?|roup-by)|horizontal|i(?:mplode|nt(?:eger|o-(?:d(?:f|type)|lazy|nu|repr|schema))|s-(?:duplicated|in|n(?:ot-null|ull)|unique))|join(?:-where)?|l(?:ast|en|i(?:st-contains|t)|owercase)|m(?:a(?:th|x)|e(?:an|dian)|in)|n(?:-unique|ot)|o(?:pen|therwise|ver)|p(?:ivot|rofile)|q(?:cut|u(?:antile|ery))|r(?:e(?:name|place(?:-time-zone)?|verse)|olling)|s(?:a(?:mple|ve)|chema|e(?:lect|t(?:-with-idx)?)|h(?:ape|ift)|lice|ort-by|t(?:d|ore-(?:get|ls|rm)|r(?:-(?:join|lengths|replace(?:-all)?|s(?:lice|plit|trip-chars))|ftime|uct-json-encode))|um(?:mary)?)|t(?:ake|runcate)|u(?:n(?:ique|nest|pivot)|ppercase)|va(?:lue-counts|r)|w(?:hen|ith-column)))?|rt)|r(?:epend|int)|s)|query(?: (?:db|git|json|web(?:page-info)?|xml))?|r(?:andom(?: (?:b(?:inary|ool)|chars|dice|float|int|uuid))?|e(?:duce|g(?:ex|istry(?: query)?)|ject|name|turn|verse)|m|o(?:ll(?: (?:down|left|right|up))?|tate)|un-(?:external|internal))|s(?:ave|c(?:hema|ope(?: (?:aliases|commands|e(?:ngine-stats|xterns)|modules|variables))?)|e(?:lect|q(?: (?:char|date))?)|huffle|kip(?: (?:until|while))?|l(?:eep|ice)|o(?:rt(?:-by)?|urce(?:-env)?)|plit(?: (?:c(?:ell-path|hars|olumn)|list|row|words))?|t(?:art|or(?: (?:create|delete|export|i(?:mport|nsert)|open|reset|update))?|r(?: (?:c(?:a(?:mel-case|pitalize)|o(?:mpress|ntains))|d(?:e(?:compress|dent|unicode)|istance|owncase)|e(?:nds-with|xpand)|inde(?:nt|x-of)|join|kebab-case|length|pascal-case|re(?:place|verse)|s(?:creaming-snake-case|hl-(?:quote|split)|imilarity|lug|nake-case|ta(?:rts-with|ts)|ubstring)|t(?:itle-case|rim)|upcase|wrap)|ess_internals)?)|ys(?: (?:cpu|disks|host|mem|net|temp|users))?)|t(?:a(?:ble|ke(?: (?:until|while))?)|e(?:e|rm(?: (?:query|size))?)|imeit|o(?: (?:csv|html|json|m(?:d|sgpack(?:z)?)|nuon|p(?:arquet|list)|t(?:ext|oml|sv)|xml|y(?:aml|ml))|uch)?|r(?:anspose|y)|utor)|u(?:limit|n(?:ame|iq(?:-by)?)|p(?:date(?: cells)?|sert)|rl(?: (?:build-query|decode|encode|join|parse|split-query))?|se)|v(?:alues|ersion(?: check)?|iew(?: (?:blocks|files|ir|s(?:ource|pan)))?)|w(?:atch|h(?:ere|i(?:ch|le)|oami)|i(?:ndow|th-env)|rap)|zip)(?![\\w-])( (.*))?","captures":{"1":{"name":"keyword.other.builtin.nushell"},"2":{"patterns":[{"include":"#value"}]}}},{"name":"entity.name.type.external.nushell","match":"(?\u003c=\\^)(?:\\$(\"[^\"]+\"|'[^']+')|\"[^\"]+\"|'[^']+')","captures":{"1":{"patterns":[{"include":"#paren-expression"}]}}},{"match":"([\\w.]+(?:-[\\w.!]+)*)(?: (.*))?","captures":{"1":{"name":"entity.name.type.external.nushell"},"2":{"patterns":[{"include":"#value"}]}}},{"include":"#value"}]}}},"comment":{"name":"comment.nushell","match":"(#.*)$"},"constant-keywords":{"name":"constant.language.nushell","match":"\\b(?:true|false|null)\\b"},"constant-value":{"patterns":[{"include":"#constant-keywords"},{"include":"#datetime"},{"include":"#numbers"},{"include":"#numbers-hexa"},{"include":"#numbers-octal"},{"include":"#numbers-binary"},{"include":"#binary"}]},"control-keywords":{"name":"keyword.control.nushell","match":"(?\u003c![0-9a-zA-Z_\\-.\\/:\\\\])(?:break|continue|else(?: if)?|for|if|loop|mut|return|try|while)(?![0-9a-zA-Z_\\-.\\/:\\\\])"},"datetime":{"name":"constant.numeric.nushell","match":"\\b\\d{4}-\\d{2}-\\d{2}(?:T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:\\+\\d{2}:?\\d{2}|Z)?)?\\b"},"define-alias":{"match":"((?:export )?alias)\\s+([\\w\\-!]+)\\s*(=)","captures":{"1":{"name":"entity.name.function.nushell"},"2":{"name":"entity.name.type.nushell"},"3":{"patterns":[{"include":"#operators"}]}}},"define-variable":{"match":"(let|mut|(?:export\\s+)?const)\\s+(\\w+)\\s+(=)","captures":{"1":{"name":"keyword.other.nushell"},"2":{"name":"variable.other.nushell"},"3":{"patterns":[{"include":"#operators"}]}}},"expression":{"patterns":[{"include":"#pre-command"},{"include":"#for-loop"},{"include":"#operators"},{"name":"keyword.control.nushell","match":"\\|"},{"include":"#control-keywords"},{"include":"#constant-value"},{"include":"#string-raw"},{"include":"#command"},{"include":"#value"}]},"extern":{"begin":"((?:export\\s+)?extern)\\s+([\\w\\-]+|\"[\\w\\- ]+\")","end":"(?\u003c=\\])","patterns":[{"include":"#function-parameters"}],"beginCaptures":{"1":{"name":"entity.name.function.nushell"},"2":{"name":"entity.name.type.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.function.end.nushell"}}},"for-loop":{"name":"meta.for-loop.nushell","begin":"(for)\\s+(\\$?\\w+)\\s+(in)\\s+(.+)\\s*(\\{)","end":"\\}","patterns":[{"include":"source.nushell"}],"beginCaptures":{"1":{"name":"keyword.other.nushell"},"2":{"name":"variable.other.nushell"},"3":{"name":"keyword.other.nushell"},"4":{"patterns":[{"include":"#value"}]},"5":{"name":"punctuation.section.block.begin.bracket.curly.nushell"}},"endCaptures":{"0":{"name":"punctuation.section.block.end.bracket.curly.nushell"}}},"function":{"begin":"((?:export\\s+)?def)(?:\\s+((?:--\\w+(?:\\s+--\\w+)*)))?\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+'|`[\\w\\- ]+`)(?:\\s+((?:--\\w+(?:\\s+--\\w+)*)))?","end":"(?\u003c=\\})","patterns":[{"include":"#function-parameters"},{"include":"#function-body"},{"include":"#function-inout"}],"beginCaptures":{"1":{"name":"entity.name.function.nushell"},"2":{"name":"entity.name.function.nushell"},"3":{"name":"entity.name.type.nushell"},"4":{"name":"entity.name.function.nushell"}}},"function-body":{"name":"meta.function.body.nushell","begin":"\\{","end":"\\}","patterns":[{"include":"source.nushell"}],"beginCaptures":{"0":{"name":"punctuation.definition.function.begin.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.function.end.nushell"}}},"function-inout":{"patterns":[{"include":"#types"},{"name":"keyword.operator.nushell","match":"-\u003e"},{"include":"#function-multiple-inout"}]},"function-multiple-inout":{"end":"\\]","patterns":[{"include":"#types"},{"match":"\\s*(,)\\s*","captures":{"1":{"name":"punctuation.separator.nushell"}}},{"match":"\\s+(-\u003e)\\s+","captures":{"1":{"name":"keyword.operator.nushell"}}}],"beginCaptures":{"1":{"name":"punctuation.definition.in-out.nushell"},"2":{"name":"meta.brace.square.begin.nushell"}},"endCaptures":{"0":{"name":"meta.brace.square.end.nushell"}}},"function-parameter":{"patterns":[{"name":"variable.parameter.nushell","match":"(-{0,2}|\\.{3})[\\w-]+(?:\\((-[\\w?])\\))?","captures":{"1":{"name":"keyword.control.nushell"}}},{"begin":"\\??:\\s*","end":"(?=(?:\\s+(?:-{0,2}|\\.{3})[\\w-]+)|(?:\\s*(?:,|\\]|\\||@|=|#|$)))","patterns":[{"include":"#types"}]},{"begin":"@(?=\"|')","end":"(?\u003c=\"|')","patterns":[{"include":"#string"}]},{"name":"default.value.nushell","begin":"=\\s*","end":"(?=(?:\\s+-{0,2}[\\w-]+)|(?:\\s*(?:,|\\]|\\||#|$)))","patterns":[{"include":"#value"}]}]},"function-parameters":{"name":"meta.function.parameters.nushell","begin":"\\[","end":"\\]","patterns":[{"include":"#function-parameter"},{"include":"#comment"}],"beginCaptures":{"0":{"name":"meta.brace.square.begin.nushell"}},"endCaptures":{"0":{"name":"meta.brace.square.end.nushell"}}},"internal-variables":{"name":"variable.language.nushell","match":"\\$(?:nu|env)\\b"},"keyword":{"name":"keyword.other.nushell","match":"(?:def(?:-env)?)"},"module":{"name":"meta.module.nushell","begin":"((?:export\\s+)?module)\\s+([\\w\\-]+)\\s*\\{","end":"\\}","patterns":[{"include":"source.nushell"}],"beginCaptures":{"1":{"name":"entity.name.function.nushell"},"2":{"name":"entity.name.namespace.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.module.end.nushell"}}},"numbers":{"name":"constant.numeric.nushell","match":"(?\u003c![\\w-])_*+[-+]?_*+(?:(?i:NaN|infinity|inf)_*+|(?:\\d[\\d_]*+\\.?|\\._*+\\d)[\\d_]*+(?i:E_*+[-+]?_*+\\d[\\d_]*+)?)(?i:ns|us|µs|ms|sec|min|hr|day|wk|b|kb|mb|gb|tb|pt|eb|zb|kib|mib|gib|tib|pit|eib|zib)?(?:(?![\\w.])|(?=\\.\\.))"},"numbers-binary":{"name":"constant.numeric.nushell","match":"(?\u003c![\\w-])_*+0_*+b_*+[01][01_]*+(?![\\w.])"},"numbers-hexa":{"name":"constant.numeric.nushell","match":"(?\u003c![\\w-])_*+0_*+x_*+[0-9a-fA-F][0-9a-fA-F_]*+(?![\\w.])"},"numbers-octal":{"name":"constant.numeric.nushell","match":"(?\u003c![\\w-])_*+0_*+o_*+[0-7][0-7_]*+(?![\\w.])"},"operators":{"patterns":[{"include":"#operators-word"},{"include":"#operators-symbols"},{"include":"#ranges"}]},"operators-symbols":{"name":"keyword.control.nushell","match":"(?\u003c= )(?:(?:\\+|\\-|\\*|\\/)=?|\\/\\/|\\*\\*|!=|[\u003c\u003e=]=?|[!=]~|\\+\\+=?)(?= |$)"},"operators-word":{"name":"keyword.control.nushell","match":"(?\u003c= |\\()(?:mod|in|not-(?:in|like|has)|not|and|or|xor|bit-(?:or|and|xor|shl|shr)|starts-with|ends-with|like|has)(?= |\\)|$)"},"parameters":{"name":"variable.parameter.nushell","match":"(?\u003c=\\s)(-{1,2})[\\w-]+","captures":{"1":{"name":"keyword.control.nushell"}}},"paren-expression":{"name":"meta.expression.parenthesis.nushell","begin":"\\(","end":"\\)","patterns":[{"include":"#expression"}],"beginCaptures":{"0":{"name":"meta.brace.round.begin.nushell"}},"endCaptures":{"0":{"name":"meta.brace.round.end.nushell"}}},"pre-command":{"begin":"(\\w+)(=)","end":"(?=\\s+)","patterns":[{"include":"#value"}],"beginCaptures":{"1":{"name":"variable.other.nushell"},"2":{"patterns":[{"include":"#operators"}]}}},"ranges":{"name":"keyword.control.nushell","match":"\\.\\.\u003c?"},"spread":{"name":"keyword.control.nushell","match":"\\.\\.\\.(?=[^\\s\\]}])"},"string":{"patterns":[{"include":"#string-single-quote"},{"include":"#string-backtick"},{"include":"#string-double-quote"},{"include":"#string-interpolated-double"},{"include":"#string-interpolated-single"},{"include":"#string-raw"},{"include":"#string-bare"}]},"string-backtick":{"name":"string.quoted.single.nushell","begin":"`","end":"`","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.nushell"}}},"string-bare":{"name":"string.bare.nushell","match":"[^$\\[{(\"',|#\\s|;][^\\[\\]{}()\"'\\s,|;]*"},"string-double-quote":{"name":"string.quoted.double.nushell","begin":"\"","end":"\"","patterns":[{"match":"\\w+"},{"include":"#string-escape"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.nushell"}}},"string-escape":{"name":"constant.character.escape.nushell","match":"\\\\(?:[bfrnt\\\\'\"/]|u[0-9a-fA-F]{4})"},"string-interpolated-double":{"name":"string.interpolated.double.nushell","begin":"\\$\"","end":"\"","patterns":[{"name":"constant.character.escape.nushell","match":"\\\\[()]"},{"include":"#string-escape"},{"include":"#paren-expression"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.nushell"}}},"string-interpolated-single":{"name":"string.interpolated.single.nushell","begin":"\\$'","end":"'","patterns":[{"include":"#paren-expression"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.nushell"}}},"string-raw":{"name":"string.raw.nushell","begin":"r(#+)'","end":"'\\1","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.nushell"}}},"string-single-quote":{"name":"string.quoted.single.nushell","begin":"'","end":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.nushell"}}},"table":{"name":"meta.table.nushell","begin":"\\[","end":"\\]","patterns":[{"include":"#spread"},{"include":"#value"},{"name":"punctuation.separator.nushell","match":","}],"beginCaptures":{"0":{"name":"meta.brace.square.begin.nushell"}},"endCaptures":{"0":{"name":"meta.brace.square.end.nushell"}}},"types":{"patterns":[{"name":"meta.list.nushell","begin":"\\b(list)\\s*\u003c","end":"\u003e","patterns":[{"include":"#types"}],"beginCaptures":{"1":{"name":"entity.name.type.nushell"}}},{"name":"meta.record.nushell","begin":"\\b(record)\\s*\u003c","end":"\u003e","patterns":[{"match":"([\\w\\-]+|\"[\\w\\- ]+\"|'[^']+')\\s*:\\s*","captures":{"1":{"name":"variable.parameter.nushell"}}},{"include":"#types"}],"beginCaptures":{"1":{"name":"entity.name.type.nushell"}}},{"name":"entity.name.type.nushell","match":"\\b(\\w+)\\b"}]},"use-module":{"patterns":[{"match":"^\\s*((?:export )?use)\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+')(?:\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+'|\\*))?\\s*;?$","captures":{"1":{"name":"entity.name.function.nushell"},"2":{"name":"entity.name.namespace.nushell"},"3":{"name":"keyword.other.nushell"}}},{"begin":"^\\s*((?:export )?use)\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+')\\s*\\[","end":"(\\])\\s*;?\\s*$","patterns":[{"match":"([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+'|\\*),?","captures":{"1":{"name":"keyword.other.nushell"}}},{"include":"#comment"}],"beginCaptures":{"1":{"name":"entity.name.function.nushell"},"2":{"name":"entity.name.namespace.nushell"}},"endCaptures":{"1":{"name":"meta.brace.square.end.nushell"}}},{"match":"(?\u003cpath\u003e(?:/|\\\\|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\w\\- ]+(?:\\.nu)?){0}^\\s*((?:export )?use)\\s+(\"\\g\u003cpath\u003e\"|'\\g\u003cpath\u003e\\'|(?![\"'])\\g\u003cpath\u003e)(?:\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[^']+'|\\*))?\\s*;?$","captures":{"2":{"name":"entity.name.function.nushell"},"3":{"name":"string.bare.nushell","patterns":[{"match":"([\\w\\- ]+)(?:\\.nu)?(?=$|\"|')","captures":{"1":{"name":"entity.name.namespace.nushell"}}}]},"4":{"name":"keyword.other.nushell"}}},{"begin":"(?\u003cpath\u003e(?:/|\\\\|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\w\\- ]+(?:\\.nu)?){0}^\\s*((?:export )?use)\\s+(\"\\g\u003cpath\u003e\"|'\\g\u003cpath\u003e\\'|(?![\"'])\\g\u003cpath\u003e)\\s+\\[","end":"(\\])\\s*;?\\s*$","patterns":[{"match":"([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+'|\\*),?","captures":{"0":{"name":"keyword.other.nushell"}}},{"include":"#comment"}],"beginCaptures":{"2":{"name":"entity.name.function.nushell"},"3":{"name":"string.bare.nushell","patterns":[{"match":"([\\w\\- ]+)(?:\\.nu)?(?=$|\"|')","captures":{"1":{"name":"entity.name.namespace.nushell"}}}]}},"endCaptures":{"1":{"name":"meta.brace.square.end.nushell"}}},{"match":"^\\s*(?:export )?use\\b","captures":{"0":{"name":"entity.name.function.nushell"}}}]},"value":{"patterns":[{"include":"#variables"},{"include":"#variable-fields"},{"include":"#control-keywords"},{"include":"#constant-value"},{"include":"#table"},{"include":"#operators"},{"include":"#paren-expression"},{"include":"#braced-expression"},{"include":"#string"},{"include":"#comment"}]},"variable-fields":{"name":"variable.other.nushell","match":"(?\u003c=\\)|\\}|\\])(?:\\.(?:[\\w-]+|\"[\\w\\- ]+\"))+"},"variables":{"match":"(\\$[a-zA-Z0-9_]+)((?:\\.(?:[\\w-]+|\"[\\w\\- ]+\"))*)","captures":{"1":{"patterns":[{"include":"#internal-variables"},{"name":"variable.other.nushell","match":"\\$.+"}]},"2":{"name":"variable.other.nushell"}}}}}
|
|
1
|
+
{"name":"nushell","scopeName":"source.nushell","patterns":[{"include":"#define-variable"},{"include":"#define-alias"},{"include":"#function"},{"include":"#extern"},{"include":"#module"},{"include":"#use-module"},{"include":"#expression"},{"include":"#comment"}],"repository":{"binary":{"name":"constant.binary.nushell","begin":"\\b(0[xbo])(\\[)","end":"\\]","patterns":[{"name":"constant.numeric.nushell","match":"[0-9a-fA-F]+"}],"beginCaptures":{"1":{"name":"constant.numeric.nushell"},"2":{"name":"meta.brace.square.begin.nushell"}},"endCaptures":{"0":{"name":"meta.brace.square.begin.nushell"}}},"braced-expression":{"name":"meta.expression.braced.nushell","begin":"\\{","end":"\\}","patterns":[{"name":"meta.closure.parameters.nushell","begin":"(?\u003c=\\{)\\s*\\|","end":"\\|","patterns":[{"include":"#function-parameter"}]},{"name":"meta.record-entry.nushell","begin":"(?!\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2})([^\\s:,|;(){}\\[\"'$#][^\\s:,|;(){}\\[\"']*)\\s*(:)\\s*","end":"(?=[,}])|(?\u003c=[^\\s:])(?=\\s)","patterns":[{"include":"#record-value"}],"beginCaptures":{"1":{"name":"string.bare.nushell variable.other.nushell"},"2":{"name":"keyword.control.nushell"}}},{"name":"meta.record-entry.nushell","begin":"(\\$\"((?:[^\"\\\\]|\\\\.)*)\")\\s*(:)\\s*","end":"(?=[,}])|(?\u003c=[^\\s:])(?=\\s)","patterns":[{"include":"#record-value"}],"beginCaptures":{"1":{"name":"variable.other.nushell"},"2":{"name":"variable.other.nushell","patterns":[{"include":"#paren-expression"}]},"3":{"name":"keyword.control.nushell"}}},{"name":"meta.record-entry.nushell","begin":"(\"(?:[^\"\\\\]|\\\\.)*\")\\s*(:)\\s*","end":"(?=[,}])|(?\u003c=[^\\s:])(?=\\s)","patterns":[{"include":"#record-value"}],"beginCaptures":{"1":{"name":"string.quoted.double.nushell variable.other.nushell"},"2":{"name":"keyword.control.nushell"}}},{"name":"meta.record-entry.nushell","begin":"(\\$'([^']*)')\\s*(:)\\s*","end":"(?=[,}])|(?\u003c=[^\\s:])(?=\\s)","patterns":[{"include":"#record-value"}],"beginCaptures":{"1":{"name":"variable.other.nushell"},"2":{"name":"variable.other.nushell","patterns":[{"include":"#paren-expression"}]},"3":{"name":"keyword.control.nushell"}}},{"name":"meta.record-entry.nushell","begin":"('[^']*')\\s*(:)\\s*","end":"(?=[,}])|(?\u003c=[^\\s:])(?=\\s)","patterns":[{"include":"#record-value"}],"beginCaptures":{"1":{"name":"string.quoted.single.nushell variable.other.nushell"},"2":{"name":"keyword.control.nushell"}}},{"include":"#spread"},{"include":"source.nushell"}],"beginCaptures":{"0":{"name":"punctuation.section.block.begin.bracket.curly.nushell"}},"endCaptures":{"0":{"name":"punctuation.section.block.end.bracket.curly.nushell"}}},"command":{"name":"meta.command.nushell","begin":"(?\u003c!\\w)(?:(\\^)|(?![0-9]|\\$))([\\w.!]+(?:(?: (?!-)[\\w\\-.!]+(?:(?= |\\))|$)|[\\w\\-.!]+))*|(?\u003c=\\^)\\$?(?:\"[^\"]+\"|'[^']+'))","end":"(?=\\||\\)|\\}|;)|$","patterns":[{"include":"#parameters"},{"include":"#spread"},{"include":"#value"}],"beginCaptures":{"1":{"name":"keyword.operator.nushell"},"2":{"patterns":[{"include":"#control-keywords"},{"match":"(?:ansi|char) \\w+","captures":{"0":{"name":"keyword.other.builtin.nushell"}}},{"match":"(a(?:bbr(?: list)?|l(?:ias|l)|n(?:si(?: (?:gradient|link|strip))?|y)|ppend|st|ttr(?: (?:c(?:ategory|omplete(?: external)?)|deprecated|example|interactive|search-terms))?)|b(?:its(?: (?:and|not|or|ro(?:l|r)|sh(?:l|r)|xor))?|reak|ytes(?: (?:a(?:dd|t)|build|collect|ends-with|index-of|length|re(?:move|place|verse)|s(?:plit|tarts-with)))?)|c(?:al|d|h(?:ar|unk(?:-by|s))|l(?:ear|ip(?: (?:copy|paste))?)|o(?:l(?:lect|umns)|m(?:binations|mandline(?: (?:complete|edit|get-cursor|set-(?:cursor|prompt)))?|p(?:act|lete))|n(?:fig(?: (?:env|flatten|nu|reset|use-colors))?|st|tinue))|p)|d(?:ate(?: (?:f(?:ormat|rom-human)|humanize|list-timezone|now|to-timezone))?|e(?:bug(?: (?:e(?:nv|xperimental-options)|info|profile))?|code(?: (?:base(?:32(?:hex)?|64)|hex))?|f(?:ault)?|scribe|tect(?: (?:columns|type))?)|ifference|o|rop(?: (?:column|nth))?|t(?: (?:add|diff|format|now|part|to|utcnow))?|u)|e(?:ach(?: while)?|cho|moji|n(?:code(?: (?:base(?:32(?:hex)?|64)|hex))?|umerate)|rror(?: make)?|very|x(?:ec|it|p(?:l(?:ain|ore(?: (?:config|regex))?)|ort(?: (?:alias|const|def|extern|module|use)|-env)?)|tern))|f(?:i(?:l(?:e|l|ter)|nd|rst)|latten|or(?:mat(?: (?:bits|d(?:ate|uration)|filesize|number|pattern))?)?|rom(?: (?:csv|eml|i(?:cs|ni)|json|kdl|m(?:d|sgpack(?:z)?)|nuon|ods|p(?:arquet|list)|ssv|t(?:o(?:ml|on)|sv)|url|vcf|x(?:lsx|ml)|y(?:aml|ml)))?)|g(?:e(?:nerate|t)|lob|r(?:id|oup-by)|stat)|h(?:ash(?: (?:md5|sha(?:256|512)))?|e(?:aders|lp(?: (?:aliases|commands|e(?:scapes|xterns)|modules|operators|pipe-and-redirect))?)|i(?:de(?:-env)?|sto(?:gram|ry(?: (?:import|session))?))|ttp(?: (?:delete|get|head|options|p(?:atch|o(?:ol|st)|ut)))?)|i(?:dx(?: (?:d(?:irs|rop)|fi(?:les|nd)|init|s(?:earch|tatus)|watch))?|f|gnore|n(?:c|put(?: list(?:en)?)?|s(?:ert|pect)|t(?:er(?:leave|sect)|o(?: (?:b(?:inary|ool)|cell-path|d(?:atetime|uration)|f(?:ilesize|loat)|glob|int|matrix|record|s(?:emver(?:-range)?|qlite|tring)|value))?))|s-(?:admin|empty|not-empty|redirected|terminal)|tems)|j(?:o(?:b(?: (?:describe|flush|id|kill|list|recv|s(?:end|pawn)|unfreeze))?|in)|son path|walk)|k(?:eybindings(?: (?:default|list(?:en)?))?|ill)|l(?:ast|e(?:ngth|t(?:-env)?)|ines|o(?:ad-env|op)|s)|m(?:at(?:ch|h(?: (?:a(?:bs|rc(?:cos(?:h)?|sin(?:h)?|tan(?:h)?)|vg)|c(?:brt|eil|os(?:h)?)|exp|floor|l(?:n|og)|m(?:ax|edian|in|ode)|product|round|s(?:in(?:h)?|qrt|tddev|um)|tan(?:h)?|variance))?|rix(?: (?:add|get-(?:col|row)|i(?:dentity|nto-nu)|m(?:a(?:p|x)|ean|ultiply)|re(?:duce|shape)|s(?:cale|et-(?:col|row)|u(?:btract|m))|transpose|zeros))?)|e(?:rge(?: deep)?|tadata(?: (?:access|set))?)|k(?:dir|temp)|o(?:dule|ve)|ut|v)|nu-(?:check|highlight)|o(?:pen|verlay(?: (?:hide|list|new|use))?)|p(?:a(?:nic|r(?:-each|se)|th(?: (?:basename|dirname|ex(?:ists|pand)|join|parse|relative-to|s(?:elf|plit)|type))?)|e(?:ek|rmutations)|lugin(?: (?:add|list|rm|stop|use))?|o(?:lars(?: (?:a(?:gg(?:-groups)?|ll-(?:false|true)|ppend|rg-(?:m(?:ax|in)|sort|true|unique|where)|s(?:-date(?:time)?)?)|c(?:a(?:che|st)|o(?:l(?:lect|umns)?|n(?:cat(?:-str)?|tains|vert-time-zone)|unt(?:-null)?)|u(?:mulative|t))|d(?:atepart|ecimal|rop(?:-(?:duplicates|nulls))?|ummies)|e(?:ntropy|xp(?:lode|r-not))|f(?:i(?:l(?:l-n(?:an|ull)|ter(?:-with)?)|rst)|latten)|g(?:et(?:-(?:day|hour|m(?:inute|onth)|nanosecond|ordinal|second|week(?:day)?|year))?|roup-by)|horizontal|i(?:mplode|nt(?:eger|o-(?:d(?:f|type)|lazy|nu|repr|schema))|s-(?:duplicated|in|n(?:ot-null|ull)|unique))|join(?:-where)?|l(?:ast|en|i(?:st-contains|t)|owercase)|m(?:a(?:p-batches|th(?: (?:abs|bitwise-(?:and|count-(?:ones|zeros)|leading-(?:ones|zeros)|or|trailing-(?:ones|zeros)|xor)|cos|dot|exp|log(?:1p)?|s(?:i(?:gn|n)|qrt)))?|x)|e(?:an|dian)|in)|n(?:-unique|ot)|o(?:pen|therwise|ver)|p(?:ivot|rofile)|q(?:cut|u(?:antile|ery))|r(?:e(?:name|place(?:-time-zone)?|verse)|olling)|s(?:a(?:mple|ve)|chema|e(?:lect(?:or(?: (?:a(?:l(?:l|pha(?:numeric)?)|rray)|b(?:inary|oolean|y-(?:dtype|index|name))|c(?:ategorical|ontains)|d(?:ate(?:time)?|ecimal|igit|uration)|e(?:mpty|n(?:ds-with|um)|xclude)|f(?:irst|loat)|integer|l(?:ast|ist)|matches|n(?:ested|ot|umeric)|object|s(?:igned-integer|t(?:arts-with|r(?:ing|uct)))|temporal|unsigned-integer))?)?|t(?:-with-idx)?)|h(?:ape|ift)|lice|ort-by|t(?:d|ore-(?:get|ls|rm)|r(?:-(?:join|lengths|replace(?:-all)?|s(?:lice|plit|trip-chars))|ftime|uct-json-encode))|um(?:mary)?)|t(?:ake|runcate)|u(?:n(?:ique|nest|pivot)|ppercase)|va(?:lue-counts|r)|w(?:hen|ith-column)))?|rt)|r(?:epend|int)|s)|query(?: (?:db|git|json|web(?:page-info)?|xml))?|r(?:andom(?: (?:b(?:inary|ool)|chars|float|int|pass|uuid))?|e(?:duce|g(?:ex|istry(?: query)?)|ject|name|turn|verse)|m|o(?:ll(?: (?:down|left|right|up))?|tate)|un(?:-(?:external|internal))?)|s(?:ave|c(?:hema|ope(?: (?:aliases|commands|e(?:ngine-stats|xterns)|modules|variables))?)|e(?:lect|mver(?: bump)?|q(?: (?:char|date))?)|huffle|kip(?: (?:until|while))?|l(?:eep|ice)|o(?:rt(?:-by)?|urce(?:-env)?)|plit(?: (?:c(?:ell-path|hars|olumn)|list|row|words))?|t(?:art|or(?: (?:create|delete|export|i(?:mport|nsert)|open|reset|update))?|r(?: (?:a(?:fter|lign)|be(?:fore|tween)|c(?:a(?:mel-case|pitalize)|o(?:m(?:mon-prefix|press)|ntains))|d(?:e(?:compress|dent|unicode)|istance|owncase)|e(?:nds-with|scape-regex|xpand)|in(?:crement|de(?:nt|x-of))|join|kebab-case|l(?:ength|owercase)|pascal-case|re(?:place|verse)|s(?:creaming-snake-case|hl-(?:quote|split)|imilarity|lug|nake-case|ta(?:rts-with|ts)|ubstring)|t(?:itle-case|r(?:im|uncate))|u(?:nescape|p(?:case|percase))|wrap))?)|ys(?: (?:cpu|disks|host|mem|net|temp|users))?)|t(?:a(?:ble|ke(?: (?:until|while))?)|e(?:e|rm(?: (?:query|size))?)|imeit|o(?: (?:csv|gui|html|json|kdl|m(?:d|sgpack(?:z)?)|nuon|p(?:arquet|list)|t(?:ext|o(?:ml|on)|sv|xt)|xml|y(?:aml|ml))|uch)?|r(?:anspose|ee|y)|u(?:i(?: (?:b(?:ind|ox|utton)|debug|l(?:abel|og)|menu|pr(?:eview|ogress)|run|s(?:e(?:arch|lect)|plit)|t(?:ab(?:le)?|extbox|ree)))?|tor))|u(?:limit|mask|n(?:ame|i(?:on|q(?:-by)?)|let)|p(?:date(?: cells)?|sert)|rl(?: (?:build-query|decode|encode|join|parse|split-query))?|se)|v(?:alues|ersion(?: check)?|iew(?: (?:blocks|files|ir|s(?:ource|pan)))?)|w(?:atch|h(?:ere|i(?:ch|le)|oami)|i(?:ndow|th-env)|rap)|zip)(?![\\w-])( (.*))?","captures":{"1":{"name":"keyword.other.builtin.nushell"},"2":{"patterns":[{"include":"#value"}]}}},{"name":"entity.name.type.external.nushell","match":"(?\u003c=\\^)(?:\\$(\"[^\"]+\"|'[^']+')|\"[^\"]+\"|'[^']+')","captures":{"1":{"patterns":[{"include":"#paren-expression"}]}}},{"match":"([\\w.]+(?:-[\\w.!]+)*)(?: (.*))?","captures":{"1":{"name":"entity.name.type.external.nushell"},"2":{"patterns":[{"include":"#value"}]}}},{"include":"#value"}]}}},"comment":{"name":"comment.nushell","match":"(#.*)$"},"constant-keywords":{"name":"constant.language.nushell","match":"\\b(?:true|false|null)\\b"},"constant-value":{"patterns":[{"include":"#constant-keywords"},{"include":"#datetime"},{"include":"#binary"},{"include":"#numbers"},{"include":"#numbers-hexa"},{"include":"#numbers-octal"},{"include":"#numbers-binary"}]},"control-keywords":{"name":"keyword.control.nushell","match":"(?\u003c![0-9a-zA-Z_\\-.\\/:\\\\])(?:break|continue|else(?: if)?|for|if|loop|mut|return|try|while)(?![0-9a-zA-Z_\\-.\\/:\\\\])"},"datetime":{"name":"constant.numeric.nushell","match":"\\b\\d{4}-\\d{2}-\\d{2}(?:T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:[+-]\\d{2}:\\d{2}|Z)?)?\\b"},"define-alias":{"match":"((?:export )?alias)\\s+([\\w\\-!]+)\\s*(=)","captures":{"1":{"name":"storage.type.alias.nushell"},"2":{"name":"entity.name.function.nushell"},"3":{"patterns":[{"include":"#operators"}]}}},"define-variable":{"match":"\\b(let|mut|(?:export\\s+)?const)\\s+(\\w+)(?:\\s*(:)\\s*([^=]+?))?\\s+(=)","captures":{"1":{"name":"keyword.other.nushell"},"2":{"name":"variable.other.nushell"},"3":{"name":"punctuation.separator.nushell"},"4":{"patterns":[{"include":"#types"}]},"5":{"patterns":[{"include":"#operators"}]}}},"expression":{"patterns":[{"include":"#pre-command"},{"include":"#for-loop"},{"include":"#operators"},{"name":"keyword.control.nushell","match":"\\|"},{"include":"#control-keywords"},{"include":"#constant-value"},{"include":"#string-raw"},{"include":"#command"},{"include":"#value"}]},"extern":{"begin":"((?:export\\s+)?extern)\\s+([\\w\\-]+|\"[\\w\\- ]+\")","end":"(?\u003c=\\])","patterns":[{"include":"#function-parameters"}],"beginCaptures":{"1":{"name":"storage.type.function.nushell"},"2":{"name":"entity.name.function.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.function.end.nushell"}}},"for-loop":{"name":"meta.for-loop.nushell","begin":"\\b(for)\\s+(\\$?\\w+)\\s+(in)\\s+(.+)\\s*(\\{)","end":"\\}","patterns":[{"include":"source.nushell"}],"beginCaptures":{"1":{"name":"keyword.other.nushell"},"2":{"name":"variable.other.nushell"},"3":{"name":"keyword.other.nushell"},"4":{"patterns":[{"include":"#value"}]},"5":{"name":"punctuation.section.block.begin.bracket.curly.nushell"}},"endCaptures":{"0":{"name":"punctuation.section.block.end.bracket.curly.nushell"}}},"function":{"begin":"((?:export\\s+)?def)(?:\\s+((?:--\\w+(?:\\s+--\\w+)*)))?\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+'|`[\\w\\- ]+`)(?:\\s+((?:--\\w+(?:\\s+--\\w+)*)))?","end":"(?\u003c=\\})","patterns":[{"include":"#function-parameters"},{"include":"#function-body"},{"include":"#function-inout"}],"beginCaptures":{"1":{"name":"storage.type.function.nushell"},"2":{"name":"storage.modifier.nushell"},"3":{"name":"entity.name.function.nushell"},"4":{"name":"storage.modifier.nushell"}}},"function-body":{"name":"meta.function.body.nushell","begin":"\\{","end":"\\}","patterns":[{"include":"source.nushell"}],"beginCaptures":{"0":{"name":"punctuation.definition.function.begin.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.function.end.nushell"}}},"function-inout":{"patterns":[{"include":"#types"},{"name":"keyword.operator.nushell","match":"-\u003e"},{"include":"#function-multiple-inout"}]},"function-multiple-inout":{"end":"\\]","patterns":[{"include":"#types"},{"match":"\\s*(,)\\s*","captures":{"1":{"name":"punctuation.separator.nushell"}}},{"match":"\\s+(-\u003e)\\s+","captures":{"1":{"name":"keyword.operator.nushell"}}}],"beginCaptures":{"1":{"name":"punctuation.definition.in-out.nushell"},"2":{"name":"meta.brace.square.begin.nushell"}},"endCaptures":{"0":{"name":"meta.brace.square.end.nushell"}}},"function-parameter":{"patterns":[{"name":"variable.parameter.nushell","match":"(-{0,2}|\\.{3})[\\w-]+(?:\\((-[\\w?])\\))?","captures":{"1":{"name":"keyword.control.nushell"}}},{"begin":"\\??:\\s*","end":"(?=(?:\\s+(?:-{0,2}|\\.{3})[\\w-]+)|(?:\\s*(?:,|\\]|\\||@|=|#|$)))","patterns":[{"include":"#types"}]},{"begin":"@(?=\"|')","end":"(?\u003c=\"|')","patterns":[{"include":"#string"}]},{"name":"default.value.nushell","begin":"=\\s*","end":"(?=(?:\\s+-{0,2}[\\w-]+)|(?:\\s*(?:,|\\]|\\||#|$)))","patterns":[{"include":"#value"}]}]},"function-parameters":{"name":"meta.function.parameters.nushell","begin":"\\[","end":"\\]","patterns":[{"include":"#function-parameter"},{"include":"#comment"}],"beginCaptures":{"0":{"name":"meta.brace.square.begin.nushell"}},"endCaptures":{"0":{"name":"meta.brace.square.end.nushell"}}},"internal-variables":{"name":"variable.language.nushell","match":"\\$(?:nu|env|in)\\b"},"keyword":{"name":"keyword.other.nushell","match":"(?:def(?:-env)?)"},"module":{"name":"meta.module.nushell","begin":"((?:export\\s+)?module)\\s+([\\w\\-]+)\\s*\\{","end":"\\}","patterns":[{"include":"source.nushell"}],"beginCaptures":{"1":{"name":"storage.type.module.nushell"},"2":{"name":"entity.name.namespace.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.module.end.nushell"}}},"numbers":{"name":"constant.numeric.nushell","match":"(?\u003c![\\w-])_*+[-+]?_*+(?:(?i:NaN|infinity|inf)_*+|(?:\\d[\\d_]*+\\.?|\\._*+\\d)[\\d_]*+(?i:E_*+[-+]?_*+\\d[\\d_]*+)?)(?i:ns|us|µs|ms|sec|min|hr|day|wk|b|kb|mb|gb|tb|pb|eb|kib|mib|gib|tib|pib|eib)?(?:(?![\\w.])|(?=\\.\\.))"},"numbers-binary":{"name":"constant.numeric.nushell","match":"(?\u003c![\\w-])_*+0_*+b_*+[01][01_]*+(?![\\w.])"},"numbers-hexa":{"name":"constant.numeric.nushell","match":"(?\u003c![\\w-])_*+0_*+x_*+[0-9a-fA-F][0-9a-fA-F_]*+(?![\\w.])"},"numbers-octal":{"name":"constant.numeric.nushell","match":"(?\u003c![\\w-])_*+0_*+o_*+[0-7][0-7_]*+(?![\\w.])"},"operators":{"patterns":[{"include":"#operators-word"},{"include":"#operators-redirection"},{"include":"#operators-symbols"},{"include":"#ranges"}]},"operators-redirection":{"name":"keyword.control.nushell","match":"(?\u003c= )(?:o\\+e|e\\+o|out\\+err|err\\+out|o|e|out|err)(?:\u003e\u003e?|\u003e\\|)(?= |$)"},"operators-symbols":{"name":"keyword.control.nushell","match":"(?\u003c= )(?:(?:\\+|\\-|\\*|\\/)=?|\\/\\/|\\*\\*|!=|[\u003c\u003e=]=?|[!=]~|\\+\\+=?)(?= |$)"},"operators-word":{"name":"keyword.control.nushell","match":"(?\u003c= |\\()(?:mod|in|not-(?:in|like|has)|not|and|or|xor|bit-(?:or|and|xor|shl|shr)|starts-with|ends-with|like|has)(?= |\\)|$)"},"parameters":{"name":"variable.parameter.nushell","match":"(?\u003c=\\s)(-{1,2})[a-zA-Z_][\\w-]*","captures":{"1":{"name":"keyword.control.nushell"}}},"paren-expression":{"name":"meta.expression.parenthesis.nushell","begin":"\\(","end":"\\)","patterns":[{"include":"#expression"}],"beginCaptures":{"0":{"name":"meta.brace.round.begin.nushell"}},"endCaptures":{"0":{"name":"meta.brace.round.end.nushell"}}},"pre-command":{"begin":"(\\w+)(=)","end":"(?=\\s+)","patterns":[{"include":"#value"}],"beginCaptures":{"1":{"name":"variable.other.nushell"},"2":{"patterns":[{"include":"#operators"}]}}},"ranges":{"name":"keyword.control.nushell","match":"\\.\\.\u003c?"},"record-value":{"patterns":[{"include":"#variables"},{"include":"#variable-fields"},{"include":"#constant-value"},{"include":"#table"},{"include":"#spread"},{"include":"#ranges"},{"include":"#paren-expression"},{"include":"#braced-expression"},{"include":"#string"},{"include":"#comment"}]},"spread":{"name":"keyword.control.nushell","match":"\\.\\.\\.(?=[^\\s\\]}])"},"string":{"patterns":[{"include":"#string-single-quote"},{"include":"#string-backtick"},{"include":"#string-double-quote"},{"include":"#string-interpolated-double"},{"include":"#string-interpolated-single"},{"include":"#string-raw"},{"include":"#string-bare"}]},"string-backtick":{"name":"string.quoted.single.nushell","begin":"`","end":"`","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.nushell"}}},"string-bare":{"name":"string.bare.nushell","match":"[^$\\[{(\"',|#\\s|;][^\\[\\]{}()\"'\\s,|;]*"},"string-double-quote":{"name":"string.quoted.double.nushell","begin":"\"","end":"\"","patterns":[{"match":"\\w+"},{"include":"#string-escape"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.nushell"}}},"string-escape":{"name":"constant.character.escape.nushell","match":"\\\\(?:[abefnrt\\\\'\"/(){}$^#|~]|u\\{[0-9a-fA-F]{1,6}\\}|u[0-9a-fA-F]{4})"},"string-interpolated-double":{"name":"string.interpolated.double.nushell","begin":"\\$\"","end":"\"","patterns":[{"name":"constant.character.escape.nushell","match":"\\\\[()]"},{"include":"#string-escape"},{"include":"#paren-expression"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.nushell"}}},"string-interpolated-single":{"name":"string.interpolated.single.nushell","begin":"\\$'","end":"'","patterns":[{"include":"#paren-expression"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.nushell"}}},"string-raw":{"name":"string.raw.nushell","begin":"r(#+)'","end":"'\\1","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.nushell"}}},"string-single-quote":{"name":"string.quoted.single.nushell","begin":"'","end":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.nushell"}}},"table":{"name":"meta.table.nushell","begin":"\\[","end":"\\]","patterns":[{"include":"#spread"},{"include":"#value"},{"name":"punctuation.separator.nushell","match":","}],"beginCaptures":{"0":{"name":"meta.brace.square.begin.nushell"}},"endCaptures":{"0":{"name":"meta.brace.square.end.nushell"}}},"types":{"patterns":[{"name":"meta.list.nushell","begin":"\\b(list|oneof)\\s*\u003c","end":"\u003e","patterns":[{"include":"#types"}],"beginCaptures":{"1":{"name":"entity.name.type.nushell"}}},{"name":"meta.record.nushell","begin":"\\b(record|table)\\s*\u003c","end":"\u003e","patterns":[{"match":"([\\w\\-]+|\"[\\w\\- ]+\"|'[^']+')\\s*:\\s*","captures":{"1":{"name":"variable.parameter.nushell"}}},{"include":"#types"}],"beginCaptures":{"1":{"name":"entity.name.type.nushell"}}},{"name":"entity.name.type.nushell","match":"\\b(\\w+)\\b"}]},"use-module":{"patterns":[{"match":"^\\s*((?:export )?use)\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+')(?:\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+'|\\*))?\\s*;?$","captures":{"1":{"name":"keyword.control.import.nushell"},"2":{"name":"entity.name.namespace.nushell"},"3":{"name":"keyword.other.nushell"}}},{"begin":"^\\s*((?:export )?use)\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+')\\s*\\[","end":"(\\])\\s*;?\\s*$","patterns":[{"match":"([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+'|\\*),?","captures":{"1":{"name":"keyword.other.nushell"}}},{"include":"#comment"}],"beginCaptures":{"1":{"name":"keyword.control.import.nushell"},"2":{"name":"entity.name.namespace.nushell"}},"endCaptures":{"1":{"name":"meta.brace.square.end.nushell"}}},{"match":"(?\u003cpath\u003e(?:/|\\\\|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\w\\- ]+(?:\\.nu)?){0}^\\s*((?:export )?use)\\s+(\"\\g\u003cpath\u003e\"|'\\g\u003cpath\u003e\\'|(?![\"'])\\g\u003cpath\u003e)(?:\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[^']+'|\\*))?\\s*;?$","captures":{"2":{"name":"keyword.control.import.nushell"},"3":{"name":"string.bare.nushell","patterns":[{"match":"([\\w\\- ]+)(?:\\.nu)?(?=$|\"|')","captures":{"1":{"name":"entity.name.namespace.nushell"}}}]},"4":{"name":"keyword.other.nushell"}}},{"begin":"(?\u003cpath\u003e(?:/|\\\\|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\w\\- ]+(?:\\.nu)?){0}^\\s*((?:export )?use)\\s+(\"\\g\u003cpath\u003e\"|'\\g\u003cpath\u003e\\'|(?![\"'])\\g\u003cpath\u003e)\\s+\\[","end":"(\\])\\s*;?\\s*$","patterns":[{"match":"([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+'|\\*),?","captures":{"0":{"name":"keyword.other.nushell"}}},{"include":"#comment"}],"beginCaptures":{"2":{"name":"keyword.control.import.nushell"},"3":{"name":"string.bare.nushell","patterns":[{"match":"([\\w\\- ]+)(?:\\.nu)?(?=$|\"|')","captures":{"1":{"name":"entity.name.namespace.nushell"}}}]}},"endCaptures":{"1":{"name":"meta.brace.square.end.nushell"}}},{"match":"^\\s*(?:export )?use\\b","captures":{"0":{"name":"keyword.control.import.nushell"}}}]},"value":{"patterns":[{"include":"#variables"},{"include":"#variable-fields"},{"include":"#control-keywords"},{"include":"#constant-value"},{"include":"#table"},{"include":"#operators"},{"include":"#paren-expression"},{"include":"#braced-expression"},{"include":"#string"},{"include":"#comment"}]},"variable-fields":{"name":"variable.other.nushell","match":"(?\u003c=\\)|\\}|\\])(?:\\.(?:[\\w-]+|\"[\\w\\- ]+\"))+"},"variables":{"match":"(\\$[a-zA-Z0-9_]+)((?:\\.(?:[\\w-]+|\"[\\w\\- ]+\"))*)","captures":{"1":{"patterns":[{"include":"#internal-variables"},{"name":"variable.other.nushell","match":"\\$.+"}]},"2":{"name":"variable.other.nushell"}}}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"scopeName":"source.ocaml.META","patterns":[{"include":"#comments"},{"include":"#entries"}],"repository":{"comments":{"name":"comment.line.META","begin":"#","end":"$"},"entries":{"patterns":[{"match":"\\b([[:word:].]+)[[:space:]]*(\\+?=)[[:space:]]*(\".*\")","captures":{"1":{"name":"entity.name.tag.META"},"2":{"name":"keyword.operator.META"},"3":{"name":"string.quoted.double.META"}}},{"begin":"\\b([[:word:].]+)[[:space:]]*\\(","end":"\\)[[:space:]]*(\\+?=)[[:space:]]*(\".*\")","patterns":[{"name":"keyword.operator.META","match":"-"},{"name":"constant.language.META","match":"\\b(byte|native|toploop|mt|mt_posix|mt_vm|gprof|autolink)\\b"}],"beginCaptures":{"1":{"name":"entity.name.tag.META"}},"endCaptures":{"1":{"name":"keyword.operator.META"},"2":{"name":"string.quoted.double.META"}}},{"begin":"\\b(package)[[:space:]]*(\"[^.]*\")[[:space:]]*\\(","end":"\\)","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"keyword.other.META"},"2":{"name":"string.quoted.double.META"}}}]}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"OCaml Interface","scopeName":"source.ocaml.interface","patterns":[{"include":"source.ocaml#directives"},{"include":"source.ocaml#comments"},{"include":"source.ocaml#attributes"},{"include":"source.ocaml#extensions"},{"include":"#bindings"},{"include":"source.ocaml#operators"},{"include":"#keywords"},{"include":"source.ocaml#types"},{"include":"source.ocaml#identifiers"}],"repository":{"bindings":{"patterns":[{"name":"variable.parameter.optional.ocaml","match":"\\?([[:lower:]_][[:word:]']*)?"},{"name":"variable.parameter.labeled.ocaml","match":"~([[:lower:]_][[:word:]']*)?"},{"match":"\\b(type)[[:space:]]+(nonrec[[:space:]]+)?(_[[:space:]]+|[+-]?'[[:alpha:]][[:word:]']*[[:space:]]+|\\(.*\\)[[:space:]]+)?([[:lower:]_][[:word:]']*)","captures":{"1":{"name":"keyword.ocaml"},"2":{"name":"keyword.ocaml"},"3":{"patterns":[{"include":"$base"}]},"4":{"name":"entity.name.function.binding.ocaml"}}},{"match":"\\b(and)[[:space:]]+(?!(?:module|type|lazy)\\b(?!'))(virtual[[:space:]]+)?(_[[:space:]]+|'[[:alpha:]][[:word:]']*[[:space:]]+|\\(.*\\)[[:space:]]+)?([[:lower:]_][[:word:]']*)(?![[:word:]'])[[:space:]]*(?!,|::|[[:space:]])","captures":{"1":{"name":"keyword.ocaml"},"2":{"name":"keyword.ocaml"},"3":{"patterns":[{"include":"$base"}]},"4":{"name":"entity.name.function.binding.ocaml"}}},{"begin":"\\b(external)[[:space:]]+([[:lower:]_][[:word:]']*)?","end":"(?\u003c=]|\")[[:space:]]*(?:$|(?=]))","patterns":[{"name":"string.quoted.double.ocaml","begin":"\"","end":"\""},{"include":"$base"}],"beginCaptures":{"1":{"name":"keyword.ocaml"},"2":{"name":"entity.name.function.binding.ocaml"}}},{"match":"\\b(val)[[:space:]]+(virtual)[[:space:]]+(mutable)[[:space:]]+([[:lower:]_][[:word:]']*)","captures":{"1":{"name":"keyword.ocaml"},"2":{"name":"keyword.ocaml"},"3":{"name":"keyword.ocaml"},"4":{"name":"entity.name.function.binding.ocaml"}}},{"match":"\\b(val|val!)[[:space:]]+(mutable[[:space:]]+)?(virtual[[:space:]]+)?([[:lower:]_][[:word:]']*)","captures":{"1":{"name":"keyword.ocaml"},"2":{"name":"keyword.ocaml"},"3":{"name":"keyword.ocaml"},"4":{"name":"entity.name.function.binding.ocaml"}}},{"match":"\\b(method)[[:space:]]+(virtual)[[:space:]]+(private)[[:space:]]+([[:lower:]_][[:word:]']*)","captures":{"1":{"name":"keyword.ocaml"},"2":{"name":"keyword.ocaml"},"3":{"name":"keyword.ocaml"},"4":{"name":"entity.name.function.binding.ocaml"}}},{"match":"\\b(method|method!)[[:space:]]+(private[[:space:]]+)?(virtual[[:space:]]+)?([[:lower:]_][[:word:]']*)","captures":{"1":{"name":"keyword.ocaml"},"2":{"name":"keyword.ocaml"},"3":{"name":"keyword.ocaml"},"4":{"name":"entity.name.function.binding.ocaml"}}},{"match":"\\b(class)[[:space:]]*([[:space:]]+type)?([[:space:]]+virtual)?[[:space:]]*(\\[.*\\])[[:space:]]*([[:lower:]_][[:word:]']*)","captures":{"1":{"name":"keyword.ocaml"},"2":{"name":"keyword.ocaml"},"3":{"name":"keyword.ocaml"},"4":{"patterns":[{"include":"$base"}]},"5":{"name":"entity.name.function.binding.ocaml"}}},{"match":"\\b(class)[[:space:]]+(type[[:space:]]+)?(virtual[[:space:]]+)?([[:lower:]_][[:word:]']*)","captures":{"1":{"name":"keyword.ocaml"},"2":{"name":"keyword.ocaml"},"3":{"name":"keyword.ocaml"},"4":{"name":"entity.name.function.binding.ocaml"}}},{"match":"\\b(object)[[:space:]]*\\([[:space:]]*([[:lower:]_][[:word:]']*)","captures":{"1":{"name":"keyword.ocaml"},"2":{"name":"entity.name.function.binding.ocaml"}}},{"begin":"\\b(module)[[:space:]]+(type)[[:space:]]+(of)\\b","end":"(?=val|external|type|exception|class|module|open|include|=)","patterns":[{"include":"source.ocaml"}],"beginCaptures":{"1":{"name":"keyword.ocaml"},"2":{"name":"keyword.ocaml"},"3":{"name":"keyword.ocaml"}}}]},"keywords":{"patterns":[{"name":"keyword.other.ocaml.interface","match":"\\b(and|as|class|constraint|end|exception|external|functor|in|include|inherit|let[[:space:]]+open|method|module|mutable|nonrec|object|of|open|private|rec|sig|type|val|virtual|with)\\b(?!')"}]}}}
|
data/grammars/source.ocaml.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"OCaml","scopeName":"source.ocaml","patterns":[{"name":"meta.module.binding","match":"\\b(let)\\s+(module)\\s+([A-Z][a-zA-Z0-9'_]*)\\s*(=)","captures":{"1":{"name":"keyword.other.module-binding.ocaml"},"2":{"name":"keyword.other.module-definition.ocaml"},"3":{"name":"support.other.module.ocaml"},"4":{"name":"punctuation.separator.module-binding.ocmal"}}},{"name":"meta.module.openbinding","begin":"\\b(let)\\s+(open)\\s+([A-Z][a-zA-Z0-9'_]*)(?=(\\.[A-Z][a-zA-Z0-9_]*)*)","end":"(\\s|$)","patterns":[{"name":"support.other.module.ocaml","match":"(\\.)([A-Z][a-zA-Z0-9'_]*)","captures":{"1":{"name":"punctuation.separator.module-reference.ocaml"}}}],"beginCaptures":{"1":{"name":"keyword.other.module-binding.ocaml"},"2":{"name":"keyword.other.ocaml"},"3":{"name":"support.other.module.ocaml"}}},{"name":"meta.function.ocaml","begin":"\\b(let|and)\\s+(?!\\(\\*)((rec\\s+)([a-z_][a-zA-Z0-9_']*)\\b|([a-z_][a-zA-Z0-9_']*|\\([^)]+\\))(?=\\s)((?=\\s*=\\s*(?=fun(?:ction)\\b))|(?!\\s*=)))","end":"(?:(:)\\s*([^=]+))?(?:(=)|(=)\\s*(?=fun(?:ction)\\b))","patterns":[{"include":"#variables"}],"beginCaptures":{"1":{"name":"keyword.other.function-definition.ocaml"},"3":{"name":"keyword.other.funtion-definition.ocaml"},"4":{"name":"entity.name.function.ocaml"},"5":{"name":"entity.name.function.ocaml"}},"endCaptures":{"1":{"name":"punctuation.separator.function.type-constraint.ocaml"},"2":{"name":"storage.type.ocaml"},"3":{"name":"keyword.operator.ocaml"},"4":{"name":"keyword.operator.ocaml"}}},{"name":"meta.function.anonymous.ocaml","begin":"(\\(|\\s)(?=fun\\s)","end":"(\\))","patterns":[{"name":"meta.function.anonymous.definition.ocaml","begin":"(?\u003c=(\\(|\\s))(fun)\\s","end":"(-\u003e)","patterns":[{"include":"#variables"}],"beginCaptures":{"2":{"name":"keyword.other.function-definition.ocaml"}},"endCaptures":{"1":{"name":"punctuation.separator.function-definition.ocaml"}}},{"include":"$self"}],"beginCaptures":{"1":{"name":"punctuation.definition.function.anonymous.ocaml"}},"endCaptures":{"1":{"name":"punctuation.definition.function.anonymous.ocaml"}}},{"name":"meta.type-definition-group.ocaml","begin":"^\\s*(?=type\\s)","end":"\\b(?=let|end|val)|^\\s*$","patterns":[{"name":"meta.type-definition.ocaml","begin":"\\b(type|and)\\s+([^=]*)(=)?","end":"(?=\\b(type|and|let|end|val)\\b)|(?=^\\s*$)","patterns":[{"include":"#typedefs"}],"beginCaptures":{"1":{"name":"keyword.other.type-definition.ocaml"},"2":{"name":"storage.type.ocaml"},"3":{"name":"punctuation.separator.type-definition.ocaml"}}}]},{"name":"meta.pattern-match.ocaml","begin":"\\b(with|function)(?=(\\s*$|.*-\u003e))\\b|((?\u003c!\\S)(\\|)(?=(\\w|\\s).*-\u003e))","end":"(?:(-\u003e)|\\b(when)\\b|\\s(?=\\|))","patterns":[{"include":"#matchpatterns"}],"beginCaptures":{"1":{"name":"keyword.control.match-definition.ocaml"},"2":{"name":"keyword.other.function-definition.ocaml"},"3":{"name":"keyword.control.match-definition.ocaml"}},"endCaptures":{"1":{"name":"punctuation.separator.match-definition.ocaml"},"2":{"name":"keyword.control.match-condition.ocaml"}}},{"name":"meta.class.type-definition.ocaml","match":"^[ \\t]*(class\\s+type\\s+)((\\[\\s*('[A-Za-z][a-zA-Z0-9_']*(?:\\s*,\\s*'[A-Za-z][a-zA-Z0-9_']*)*)\\s*\\]\\s+)?[a-z_][a-zA-Z0-9'_]*)","captures":{"1":{"name":"keyword.other.class-type-definition.ocaml"},"2":{"name":"entity.name.type.class-type.ocaml"},"4":{"name":"storage.type.ocaml"}}},{"name":"meta.class.ocaml","begin":"^[ \\t]*(class)(?:\\s+(?!(?:virtual)\\s+))((\\[\\s*('[A-Za-z][a-zA-Z0-9_']*(?:\\s*,\\s*'[A-Za-z][a-zA-Z0-9_']*)*)\\s*\\]\\s+)?[a-z_][a-zA-Z0-9'_]*)","end":"(=)","patterns":[{"include":"#variables"}],"beginCaptures":{"1":{"name":"keyword.other.class-definition.ocaml"},"2":{"name":"entity.name.type.class.ocaml"},"4":{"name":"storage.type.ocaml"}},"endCaptures":{"1":{"name":"keyword.operator.ocaml"}}},{"name":"meta.class.virtual.ocaml","begin":"^[ \\t]*(class\\s+virtual\\s+)((\\[\\s*('[A-Za-z][a-zA-Z0-9_']*(?:\\s*,\\s*'[A-Za-z][a-zA-Z0-9_']*)*)\\s*\\]\\s+)?[a-z_][a-zA-Z0-9'_]*)","end":"(=)","patterns":[{"include":"#variables"}],"beginCaptures":{"1":{"name":"keyword.other.class-definition.ocaml"},"2":{"name":"entity.name.type.class.ocaml"},"4":{"name":"storage.type.ocaml"}},"endCaptures":{"1":{"name":"keyword.operator.ocaml"}}},{"name":"meta.class.virtual.type-definition.ocaml","match":"^[ \\t]*(class\\s+type\\s+virtual)((\\[\\s*('[A-Za-z][a-zA-Z0-9_']*(?:\\s*,\\s*'[A-Za-z][a-zA-Z0-9_']*)*)\\s*\\]\\s+)?[a-z_][a-zA-Z0-9'_]*)","captures":{"1":{"name":"keyword.other.class-type-definition.ocaml"},"2":{"name":"entity.name.type.class-type.ocaml"},"4":{"name":"storage.type.ocaml"}}},{"name":"meta.record.ocaml","begin":"(\\{)","end":"(\\})","patterns":[{"name":"keyword.other.language.ocaml","match":"\\bwith\\b"},{"name":"meta.record.definition.ocaml","begin":"(\\bmutable\\s+)?\\b([a-z_][a-zA-Z0-9_']*)\\s*(:)","end":"(;|(?=}))","patterns":[{"include":"#typedefs"}],"beginCaptures":{"1":{"name":"keyword.other.storage.modifier.ocaml"},"2":{"name":"source.ocaml"},"3":{"name":"punctuation.definition.record.ocaml"}},"endCaptures":{"1":{"name":"keyword.operator.ocaml"}}},{"include":"$self"}],"beginCaptures":{"1":{"name":"punctuation.definition.record.ocaml"}},"endCaptures":{"1":{"name":"punctuation.definition.record.ocaml"}}},{"name":"meta.object.ocaml","begin":"\\b(object)\\s*(?:(\\()(_?[a-z]+)(\\)))?\\s*$","end":"\\b(end)\\b","patterns":[{"name":"meta.method.ocaml","begin":"\\b(method)\\s+(virtual\\s+)?(private\\s+)?([a-z_][a-zA-Z0-9'_]*)","end":"(=|:)","patterns":[{"include":"#variables"}],"beginCaptures":{"1":{"name":"keyword.other.method-definition.ocaml"},"2":{"name":"keyword.other.method-definition.ocaml"},"3":{"name":"keyword.other.method-restriction.ocaml"},"4":{"name":"entity.name.function.method.ocaml"}},"endCaptures":{"1":{"name":"keyword.operator.ocaml"}}},{"name":"meta.object.type-constraint.ocaml","begin":"(constraint)\\s+([a-z_'][a-zA-Z0-9'_]*)\\s+(=)","end":"(#[a-z_][a-zA-Z0-9'_]*)|(int|char|float|string|list|array|bool|unit|exn|option|int32|int64|nativeint|format4|lazy_t)|([a-z_][a-zA-Z0-9'_]*)\\s*$","beginCaptures":{"1":{"name":"keyword.other.language.ocaml"},"2":{"name":"storage.type.ocaml"},"3":{"name":"keyword.operator.ocaml"}},"endCaptures":{"1":{"name":"storage.type.polymorphic-variant.ocaml"},"2":{"name":"storage.type.ocaml"},"3":{"name":"storage.type.ocaml"}}},{"include":"$self"}],"beginCaptures":{"1":{"name":"keyword.other.object-definition.ocaml"},"2":{"name":"punctuation.definition.self-binding.ocaml"},"3":{"name":"entity.name.type.self-binding.ocaml"},"4":{"name":"punctuation.definition.self-binding.ocaml"}},"endCaptures":{"1":{"name":"keyword.control.object.ocaml"},"2":{"name":"punctuation.terminator.expression.ocaml"}}},{"name":"meta.method-call.ocaml","match":"(?\u003c=\\w|\\)|')(#)[a-z_][a-zA-Z0-9'_]*","captures":{"1":{"name":"punctuation.separator.method-call.ocaml"}}},{"name":"meta.module.ocaml","match":"^[ \\t]*(module)\\s+([A-Z_][a-zA-Z0-9'_]*)(?:\\s*(:)\\s*([A-Z][a-zA-Z0-9'_]*)?)?","captures":{"1":{"name":"keyword.other.module-definition.ocaml"},"2":{"name":"entity.name.type.module.ocaml"},"3":{"name":"punctuation.separator.module-definition.ocaml"},"4":{"name":"entity.name.type.module-type.ocaml"}}},{"name":"meta.module.type.ocaml","match":"^[ \\t]*(module\\s+type\\s+)([A-Z][a-zA-Z0-9'_]*)","captures":{"1":{"name":"keyword.other.module-type-definition.ocaml"},"2":{"name":"entity.name.type.module-type.ocaml"}}},{"name":"meta.module.signature.ocaml","begin":"\\b(sig)\\b","end":"\\b(end)\\b","patterns":[{"include":"#module-signature"},{"include":"$self"}],"beginCaptures":{"1":{"name":"keyword.other.module.signature.ocaml"}},"endCaptures":{"1":{"name":"keyword.other.module.signature.ocaml"},"2":{"name":"punctuation.terminator.expression.ocaml"},"3":{"name":"keyword.operator.ocaml"}}},{"name":"meta.module.structure.ocaml","begin":"\\b(struct)\\b","end":"\\b(end)\\b","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"keyword.other.module.structure.ocaml"}},"endCaptures":{"1":{"name":"keyword.other.module.structure.ocaml"}}},{"include":"#moduleref"},{"name":"meta.module.open.ocaml","begin":"\\b(open)\\s+([A-Z][a-zA-Z0-9'_]*)(?=(\\.[A-Z][a-zA-Z0-9_]*)*)","end":"(\\s|$)","patterns":[{"name":"support.other.module.ocaml","match":"(\\.)([A-Z][a-zA-Z0-9'_]*)","captures":{"1":{"name":"punctuation.separator.module-reference.ocaml"}}}],"beginCaptures":{"1":{"name":"keyword.other.ocaml"},"2":{"name":"support.other.module.ocaml"}}},{"name":"meta.exception.ocaml","match":"\\b(exception)\\s+([A-Z][a-zA-Z0-9'_]*)\\b","captures":{"1":{"name":"keyword.other.ocaml"},"2":{"name":"entity.name.type.exception.ocaml"}}},{"name":"source.camlp4.embedded.ocaml","begin":"(?=(\\[\u003c)(?![^\\[]+?[^\u003e]]))","end":"(\u003e])","patterns":[{"include":"source.camlp4.ocaml"}],"endCaptures":{"1":{"name":"punctuation.definition.camlp4-stream.ocaml"}}},{"include":"#strings"},{"include":"#constants"},{"include":"#comments"},{"include":"#lists"},{"include":"#arrays"},{"name":"meta.type-constraint.ocaml","begin":"(\\()(?=(~[a-z][a-zA-Z0-9_]*:|(\"(\\\\\"|[^\"])*\")|[^\\(\\)~\"])+(?\u003c!:)(:\u003e|:(?![:=])))","end":"(?\u003c!:)(:\u003e|:(?![:=]))(.*?)(\\))","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"punctuation.section.type-constraint.ocaml"}},"endCaptures":{"1":{"name":"punctuation.separator.type-constraint.ocaml"},"2":{"name":"storage.type.ocaml"},"3":{"name":"punctuation.section.type-constraint.ocaml"}}},{"name":"keyword.other.directive.ocaml","match":"^[ \\t]*#[a-zA-Z]+"},{"name":"keyword.other.directive.line-number.ocaml","match":"^[ \\t]*#[0-9]*"},{"include":"#storagetypes"},{"name":"keyword.other.storage.modifier.ocaml","match":"\\b(mutable|ref)\\b"},{"name":"entity.name.type.variant.polymorphic.ocaml","match":"`[A-Za-z][a-zA-Z0-9'_]*\\b"},{"name":"entity.name.type.variant.ocaml","match":"\\b[A-Z][a-zA-Z0-9'_]*\\b"},{"name":"keyword.operator.symbol.ocaml","match":"!=|:=|\u003e|\u003c"},{"name":"keyword.operator.infix.floating-point.ocaml","match":"[*+/-]\\."},{"name":"keyword.operator.prefix.floating-point.ocaml","match":"~-\\."},{"name":"punctuation.definition.list.constructor.ocaml","match":"::"},{"name":"punctuation.terminator.expression.ocaml","match":";;"},{"name":"punctuation.separator.ocaml","match":";"},{"name":"punctuation.separator.function-return.ocaml","match":"-\u003e"},{"name":"keyword.operator.infix.ocaml","match":"[=\u003c\u003e@^\u0026+\\-*/$%|][|!$%\u0026*+./:\u003c=\u003e?@^~-]*"},{"name":"keyword.operator.prefix.ocaml","match":"\\bnot\\b|!|[!\\?~][!$%\u0026*+./:\u003c=\u003e?@^~-]+"},{"name":"entity.name.tag.label.ocaml","match":"~[a-z][a-z0-9'_]*(:)?","captures":{"1":{"name":"punctuation.separator.argument-label.ocaml"}}},{"name":"meta.begin-end-group.ocaml","begin":"\\b(begin)\\b","end":"\\b(end)\\b","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"keyword.control.begin-end.ocaml"}},"endCaptures":{"1":{"name":"keyword.control.begin-end.ocaml"}}},{"name":"meta.for-loop.ocaml","begin":"\\b(for)\\b","end":"\\b(done)\\b","patterns":[{"name":"keyword.control.loop.ocaml","match":"\\bdo\\b"},{"include":"$self"}],"beginCaptures":{"1":{"name":"keyword.control.for-loop.ocaml"}},"endCaptures":{"1":{"name":"keyword.control.for-loop.ocaml"}}},{"name":"meta.while-loop.ocaml","begin":"\\b(while)\\b","end":"\\b(done)\\b","patterns":[{"name":"keyword.control.loop.ocaml","match":"\\bdo\\b"},{"include":"$self"}],"beginCaptures":{"1":{"name":"keyword.control.while-loop.ocaml"}},"endCaptures":{"1":{"name":"keyword.control.while-loop.ocaml"}}},{"name":"meta.paren-group.ocaml","begin":"\\(","end":"\\)","patterns":[{"include":"$self"}]},{"name":"keyword.operator.ocaml","match":"\\b(and|land|lor|lsl|lsr|asr|lnot|lxor|mod|or)\\b"},{"name":"keyword.control.ocaml","match":"\\b(downto|if|else|match|then|to|when|with|try)\\b"},{"name":"keyword.other.ocaml","match":"\\b(as|assert|class|constraint|exception|functor|in|include|inherit|initializer|lazy|let|mod|module|mutable|new|object|open|private|rec|sig|struct|type|virtual)\\b"},{"include":"#module-signature"},{"name":"invalid.illegal.unrecognized-character.ocaml","match":"(’|‘|“|”)"}],"repository":{"arrays":{"patterns":[{"name":"meta.array.ocaml","begin":"(\\[\\|)","end":"(\\|])","patterns":[{"include":"#arrays"},{"include":"$self"}],"beginCaptures":{"1":{"name":"punctuation.definition.array.begin.ocaml"}},"endCaptures":{"1":{"name":"punctuation.definition.array.end.ocaml"}}}]},"comments":{"patterns":[{"name":"comment.block.ocaml","begin":"\\(\\*","end":"\\*\\)","patterns":[{"include":"#comments"}],"beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.ocaml"}},"endCaptures":{"0":{"name":"punctuation.definition.comment.end.ocaml"}}}]},"comments_inner":{"patterns":[{"include":"#comments"},{"name":"comment.block.string.quoted.double.ocaml","begin":"(?=[^\\\\])(\")","end":"\"","patterns":[{"name":"comment.block.string.constant.character.escape.ocaml","match":"\\\\(x[a-fA-F0-9][a-fA-F0-9]|[0-2]\\d\\d|[bnrt'\"\\\\])"}]}]},"constants":{"patterns":[{"name":"constant.language.pseudo-variable.ocaml","match":"(?:\\[\\s*(\\])|\\((\\))|\\(\\s*(\\)))","captures":{"1":{"name":"meta.empty-typing-pair.ocaml"},"2":{"name":"meta.empty-typing-pair.parens.ocaml"},"3":{"name":"meta.empty-typing-pair.ocaml"}}},{"name":"constant.language.boolean.ocaml","match":"\\b(true|false)\\b"},{"name":"constant.numeric.floating-point.ocaml","match":"\\b-?[0-9][0-9_]*((\\.([0-9][0-9_]*([eE][+-]??[0-9][0-9_]*)?)?)|([eE][+-]??[0-9][0-9_]*))"},{"name":"constant.numeric.integer.nativeint.ocaml","match":"\\b(-?((0(x|X)[0-9a-fA-F][0-9a-fA-F_]*)|(0(o|O)[0-7][0-7_]*)|(0(b|B)[01][01_]*)|([0-9][0-9_]*)))n"},{"name":"constant.numeric.integer.int64.ocaml","match":"\\b(-?((0(x|X)[0-9a-fA-F][0-9a-fA-F_]*)|(0(o|O)[0-7][0-7_]*)|(0(b|B)[01][01_]*)|([0-9][0-9_]*)))L"},{"name":"constant.numeric.integer.int32.ocaml","match":"\\b(-?((0(x|X)[0-9a-fA-F][0-9a-fA-F_]*)|(0(o|O)[0-7][0-7_]*)|(0(b|B)[01][01_]*)|([0-9][0-9_]*)))l"},{"name":"constant.numeric.integer.ocaml","match":"\\b(-?((0(x|X)[0-9a-fA-F][0-9a-fA-F_]*)|(0(o|O)[0-7][0-7_]*)|(0(b|B)[01][01_]*)|([0-9][0-9_]*)))"},{"name":"constant.character.ocaml","match":"'(.|\\\\(x[a-fA-F0-9][a-fA-F0-9]|[0-2]\\d\\d|[bnrt'\"\\\\]))'"}]},"definite_storagetypes":{"patterns":[{"include":"#storagetypes"},{"name":"storage.type.ocaml","match":"\\b[a-zA-Z0-9'_]+\\b"}]},"lists":{"patterns":[{"name":"meta.list.ocaml","begin":"(\\[)(?!\\||\u003c|\u003e)","end":"(?\u003c!\\||\u003e)(])","patterns":[{"include":"#lists"},{"include":"$self"}],"beginCaptures":{"1":{"name":"punctuation.definition.list.begin.ocaml"}},"endCaptures":{"1":{"name":"punctuation.definition.list.end.ocaml"}}}]},"matchpatterns":{"patterns":[{"name":"constant.language.universal-match.ocaml","match":"\\b_\\b"},{"name":"punctuation.separator.match-pattern.ocaml","match":"\\|(?=\\s*\\S)"},{"name":"meta.match-option.ocaml","begin":"(\\()(?=(?!=.*?-\u003e).*?\\|)","end":"(\\))","patterns":[{"name":"punctuation.separator.match-option.ocaml","match":"\\|"},{"include":"#matchpatterns"}],"beginCaptures":{"1":{"name":"punctuation.definition.match-option.ocaml"}},"endCaptures":{"1":{"name":"punctuation.definition.match-option.ocaml"}}},{"include":"#moduleref"},{"include":"#constants"},{"include":"#variables"},{"include":"$self"}]},"module-signature":{"patterns":[{"name":"meta.module.signature.val.ocaml","begin":"(val)\\s+([a-z_][a-zA-Z0-9_']*)\\s*(:)","end":"(?=\\b(type|val|external|class|module|end)\\b)|^\\s*$","patterns":[{"name":"variable.parameter.ameter.optional.ocaml","match":"(\\?)([a-z][a-zA-Z0-9_]*)\\s*(:)","captures":{"1":{"name":"punctuation.definition.optional-parameter.ocaml"},"2":{"name":"entity.name.tag.label.optional.ocaml"},"3":{"name":"punctuation.separator.optional-parameter.ocaml"}}},{"name":"variable.parameter.labeled.ocaml","begin":"([a-z][a-zA-Z0-9'_]*)\\s*(:)\\s*","end":"\\s","patterns":[{"include":"#definite_storagetypes"}],"beginCaptures":{"1":{"name":"entity.name.tag.label.ocaml"},"2":{"name":"punctuation.separator.label.ocaml"},"3":{"name":"storage.type.ocaml"}}},{"include":"#typedefs"}],"beginCaptures":{"1":{"name":"keyword.other.ocaml"},"2":{"name":"entity.name.type.value-signature.ocaml"},"3":{"name":"punctuation.separator.type-constraint.ocaml"}}},{"name":"meta.module.signature.external.ocaml","begin":"(external)\\s+([a-z_][a-zA-Z0-9_']*)\\s*(:)","end":"(?=\\b(type|val|external|class|module|let|end)\\b)|^\\s*$","patterns":[{"name":"variable.parameter.optional.ocaml","match":"(\\?)([a-z][a-zA-Z0-9_]*)\\s*(:)","captures":{"1":{"name":"punctuation.definition.optional-parameter.ocaml"},"2":{"name":"entity.name.tag.label.optional.ocaml"},"3":{"name":"punctuation.separator.optional-parameter.ocaml"}}},{"name":"variable.parameter.labeled.ocaml","begin":"(~)([a-z][a-zA-Z0-9'_]*)\\s*(:)\\s*","end":"\\s","patterns":[{"include":"#variables"}],"beginCaptures":{"1":{"name":"punctuation.definition.labeled-parameter.ocaml"},"2":{"name":"entity.name.tag.label.ocaml"},"3":{"name":"punctuation.separator.label.ocaml"}}},{"include":"#strings"},{"include":"#typedefs"}],"beginCaptures":{"1":{"name":"keyword.other.ocaml"},"2":{"name":"entity.name.type.external-signature.ocaml"},"3":{"name":"punctuation.separator.type-constraint.ocaml"}}}]},"moduleref":{"patterns":[{"name":"meta.module-reference.ocaml","match":"\\b([A-Z][a-zA-Z0-9'_]*)(\\.)","beginCaptures":{"1":{"name":"support.other.module.ocaml"},"2":{"name":"punctuation.separator.module-reference.ocaml"}}}]},"storagetypes":{"patterns":[{"name":"storage.type.ocaml","match":"\\b(int|char|float|string|list|array|bool|unit|exn|option|int32|int64|nativeint|format4|lazy_t)\\b"},{"name":"storage.type.variant.polymorphic.ocaml","match":"#[a-z_][a-zA-Z0-9_]*"}]},"strings":{"patterns":[{"name":"string.quoted.double.ocaml","begin":"(?=[^\\\\])(\")","end":"(\")","patterns":[{"name":"punctuation.separator.string.ignore-eol.ocaml","match":"\\\\$[ \\t]*"},{"name":"constant.character.string.escape.ocaml","match":"\\\\(x[a-fA-F0-9][a-fA-F0-9]|[0-2]\\d\\d|[bnrt'\"\\\\])"},{"name":"constant.character.regexp.escape.ocaml","match":"\\\\[\\|\\(\\)1-9$^.*+?\\[\\]]"},{"name":"invalid.illegal.character.string.escape","match":"\\\\(?!(x[a-fA-F0-9][a-fA-F0-9]|[0-2]\\d\\d|[bnrt'\"\\\\]|[\\|\\(\\)1-9$^.*+?\\[\\]]|$[ \\t]*))(?:.)"}],"beginCaptures":{"1":{"name":"punctuation.definition.string.begin.ocaml"}},"endCaptures":{"1":{"name":"punctuation.definition.string.end.ocaml"}}}]},"typedefs":{"patterns":[{"name":"punctuation.separator.variant-definition.ocaml","match":"\\|"},{"include":"#comments_inner"},{"name":"meta.paren-group.ocaml","begin":"\\(","end":"\\)","patterns":[{"include":"#typedefs"}]},{"name":"keyword.other.ocaml","match":"\\bof\\b"},{"include":"#storagetypes"},{"name":"storage.type.ocaml","match":"(?\u003c=\\s|\\()['a-z_][a-zA-Z0-9_]*\\b"},{"name":"meta.module.type.ocaml","match":"\\b((?:[A-Z][a-zA-Z0-9'_]*)(?:\\.[A-Z][a-zA-Z0-9'_]+)*)(\\.[a-zA-Z0-9'_]+)","captures":{"1":{"name":"support.other.module.ocaml"},"2":{"name":"storage.type.module.ocaml"}}},{"name":"meta.polymorphic-variant.definition.ocaml","begin":"(\\[(\u003e|\u003c)?)","end":"(\\])","patterns":[{"include":"#typedefs"}],"beginCaptures":{"1":{"name":"punctuation.definition.polymorphic-variant.ocaml"}},"endCaptures":{"1":{"name":"punctuation.definition.polymorphic-variant.ocaml"}}},{"include":"$self"},{"name":"punctuation.separator.algebraic-type.ocaml","match":"\\|"}]},"variables":{"patterns":[{"name":"variable.parameter.unit.ocaml","match":"\\(\\)"},{"include":"#constants"},{"include":"#moduleref"},{"name":"variable.parameter.labeled.ocaml","begin":"(~)([a-z][a-zA-Z0-9'_]*)(\\s*:\\s*)?","end":"(?=(-\u003e|\\s))","patterns":[{"include":"#variables"}],"beginCaptures":{"1":{"name":"punctuation.definition.labeled-parameter.ocaml"},"2":{"name":"entity.name.tag.label.ocaml"},"3":{"name":"punctuation.separator.label.ocaml"}}},{"name":"variable.parameter.optional.ocaml","match":"(\\?)([a-z][a-zA-Z0-9_]*)","captures":{"1":{"name":"punctuation.definition.optional-parameter.ocaml"},"2":{"name":"entity.name.tag.label.optional.ocaml"}}},{"name":"variable.parameter.optional.ocaml","begin":"(\\?)(\\()([a-z_][a-zA-Z0-9'_]*)\\s*(=)","end":"(\\))","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"punctuation.definition.optional-parameter.ocaml"},"2":{"name":"punctuation.definition.optional-parameter.ocaml"},"3":{"name":"entity.name.tag.label.optional.ocaml"},"4":{"name":"punctuation.separator.optional-parameter-assignment.ocaml"}},"endCaptures":{"1":{"name":"punctuation.definition.optional-parameter.ocaml"}}},{"name":"meta.parameter.type-constrained.ocaml","begin":"(\\()(?=(~[a-z][a-zA-Z0-9_]*:|(\"(\\\\\"|[^\"])*\")|[^\\(\\)~\"])+(?\u003c!:)(:\u003e|:(?![:=])))","end":"(\\))","patterns":[{"name":"storage.type.ocaml","begin":"(?\u003c!:)(:\u003e|:(?![:=]))","end":"(?=\\))","patterns":[{"name":"meta.paren.group","begin":"\\(","end":"\\)"}],"beginCaptures":{"1":{"name":"punctuation.separator.type-constraint.ocaml"}}},{"include":"#variables"}],"beginCaptures":{"1":{"name":"punctuation.section.type-constraint.ocaml"}},"endCaptures":{"1":{"name":"punctuation.section.type-constraint.ocaml"}}},{"include":"#comments_inner"},{"name":"meta.paren-group.ocaml","begin":"\\(","end":"\\)","patterns":[{"include":"#variables"}]},{"name":"variable.parameter.tuple.ocaml","begin":"(\\()","end":"(\\))","patterns":[{"include":"#matchpatterns"},{"include":"#variables"},{"name":"punctuation.separator.tuple.ocaml","match":","}],"beginCaptures":{"1":{"name":"punctuation.definition.tuple.ocaml"}},"endCaptures":{"1":{"name":"punctuation.definition.tuple.ocaml"}}},{"name":"variable.parameter.record.ocaml","begin":"(\\{)","end":"(\\})","patterns":[{"include":"#moduleref"},{"name":"meta.recordfield.match.ocaml","begin":"\\b([a-z][a-zA-Z0-9'_]*)\\s*(=)","end":"(;)|(?=\\})","patterns":[{"include":"#matchpatterns"}],"beginCaptures":{"1":{"name":"entity.name.tag.record.ocaml"},"2":{"name":"punctuation.separator.record.field-assignment.ocaml"}},"endCaptures":{"1":{"name":"punctuation.separator.record.ocaml"}}}],"beginCaptures":{"1":{"name":"punctuation.definition.record.ocaml"}},"endCaptures":{"1":{"name":"punctuation.definition.record.ocaml"}}},{"include":"#storagetypes"},{"name":"variable.parameter.ocaml","match":"\\b[a-z_][a-zA-Z0-9'_]*"}]}}}
|
|
1
|
+
{"name":"OCaml","scopeName":"source.ocaml","patterns":[{"include":"#directives"},{"include":"#comments"},{"include":"#strings"},{"include":"#characters"},{"include":"#attributes"},{"include":"#extensions"},{"include":"#modules"},{"include":"#bindings"},{"include":"#operators"},{"include":"#keywords"},{"include":"#literals"},{"include":"#types"},{"include":"#identifiers"}],"repository":{"attributes":{"begin":"\\[(@|@@|@@@)[[:space:]]*([[:alpha:]_]+(\\.[[:word:]']+)*)","end":"\\]","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"keyword.operator.attribute.ocaml"},"2":{"name":"keyword.other.attribute.ocaml","patterns":[{"name":"keyword.other.ocaml punctuation.other.period punctuation.separator.period","match":"\\."}]}}},"bindings":{"patterns":[{"match":"\\b(for)[[:space:]]+([[:lower:]_][[:word:]']*)","captures":{"1":{"name":"keyword.ocaml"},"2":{"name":"entity.name.function.binding.ocaml"}}},{"match":"\\b(let)[[:space:]]+(open|exception|module)\\b(?!')","captures":{"1":{"name":"keyword.ocaml"},"2":{"name":"keyword.ocaml"}}},{"match":"\\b(let)[[:space:]]+(?!lazy\\b(?!'))(rec[[:space:]]+)?(?!rec\\b(?!'))([[:lower:]_][[:word:]']*)(?![[:word:]'])[[:space:]]*(?!,|::|[[:space:]])","captures":{"1":{"name":"keyword.ocaml"},"2":{"name":"keyword.ocaml"},"3":{"name":"entity.name.function.binding.ocaml"}}},{"match":"\\b(let|and)([$\u0026*+\\-/=\u003e@^|\u003c][!?$\u0026*+\\-/=\u003e@^|%:]*)[[:space:]]*(?!lazy\\b(?!'))([[:lower:]_][[:word:]']*)(?![[:word:]'])[[:space:]]*(?!,|::|[[:space:]])","captures":{"1":{"name":"keyword.ocaml"},"2":{"name":"keyword.ocaml"},"3":{"name":"entity.name.function.binding.ocaml"}}},{"match":"\\([[:space:]]*(val)[[:space:]]+([[:lower:]_][[:word:]']*)","captures":{"1":{"name":"keyword.ocaml"},"2":{"patterns":[{"include":"$self"}]}}},{"match":"(?:\\(|(:))[[:space:]]*(type)((?:[[:space:]]+[[:lower:]_][[:word:]']*)+)","captures":{"1":{"name":"keyword.other.ocaml punctuation.other.colon punctuation.colon"},"2":{"name":"keyword.ocaml"},"3":{"name":"entity.name.function.binding.ocaml"}}},{"begin":"(\\?)\\([[:space:]]*([[:lower:]_][[:word:]']*)","end":"\\)","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"variable.parameter.optional.ocaml"},"2":{"name":"variable.parameter.optional.ocaml"}}},{"begin":"(~)\\([[:space:]]*([[:lower:]_][[:word:]']*)","end":"\\)","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"variable.parameter.labeled.ocaml"},"2":{"name":"variable.parameter.labeled.ocaml"}}},{"include":"source.ocaml.interface#bindings"}]},"characters":{"patterns":[{"name":"string.quoted.single.ocaml","match":"'(\\\\\\\\)'","captures":{"1":{"name":"constant.character.escape.ocaml"}}},{"name":"string.quoted.single.ocaml","match":"'(\\\\[\"'ntbr ])'","captures":{"1":{"name":"constant.character.escape.ocaml"}}},{"name":"string.quoted.single.ocaml","match":"'(\\\\[[:digit:]]{3})'","captures":{"1":{"name":"constant.character.escape.ocaml"}}},{"name":"string.quoted.single.ocaml","match":"'(\\\\x[[:xdigit:]]{2})'","captures":{"1":{"name":"constant.character.escape.ocaml"}}},{"name":"string.quoted.single.ocaml","match":"'(\\\\o[0-3][0-7]{2})'","captures":{"1":{"name":"constant.character.escape.ocaml"}}},{"name":"string.quoted.single.ocaml","match":"'(\\\\.)'","captures":{"1":{"name":"invalid.illegal.unknown-escape.ocaml"}}},{"name":"string.quoted.single.ocaml","match":"'.'"}]},"comments":{"patterns":[{"name":"comment.block.ocaml","match":"\\(\\*\\*\\)"},{"name":"comment.doc.ocaml","begin":"\\(\\*\\*(?!\\*)","end":"\\*\\)","patterns":[{"include":"source.ocaml.ocamldoc#markup"},{"include":"#strings-in-comments"},{"include":"#comments"}]},{"begin":"\\(\\*\\$","end":"\\*\\)","patterns":[{"include":"$self"}],"beginCaptures":{"0":{"name":"comment.cinaps.ocaml"}},"endCaptures":{"0":{"name":"comment.cinaps.ocaml"}}},{"name":"comment.block.ocaml","begin":"\\(\\*","end":"\\*\\)","patterns":[{"include":"#strings-in-comments"},{"include":"#comments"}]}]},"directives":{"patterns":[{"contentName":"comment.line.directive.ocaml","begin":"^[[:space:]]*(#)[[:space:]]*([[:digit:]]+)","end":"$","beginCaptures":{"1":{"name":"keyword.other.ocaml"},"2":{"name":"constant.numeric.decimal.integer.ocaml"}}},{"patterns":[{"begin":"^[[:space:]]*(#)[[:space:]]*(help|quit|cd|directory|remove_directory|load_rec|load|use|mod_use)","end":"$","patterns":[{"include":"#strings"}],"beginCaptures":{"1":{"name":"keyword.other.ocaml"},"2":{"name":"keyword.other.ocaml"}}},{"begin":"^[[:space:]]*(#)[[:space:]]*(show_class_type|show_class|show_exception|show_module_type|show_module|show_type|show_val|show)","end":"$","patterns":[{"include":"#types"},{"include":"#identifiers"}],"beginCaptures":{"1":{"name":"keyword.other.ocaml"},"2":{"name":"keyword.other.ocaml"}}},{"begin":"^[[:space:]]*(#)[[:space:]]*(install_printer|print_depth|print_length|remove_printer|trace|untrace_all|untrace)","end":"$","patterns":[{"include":"#literals"},{"include":"#identifiers"}],"beginCaptures":{"1":{"name":"keyword.other.ocaml"},"2":{"name":"keyword.other.ocaml"}}},{"begin":"^[[:space:]]*(#)[[:space:]]*(labels|ppx|principal|rectypes|warn_error|warnings)","end":"$","patterns":[{"include":"#strings"},{"include":"#literals"}],"beginCaptures":{"1":{"name":"keyword.other.ocaml"},"2":{"name":"keyword.other.ocaml"}}}]},{"begin":"^[[:space:]]*(#)[[:space:]]*(require|list|camlp4o|camlp4r|predicates|thread)","end":"$","patterns":[{"include":"#strings"}],"beginCaptures":{"1":{"name":"keyword.other.ocaml"},"2":{"name":"keyword.other.ocaml"}}},{"begin":"^[[:space:]]*(#)[[:space:]]*(define|undef|ifdef|ifndef|if|else|elif|endif|include|warning|error|ext|endext)","end":"$","patterns":[{"name":"keyword.other.ocaml","match":"\\b(defined)\\b"},{"name":"keyword.other.ocaml","match":"\\\\"},{"include":"#comments"},{"include":"#strings"},{"include":"#characters"},{"include":"#keywords"},{"include":"#operators"},{"include":"#literals"},{"include":"#types"},{"include":"#identifiers"}],"beginCaptures":{"1":{"name":"keyword.other.ocaml"},"2":{"name":"keyword.other.ocaml"}}}]},"extensions":{"begin":"\\[(%|%%)[[:space:]]*([[:alpha:]_]+(\\.[[:word:]']+)*)","end":"\\]","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"keyword.operator.extension.ocaml"},"2":{"name":"keyword.other.extension.ocaml","patterns":[{"name":"keyword.other.ocaml punctuation.other.period punctuation.separator.period","match":"\\."}]}}},"identifiers":{"patterns":[{"name":"constant.language.ocaml","match":"\\b_\\b"},{"name":"constant.language.capital-identifier.ocaml","match":"\\b[[:upper:]][[:word:]']*('|\\b)"},{"name":"source.ocaml","match":"\\b[[:lower:]_][[:word:]']*('|\\b)"},{"name":"constant.language.polymorphic-variant.ocaml","match":"\\`[[:alpha:]][[:word:]']*\\b"},{"name":"constant.language.list.ocaml","match":"\\[\\]"}]},"keywords":{"patterns":[{"name":"keyword.other.ocaml","match":"\\b(and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|virtual|when|while|with)\\b(?!')"}]},"literals":{"patterns":[{"name":"constant.language.boolean.ocaml","match":"\\b(true|false)\\b"},{"name":"constant.numeric.decimal.float.ocaml","match":"\\b([[:digit:]][[:digit:]_]*(\\.[[:digit:]_]*)?[eE][+-]?[[:digit:]][[:digit:]_]*[g-zG-Z]?)\\b"},{"name":"constant.numeric.decimal.float.ocaml","match":"\\b([[:digit:]][[:digit:]_]*)(\\.[[:digit:]_]*[g-zG-Z]?\\b|\\.)"},{"name":"constant.numeric.hexadecimal.float.ocaml","match":"\\b((0x|0X)[[:xdigit:]][[:xdigit:]_]*(\\.[[:xdigit:]_]*)?[pP][+-]?[[:digit:]][[:digit:]_]*[g-zG-Z]?)\\b"},{"name":"constant.numeric.hexadecimal.float.ocaml","match":"\\b((0x|0X)[[:xdigit:]][[:xdigit:]_]*)(\\.[[:xdigit:]_]*[g-zG-Z]?\\b|\\.)"},{"name":"constant.numeric.decimal.integer.ocaml","match":"\\b([[:digit:]][[:digit:]_]*[lLng-zG-Z]?)\\b"},{"name":"constant.numeric.hexadecimal.integer.ocaml","match":"\\b((0x|0X)[[:xdigit:]][[:xdigit:]_]*[lLng-zG-Z]?)\\b"},{"name":"constant.numeric.octal.integer.ocaml","match":"\\b((0o|0O)[0-7][0-7_]*[lLng-zG-Z]?)\\b"},{"name":"constant.numeric.binary.integer.ocaml","match":"\\b((0b|0B)[0-1][0-1_]*[lLng-zG-Z]?)\\b"},{"name":"constant.language.unit.ocaml","match":"\\(\\)"},{"begin":"\\(","end":"\\)","patterns":[{"include":"$self"}]},{"name":"constant.language.array.ocaml","match":"\\[\\|\\|\\]"},{"begin":"\\[\\|","end":"\\|\\]","patterns":[{"include":"$self"}]},{"name":"constant.language.list.ocaml","match":"\\[\\]"},{"begin":"\\[","end":"]","patterns":[{"include":"$self"}]},{"begin":"\\{","end":"\\}","patterns":[{"include":"$self"}]}]},"modules":{"patterns":[{"begin":"\\b(sig)\\b","end":"\\b(end)\\b","patterns":[{"include":"source.ocaml.interface"}],"beginCaptures":{"0":{"name":"keyword.other.ocaml"}},"endCaptures":{"0":{"name":"keyword.other.ocaml"}}},{"begin":"\\b(struct)\\b","end":"\\b(end)\\b","patterns":[{"include":"$self"}],"beginCaptures":{"0":{"name":"keyword.other.ocaml"}},"endCaptures":{"0":{"name":"keyword.other.ocaml"}}}]},"operators":{"patterns":[{"name":"keyword.ocaml","match":"\\b(let|and)[$\u0026*+\\-/=\u003e@^|\u003c][!?$\u0026*+\\-/=\u003e@^|%:]*"},{"name":"keyword.operator.ocaml","match":"[$\u0026*+\\-/=\u003e@^%\u003c][~!?$\u0026*+\\-/=\u003e@^|%\u003c:.]*"},{"name":"keyword.operator.ocaml","match":"\\|[~!?$\u0026*+\\-/=\u003e@^|%\u003c:.]+"},{"name":"keyword.other.ocaml","match":"(?\u003c!\\[)(\\|)(?!\\])"},{"name":"keyword.operator.ocaml","match":"#[~!?$\u0026*+\\-/=\u003e@^|%\u003c:.]+"},{"name":"keyword.operator.ocaml","match":"![~!?$\u0026*+\\-/=\u003e@^|%\u003c:.]*"},{"name":"keyword.operator.ocaml","match":"[?~][~!?$\u0026*+\\-/=\u003e@^|%\u003c:.]+"},{"name":"keyword.operator.ocaml","match":"\\b(or|mod|land|lor|lxor|lsl|lsr|asr)\\b"},{"name":"keyword.other.ocaml","match":"#"},{"name":"keyword.other.ocaml punctuation.other.colon punctuation.colon","match":":"},{"name":"keyword.other.ocaml punctuation.other.period punctuation.separator.period","match":"\\."},{"name":"keyword.other.ocaml punctuation.separator.terminator punctuation.separator.semicolon","match":";"},{"name":"keyword.other.ocaml punctuation.comma punctuation.separator.comma","match":","}]},"strings":{"patterns":[{"name":"string.quoted.braced.ocaml","begin":"\\{(%%?[[:alpha:]_][[:word:]']*(\\.[[:alpha:]_][[:word:]']*)*[[:space:]]*)?([[:lower:]_]*)\\|","end":"\\|\\3\\}","beginCaptures":{"1":{"name":"keyword.other.extension.ocaml"}}},{"name":"string.quoted.double.ocaml","begin":"\"","end":"\"","patterns":[{"name":"constant.character.escape.ocaml","match":"\\\\$"},{"name":"constant.character.escape.ocaml","match":"\\\\\\\\"},{"name":"constant.character.escape.ocaml","match":"\\\\[\"'ntbr ]"},{"name":"constant.character.escape.ocaml","match":"\\\\[[:digit:]]{3}"},{"name":"constant.character.escape.ocaml","match":"\\\\x[[:xdigit:]]{2}"},{"name":"constant.character.escape.ocaml","match":"\\\\o[0-3][0-7]{2}"},{"name":"constant.character.escape.ocaml","match":"\\\\u\\{[[:xdigit:]]{1,6}\\}"},{"name":"constant.character.printf.ocaml","match":"%[-0+ #]*([[:digit:]]+|\\*)?(.([[:digit:]]+|\\*))?[lLn]?[diunlLNxXosScCfFeEgGhHBbat!%@,]"},{"name":"invalid.illegal.unknown-escape.ocaml","match":"\\\\."}]}]},"strings-in-comments":{"patterns":[{"match":"'(\\\\)?.'"},{"begin":"\"","end":"\"","patterns":[{"match":"\\\\\\\\"},{"match":"\\\\\""}]},{"begin":"\\{([[:lower:]_]*)\\|","end":"\\|\\1\\}"}]},"types":{"patterns":[{"name":"storage.type.ocaml","match":"'[[:alpha:]][[:word:]']*\\b|'_\\b"},{"name":"storage.type.weak.ocaml","match":"'_[[:alpha:]][[:word:]']*\\b"},{"name":"support.type.ocaml","match":"\\b(unit|bool|int|int32|int64|nativeint|float|char|bytes|string)\\b"}]}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"Menhir","scopeName":"source.ocaml.menhir","patterns":[{"include":"#comments"},{"begin":"(?=%[^%])","end":"(?=%%)","patterns":[{"include":"#comments"},{"include":"#declarations"}]},{"begin":"%%","end":"%%","patterns":[{"include":"#comments"},{"include":"#rules"}],"beginCaptures":{"0":{"name":"keyword.other.menhir"}},"endCaptures":{"0":{"name":"keyword.other.menhir"}}},{"include":"source.ocaml"}],"repository":{"comments":{"patterns":[{"include":"source.ocaml#comments"},{"name":"comment.block.menhir","begin":"/\\*","end":"\\*/"},{"name":"comment.line.menhir","begin":"//","end":"$"}]},"declarations":{"patterns":[{"begin":"%{","end":"%}","patterns":[{"include":"source.ocaml"}],"beginCaptures":{"0":{"name":"keyword.other.menhir"}},"endCaptures":{"0":{"name":"keyword.other.menhir"}}},{"begin":"%token\\b","end":"(?=%)","patterns":[{"include":"#type-annotation"},{"include":"#token-name"},{"include":"source.ocaml#strings"},{"include":"source.ocaml#attributes"},{"include":"#comments"}],"beginCaptures":{"0":{"name":"keyword.other.menhir"}}},{"begin":"%(?:nonassoc|left|right)\\b","end":"(?=%)","patterns":[{"include":"#token-name"},{"include":"#production-name"},{"include":"source.ocaml#strings"},{"include":"source.ocaml#attributes"},{"include":"#comments"}],"beginCaptures":{"0":{"name":"keyword.other.menhir"}}},{"begin":"%(?:type|start|on_error_reduce)\\b","end":"(?=%)","patterns":[{"include":"#type-annotation"},{"include":"#production-name"},{"include":"source.ocaml#strings"},{"include":"source.ocaml#attributes"},{"include":"#comments"}],"beginCaptures":{"0":{"name":"keyword.other.menhir"}}},{"name":"keyword.other.menhir","match":"%parameter\\b"},{"begin":"%(?:attribute\\b|(?=\\[))","end":"(?=%)","patterns":[{"include":"source.ocaml#attributes"},{"include":"#token-name"},{"include":"#production-name"},{"include":"#comments"}],"beginCaptures":{"0":{"name":"keyword.other.menhir"}}},{"include":"#type-annotation"},{"include":"source.ocaml#strings"}],"repository":{"type-annotation":{"begin":"\u003c","end":"\u003e","patterns":[{"include":"source.ocaml"}],"beginCaptures":{"0":{"name":"keyword.other.menhir"}},"endCaptures":{"0":{"name":"keyword.other.menhir"}}}}},"new-actions":{"patterns":[{"include":"#old-actions"},{"begin":"\u003c","end":"\u003e","patterns":[{"include":"source.ocaml"}],"beginCaptures":{"0":{"name":"keyword.other.menhir"}},"endCaptures":{"0":{"name":"keyword.other.menhir"}}}]},"new-rules":{"begin":"(let)[[:space:]]+([[:lower:]_][[:word:]]*)[[:space:]]*(?:\\(([^)]+)\\)[[:space:]]*)?(:=|==)","end":"(?=let\\b|[[:lower:]_][[:word:]]*[[:space:]]*(?:\\([^)]+\\)[[:space:]]*)?:|%(?!prec\\b))","patterns":[{"include":"#comments"},{"include":"#new-variables"},{"include":"#references"},{"include":"#prec"},{"include":"#operators"},{"include":"source.ocaml#strings"},{"include":"source.ocaml#attributes"},{"include":"#new-actions"},{"begin":"[:|]","end":"(?=[{\u003c|]|let\\b|[[:lower:]_][[:word:]]*[[:space:]]*(?:\\([^)]+\\)[[:space:]]*)?:|%(?!prec\\b))","patterns":[{"include":"#comments"},{"include":"#new-variables"},{"include":"#references"},{"include":"#prec"},{"include":"#operators"},{"include":"source.ocaml#strings"},{"include":"source.ocaml#attributes"}],"beginCaptures":{"0":{"name":"keyword.other.menhir"}}}],"beginCaptures":{"1":{"name":"keyword.other.menhir"},"2":{"name":"entity.name.function.rule.menhir"},"3":{"patterns":[{"name":"variable.parameter.rule.menhir","match":"[[:alpha:]_][[:word:]]*"}]},"4":{"name":"keyword.other.menhir"}}},"new-variables":{"patterns":[{"include":"#old-variables"},{"match":"(~)[[:space:]]*(=)","captures":{"1":{"name":"variable.parameter.value.menhir"},"2":{"name":"keyword.other.menhir"}}},{"begin":"(?\u003c![[:word:][:space:]])[[:space:]]*\\(","end":"\\)[[:space:]]*(=)","patterns":[{"include":"#pattern"}],"endCaptures":{"1":{"name":"keyword.other.menhir"}}}],"repository":{"pattern":{"patterns":[{"name":"variable.parameter.value.menhir","match":"[[:lower:]_][[:word:]]*|~"},{"begin":"\\(","end":"\\)","patterns":[{"include":"#pattern"}]}]}}},"old-actions":{"contentName":"source.embedded-action.menhir","begin":"{","end":"}","patterns":[{"include":"source.ocaml"}],"beginCaptures":{"0":{"name":"keyword.other.menhir"}},"endCaptures":{"0":{"name":"keyword.other.menhir"}}},"old-rules":{"begin":"([[:lower:]_][[:word:]]*)[[:space:]]*(?:\\(([^)]+)\\))?(?=[[:space:]]*:)","end":"(?=let\\b|[[:lower:]_][[:word:]]*[[:space:]]*(?:\\([^)]+\\)[[:space:]]*)?:|%(?!prec\\b))","patterns":[{"include":"#comments"},{"include":"#old-variables"},{"include":"#references"},{"include":"#prec"},{"include":"#operators"},{"include":"source.ocaml#strings"},{"include":"source.ocaml#attributes"},{"include":"#old-actions"},{"begin":"[:|]","end":"(?=[{\u003c|]|let\\b|[[:lower:]_][[:word:]]*[[:space:]]*(?:\\([^)]+\\)[[:space:]]*)?:|%(?!prec\\b))","patterns":[{"include":"#comments"},{"include":"#old-variables"},{"include":"#references"},{"include":"#prec"},{"include":"#operators"},{"include":"source.ocaml#strings"},{"include":"source.ocaml#attributes"}],"beginCaptures":{"0":{"name":"keyword.other.menhir"}}}],"beginCaptures":{"1":{"name":"entity.name.function.rule.menhir"},"2":{"patterns":[{"name":"variable.parameter.rule.menhir","match":"[[:alpha:]_][[:word:]]*"}]}}},"old-variables":{"match":"([[:lower:]_][[:word:]]*)[[:space:]]*(=)","patterns":[{"include":"#references"}],"captures":{"1":{"name":"variable.parameter.value.menhir"},"2":{"name":"keyword.other.menhir"}}},"operators":{"patterns":[{"name":"keyword.operator.menhir","match":"[?+*]"},{"name":"keyword.other.menhir","match":"\\|"},{"name":"keyword.other.menhir punctuation.separator.terminator punctuation.separator.semicolon","match":";"}]},"prec":{"name":"keyword.other.menhir","match":"%prec\\b"},"production-name":{"name":"entity.name.function.rule.menhir","match":"[[:lower:]_][[:word:]]*"},"references":{"patterns":[{"name":"support.function.rule.menhir","match":"\\b(endrule|midrule|option|ioption|boption|loption|pair|separated_pair|preceded|terminated|delimited|list|nonempty_list|separated_list|separated_nonempty_list|rev|flatten|append)\\b"},{"include":"#token-name"},{"include":"#production-name"}]},"rules":{"patterns":[{"include":"#old-rules"},{"include":"#new-rules"},{"name":"keyword.other.directive.menhir","match":"%(?:public|inline)\\b"},{"name":"keyword.other.menhir","match":"\\blet\\b|:=|=="}]},"token-name":{"name":"constant.other.token.menhir","match":"[[:upper:]][[:word:]]*"}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"scopeName":"source.ocaml.merlin","patterns":[{"include":"#comment"},{"include":"#directory"},{"include":"#flag"},{"include":"#package"}],"repository":{"comment":{"name":"comment.line.merlin","begin":"#","end":"$"},"directory":{"name":"string.other.merlin","begin":"\\b(B|S)\\b","end":"$","patterns":[{"name":"keyword.other.path.merlin","match":"[:./ \\\\]"},{"name":"keyword.other.glob.merlin","match":"[*?]"}],"beginCaptures":{"1":{"name":"keyword.other.merlin"}}},"flag":{"begin":"\\b(FLG)\\b","end":"$","patterns":[{"name":"string.quoted.double.merlin","begin":"\"","end":"\""},{"match":"([\\-\\+])\\b(?:([[:digit:]]+)|([[:lower:]][[:word:]]*))\\b","captures":{"1":{"name":"keyword.other.merlin"},"2":{"name":"constant.language.merlin"},"3":{"name":"variable.parameter.merlin"}}}],"beginCaptures":{"1":{"name":"keyword.other.merlin"}}},"package":{"begin":"\\b(PKG)\\b","end":"$","patterns":[{"match":"(?\u003c![\\-\\+])\\b([[:lower:]][-[:word:]]*)\\b[[:space:]]*(\\.)?","captures":{"1":{"name":"entity.name.class.merlin"},"2":{"name":"keyword.other.merlin"}}}],"beginCaptures":{"1":{"name":"storage.type.merlin"}}}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"OCaml.mlx","scopeName":"source.ocaml.mlx","patterns":[{"include":"#directives"},{"include":"#comments"},{"include":"#strings"},{"include":"#characters"},{"include":"#attributes"},{"include":"#extensions"},{"include":"#modules"},{"include":"#bindings"},{"include":"#jsx"},{"include":"#operators"},{"include":"#keywords"},{"include":"#literals"},{"include":"#types"},{"include":"#identifiers"}],"repository":{"attributes":{"begin":"\\[(@|@@|@@@)[[:space:]]*([[:alpha:]_]+(\\.[[:word:]']+)*)","end":"\\]","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"keyword.operator.attribute.ocaml"},"2":{"name":"keyword.other.attribute.ocaml","patterns":[{"name":"keyword.other.ocaml punctuation.other.period punctuation.separator.period","match":"\\."}]}}},"bindings":{"patterns":[{"match":"\\b(for)[[:space:]]+([[:lower:]_][[:word:]']*)","captures":{"1":{"name":"keyword.ocaml"},"2":{"name":"entity.name.function.binding.ocaml"}}},{"match":"\\b(let)[[:space:]]+(open|exception|module)\\b(?!')","captures":{"1":{"name":"keyword.ocaml"},"2":{"name":"keyword.ocaml"}}},{"match":"\\b(let)[[:space:]]+(?!lazy\\b(?!'))(rec[[:space:]]+)?(?!rec\\b(?!'))([[:lower:]_][[:word:]']*)(?![[:word:]'])[[:space:]]*(?!,|::|[[:space:]])","captures":{"1":{"name":"keyword.ocaml"},"2":{"name":"keyword.ocaml"},"3":{"name":"entity.name.function.binding.ocaml"}}},{"match":"\\b(let|and)([$\u0026*+\\-/=\u003e@^|\u003c][!?$\u0026*+\\-/=\u003e@^|%:]*)[[:space:]]*(?!lazy\\b(?!'))([[:lower:]_][[:word:]']*)(?![[:word:]'])[[:space:]]*(?!,|::|[[:space:]])","captures":{"1":{"name":"keyword.ocaml"},"2":{"name":"keyword.ocaml"},"3":{"name":"entity.name.function.binding.ocaml"}}},{"match":"\\([[:space:]]*(val)[[:space:]]+([[:lower:]_][[:word:]']*)","captures":{"1":{"name":"keyword.ocaml"},"2":{"patterns":[{"include":"$self"}]}}},{"match":"(?:\\(|(:))[[:space:]]*(type)((?:[[:space:]]+[[:lower:]_][[:word:]']*)+)","captures":{"1":{"name":"keyword.other.ocaml punctuation.other.colon punctuation.colon"},"2":{"name":"keyword.ocaml"},"3":{"name":"entity.name.function.binding.ocaml"}}},{"begin":"(\\?)\\([[:space:]]*([[:lower:]_][[:word:]']*)","end":"\\)","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"variable.parameter.optional.ocaml"},"2":{"name":"variable.parameter.optional.ocaml"}}},{"begin":"(~)\\([[:space:]]*([[:lower:]_][[:word:]']*)","end":"\\)","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"variable.parameter.labeled.ocaml"},"2":{"name":"variable.parameter.labeled.ocaml"}}},{"include":"source.ocaml.interface#bindings"}]},"characters":{"patterns":[{"name":"string.quoted.single.ocaml","match":"'(\\\\\\\\)'","captures":{"1":{"name":"constant.character.escape.ocaml"}}},{"name":"string.quoted.single.ocaml","match":"'(\\\\[\"'ntbr ])'","captures":{"1":{"name":"constant.character.escape.ocaml"}}},{"name":"string.quoted.single.ocaml","match":"'(\\\\[[:digit:]]{3})'","captures":{"1":{"name":"constant.character.escape.ocaml"}}},{"name":"string.quoted.single.ocaml","match":"'(\\\\x[[:xdigit:]]{2})'","captures":{"1":{"name":"constant.character.escape.ocaml"}}},{"name":"string.quoted.single.ocaml","match":"'(\\\\o[0-3][0-7]{2})'","captures":{"1":{"name":"constant.character.escape.ocaml"}}},{"name":"string.quoted.single.ocaml","match":"'(\\\\.)'","captures":{"1":{"name":"invalid.illegal.unknown-escape.ocaml"}}},{"name":"string.quoted.single.ocaml","match":"'.'"}]},"comments":{"patterns":[{"name":"comment.block.ocaml","match":"\\(\\*\\*\\)"},{"name":"comment.doc.ocaml","begin":"\\(\\*\\*(?!\\*)","end":"\\*\\)","patterns":[{"include":"source.ocaml.ocamldoc#markup"},{"include":"#strings-in-comments"},{"include":"#comments"}]},{"begin":"\\(\\*\\$","end":"\\*\\)","patterns":[{"include":"$self"}],"beginCaptures":{"0":{"name":"comment.cinaps.ocaml"}},"endCaptures":{"0":{"name":"comment.cinaps.ocaml"}}},{"name":"comment.block.ocaml","begin":"\\(\\*","end":"\\*\\)","patterns":[{"include":"#strings-in-comments"},{"include":"#comments"}]}]},"directives":{"patterns":[{"contentName":"comment.line.directive.ocaml","begin":"^[[:space:]]*(#)[[:space:]]*([[:digit:]]+)","end":"$","beginCaptures":{"1":{"name":"keyword.other.ocaml"},"2":{"name":"constant.numeric.decimal.integer.ocaml"}}},{"patterns":[{"begin":"^[[:space:]]*(#)[[:space:]]*(help|quit|cd|directory|remove_directory|load_rec|load|use|mod_use)","end":"$","patterns":[{"include":"#strings"}],"beginCaptures":{"1":{"name":"keyword.other.ocaml"},"2":{"name":"keyword.other.ocaml"}}},{"begin":"^[[:space:]]*(#)[[:space:]]*(show_class_type|show_class|show_exception|show_module_type|show_module|show_type|show_val|show)","end":"$","patterns":[{"include":"#types"},{"include":"#identifiers"}],"beginCaptures":{"1":{"name":"keyword.other.ocaml"},"2":{"name":"keyword.other.ocaml"}}},{"begin":"^[[:space:]]*(#)[[:space:]]*(install_printer|print_depth|print_length|remove_printer|trace|untrace_all|untrace)","end":"$","patterns":[{"include":"#literals"},{"include":"#identifiers"}],"beginCaptures":{"1":{"name":"keyword.other.ocaml"},"2":{"name":"keyword.other.ocaml"}}},{"begin":"^[[:space:]]*(#)[[:space:]]*(labels|ppx|principal|rectypes|warn_error|warnings)","end":"$","patterns":[{"include":"#strings"},{"include":"#literals"}],"beginCaptures":{"1":{"name":"keyword.other.ocaml"},"2":{"name":"keyword.other.ocaml"}}}]},{"begin":"^[[:space:]]*(#)[[:space:]]*(require|list|camlp4o|camlp4r|predicates|thread)","end":"$","patterns":[{"include":"#strings"}],"beginCaptures":{"1":{"name":"keyword.other.ocaml"},"2":{"name":"keyword.other.ocaml"}}},{"begin":"^[[:space:]]*(#)[[:space:]]*(define|undef|ifdef|ifndef|if|else|elif|endif|include|warning|error|ext|endext)","end":"$","patterns":[{"name":"keyword.other.ocaml","match":"\\b(defined)\\b"},{"name":"keyword.other.ocaml","match":"\\\\"},{"include":"#comments"},{"include":"#strings"},{"include":"#characters"},{"include":"#keywords"},{"include":"#operators"},{"include":"#literals"},{"include":"#types"},{"include":"#identifiers"}],"beginCaptures":{"1":{"name":"keyword.other.ocaml"},"2":{"name":"keyword.other.ocaml"}}}]},"extensions":{"begin":"\\[(%|%%)[[:space:]]*([[:alpha:]_]+(\\.[[:word:]']+)*)","end":"\\]","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"keyword.operator.extension.ocaml"},"2":{"name":"keyword.other.extension.ocaml","patterns":[{"name":"keyword.other.ocaml punctuation.other.period punctuation.separator.period","match":"\\."}]}}},"identifiers":{"patterns":[{"name":"constant.language.ocaml","match":"\\b_\\b"},{"name":"constant.language.capital-identifier.ocaml","match":"\\b[[:upper:]][[:word:]']*('|\\b)"},{"name":"source.ocaml","match":"\\b[[:lower:]_][[:word:]']*('|\\b)"},{"name":"constant.language.polymorphic-variant.ocaml","match":"\\`[[:alpha:]][[:word:]']*\\b"},{"name":"constant.language.list.ocaml","match":"\\[\\]"}]},"jsx":{"patterns":[{"include":"#jsx-head"},{"include":"#jsx-tail"}]},"jsx-attributes":{"patterns":[{"include":"#comments"},{"include":"#jsx-property-name"},{"begin":"=([[:space:]]*)","end":"(?=[[:space:]]|/?\u003e)","patterns":[{"include":"#jsx-expression"}],"beginCaptures":{"0":{"name":"keyword.operator.ocaml"}}}]},"jsx-body":{"begin":"((\u003e))","end":"(?=\u003c/)","patterns":[{"include":"#jsx-expression"}],"beginCaptures":{"1":{},"2":{"name":"punctuation.definition.tag.end.js"}}},"jsx-expression":{"patterns":[{"include":"#comments"},{"include":"#extensions"},{"include":"#attributes"},{"include":"#literals"},{"include":"#strings"},{"include":"#identifiers"},{"include":"#jsx"}]},"jsx-head":{"begin":"((\u003c))(?=[_[:alpha:]])","end":"((/\u003e))|(?=\u003c/)","patterns":[{"begin":"\\G","end":"(?=[[:space:]/\u003e])[[:space:]]*+","patterns":[{"name":"entity.name.tag.inline.any.html","match":"\\b[[:upper:]][[:word:]']*('|\\b)"},{"name":"entity.name.tag.inline.any.html","match":"\\b[[:lower:]][[:word:]]*\\b"}]},{"include":"#jsx-attributes"},{"include":"#jsx-body"}],"beginCaptures":{"1":{},"2":{"name":"punctuation.definition.tag.begin.js"}},"endCaptures":{"1":{},"2":{"name":"punctuation.definition.tag.end.js"}}},"jsx-property-name":{"match":"(?x)\n[[:space:]]*\n([_$[:alpha:]][-_$[:alnum:]]*)\n(?=[[:space:]]|=|/?\u003e|/\\*|//)","captures":{"1":{"name":"entity.other.attribute-name.namespace.js"},"2":{"name":"punctuation.separator.namespace.js"},"3":{"name":"entity.other.attribute-name.js"}}},"jsx-tail":{"begin":"\\G(/\u003e)|(\u003c/)","end":"(\u003e)","patterns":[{"name":"entity.name.tag.inline.any.html","match":"\\b[[:upper:]][[:word:]']*('|\\b)"},{"name":"entity.name.tag.inline.any.html","match":"\\b[[:lower:]][[:word:]]*\\b"}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.end.js"},"2":{"name":"punctuation.definition.tag.begin.js"}},"endCaptures":{"1":{"name":"punctuation.definition.tag.end.js"}},"applyEndPatternLast":true},"keywords":{"patterns":[{"name":"keyword.other.ocaml","match":"\\b(and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|virtual|when|while|with)\\b(?!')"}]},"literals":{"patterns":[{"name":"constant.language.boolean.ocaml","match":"\\b(true|false)\\b"},{"name":"constant.numeric.decimal.float.ocaml","match":"\\b([[:digit:]][[:digit:]_]*(\\.[[:digit:]_]*)?[eE][+-]?[[:digit:]][[:digit:]_]*[g-zG-Z]?)\\b"},{"name":"constant.numeric.decimal.float.ocaml","match":"\\b([[:digit:]][[:digit:]_]*)(\\.[[:digit:]_]*[g-zG-Z]?\\b|\\.)"},{"name":"constant.numeric.hexadecimal.float.ocaml","match":"\\b((0x|0X)[[:xdigit:]][[:xdigit:]_]*(\\.[[:xdigit:]_]*)?[pP][+-]?[[:digit:]][[:digit:]_]*[g-zG-Z]?)\\b"},{"name":"constant.numeric.hexadecimal.float.ocaml","match":"\\b((0x|0X)[[:xdigit:]][[:xdigit:]_]*)(\\.[[:xdigit:]_]*[g-zG-Z]?\\b|\\.)"},{"name":"constant.numeric.decimal.integer.ocaml","match":"\\b([[:digit:]][[:digit:]_]*[lLng-zG-Z]?)\\b"},{"name":"constant.numeric.hexadecimal.integer.ocaml","match":"\\b((0x|0X)[[:xdigit:]][[:xdigit:]_]*[lLng-zG-Z]?)\\b"},{"name":"constant.numeric.octal.integer.ocaml","match":"\\b((0o|0O)[0-7][0-7_]*[lLng-zG-Z]?)\\b"},{"name":"constant.numeric.binary.integer.ocaml","match":"\\b((0b|0B)[0-1][0-1_]*[lLng-zG-Z]?)\\b"},{"name":"constant.language.unit.ocaml","match":"\\(\\)"},{"begin":"\\(","end":"\\)","patterns":[{"include":"$self"}]},{"name":"constant.language.array.ocaml","match":"\\[\\|\\|\\]"},{"begin":"\\[\\|","end":"\\|\\]","patterns":[{"include":"$self"}]},{"name":"constant.language.list.ocaml","match":"\\[\\]"},{"begin":"\\[","end":"]","patterns":[{"include":"$self"}]},{"begin":"\\{","end":"\\}","patterns":[{"include":"$self"}]}]},"modules":{"patterns":[{"begin":"\\b(sig)\\b","end":"\\b(end)\\b","patterns":[{"include":"source.ocaml.interface"}],"beginCaptures":{"0":{"name":"keyword.other.ocaml"}},"endCaptures":{"0":{"name":"keyword.other.ocaml"}}},{"begin":"\\b(struct)\\b","end":"\\b(end)\\b","patterns":[{"include":"$self"}],"beginCaptures":{"0":{"name":"keyword.other.ocaml"}},"endCaptures":{"0":{"name":"keyword.other.ocaml"}}}]},"operators":{"patterns":[{"name":"keyword.ocaml","match":"\\b(let|and)[$\u0026*+\\-/=\u003e@^|\u003c][!?$\u0026*+\\-/=\u003e@^|%:]*"},{"name":"keyword.operator.ocaml","match":"[$\u0026*+\\-/=\u003e@^%\u003c][~!?$\u0026*+\\-/=\u003e@^|%\u003c:.]*"},{"name":"keyword.operator.ocaml","match":"\\|[~!?$\u0026*+\\-/=\u003e@^|%\u003c:.]+"},{"name":"keyword.other.ocaml","match":"(?\u003c!\\[)(\\|)(?!\\])"},{"name":"keyword.operator.ocaml","match":"#[~!?$\u0026*+\\-/=\u003e@^|%\u003c:.]+"},{"name":"keyword.operator.ocaml","match":"![~!?$\u0026*+\\-/=\u003e@^|%\u003c:.]*"},{"name":"keyword.operator.ocaml","match":"[?~][~!?$\u0026*+\\-/=\u003e@^|%\u003c:.]+"},{"name":"keyword.operator.ocaml","match":"\\b(or|mod|land|lor|lxor|lsl|lsr|asr)\\b"},{"name":"keyword.other.ocaml","match":"#"},{"name":"keyword.other.ocaml punctuation.other.colon punctuation.colon","match":":"},{"name":"keyword.other.ocaml punctuation.other.period punctuation.separator.period","match":"\\."},{"name":"keyword.other.ocaml punctuation.separator.terminator punctuation.separator.semicolon","match":";"},{"name":"keyword.other.ocaml punctuation.comma punctuation.separator.comma","match":","}]},"strings":{"patterns":[{"name":"string.quoted.braced.ocaml","begin":"\\{(%%?[[:alpha:]_][[:word:]']*(\\.[[:alpha:]_][[:word:]']*)*[[:space:]]*)?([[:lower:]_]*)\\|","end":"\\|\\3\\}","beginCaptures":{"1":{"name":"keyword.other.extension.ocaml"}}},{"name":"string.quoted.double.ocaml","begin":"\"","end":"\"","patterns":[{"name":"constant.character.escape.ocaml","match":"\\\\$"},{"name":"constant.character.escape.ocaml","match":"\\\\\\\\"},{"name":"constant.character.escape.ocaml","match":"\\\\[\"'ntbr ]"},{"name":"constant.character.escape.ocaml","match":"\\\\[[:digit:]]{3}"},{"name":"constant.character.escape.ocaml","match":"\\\\x[[:xdigit:]]{2}"},{"name":"constant.character.escape.ocaml","match":"\\\\o[0-3][0-7]{2}"},{"name":"constant.character.escape.ocaml","match":"\\\\u\\{[[:xdigit:]]{1,6}\\}"},{"name":"constant.character.printf.ocaml","match":"%[-0+ #]*([[:digit:]]+|\\*)?(.([[:digit:]]+|\\*))?[lLn]?[diunlLNxXosScCfFeEgGhHBbat!%@,]"},{"name":"invalid.illegal.unknown-escape.ocaml","match":"\\\\."}]}]},"strings-in-comments":{"patterns":[{"match":"'(\\\\)?.'"},{"begin":"\"","end":"\"","patterns":[{"match":"\\\\\\\\"},{"match":"\\\\\""}]},{"begin":"\\{([[:lower:]_]*)\\|","end":"\\|\\1\\}"}]},"types":{"patterns":[{"name":"storage.type.ocaml","match":"'[[:alpha:]][[:word:]']*\\b|'_\\b"},{"name":"storage.type.weak.ocaml","match":"'_[[:alpha:]][[:word:]']*\\b"},{"name":"support.type.ocaml","match":"\\b(unit|bool|int|int32|int64|nativeint|float|char|bytes|string)\\b"}]}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"scopeName":"source.ocaml.oasis","patterns":[{"include":"#comments"},{"include":"#fields"},{"include":"#sections"},{"include":"#conditionals"},{"include":"#substitution"}],"repository":{"comments":{"name":"comment.line.oasis","begin":"#","end":"$"},"conditionals":{"patterns":[{"name":"keyword.other.oasis","match":"\\b(if|else)\\b"},{"name":"keyword.operator.oasis","match":"(!|\u0026\u0026|\\|\\|)"},{"name":"constant.language.oasis","match":"\\b(true|false)\\b"},{"begin":"\\b(os_type|system|architecture|ccomp_type|ocaml_version|flag)\\(","end":"\\)","beginCaptures":{"1":{"name":"entity.name.function.oasis"}}}]},"fields":{"match":"^[[:space:]]*([[:word:]]+)(:|\\+:|\\$:)","captures":{"1":{"name":"entity.name.tag.oasis"},"2":{"name":"keyword.operator.oasis"}}},"sections":{"contentName":"string.other.oasis","begin":"^[[:space:]]*(Flag|Library|Object|Executable|Document|Test|SourceRepository)","end":"$","beginCaptures":{"1":{"name":"keyword.other.oasis"}}},"substitution":{"name":"constant.language.oasis","match":"\\$[[:word:]]+"}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"scopeName":"source.ocaml.ocamlbuild","patterns":[{"include":"#comments"},{"include":"#lines"},{"name":"keyword.other.ocamlbuild punctuation.comma punctuation.separator.comma","match":","}],"repository":{"comments":{"name":"comment.line.ocamlbuild","begin":"#","end":"$"},"expressions":{"patterns":[{"name":"string.quoted.double.ocamlbuild","begin":"\u003c","end":"\u003e","patterns":[{"include":"#patterns"}],"beginCaptures":{"0":{"name":"keyword.operator.ocamlbuild"}},"endCaptures":{"0":{"name":"keyword.operator.ocamlbuild"}}},{"name":"string.quoted.double.ocamlbuild","begin":"\"","end":"\""},{"name":"constant.language.ocamlbuild","match":"\\b(true|false)\\b"},{"name":"keyword.operator.ocamlbuild","match":"\\b(or|and|not)\\b"},{"include":"#variables"},{"include":"$self"}]},"lines":{"begin":"^[[:space:]]*","end":"(:)|$","patterns":[{"include":"#expressions"}],"endCaptures":{"1":{"name":"keyword.operator.ocamlbuild"}}},"patterns":{"patterns":[{"name":"keyword.operator.ocamlbuild","match":"\\?"},{"name":"constant.language.ocamlbuild","match":"\\*"},{"begin":"{","end":"}","patterns":[{"name":"keyword.operator.ocamlbuild","match":","},{"include":"#patterns"}],"beginCaptures":{"0":{"name":"keyword.operator.ocamlbuild"}},"endCaptures":{"0":{"name":"keyword.operator.ocamlbuild"}}},{"begin":"\\[\\^?","end":"\\]","beginCaptures":{"0":{"name":"keyword.operator.ocamlbuild"}},"endCaptures":{"0":{"name":"keyword.operator.ocamlbuild"}}}]},"variables":{"patterns":[{"match":"(%)\\([^:)]*\\)","patterns":[{"include":"#expressions"}],"captures":{"1":{"name":"keyword.operator.ocamlbuild"}}},{"begin":"(%)\\([^:]*(:)","end":"\\)","patterns":[{"include":"#expressions"}],"beginCaptures":{"1":{"name":"keyword.operator.ocamlbuild"},"2":{"name":"keyword.operator.ocamlbuild"}}},{"name":"keyword.operator.ocamlbuild","match":"%"}]}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"OCamldoc","scopeName":"source.ocaml.ocamldoc","patterns":[{"include":"#markup"}],"repository":{"braces":{"patterns":[{"begin":"(?\u003c!\\\\){","end":"(?\u003c!\\\\)\\}","patterns":[{"include":"#braces"}]}]},"lighttable":{"patterns":[{"include":"#markup"},{"name":"punctuation.definition.list.begin.markdown.tableheader.tablechars.ocamldoc","match":"\\||(\\-\\-\\-+)|(:\\-\\-\\-+:)|(:\\-\\-+)|(\\-\\-+:)"}]},"lists":{"patterns":[{"begin":"((?\u003c!\\\\){(\\-|li)[[:space:]])","end":"((?\u003c!\\\\)})","patterns":[{"include":"#markup"}],"beginCaptures":{"1":{"name":"punctuation.definition.list.begin.markdown.ocamldoc"}},"endCaptures":{"1":{"name":"punctuation.definition.list.begin.markdown.ocamldoc"}}}]},"markup":{"patterns":[{"match":"(@raises?)[[:space:]]+([^[:space:]]+)","captures":{"1":{"name":"keyword.doc-tag.ocamldoc"},"2":{"name":"markup.inline.raw.ocamldoc source.embedded.ocamldoc constant.language.capital-identifier.ocaml"}}},{"match":"(@param)[[:space:]]+([^[:space:]]+)","captures":{"1":{"name":"keyword.doc-tag.ocamldoc"},"2":{"name":"markup.inline.raw.ocamldoc source.embedded.ocamldoc"}}},{"match":"(@see)[[:space:]]+(\u003c.*?\u003e|\".*?\"|'.*?')","captures":{"1":{"name":"keyword.doc-tag.ocamldoc"},"2":{"name":"markup.underline.link.ocamldoc meta.link.ocamldoc"}}},{"name":"keyword.doc-tag.ocamldoc","match":"@[[:lower:]]+"},{"name":"markup.inline.raw.ocamldoc","contentName":"source.embedded.ocamldoc","begin":"(?\u003c!\\\\)\\[","end":"(?\u003c!\\\\)\\]","patterns":[{"include":"source.ocaml"}]},{"name":"markup.inline.raw.ocamldoc","contentName":"source.embedded.ocamldoc","begin":"(?\u003c!\\\\)\\{(@ocaml([[:space:]].*?)?)?\\[","end":"(?\u003c!\\\\)\\]\\}","patterns":[{"include":"source.ocaml"}]},{"name":"markup.inline.raw.odoc","contentName":"source.embedded.odoc","begin":"(?\u003c!\\\\)\\{@.+?\\[","end":"(?\u003c!\\\\)\\]\\}"},{"name":"markup.inline.raw.ocamldoc","contentName":"source.embedded.ocamldoc","begin":"(?\u003c!\\\\)\\{!((modules?|modtype|module-type|class|classtype|class-type|val|value|type|exception|exn|attribute|method|section|const|recfield|field|extension|extension-decl|instance-variable|label|page):)?","end":"(?\u003c!\\\\)\\}","patterns":[{"include":"source.ocaml"}]},{"name":"markup.underline.link.ocamldoc meta.link.ocamldoc","contentName":"markup.inline.raw.ocamldoc source.embedded.ocamldoc","begin":"(?\u003c!\\\\)\\{(\\{!((module|modtype|module-type|class|classtype|class-type|val|value|type|exception|exn|attribute|method|section|const|recfield|field|extension|extension-decl|instance-variable|label|page):)?)","end":"(\\}).*?(?\u003c!\\\\)\\}","patterns":[{"include":"source.ocaml"}],"beginCaptures":{"1":{"name":"markup.inline.raw.ocamldoc"}},"endCaptures":{"1":{"name":"markup.inline.raw.ocamldoc"}}},{"name":"markup.heading.ocamldoc","begin":"(?\u003c!\\\\){[[:digit:]]+(:[^[:space:]]*)?[[:space:]]","end":"(?\u003c!\\\\)}","patterns":[{"include":"#markup"}],"beginCaptures":{"1":{"name":"meta.link.label.ocamldoc"}}},{"name":"markup.bold.ocamldoc","begin":"(?\u003c!\\\\){b[[:space:]]","end":"(?\u003c!\\\\)}","patterns":[{"include":"#markup"}]},{"name":"markup.italic.ocamldoc","begin":"(?\u003c!\\\\){(i|e)[[:space:]]","end":"(?\u003c!\\\\)}","patterns":[{"include":"#markup"}]},{"name":"markup.inline.raw.ocamldoc","begin":"(?\u003c!\\\\){v[[:space:]]","end":"\\bv}"},{"name":"markup.exponent.ocamldoc","begin":"(?\u003c!\\\\){(\\^|\\_)[[:space:]]","end":"(?\u003c!\\\\)}","patterns":[{"include":"#markup"}]},{"name":"support.class.math.odoc markup.math.inline.odoc meta.math.inline.odoc","begin":"(?\u003c!\\\\){m[[:space:]]","end":"(?\u003c!\\\\)\\}","patterns":[{"include":"#braces"}]},{"name":"support.class.math.odoc markup.math.block.odoc meta.math.block.odoc","begin":"(?\u003c!\\\\){math[[:space:]]","end":"(?\u003c!\\\\)\\}","patterns":[{"include":"#braces"}]},{"name":"punctuation.definition.list.begin.markdown.ocamldoc","match":"^[[:space:]]*(\\-|\\+)"},{"begin":"((?\u003c!\\\\){(ul|ol)[[:space:]])","end":"((?\u003c!\\\\)})","patterns":[{"include":"#lists"}],"beginCaptures":{"1":{"name":"punctuation.definition.list.begin.markdown.ocamldoc"}},"endCaptures":{"1":{"name":"punctuation.definition.list.begin.markdown.ocamldoc"}}},{"begin":"((?\u003c!\\\\){table[[:space:]])","end":"((?\u003c!\\\\)})","patterns":[{"include":"#table"}],"beginCaptures":{"1":{"name":"punctuation.definition.list.begin.markdown.table.ocamldoc"}},"endCaptures":{"1":{"name":"punctuation.definition.list.begin.markdown.table.ocamldoc"}}},{"begin":"((?\u003c!\\\\){t[[:space:]])","end":"((?\u003c!\\\\)})","patterns":[{"include":"#lighttable"}],"beginCaptures":{"1":{"name":"punctuation.definition.list.begin.markdown.table.light.ocamldoc"}},"endCaptures":{"1":{"name":"punctuation.definition.list.begin.markdown.table.light.ocamldoc"}}},{"name":"markup.underline.link.ocamldoc meta.link.ocamldoc","begin":"(?\u003c!\\\\){({:.*?})","end":"(?\u003c!\\\\)\\}","patterns":[{"include":"#markup"}],"beginCaptures":{"1":{"name":"string.other.link.title.markdown.ocamldoc"}}},{"match":"(?\u003c!\\\\)({:.*?})","captures":{"1":{"name":"string.other.link.title.markdown.ocamldoc"}}},{"name":"markup.inline.raw.ocamldoc","begin":"(?\u003c!\\\\){\\%([[:space:]]|latex:)","end":"\\%}","patterns":[{"include":"text.tex.latex"}]},{"name":"markup.inline.raw.ocamldoc","begin":"(?\u003c!\\\\){\\%html:","end":"\\%}","patterns":[{"include":"text.html.basic"}]}]},"table":{"patterns":[{"begin":"((?\u003c!\\\\){tr[[:space:]])","end":"((?\u003c!\\\\)})","patterns":[{"include":"#tablerow"}],"beginCaptures":{"1":{"name":"punctuation.definition.list.begin.markdown.table.row.ocamldoc"}},"endCaptures":{"1":{"name":"punctuation.definition.list.begin.markdown.table.row.ocamldoc"}}}]},"tablerow":{"patterns":[{"begin":"((?\u003c!\\\\){td[[:space:]])","end":"((?\u003c!\\\\)})","patterns":[{"include":"#markup"}],"beginCaptures":{"1":{"name":"punctuation.definition.list.begin.markdown.table.cell.ocamldoc"}},"endCaptures":{"1":{"name":"punctuation.definition.list.begin.markdown.table.cell.ocamldoc"}}},{"contentName":"markup.bold.tableheader.ocamldoc","begin":"((?\u003c!\\\\){th[[:space:]])","end":"((?\u003c!\\\\)})","patterns":[{"include":"#markup"}],"beginCaptures":{"1":{"name":"punctuation.definition.list.begin.markdown.tableheader.ocamldoc"}},"endCaptures":{"1":{"name":"punctuation.definition.list.begin.markdown.tableheader.ocamldoc"}}}]}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"OCamlFormat","scopeName":"source.ocaml.ocamlformat","patterns":[{"include":"#comments"},{"include":"#options"},{"include":"#values"},{"name":"punctuation.separator.key-value.ocamlformat","match":"="}],"repository":{"comments":{"name":"comment.line.ocamlformat","begin":"#","end":"$"},"options":{"patterns":[{"name":"keyword.other.ocamlformat","match":"\\b(?\u003c!-)(align-cases|align-constructors-decl|align-variants-decl|assignment-operator)(?!-)\\b"},{"name":"keyword.other.ocamlformat","match":"\\b(?\u003c!-)(break-before-in|break-cases|break-collection-expressions|break-colon|break-fun-decl|break-fun-sig|break-infix|break-infix-before-func|break-separators|break-sequences|break-string-literals|break-struct)(?!-)\\b"},{"name":"keyword.other.ocamlformat","match":"\\b(?\u003c!-)(cases-exp-indent|cases-matching-exp-indent|check|comment-check)(?!-)\\b"},{"name":"keyword.other.ocamlformat","match":"\\b(?\u003c!-)(debug|disable|disable-conf-attrs|disable-conf-files|disable-outside-detected-project|disambiguate-non-breaking-match|doc|doc-comments|doc-comments-padding|doc-comments-tag-only|doc-comments-val|dock-collection-brackets)(?!-)\\b"},{"name":"keyword.other.ocamlformat","match":"\\b(?\u003c!-)(enable-outside-detected-project|escape-chars|escape-strings|exp-grouping|extension-indent|extension-sugar)(?!-)\\b"},{"name":"keyword.other.ocamlformat","match":"\\b(?\u003c!-)(field-space|function-indent|function-indent-nested)(?!-)\\b"},{"name":"keyword.other.ocamlformat","match":"\\b(?\u003c!-)(if-then-else|ignore-invalid-option|impl|indent-after-in|indicate-multiline-delimiters|indicate-nested-or-patterns|infix-precedence|inplace|intf)(?!-)\\b"},{"name":"keyword.other.ocamlformat","match":"\\b(?\u003c!-)(leading-nested-match-parens|let-and|let-binding-deindent-fun|let-binding-indent|let-binding-spacing|let-module|let-open|letop-punning|line-endings)(?!-)\\b"},{"name":"keyword.other.ocamlformat","match":"\\b(?\u003c!-)(margin|margin-check|match-indent|match-indent-nested|max-indent|max-iters|module-indent|module-item-spacing)(?!-)\\b"},{"name":"keyword.other.ocamlformat","match":"\\b(?\u003c!-)(name|nested-match|no-break-infix-before-func|no-break-sequences|no-comment-check|no-debug|no-disable|no-disable-conf-attrs|no-disambiguate-non-breaking-match|no-dock-collection-brackets|no-leading-nested-match-parens|no-let-binding-deindent-fun|no-margin-check|no-ocp-indent-compat|no-parens-ite|no-parse-docstrings|no-parse-toplevel-phrases|no-quiet|no-space-around-arrays|no-space-around-lists|no-space-around-records|no-space-around-variants|no-version-check|no-wrap-comments|no-wrap-fun-args)(?!-)\\b"},{"name":"keyword.other.ocamlformat","match":"\\b(?\u003c!-)(ocaml-version|ocp-indent-compat|ocp-indent-config|output)(?!-)\\b"},{"name":"keyword.other.ocamlformat","match":"\\b(?\u003c!-)(parens-ite|parens-tuple|parens-tuple-patterns|parse-docstrings|parse-toplevel-phrases|print-config|profile)(?!-)\\b"},{"name":"keyword.other.ocamlformat","match":"\\b(?\u003c!-)(sequence-blank-line|sequence-style|single-case|space-around-arrays|space-around-lists|space-around-records|space-around-variants|stritem-extension-indent)(?!-)\\b"},{"name":"keyword.other.ocamlformat","match":"\\b(?\u003c!-)(type-decl|type-decl-indent)(?!-)\\b"},{"name":"keyword.other.ocamlformat","match":"\\b(?\u003c!-)(wrap-comments|wrap-fun-args)(?!-)\\b"},{"name":"keyword.other.ocamlformat","match":"\\b(?\u003c!-)(quiet)(?!-)\\b"},{"name":"keyword.other.ocamlformat","match":"\\b(?\u003c!-)(repl-file|root)(?!-)\\b"},{"name":"keyword.other.ocamlformat","match":"\\b(?\u003c!-)(use-file)(?!-)\\b"},{"name":"keyword.other.ocamlformat","match":"\\b(?\u003c!-)(version|version-check)(?!-)\\b"}]},"values":{"patterns":[{"name":"string.other.ocamlformat","match":"\\b(true|false)\\b"},{"name":"constant.numeric.decimal.ocamlformat","match":"\\b([[:digit:]]+(\\.[[:digit:]]*)*)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(begin-line|end-line)(?!-)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(auto|fit-or-vertical)(?!-)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(all|fit|fit-or-vertical|nested|toplevel|vertical)(?!-)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(fit-or-vertical|wrap)(?!-)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(after|before)(?!-)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(fit-or-vertical|smart|wrap)(?!-)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(fit-or-vertical|wrap|wrap-or-vertical)(?!-)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(auto|never)(?!-)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(force|natural)(?!-)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(compact|normal)(?!-)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(after-when-possible|before|before-except-val)(?!-)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(default|fit)(?!-)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(parens|preserve)(?!-)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(loose|tight|tight-decl)(?!-)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(always|auto|never)(?!-)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(compact|fit-or-vertical|k-r|keyword-first|vertical)(?!-)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(closing-on-separate-line|no|space)(?!-)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(space|unsafe-no)(?!-)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(indent|parens)(?!-)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(compact|sparse)(?!-)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(compact|double-semicolon|sparse)(?!-)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(crlf|lf)(?!-)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(compact|preserve|sparse)(?!-)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(preserve|always|never)(?!-)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(align|wrap)(?!-)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(conventional|default|janestreet|ocamlformat)(?!-)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(always|multi-line-only)(?!-)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(always|multi-line-only)(?!-)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(compact|preserve-one)(?!-)\\b"},{"name":"string.other.ocamlformat","match":"\\b(?\u003c!-)(before|separator|terminator)(?!-)\\b"}]}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"OCamllex","scopeName":"source.ocaml.ocamllex","patterns":[{"include":"source.ocaml#comments"},{"include":"source.ocaml#strings"},{"include":"source.ocaml#characters"},{"include":"#rules"},{"include":"#keywords"},{"include":"#actions"},{"include":"#regex"},{"name":"invalid.illegal.unrecognized-character.ocamllex","match":"(’|‘|“|”)"}],"repository":{"actions":{"patterns":[{"begin":"{","end":"}","patterns":[{"include":"source.ocaml"}],"beginCaptures":{"0":{"name":"keyword.other.ocamllex"}},"endCaptures":{"0":{"name":"keyword.other.ocamllex"}}}]},"keywords":{"patterns":[{"name":"keyword.other.ocamllex","match":"\\b(let|as|rule|and|parse|shortest|refill)\\b(?!')"},{"name":"keyword.operator.symbol.ocamllex","match":"="}]},"regex":{"patterns":[{"name":"punctuation.character-set.ocamllex","match":"\\[|\\]"},{"name":"punctuation.group.ocamllex","match":"\\(|\\)"},{"name":"keyword.operator.ocamllex","match":"\\^|#|\\*|\\+|\\?|\\||-"},{"name":"constant.language.eof.ocamllex","match":"\\beof\\b"},{"name":"entity.name.type.reference.ocamllex","match":"\\b[[:alpha:]][[:word:]']*('|\\b)"}]},"rules":{"match":"\\b(rule|and)[[:space:]]+([[:lower:]][[:word:]']*('|\\b))","captures":{"1":{"name":"keyword.other.ocamllex"},"2":{"name":"entity.name.function.rule.ocamllex"}}}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"scopeName":"source.ocaml.opam-install","patterns":[{"name":"comment.line.opam-install","begin":"#","end":"$"},{"match":"^[[:space:]]*(lib|lib_root|libexec|libexec_root|bin|sbin|toplevel|share|share_root|etc|doc|stublibs|man|misc)[[:space:]]*(:)","captures":{"1":{"name":"entity.name.tag.opam-install"},"2":{"name":"keyword.operator.opam-install"}}},{"name":"string.quoted.double.opam-install","begin":"\"","end":"\""}]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"scopeName":"source.ocaml.opam","patterns":[{"include":"#comments"},{"include":"#fields"},{"include":"#values"}],"repository":{"comments":{"patterns":[{"name":"comment.block.opam","begin":"\\(\\*","end":"\\*\\)"},{"name":"comment.line.opam","begin":"#","end":"$"}]},"fields":{"match":"^([[:word:]-]*[[:alpha:]][[:word:]-]*)(:)","captures":{"1":{"name":"entity.name.tag.opam"},"2":{"name":"keyword.operator.opam"}}},"string-elements":{"patterns":[{"name":"constant.character.escape.opam","match":"\\\\\\\\"},{"name":"constant.character.escape.opam","match":"\\\\[\"ntbr\\n]"},{"name":"constant.character.escape.opam","match":"\\\\[[:digit:]]{3}"},{"name":"constant.character.escape.opam","match":"\\\\x[[:xdigit:]]{2}"},{"name":"constant.variable.opam","begin":"%\\{","end":"}\\%"},{"name":"invalid.illegal.unknown-escape.opam","match":"\\\\."}]},"values":{"patterns":[{"name":"constant.language.opam","match":"\\b(true|false)\\b"},{"name":"constant.numeric.decimal.opam","match":"(\\b|\\-?)[[:digit:]]+\\b"},{"name":"string.quoted.double.opam","begin":"\"","end":"\"","patterns":[{"include":"#string-elements"}]},{"name":"string.quoted.triple-double.opam","begin":"\"\"\"","end":"\"\"\"","patterns":[{"include":"#string-elements"}]},{"name":"keyword.operator.opam","match":"[!=\u003c\u003e\\|\u0026?:]+"},{"name":"variable.parameter.opam","match":"\\b([[:word:]+-]+)\\b"}]}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"openqasm","scopeName":"source.openqasm","patterns":[{"include":"#comments"},{"include":"#keywords"},{"include":"#operators"},{"include":"#types"},{"include":"#constants"},{"include":"#strings"},{"include":"#brackets"},{"include":"#variables"}],"repository":{"brackets":{"patterns":[{"name":"punctuation.bracket.openqasm","match":"[\\[\\]\\(\\)\\{\\}]"}]},"comments":{"patterns":[{"name":"comment.line.double-slash","match":"//.*$"},{"name":"comment.block","begin":"/\\*","end":"\\*/"}]},"constants":{"patterns":[{"name":"constant.language.openqasm","match":"\\b(true|false|theta|pi|θ|π|ℇ|τ|euler|tau|λ|lambda|φ|phi|@)\\b"},{"name":"constant.numeric.openqasm","match":"\\b[\\d_]*\\.?[\\d_](im|dt|ns|us|ms|s|)?\\b"}]},"keywords":{"patterns":[{"name":"keyword.control.openqasm"},{"name":"keyword.other.openqasm"}]},"operators":{"patterns":[{"name":"keyword.other.operator.openqasm","match":"\\b(=)|(!)|(\u003c)|(\u003e)|(\\+)|(-)|(\\*)|(\\*\\*)|(\\/)|(\\^)|(%)|(\\|)|(\\\u0026)|(\\\u0026\\\u0026)|(\\~)|(\\|\\|)|(\u003c\u003c)|(\u003e\u003e)"}]},"strings":{"name":"string.quoted.double.openqasm","begin":"\"","end":"\"","patterns":[{"name":"constant.character.escape.openqasm","match":"\\\\."}]},"types":{"patterns":[{"name":"storage.type.openqasm","match":"\\b(angle|bit|bool|complex|duration|float|int|stretch|uint|qreg|creg)(\\[[a-zA-Z_][a-zA-Z0-9_]*\\])?\\b"}]},"variables":{"patterns":[{"name":"variable.other.openqasm","match":"\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b"}]}}}
|
|
1
|
+
{"name":"openqasm","scopeName":"source.openqasm","patterns":[{"include":"#comments"},{"include":"#keywords"},{"include":"#operators"},{"include":"#types"},{"include":"#constants"},{"include":"#strings"},{"include":"#brackets"},{"include":"#variables"}],"repository":{"brackets":{"patterns":[{"name":"punctuation.bracket.openqasm","match":"[\\[\\]\\(\\)\\{\\}]"}]},"comments":{"patterns":[{"name":"comment.line.double-slash","match":"//.*$"},{"name":"comment.block","begin":"/\\*","end":"\\*/"}]},"constants":{"patterns":[{"name":"constant.language.openqasm","match":"\\b(true|false|theta|pi|θ|π|ℇ|τ|euler|tau|λ|lambda|φ|phi|@)\\b"},{"name":"constant.numeric.openqasm","match":"\\b[\\d_]*\\.?[\\d_](im|dt|ns|us|ms|s|)?\\b"}]},"keywords":{"patterns":[{"name":"keyword.control.openqasm","match":"(?\u003c!\\.)\\b(in|for|return|if|else|switch|while|break|continue)\\b(?!\\s*\\.)"},{"name":"keyword.other.openqasm","match":"(?\u003c!\\.)\\b(OPENQASM|include|qubit|reset|mutable|readonly|#dim|stretch|delay|barrier|box|input|output|int|float|bit|bool|uint|angle|complex|const|defcal|def|gate|array|duration|let|measure|pragma|defcalgrammar|cal|qreg|creg|extern|port|frame|waveform)\\b(?!\\s*\\.)"}]},"operators":{"patterns":[{"name":"keyword.other.operator.openqasm","match":"\\b(=)|(!)|(\u003c)|(\u003e)|(\\+)|(-)|(\\*)|(\\*\\*)|(\\/)|(\\^)|(%)|(\\|)|(\\\u0026)|(\\\u0026\\\u0026)|(\\~)|(\\|\\|)|(\u003c\u003c)|(\u003e\u003e)"}]},"strings":{"name":"string.quoted.double.openqasm","begin":"\"","end":"\"","patterns":[{"name":"constant.character.escape.openqasm","match":"\\\\."}]},"types":{"patterns":[{"name":"storage.type.openqasm","match":"\\b(angle|bit|bool|complex|duration|float|int|stretch|uint|qreg|creg)(\\[[a-zA-Z_][a-zA-Z0-9_]*\\])?\\b"}]},"variables":{"patterns":[{"name":"variable.other.openqasm","match":"\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b"}]}}}
|
data/grammars/source.opy.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"OverPy","scopeName":"source.opy","patterns":[{"include":"#comments"},{"include":"#multiline-comments"},{"include":"#macros"},{"include":"#fstrings"},{"include":"#strings"},{"include":"#apos-fstrings"},{"include":"#apos-strings"},{"include":"#string-modifiers"},{"include":"#labels"},{"include":"#keywords"},{"include":"#invalid"},{"include":"#numbers"},{"include":"#enums"},{"include":"#classes"},{"include":"#functions"}],"repository":{"apos-fstrings":{"name":"string.quoted.double.overpy","begin":"((?\u003c=f)|(?\u003c=f\\w)|(?\u003c=f\\w\\w))'","end":"'","patterns":[{"name":"constant.character.escape.overpy","match":"\\\\([\\\\\"'nrtzbf]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|\u0026\\w+;)"},{"name":"constant.character.escape.overpy","contentName":"meta.embedded.overpy","begin":"\\{","end":"[\\}']","patterns":[{"include":"$self"}]}]},"apos-strings":{"name":"string.quoted.double.overpy","begin":"'","end":"'","patterns":[{"name":"constant.character.escape.overpy","match":"(\\\\([\\\\\"'nrtzbf]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|\u0026\\w+;))|(\\{\\d*\\})"}]},"classes":{"patterns":[{"name":"variable","match":"\\b[A-Z][a-z_]\\w*\\b"}]},"comments":{"patterns":[{"name":"comment.line.number-sign","match":"#[^!].*$"}]},"enums":{"patterns":[{"name":"constant","match":"\\b[A-Z_\\d]+\\b"}]},"fstrings":{"name":"string.quoted.double.overpy","begin":"((?\u003c=f)|(?\u003c=f\\w)|(?\u003c=f\\w\\w))\"","end":"\"","patterns":[{"name":"constant.character.escape.overpy","match":"\\\\([\\\\\"'nrtzbf]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|\u0026\\w+;)"},{"name":"constant.character.escape.overpy","contentName":"meta.embedded.overpy","begin":"\\{","end":"[\\}\"]","patterns":[{"include":"$self"}]}]},"functions":{"patterns":[{"name":"entity","match":"\\b\\w+(?=\\()"}]},"invalid":{"patterns":[{"name":"invalid.illegal","match":"\\b(False|True|None|Null|class|finally|is|try|from|nonlocal|with|as|yield|assert|except|raise|disabled|import)\\b"}]},"keywords":{"patterns":[{"name":"keyword","match":"\\b(if|else|elif|do|while|for|return|continue|false|true|null|goto|lambda|pass|del|break|switch|case|default|def|rule|settings|globalvar|playervar|subroutine|unsigned|signed|int|float|bool|enum|const|macro|self)\\b"},{"name":"constant","match":"\\b(and|or|not|in)\\b|((\\+|\\-|\\*\\*|\\/|\\%|\\*|\u003c|\u003e)=?)|(\\=)|\\.|((min|max|\\!)\\=)"},{"name":"entity.name.tag","match":"\\b(eventPlayer|attacker|victim|eventDamage|eventHealing|eventWasCriticalHit|eventWasEnvironment|eventWasHealthPack|eventAbility|eventDirection|healee|healer|hostPlayer|localPlayer|loc|RULE_CONDITION|ruleCondition|RULE_START|__\\w+__|[A-Z]|[A-D][A-Z])\\b"},{"name":"markup.list","match":"\\@\\w+\\b"},{"name":"meta.diff.range","match":"(?\u003c=\\@Event )\\w+\\b"},{"name":"meta.diff.range","match":"(?\u003c=\\@Team )\\w+\\b"},{"name":"meta.diff.range","match":"(?\u003c=\\@Slot )\\w+\\b"},{"name":"meta.diff.range","match":"(?\u003c=\\@Hero )\\w+\\b"}]},"labels":{"patterns":[{"name":"
|
|
1
|
+
{"name":"OverPy","scopeName":"source.opy","patterns":[{"include":"#comments"},{"include":"#multiline-comments"},{"include":"#macros"},{"include":"#fstrings"},{"include":"#strings"},{"include":"#apos-fstrings"},{"include":"#apos-strings"},{"include":"#string-modifiers"},{"include":"#labels"},{"include":"#keywords"},{"include":"#invalid"},{"include":"#numbers"},{"include":"#enums"},{"include":"#classes"},{"include":"#functions"}],"repository":{"apos-fstrings":{"name":"string.quoted.double.overpy","begin":"((?\u003c=f)|(?\u003c=f\\w)|(?\u003c=f\\w\\w))'","end":"'","patterns":[{"name":"constant.character.escape.overpy","match":"\\\\([\\\\\"'nrtzbf]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|\u0026\\w+;)"},{"name":"constant.character.escape.overpy","contentName":"meta.embedded.overpy","begin":"\\{","end":"[\\}']","patterns":[{"include":"$self"}]}]},"apos-strings":{"name":"string.quoted.double.overpy","begin":"'","end":"'","patterns":[{"name":"constant.character.escape.overpy","match":"(\\\\([\\\\\"'nrtzbf]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|\u0026\\w+;))|(\\{\\d*\\})"}]},"classes":{"patterns":[{"name":"variable","match":"\\b[A-Z][a-z_]\\w*\\b"}]},"comments":{"patterns":[{"name":"comment.line.number-sign","match":"#[^!].*$"}]},"enums":{"patterns":[{"name":"constant","match":"\\b[A-Z_\\d]+\\b"}]},"fstrings":{"name":"string.quoted.double.overpy","begin":"((?\u003c=f)|(?\u003c=f\\w)|(?\u003c=f\\w\\w))\"","end":"\"","patterns":[{"name":"constant.character.escape.overpy","match":"\\\\([\\\\\"'nrtzbf]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|\u0026\\w+;)"},{"name":"constant.character.escape.overpy","contentName":"meta.embedded.overpy","begin":"\\{","end":"[\\}\"]","patterns":[{"include":"$self"}]}]},"functions":{"patterns":[{"name":"entity","match":"\\b\\w+(?=\\()"}]},"invalid":{"patterns":[{"name":"invalid.illegal","match":"\\b(False|True|None|Null|class|finally|is|try|from|nonlocal|with|as|yield|assert|except|raise|disabled|import)\\b"}]},"keywords":{"patterns":[{"name":"keyword","match":"\\b(if|else|elif|do|while|for|return|continue|false|true|null|goto|lambda|pass|del|break|switch|case|default|def|rule|settings|globalvar|playervar|subroutine|unsigned|signed|int|float|bool|enum|const|macro|self)\\b"},{"name":"constant","match":"\\b(and|or|not|in)\\b|((\\+|\\-|\\*\\*|\\/|\\%|\\*|\u003c|\u003e)=?)|(\\=)|\\.|((min|max|\\!)\\=)"},{"name":"entity.name.tag","match":"\\b(eventPlayer|attacker|victim|eventDamage|eventHealing|eventWasCriticalHit|eventWasEnvironment|eventWasHealthPack|eventAbility|eventDirection|healee|healer|hostPlayer|localPlayer|loc|RULE_CONDITION|ruleCondition|RULE_START|__\\w+__|[A-Z]|[A-D][A-Z])\\b"},{"name":"markup.list","match":"\\@\\w+\\b"},{"name":"meta.diff.range","match":"(?\u003c=\\@Event )\\w+\\b"},{"name":"meta.diff.range","match":"(?\u003c=\\@Team )\\w+\\b"},{"name":"meta.diff.range","match":"(?\u003c=\\@Slot )\\w+\\b"},{"name":"meta.diff.range","match":"(?\u003c=\\@Hero )\\w+\\b"}]},"labels":{"patterns":[{"name":"markup.italic","match":"^[ \\t]*(?!(do|else|elif|default)\\b)[A-Za-z\\d_]+(?=:)"},{"name":"markup.italic","match":"(?\u003c=goto )[A-Za-z\\d_]+"}]},"macros":{"name":"markup.heading","begin":"#!","end":"(?\u003c!\\\\)\\n"},"multiline-comments":{"name":"comment.line","begin":"\\/\\*","end":"\\*\\/"},"numbers":{"patterns":[{"name":"constant.numeric","match":"\\b[+-]?((\\d*\\.)?\\d+|0x[0-9a-fA-F]+)\\b"}]},"string-modifiers":{"patterns":[{"name":"entity.name.tag","match":"\\b[a-z]+(?=[\"'])"}]},"strings":{"name":"string.quoted.double.overpy","begin":"\"","end":"\"","patterns":[{"name":"constant.character.escape.overpy","match":"(\\\\([\\\\\"'nrtzbf]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|\u0026\\w+;))|(\\{\\d*\\})"}]}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"Paper Sizes","scopeName":"source.paperspecs","patterns":[{"include":"#main"}],"repository":{"comma":{"name":"keyword.operator.separator.comma.paperspecs","match":"(,)","captures":{"0":{"name":"punctuation.separator.delimiter.comma.paperspecs"},"1":{"name":"sublimelinter.gutter-mark"}}},"main":{"patterns":[{"name":"meta.config.size-name.paperspecs","begin":"(?x)\\A(?!\n\t# Ignore leading whitespace\n\t\\s*\n\n\t# Ignore comments\n\t(?!\\#)\n\n\t(?:\n\t\t# Modern CSV-based paperspecs(5) format\n\t\t(?:(?=\\S)[^,]+)?,\n\t\t|\n\n\t\t# Legacy paperspecs(5) format\n\t\t[^\\s,]+\n\t\t(?:\\s+(?:\\d+(?:\\.\\d+)?|\\.\\d+)){2}\n\t\t\\s+ [A-Za-z]+\n\t\t[ \\t]* $\n\t)\n)","end":"^\\s*(?:([^#\\s,][^,]*)|([^\\s#].*?))(?\u003c!\\s)[ \\t]*$","patterns":[{"include":"etc#comment"}],"endCaptures":{"1":{"name":"entity.name.tag.paper-size.paperspecs"},"2":{"name":"invalid.illegal.syntax.paperspecs"}}},{"name":"meta.config.size-list.paperspecs","begin":"\\A","end":"(?=A)B","patterns":[{"include":"#spec"}]}]},"pageHeight":{"patterns":[{"name":"constant.numeric.page-height.paperspecs","match":"(?:^|\\G)(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?=\\s*(?:$|,))"},{"name":"invalid.illegal.syntax.bad-number.page-height.paperspecs","match":"(?:^|\\G)[^\\s,][^,]*(?=\\s*(?:$|,))"}]},"pageWidth":{"patterns":[{"name":"constant.numeric.page-width.paperspecs","match":"(?:^|\\G)(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?=\\s*(?:$|,))"},{"name":"invalid.illegal.syntax.bad-number.page-width.paperspecs","match":"(?:^|\\G)[^\\s,][^,]*(?=\\s*(?:$|,))"}]},"spec":{"patterns":[{"include":"#specCSV"},{"include":"#specLegacy"}]},"specCSV":{"name":"meta.table.record.paperspecs","match":"(?x)^\n\\s* ([^\\s,][^,]*) (?\u003c!\\s) \\s* (,) # Name\n\\s* ([^\\s,]+) (?\u003c!\\s) \\s* (,) # Page width\n\\s* ([^\\s,]+) (?\u003c!\\s) \\s* (,) # Page height\n\\s* ([^\\s,]+) (?\u003c!\\s) [ \\t]* $ # Unit","captures":{"1":{"name":"entity.name.tag.paper-size.paperspecs"},"2":{"patterns":[{"include":"#comma"}]},"3":{"patterns":[{"include":"#pageWidth"}]},"4":{"patterns":[{"include":"#comma"}]},"5":{"patterns":[{"include":"#pageHeight"}]},"6":{"patterns":[{"include":"#comma"}]},"7":{"patterns":[{"include":"#units"}]}}},"specLegacy":{"name":"meta.table.record.legacy.paperspecs","match":"(?ix)^\n\\s* (\\S+) # Name\n\\s+ (\\d+(?:\\.\\d+)?|\\.\\d+) # Page width\n\\s+ (\\d+(?:\\.\\d+)?|\\.\\d+) # Page height\n\\s+ ([a-z]+) # Unit\n(?=\\s*$)","captures":{"1":{"name":"entity.name.tag.paper-size.paperspecs"},"2":{"patterns":[{"include":"#pageWidth"}]},"3":{"patterns":[{"include":"#pageHeight"}]},"4":{"patterns":[{"include":"#units"}]}}},"units":{"patterns":[{"name":"keyword.other.unit.${1:/downcase}.paperspecs","match":"(?i)(?:^|\\G)(pt|mm|in)(?=\\s*(?:$|,))"},{"name":"invalid.deprecated.unit.legacy.${1:/downcase}.paperspecs","match":"(?i)(?:^|\\G)(cm|ft|m)(?=\\s*(?:$|,))"},{"name":"invalid.illegal.syntax.unknown-unit.paperspecs","match":"[^\\s].*?"}]}}}
|