@shikijs/langs-precompiled 3.2.2 → 3.4.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.
- package/dist/abap.mjs +1 -1
- package/dist/actionscript-3.mjs +1 -1
- package/dist/ada.mjs +1 -1
- package/dist/angular-expression.mjs +1 -1
- package/dist/angular-html.mjs +1 -1
- package/dist/angular-inline-style.mjs +1 -1
- package/dist/angular-inline-template.mjs +1 -1
- package/dist/angular-let-declaration.mjs +1 -1
- package/dist/angular-template-blocks.mjs +1 -1
- package/dist/angular-ts.mjs +1 -1
- package/dist/apache.mjs +1 -1
- package/dist/apex.mjs +1 -1
- package/dist/apl.mjs +1 -1
- package/dist/applescript.mjs +1 -1
- package/dist/ara.mjs +1 -1
- package/dist/asciidoc.mjs +1 -1
- package/dist/asm.mjs +1 -1
- package/dist/astro.mjs +1 -1
- package/dist/awk.mjs +1 -1
- package/dist/ballerina.mjs +1 -1
- package/dist/bat.mjs +1 -1
- package/dist/beancount.mjs +1 -1
- package/dist/berry.mjs +1 -1
- package/dist/bibtex.mjs +1 -1
- package/dist/bicep.mjs +1 -1
- package/dist/blade.mjs +1 -1
- package/dist/bsl.mjs +1 -1
- package/dist/c.mjs +1 -1
- package/dist/cadence.mjs +1 -1
- package/dist/cairo.mjs +1 -1
- package/dist/clarity.mjs +1 -1
- package/dist/clojure.mjs +1 -1
- package/dist/cmake.mjs +1 -1
- package/dist/cobol.mjs +1 -1
- package/dist/codeql.mjs +1 -1
- package/dist/coffee.mjs +1 -1
- package/dist/common-lisp.mjs +1 -1
- package/dist/coq.mjs +1 -1
- package/dist/cpp-macro.mjs +1 -1
- package/dist/cpp.mjs +1 -1
- package/dist/crystal.mjs +1 -1
- package/dist/csharp.mjs +1 -1
- package/dist/css.mjs +1 -1
- package/dist/cue.mjs +1 -1
- package/dist/cypher.mjs +1 -1
- package/dist/d.mjs +1 -1
- package/dist/dart.mjs +1 -1
- package/dist/dax.mjs +1 -1
- package/dist/desktop.mjs +1 -1
- package/dist/diff.mjs +1 -1
- package/dist/dotenv.mjs +1 -1
- package/dist/dream-maker.mjs +1 -1
- package/dist/edge.mjs +1 -1
- package/dist/elixir.mjs +1 -1
- package/dist/elm.mjs +1 -1
- package/dist/emacs-lisp.mjs +1 -1
- package/dist/erb.mjs +1 -1
- package/dist/erlang.mjs +1 -1
- package/dist/es-tag-css.mjs +1 -1
- package/dist/es-tag-glsl.mjs +1 -1
- package/dist/es-tag-html.mjs +1 -1
- package/dist/es-tag-sql.mjs +1 -1
- package/dist/es-tag-xml.mjs +1 -1
- package/dist/fennel.mjs +1 -1
- package/dist/fish.mjs +1 -1
- package/dist/fluent.mjs +1 -1
- package/dist/fortran-fixed-form.mjs +1 -1
- package/dist/fortran-free-form.mjs +1 -1
- package/dist/fsharp.mjs +1 -1
- package/dist/gdresource.mjs +1 -1
- package/dist/gdscript.mjs +1 -1
- package/dist/gdshader.mjs +1 -1
- package/dist/genie.mjs +1 -1
- package/dist/gherkin.mjs +1 -1
- package/dist/gleam.mjs +1 -1
- package/dist/glimmer-js.mjs +1 -1
- package/dist/glimmer-ts.mjs +1 -1
- package/dist/glsl.mjs +1 -1
- package/dist/gnuplot.mjs +1 -1
- package/dist/go.mjs +1 -1
- package/dist/graphql.mjs +1 -1
- package/dist/groovy.mjs +1 -1
- package/dist/hack.mjs +1 -1
- package/dist/haml.mjs +1 -1
- package/dist/handlebars.mjs +1 -1
- package/dist/haskell.mjs +1 -1
- package/dist/haxe.mjs +1 -1
- package/dist/hcl.mjs +1 -1
- package/dist/hjson.mjs +1 -1
- package/dist/hlsl.mjs +1 -1
- package/dist/html-derivative.mjs +1 -1
- package/dist/html.mjs +1 -1
- package/dist/http.mjs +1 -1
- package/dist/hxml.mjs +1 -1
- package/dist/hy.mjs +1 -1
- package/dist/imba.mjs +1 -1
- package/dist/ini.mjs +1 -1
- package/dist/java.mjs +1 -1
- package/dist/javascript.mjs +1 -1
- package/dist/jinja.mjs +1 -1
- package/dist/jison.mjs +1 -1
- package/dist/json.mjs +1 -1
- package/dist/json5.mjs +1 -1
- package/dist/jsonc.mjs +1 -1
- package/dist/jsonl.mjs +1 -1
- package/dist/jsonnet.mjs +1 -1
- package/dist/jssm.mjs +1 -1
- package/dist/jsx.mjs +1 -1
- package/dist/julia.mjs +1 -1
- package/dist/kotlin.mjs +1 -1
- package/dist/kusto.mjs +1 -1
- package/dist/latex.mjs +1 -1
- package/dist/lean.mjs +1 -1
- package/dist/less.mjs +1 -1
- package/dist/liquid.mjs +1 -1
- package/dist/llvm.mjs +1 -1
- package/dist/log.mjs +1 -1
- package/dist/logo.mjs +1 -1
- package/dist/lua.mjs +1 -1
- package/dist/luau.mjs +1 -1
- package/dist/make.mjs +1 -1
- package/dist/markdown-vue.mjs +1 -1
- package/dist/markdown.mjs +1 -1
- package/dist/marko.mjs +1 -1
- package/dist/matlab.mjs +1 -1
- package/dist/mdc.mjs +1 -1
- package/dist/mdx.mjs +1 -1
- package/dist/mermaid.mjs +1 -1
- package/dist/mipsasm.mjs +1 -1
- package/dist/mojo.mjs +1 -1
- package/dist/move.mjs +1 -1
- package/dist/narrat.mjs +1 -1
- package/dist/nextflow.mjs +1 -1
- package/dist/nginx.mjs +1 -1
- package/dist/nim.mjs +1 -1
- package/dist/nix.mjs +1 -1
- package/dist/nushell.mjs +1 -1
- package/dist/objective-c.mjs +1 -1
- package/dist/objective-cpp.mjs +1 -1
- package/dist/ocaml.mjs +1 -1
- package/dist/pascal.mjs +1 -1
- package/dist/perl.mjs +1 -1
- package/dist/php.mjs +1 -1
- package/dist/plsql.mjs +1 -1
- package/dist/po.mjs +1 -1
- package/dist/polar.mjs +1 -1
- package/dist/postcss.mjs +1 -1
- package/dist/powerquery.mjs +1 -1
- package/dist/powershell.mjs +1 -1
- package/dist/prisma.mjs +1 -1
- package/dist/prolog.mjs +1 -1
- package/dist/proto.mjs +1 -1
- package/dist/pug.mjs +1 -1
- package/dist/puppet.mjs +1 -1
- package/dist/purescript.mjs +1 -1
- package/dist/python.mjs +1 -1
- package/dist/qml.mjs +1 -1
- package/dist/qss.mjs +1 -1
- package/dist/r.mjs +1 -1
- package/dist/racket.mjs +1 -1
- package/dist/raku.mjs +1 -1
- package/dist/razor.mjs +1 -1
- package/dist/reg.mjs +1 -1
- package/dist/regexp.mjs +1 -1
- package/dist/rel.mjs +1 -1
- package/dist/riscv.mjs +1 -1
- package/dist/rst.mjs +1 -1
- package/dist/ruby.mjs +1 -1
- package/dist/rust.mjs +1 -1
- package/dist/sas.mjs +1 -1
- package/dist/sass.mjs +1 -1
- package/dist/scala.mjs +1 -1
- package/dist/scheme.mjs +1 -1
- package/dist/scss.mjs +1 -1
- package/dist/sdbl.mjs +1 -1
- package/dist/shaderlab.mjs +1 -1
- package/dist/shellscript.mjs +1 -1
- package/dist/shellsession.mjs +1 -1
- package/dist/smalltalk.mjs +1 -3
- package/dist/solidity.mjs +1 -1
- package/dist/soy.mjs +1 -1
- package/dist/sparql.mjs +1 -1
- package/dist/splunk.mjs +1 -1
- package/dist/sql.mjs +1 -1
- package/dist/ssh-config.mjs +1 -1
- package/dist/stata.mjs +1 -1
- package/dist/stylus.mjs +1 -1
- package/dist/svelte.mjs +1 -1
- package/dist/system-verilog.mjs +1 -1
- package/dist/systemd.mjs +1 -1
- package/dist/talonscript.mjs +1 -1
- package/dist/tasl.mjs +1 -1
- package/dist/tcl.mjs +1 -1
- package/dist/templ.mjs +1 -1
- package/dist/terraform.mjs +1 -1
- package/dist/tex.mjs +1 -1
- package/dist/toml.mjs +1 -1
- package/dist/tsx.mjs +1 -1
- package/dist/turtle.mjs +1 -1
- package/dist/twig.mjs +1 -1
- package/dist/typescript.mjs +1 -1
- package/dist/typespec.mjs +1 -1
- package/dist/typst.mjs +1 -1
- package/dist/v.mjs +1 -1
- package/dist/vala.mjs +1 -1
- package/dist/vb.mjs +1 -1
- package/dist/verilog.mjs +1 -1
- package/dist/vhdl.mjs +1 -1
- package/dist/viml.mjs +1 -1
- package/dist/vue-html.mjs +1 -1
- package/dist/vue-sfc-style-variable-injection.mjs +1 -1
- package/dist/vue.mjs +3 -3
- package/dist/vyper.mjs +1 -1
- package/dist/wasm.mjs +1 -1
- package/dist/wenyan.mjs +1 -1
- package/dist/wgsl.mjs +1 -1
- package/dist/wikitext.mjs +1 -1
- package/dist/wit.mjs +1 -1
- package/dist/wolfram.mjs +1 -1
- package/dist/xml.mjs +1 -1
- package/dist/xsl.mjs +1 -1
- package/dist/yaml.mjs +1 -1
- package/dist/zenscript.mjs +1 -1
- package/dist/zig.mjs +1 -1
- package/package.json +4 -4
package/dist/liquid.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import css from './css.mjs'
|
|
|
3
3
|
import json from './json.mjs'
|
|
4
4
|
import javascript from './javascript.mjs'
|
|
5
5
|
|
|
6
|
-
const lang = Object.freeze({displayName:"Liquid",fileTypes:["liquid"],foldingStartMarker:/\{%-?\p{space}*(capture|case|comment|for|form|if|javascript|paginate|schema|style)[^\(\%\}\)]+%\}/dgv,foldingStopMarker:/\{%\p{space}*(end(?:capture|case|comment|for|form|if|javascript|paginate|schema|style))[^\(\%\}\)]+%\}/dgv,injections:{"L:meta.embedded.block.js, L:meta.embedded.block.css, L:meta.embedded.block.html, L:string.quoted":{patterns:[{include:"#injection"}]}},name:"liquid",patterns:[{include:"#core"}],repository:{attribute:{begin:/[\p{L}\p{M}\p{N}\p{Pc}]+:/dgv,beginCaptures:{"0":{name:"entity.other.attribute-name.liquid"}},end:/(?=,|%\}|\}\}|\|)/dgv,patterns:[{include:"#value_expression"}]},attribute_liquid:{begin:/[\p{L}\p{M}\p{N}\p{Pc}]+:/dgv,beginCaptures:{"0":{name:"entity.other.attribute-name.liquid"}},end:/(?=[\,\|])|(?=\n?$)/dgv,patterns:[{include:"#value_expression"}]},comment_block:{begin:/\{%-?\p{space}*comment\p{space}*-?%\}/dgv,end:/\{%-?\p{space}*endcomment\p{space}*-?%\}/dgv,name:"comment.block.liquid",patterns:[{include:"#comment_block"},{match:/([^\n](?!\{%-?\p{space}*(comment|endcomment)\p{space}*-?%\}))*[^\n]/dgv}]},core:{patterns:[{include:"#raw_tag"},{include:"#doc_tag"},{include:"#comment_block"},{include:"#style_codefence"},{include:"#stylesheet_codefence"},{include:"#json_codefence"},{include:"#javascript_codefence"},{include:"#object"},{include:"#tag"},{include:"text.html.basic"}]},doc_tag:{begin:/\{%-?\p{space}*(doc)\p{space}*-?%\}/dgv,beginCaptures:{"0":{name:"meta.tag.liquid"},"1":{name:"entity.name.tag.doc.liquid"}},contentName:"comment.block.documentation.liquid",end:/\{%-?\p{space}*(enddoc)\p{space}*-?%\}/dgv,endCaptures:{"0":{name:"meta.tag.liquid"},"1":{name:"entity.name.tag.doc.liquid"}},name:"meta.block.doc.liquid",patterns:[{include:"#liquid_doc_description_tag"},{include:"#liquid_doc_param_tag"},{include:"#liquid_doc_example_tag"},{include:"#liquid_doc_fallback_tag"}]},filter:{captures:{"1":{name:"support.function.liquid"}},match:/\|\p{space}*((?![\.0-9])[a-zA-Z0-9_\-]+:?)\p{space}*/dgv},injection:{patterns:[{include:"#raw_tag"},{include:"#comment_block"},{include:"#object"},{include:"#tag_injection"}]},invalid_range:{match:/\(([^\n](?!\.\.))+\)/dgv,name:"invalid.illegal.range.liquid"},javascript_codefence:{begin:/(\{%-?)\p{space}*(javascript)\p{space}*(-?%\})/dgv,beginCaptures:{"0":{name:"meta.tag.metadata.javascript.start.liquid"},"1":{name:"punctuation.definition.tag.begin.liquid"},"2":{name:"entity.name.tag.javascript.liquid"},"3":{name:"punctuation.definition.tag.begin.liquid"}},contentName:"meta.embedded.block.js",end:/(\{%-?)\p{space}*(endjavascript)\p{space}*(-?%\})/dgv,endCaptures:{"0":{name:"meta.tag.metadata.javascript.end.liquid"},"1":{name:"punctuation.definition.tag.end.liquid"},"2":{name:"entity.name.tag.javascript.liquid"},"3":{name:"punctuation.definition.tag.end.liquid"}},name:"meta.block.javascript.liquid",patterns:[{include:"source.js"}]},json_codefence:{begin:/(\{%-?)\p{space}*(schema)\p{space}*(-?%\})/dgv,beginCaptures:{"0":{name:"meta.tag.metadata.schema.start.liquid"},"1":{name:"punctuation.definition.tag.begin.liquid"},"2":{name:"entity.name.tag.schema.liquid"},"3":{name:"punctuation.definition.tag.begin.liquid"}},contentName:"meta.embedded.block.json",end:/(\{%-?)\p{space}*(endschema)\p{space}*(-?%\})/dgv,endCaptures:{"0":{name:"meta.tag.metadata.schema.end.liquid"},"1":{name:"punctuation.definition.tag.end.liquid"},"2":{name:"entity.name.tag.schema.liquid"},"3":{name:"punctuation.definition.tag.end.liquid"}},name:"meta.block.schema.liquid",patterns:[{include:"source.json"}]},language_constant:{match:/\b(false|true|nil|blank)\b|empty(?!\?)/dgv,name:"constant.language.liquid"},liquid_doc_description_tag:{begin:/(@description)\b\p{space}*/dgv,beginCaptures:{"0":{name:"comment.block.documentation.liquid"},"1":{name:"storage.type.class.liquid"}},end:/(?=@|\{%-?\p{space}*enddoc\p{space}*-?%\})/dgv,patterns:[{match:/[^\@]+/dgv,name:"string.quoted.single.liquid"}]},liquid_doc_example_tag:{begin:/(@example)\b\p{space}*/dgv,beginCaptures:{"0":{name:"comment.block.documentation.liquid"},"1":{name:"storage.type.class.liquid"}},contentName:"meta.embedded.block.liquid",end:/(?=@|\{%-?\p{space}*enddoc\p{space}*-?%\})/dgv,patterns:[{include:"#core"}]},liquid_doc_fallback_tag:{captures:{"1":{name:"comment.block.liquid"}},match:/(@[\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv},liquid_doc_param_tag:{captures:{"1":{name:"storage.type.class.liquid"},"2":{name:"entity.name.type.instance.liquid"},"3":{name:"variable.other.liquid"},"4":{name:"string.quoted.single.liquid"}},match:/(@param)\p{space}+(?:(\{[^\}]*\}?)\p{space}+)?(\[?[a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}\-]*\]?)?(?:\p{space}+([^\n]*))?/dgv},number:{match:/(([\-\+])\p{space}*)?[0-9]+(\.[0-9]+)?/dgv,name:"constant.numeric.liquid"},object:{begin:/(?<!comment %\})(?<!comment -%\})(?<!comment%\})(?<!comment-%\})(?<!raw %\})(?<!raw -%\})(?<!raw%\})(?<!raw-%\})\{\{-?/dgv,beginCaptures:{"0":{name:"punctuation.definition.tag.begin.liquid"}},end:/-?\}\}/dgv,endCaptures:{"0":{name:"punctuation.definition.tag.end.liquid"}},name:"meta.object.liquid",patterns:[{include:"#filter"},{include:"#attribute"},{include:"#value_expression"}]},operator:{captures:{"1":{name:"keyword.operator.expression.liquid"}},match:/(?:(?<=\p{space})|\b)(==|!=|[\>\<]|>=|<=|or|and|contains)(?:(?=\p{space})|\b)/dgv},range:{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.section.parens.begin.liquid"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.parens.end.liquid"}},name:"meta.range.liquid",patterns:[{match:/\.\./dgv,name:"punctuation.range.liquid"},{include:"#variable_lookup"},{include:"#number"}]},raw_tag:{begin:/\{%-?\p{space}*(raw)\p{space}*-?%\}/dgv,beginCaptures:{"1":{name:"entity.name.tag.liquid"}},contentName:"string.unquoted.liquid",end:/\{%-?\p{space}*(endraw)\p{space}*-?%\}/dgv,endCaptures:{"1":{name:"entity.name.tag.liquid"}},name:"meta.entity.tag.raw.liquid",patterns:[{match:/([^\n](?!\{%-?\p{space}*endraw\p{space}*-?%\}))*[^\n]/dgv}]},string:{patterns:[{include:"#string_single"},{include:"#string_double"}]},string_double:{begin:/"/dgv,end:/"/dgv,name:"string.quoted.double.liquid"},string_single:{begin:/'/dgv,end:/'/dgv,name:"string.quoted.single.liquid"},style_codefence:{begin:/(\{%-?)\p{space}*(style)\p{space}*(-?%\})/dgv,beginCaptures:{"0":{name:"meta.tag.metadata.style.start.liquid"},"1":{name:"punctuation.definition.tag.begin.liquid"},"2":{name:"entity.name.tag.style.liquid"},"3":{name:"punctuation.definition.tag.begin.liquid"}},contentName:"meta.embedded.block.css",end:/(\{%-?)\p{space}*(endstyle)\p{space}*(-?%\})/dgv,endCaptures:{"0":{name:"meta.tag.metadata.style.end.liquid"},"1":{name:"punctuation.definition.tag.end.liquid"},"2":{name:"entity.name.tag.style.liquid"},"3":{name:"punctuation.definition.tag.end.liquid"}},name:"meta.block.style.liquid",patterns:[{include:"source.css"}]},stylesheet_codefence:{begin:/(\{%-?)\p{space}*(stylesheet)\p{space}*(-?%\})/dgv,beginCaptures:{"0":{name:"meta.tag.metadata.style.start.liquid"},"1":{name:"punctuation.definition.tag.begin.liquid"},"2":{name:"entity.name.tag.style.liquid"},"3":{name:"punctuation.definition.tag.begin.liquid"}},contentName:"meta.embedded.block.css",end:/(\{%-?)\p{space}*(endstylesheet)\p{space}*(-?%\})/dgv,endCaptures:{"0":{name:"meta.tag.metadata.style.end.liquid"},"1":{name:"punctuation.definition.tag.end.liquid"},"2":{name:"entity.name.tag.style.liquid"},"3":{name:"punctuation.definition.tag.end.liquid"}},name:"meta.block.style.liquid",patterns:[{include:"source.css"}]},tag:{begin:/(?<!comment %\})(?<!comment -%\})(?<!comment%\})(?<!comment-%\})(?<!raw %\})(?<!raw -%\})(?<!raw%\})(?<!raw-%\})\{%-?/dgv,beginCaptures:{"0":{name:"punctuation.definition.tag.begin.liquid"}},end:/-?%\}/dgv,endCaptures:{"0":{name:"punctuation.definition.tag.end.liquid"}},name:"meta.tag.liquid",patterns:[{include:"#tag_body"}]},tag_assign:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(assign|echo)\b/dgv,beginCaptures:{"1":{name:"entity.name.tag.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.liquid",patterns:[{include:"#filter"},{include:"#attribute"},{include:"#value_expression"}]},tag_assign_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(assign|echo)\b/dgv,beginCaptures:{"1":{name:"entity.name.tag.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.liquid",patterns:[{include:"#filter"},{include:"#attribute_liquid"},{include:"#value_expression"}]},tag_body:{patterns:[{include:"#tag_liquid"},{include:"#tag_assign"},{include:"#tag_comment_inline"},{include:"#tag_case"},{include:"#tag_conditional"},{include:"#tag_for"},{include:"#tag_paginate"},{include:"#tag_render"},{include:"#tag_tablerow"},{include:"#tag_expression"}]},tag_case:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(case|when)\b/dgv,beginCaptures:{"1":{name:"keyword.control.case.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.case.liquid",patterns:[{include:"#value_expression"}]},tag_case_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(case|when)\b/dgv,beginCaptures:{"1":{name:"keyword.control.case.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.case.liquid",patterns:[{include:"#value_expression"}]},tag_comment_block_liquid:{begin:/^\p{space}*(comment)\b/dgv,end:/^\p{space}*(endcomment)\b/dgv,name:"comment.block.liquid",patterns:[{include:"#tag_comment_block_liquid"},{match:/^\p{space}*(?!(comment|endcomment))[^\n]*/dgv}]},tag_comment_inline:{begin:/#/dgv,end:/(?=%\})/dgv,name:"comment.line.number-sign.liquid"},tag_comment_inline_liquid:{begin:/^\p{space}*#[^\n]*/dgv,end:/(?=\n?$)/dgv,name:"comment.line.number-sign.liquid"},tag_conditional:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(if|elsif|unless)\b/dgv,beginCaptures:{"1":{name:"keyword.control.conditional.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.conditional.liquid",patterns:[{include:"#value_expression"}]},tag_conditional_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(if|elsif|unless)\b/dgv,beginCaptures:{"1":{name:"keyword.control.conditional.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.conditional.liquid",patterns:[{include:"#value_expression"}]},tag_expression:{patterns:[{include:"#tag_expression_without_arguments"},{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*([\p{L}\p{M}\p{N}\p{Pc}]+)/dgv,beginCaptures:{"1":{name:"entity.name.tag.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.liquid",patterns:[{include:"#value_expression"}]}]},tag_expression_liquid:{patterns:[{include:"#tag_expression_without_arguments"},{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*([\p{L}\p{M}\p{N}\p{Pc}]+)/dgv,beginCaptures:{"1":{name:"entity.name.tag.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.liquid",patterns:[{include:"#value_expression"}]}]},tag_expression_without_arguments:{patterns:[{captures:{"1":{name:"keyword.control.conditional.liquid"}},match:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(end(?:unless|if))\b/dgv},{captures:{"1":{name:"keyword.control.loop.liquid"}},match:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(end(?:for|tablerow|paginate))\b/dgv},{captures:{"1":{name:"keyword.control.case.liquid"}},match:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(endcase)\b/dgv},{captures:{"1":{name:"keyword.control.other.liquid"}},match:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(capture|case|comment|for|form|if|javascript|paginate|schema|style)\b/dgv},{captures:{"1":{name:"keyword.control.other.liquid"}},match:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(end(?:capture|case|comment|for|form|if|javascript|paginate|schema|style))\b/dgv},{captures:{"1":{name:"keyword.control.other.liquid"}},match:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(else|break|continue)\b/dgv}]},tag_for:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(for)\b/dgv,beginCaptures:{"1":{name:"keyword.control.for.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.for.liquid",patterns:[{include:"#tag_for_body"}]},tag_for_body:{patterns:[{match:/\b(in|reversed)\b/dgv,name:"keyword.control.liquid"},{match:/\b(offset|limit):/dgv,name:"keyword.control.liquid"},{include:"#value_expression"}]},tag_for_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(for)\b/dgv,beginCaptures:{"1":{name:"keyword.control.for.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.for.liquid",patterns:[{include:"#tag_for_body"}]},tag_injection:{begin:/(?<!comment %\})(?<!comment -%\})(?<!comment%\})(?<!comment-%\})(?<!raw %\})(?<!raw -%\})(?<!raw%\})(?<!raw-%\})\{%-?(?!-?\p{space}*(end(?:style|javascript|comment|raw)))/dgv,beginCaptures:{"0":{name:"punctuation.definition.tag.end.liquid"}},end:/-?%\}/dgv,endCaptures:{"0":{name:"punctuation.definition.tag.end.liquid"}},name:"meta.tag.liquid",patterns:[{include:"#tag_body"}]},tag_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(liquid)\b/dgv,beginCaptures:{"1":{name:"keyword.control.liquid.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.liquid.liquid",patterns:[{include:"#tag_comment_block_liquid"},{include:"#tag_comment_inline_liquid"},{include:"#tag_assign_liquid"},{include:"#tag_case_liquid"},{include:"#tag_conditional_liquid"},{include:"#tag_for_liquid"},{include:"#tag_paginate_liquid"},{include:"#tag_render_liquid"},{include:"#tag_tablerow_liquid"},{include:"#tag_expression_liquid"}]},tag_paginate:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(paginate)\b/dgv,beginCaptures:{"1":{name:"keyword.control.paginate.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.paginate.liquid",patterns:[{include:"#tag_paginate_body"}]},tag_paginate_body:{patterns:[{match:/\b(by)\b/dgv,name:"keyword.control.liquid"},{include:"#value_expression"}]},tag_paginate_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(paginate)\b/dgv,beginCaptures:{"1":{name:"keyword.control.paginate.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.paginate.liquid",patterns:[{include:"#tag_paginate_body"}]},tag_render:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(render)\b/dgv,beginCaptures:{"1":{name:"entity.name.tag.render.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.render.liquid",patterns:[{include:"#tag_render_special_keywords"},{include:"#attribute"},{include:"#value_expression"}]},tag_render_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(render)\b/dgv,beginCaptures:{"1":{name:"entity.name.tag.render.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.render.liquid",patterns:[{include:"#tag_render_special_keywords"},{include:"#attribute_liquid"},{include:"#value_expression"}]},tag_render_special_keywords:{match:/\b(with|as|for)\b/dgv,name:"keyword.control.other.liquid"},tag_tablerow:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(tablerow)\b/dgv,beginCaptures:{"1":{name:"keyword.control.tablerow.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.tablerow.liquid",patterns:[{include:"#tag_tablerow_body"}]},tag_tablerow_body:{patterns:[{match:/\b(in)\b/dgv,name:"keyword.control.liquid"},{match:/\b(cols|offset|limit):/dgv,name:"keyword.control.liquid"},{include:"#value_expression"}]},tag_tablerow_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(tablerow)\b/dgv,beginCaptures:{"1":{name:"keyword.control.tablerow.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.tablerow.liquid",patterns:[{include:"#tag_tablerow_body"}]},value_expression:{patterns:[{captures:{"2":{name:"invalid.illegal.filter.liquid"},"3":{name:"invalid.illegal.filter.liquid"}},match:/(\[)(\|)(?=[^\]]*)(?=\])/dgv},{match:/(?<=\p{space})([\+\-\/\*])(?=\p{space})/dgv,name:"invalid.illegal.filter.liquid"},{include:"#language_constant"},{include:"#operator"},{include:"#invalid_range"},{include:"#range"},{include:"#number"},{include:"#string"},{include:"#variable_lookup"}]},variable_lookup:{patterns:[{match:/\b(additional_checkout_buttons|address|all_country_option_tags|all_products|article|articles|block|blog|blogs|canonical_url|cart|checkout|collection|collections|comment|content_for_additional_checkout_buttons|content_for_header|content_for_index|content_for_layout|country_option_tags|currency|current_page|current_tags|customer|customer_address|discount_allocation|discount_application|external_video|font|forloop|form|fulfillment|gift_card|handle|image|images|line_item|link|linklist|linklists|location|localization|metafield|model|model_source|order|page|page_description|page_image|page_title|pages|paginate|part|policy|powered_by_link|predictive_search|product|product_option|product_variant|recommendations|request|routes|script|scripts|search|section|selling_plan|selling_plan_allocation|selling_plan_group|settings|shipping_method|shop|shop_locale|store_availability|tablerow|tax_line|template|theme|transaction|unit_price_measurement|variant|video|video_source)\b/dgv,name:"variable.language.liquid"},{match:/((?<=[\p{L}\p{M}\p{N}\p{Pc}]:\p{space})[\p{L}\p{M}\p{N}\p{Pc}]+)/dgv,name:"variable.parameter.liquid"},{begin:/(?<=[\p{L}\p{M}\p{N}\p{Pc}])\[/dgv,beginCaptures:{"0":{name:"punctuation.section.brackets.begin.liquid"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.section.brackets.end.liquid"}},name:"meta.brackets.liquid",patterns:[{include:"#string"}]},{match:/(?<=([\p{L}\p{M}\p{N}\p{Pc}\]])\.)([\-\p{L}\p{M}\p{N}\p{Pc}]+\??)/dgv,name:"variable.other.member.liquid"},{match:/(?<=[\p{L}\p{M}\p{N}\p{Pc}])\.(?=[\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"punctuation.accessor.liquid"},{match:/[a-z_]([\p{L}\p{M}\p{N}\p{Pc}]|-(?!\}\}))*/dgiv,name:"variable.other.liquid"}]}},scopeName:"text.html.liquid",embeddedLangs:["html","css","json","javascript"],aliases:undefined})
|
|
6
|
+
const lang = Object.freeze({displayName:"Liquid",fileTypes:["liquid"],foldingStartMarker:/\{%-?\p{space}*(capture|case|comment|form??|if|javascript|paginate|schema|style)[^\%\(\)\}]+%\}/dgv,foldingStopMarker:/\{%\p{space}*(end(?:capture|case|comment|form??|if|javascript|paginate|schema|style))[^\%\(\)\}]+%\}/dgv,injections:{"L:meta.embedded.block.js, L:meta.embedded.block.css, L:meta.embedded.block.html, L:string.quoted":{patterns:[{include:"#injection"}]}},name:"liquid",patterns:[{include:"#core"}],repository:{attribute:{begin:/[\p{L}\p{M}\p{N}\p{Pc}]+:/dgv,beginCaptures:{"0":{name:"entity.other.attribute-name.liquid"}},end:/(?=,|%\}|\}\}|\|)/dgv,patterns:[{include:"#value_expression"}]},attribute_liquid:{begin:/[\p{L}\p{M}\p{N}\p{Pc}]+:/dgv,beginCaptures:{"0":{name:"entity.other.attribute-name.liquid"}},end:/(?=[\,\|])|(?=\n?$)/dgv,patterns:[{include:"#value_expression"}]},comment_block:{begin:/\{%-?\p{space}*comment\p{space}*-?%\}/dgv,end:/\{%-?\p{space}*endcomment\p{space}*-?%\}/dgv,name:"comment.block.liquid",patterns:[{include:"#comment_block"},{match:/([^\n](?!\{%-?\p{space}*((?:|end)comment)\p{space}*-?%\}))*[^\n]/dgv}]},core:{patterns:[{include:"#raw_tag"},{include:"#doc_tag"},{include:"#comment_block"},{include:"#style_codefence"},{include:"#stylesheet_codefence"},{include:"#json_codefence"},{include:"#javascript_codefence"},{include:"#object"},{include:"#tag"},{include:"text.html.basic"}]},doc_tag:{begin:/\{%-?\p{space}*(doc)\p{space}*-?%\}/dgv,beginCaptures:{"0":{name:"meta.tag.liquid"},"1":{name:"entity.name.tag.doc.liquid"}},contentName:"comment.block.documentation.liquid",end:/\{%-?\p{space}*(enddoc)\p{space}*-?%\}/dgv,endCaptures:{"0":{name:"meta.tag.liquid"},"1":{name:"entity.name.tag.doc.liquid"}},name:"meta.block.doc.liquid",patterns:[{include:"#liquid_doc_description_tag"},{include:"#liquid_doc_param_tag"},{include:"#liquid_doc_example_tag"},{include:"#liquid_doc_fallback_tag"}]},filter:{captures:{"1":{name:"support.function.liquid"}},match:/\|\p{space}*((?![\.0-9])[\-0-9A-Z_a-z]+:?)\p{space}*/dgv},injection:{patterns:[{include:"#raw_tag"},{include:"#comment_block"},{include:"#object"},{include:"#tag_injection"}]},invalid_range:{match:/\(([^\n](?!\.\.))+\)/dgv,name:"invalid.illegal.range.liquid"},javascript_codefence:{begin:/(\{%-?)\p{space}*(javascript)\p{space}*(-?%\})/dgv,beginCaptures:{"0":{name:"meta.tag.metadata.javascript.start.liquid"},"1":{name:"punctuation.definition.tag.begin.liquid"},"2":{name:"entity.name.tag.javascript.liquid"},"3":{name:"punctuation.definition.tag.begin.liquid"}},contentName:"meta.embedded.block.js",end:/(\{%-?)\p{space}*(endjavascript)\p{space}*(-?%\})/dgv,endCaptures:{"0":{name:"meta.tag.metadata.javascript.end.liquid"},"1":{name:"punctuation.definition.tag.end.liquid"},"2":{name:"entity.name.tag.javascript.liquid"},"3":{name:"punctuation.definition.tag.end.liquid"}},name:"meta.block.javascript.liquid",patterns:[{include:"source.js"}]},json_codefence:{begin:/(\{%-?)\p{space}*(schema)\p{space}*(-?%\})/dgv,beginCaptures:{"0":{name:"meta.tag.metadata.schema.start.liquid"},"1":{name:"punctuation.definition.tag.begin.liquid"},"2":{name:"entity.name.tag.schema.liquid"},"3":{name:"punctuation.definition.tag.begin.liquid"}},contentName:"meta.embedded.block.json",end:/(\{%-?)\p{space}*(endschema)\p{space}*(-?%\})/dgv,endCaptures:{"0":{name:"meta.tag.metadata.schema.end.liquid"},"1":{name:"punctuation.definition.tag.end.liquid"},"2":{name:"entity.name.tag.schema.liquid"},"3":{name:"punctuation.definition.tag.end.liquid"}},name:"meta.block.schema.liquid",patterns:[{include:"source.json"}]},language_constant:{match:/\b(false|true|nil|blank)\b|empty(?!\?)/dgv,name:"constant.language.liquid"},liquid_doc_description_tag:{begin:/(@description)\b\p{space}*/dgv,beginCaptures:{"0":{name:"comment.block.documentation.liquid"},"1":{name:"storage.type.class.liquid"}},end:/(?=@|\{%-?\p{space}*enddoc\p{space}*-?%\})/dgv,patterns:[{match:/[^\@]+/dgv,name:"string.quoted.single.liquid"}]},liquid_doc_example_tag:{begin:/(@example)\b\p{space}*/dgv,beginCaptures:{"0":{name:"comment.block.documentation.liquid"},"1":{name:"storage.type.class.liquid"}},contentName:"meta.embedded.block.liquid",end:/(?=@|\{%-?\p{space}*enddoc\p{space}*-?%\})/dgv,patterns:[{include:"#core"}]},liquid_doc_fallback_tag:{captures:{"1":{name:"comment.block.liquid"}},match:/(@[\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv},liquid_doc_param_tag:{captures:{"1":{name:"storage.type.class.liquid"},"2":{name:"entity.name.type.instance.liquid"},"3":{name:"variable.other.liquid"},"4":{name:"string.quoted.single.liquid"}},match:/(@param)\p{space}+(?:(\{[^\}]*\}?)\p{space}+)?(\[?[A-Z_a-z][\-\p{L}\p{M}\p{N}\p{Pc}]*\]?)?(?:\p{space}+([^\n]*))?/dgv},number:{match:/(([\-\+])\p{space}*)?[0-9]+(\.[0-9]+)?/dgv,name:"constant.numeric.liquid"},object:{begin:/(?<!comment %\})(?<!comment -%\})(?<!comment%\})(?<!comment-%\})(?<!raw %\})(?<!raw -%\})(?<!raw%\})(?<!raw-%\})\{\{-?/dgv,beginCaptures:{"0":{name:"punctuation.definition.tag.begin.liquid"}},end:/-?\}\}/dgv,endCaptures:{"0":{name:"punctuation.definition.tag.end.liquid"}},name:"meta.object.liquid",patterns:[{include:"#filter"},{include:"#attribute"},{include:"#value_expression"}]},operator:{captures:{"1":{name:"keyword.operator.expression.liquid"}},match:/(?:(?<=\p{space})|\b)(==|!=|[\<\>]|>=|<=|or|and|contains)(?:(?=\p{space})|\b)/dgv},range:{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.section.parens.begin.liquid"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.parens.end.liquid"}},name:"meta.range.liquid",patterns:[{match:/\.\./dgv,name:"punctuation.range.liquid"},{include:"#variable_lookup"},{include:"#number"}]},raw_tag:{begin:/\{%-?\p{space}*(raw)\p{space}*-?%\}/dgv,beginCaptures:{"1":{name:"entity.name.tag.liquid"}},contentName:"string.unquoted.liquid",end:/\{%-?\p{space}*(endraw)\p{space}*-?%\}/dgv,endCaptures:{"1":{name:"entity.name.tag.liquid"}},name:"meta.entity.tag.raw.liquid",patterns:[{match:/([^\n](?!\{%-?\p{space}*endraw\p{space}*-?%\}))*[^\n]/dgv}]},string:{patterns:[{include:"#string_single"},{include:"#string_double"}]},string_double:{begin:/"/dgv,end:/"/dgv,name:"string.quoted.double.liquid"},string_single:{begin:/'/dgv,end:/'/dgv,name:"string.quoted.single.liquid"},style_codefence:{begin:/(\{%-?)\p{space}*(style)\p{space}*(-?%\})/dgv,beginCaptures:{"0":{name:"meta.tag.metadata.style.start.liquid"},"1":{name:"punctuation.definition.tag.begin.liquid"},"2":{name:"entity.name.tag.style.liquid"},"3":{name:"punctuation.definition.tag.begin.liquid"}},contentName:"meta.embedded.block.css",end:/(\{%-?)\p{space}*(endstyle)\p{space}*(-?%\})/dgv,endCaptures:{"0":{name:"meta.tag.metadata.style.end.liquid"},"1":{name:"punctuation.definition.tag.end.liquid"},"2":{name:"entity.name.tag.style.liquid"},"3":{name:"punctuation.definition.tag.end.liquid"}},name:"meta.block.style.liquid",patterns:[{include:"source.css"}]},stylesheet_codefence:{begin:/(\{%-?)\p{space}*(stylesheet)\p{space}*(-?%\})/dgv,beginCaptures:{"0":{name:"meta.tag.metadata.style.start.liquid"},"1":{name:"punctuation.definition.tag.begin.liquid"},"2":{name:"entity.name.tag.style.liquid"},"3":{name:"punctuation.definition.tag.begin.liquid"}},contentName:"meta.embedded.block.css",end:/(\{%-?)\p{space}*(endstylesheet)\p{space}*(-?%\})/dgv,endCaptures:{"0":{name:"meta.tag.metadata.style.end.liquid"},"1":{name:"punctuation.definition.tag.end.liquid"},"2":{name:"entity.name.tag.style.liquid"},"3":{name:"punctuation.definition.tag.end.liquid"}},name:"meta.block.style.liquid",patterns:[{include:"source.css"}]},tag:{begin:/(?<!comment %\})(?<!comment -%\})(?<!comment%\})(?<!comment-%\})(?<!raw %\})(?<!raw -%\})(?<!raw%\})(?<!raw-%\})\{%-?/dgv,beginCaptures:{"0":{name:"punctuation.definition.tag.begin.liquid"}},end:/-?%\}/dgv,endCaptures:{"0":{name:"punctuation.definition.tag.end.liquid"}},name:"meta.tag.liquid",patterns:[{include:"#tag_body"}]},tag_assign:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(assign|echo)\b/dgv,beginCaptures:{"1":{name:"entity.name.tag.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.liquid",patterns:[{include:"#filter"},{include:"#attribute"},{include:"#value_expression"}]},tag_assign_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(assign|echo)\b/dgv,beginCaptures:{"1":{name:"entity.name.tag.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.liquid",patterns:[{include:"#filter"},{include:"#attribute_liquid"},{include:"#value_expression"}]},tag_body:{patterns:[{include:"#tag_liquid"},{include:"#tag_assign"},{include:"#tag_comment_inline"},{include:"#tag_case"},{include:"#tag_conditional"},{include:"#tag_for"},{include:"#tag_paginate"},{include:"#tag_render"},{include:"#tag_tablerow"},{include:"#tag_expression"}]},tag_case:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(case|when)\b/dgv,beginCaptures:{"1":{name:"keyword.control.case.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.case.liquid",patterns:[{include:"#value_expression"}]},tag_case_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(case|when)\b/dgv,beginCaptures:{"1":{name:"keyword.control.case.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.case.liquid",patterns:[{include:"#value_expression"}]},tag_comment_block_liquid:{begin:/^\p{space}*(comment)\b/dgv,end:/^\p{space}*(endcomment)\b/dgv,name:"comment.block.liquid",patterns:[{include:"#tag_comment_block_liquid"},{match:/^\p{space}*(?!((?:|end)comment))[^\n]*/dgv}]},tag_comment_inline:{begin:/#/dgv,end:/(?=%\})/dgv,name:"comment.line.number-sign.liquid"},tag_comment_inline_liquid:{begin:/^\p{space}*#[^\n]*/dgv,end:/(?=\n?$)/dgv,name:"comment.line.number-sign.liquid"},tag_conditional:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(if|elsif|unless)\b/dgv,beginCaptures:{"1":{name:"keyword.control.conditional.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.conditional.liquid",patterns:[{include:"#value_expression"}]},tag_conditional_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(if|elsif|unless)\b/dgv,beginCaptures:{"1":{name:"keyword.control.conditional.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.conditional.liquid",patterns:[{include:"#value_expression"}]},tag_expression:{patterns:[{include:"#tag_expression_without_arguments"},{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*([\p{L}\p{M}\p{N}\p{Pc}]+)/dgv,beginCaptures:{"1":{name:"entity.name.tag.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.liquid",patterns:[{include:"#value_expression"}]}]},tag_expression_liquid:{patterns:[{include:"#tag_expression_without_arguments"},{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*([\p{L}\p{M}\p{N}\p{Pc}]+)/dgv,beginCaptures:{"1":{name:"entity.name.tag.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.liquid",patterns:[{include:"#value_expression"}]}]},tag_expression_without_arguments:{patterns:[{captures:{"1":{name:"keyword.control.conditional.liquid"}},match:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(end(?:unless|if))\b/dgv},{captures:{"1":{name:"keyword.control.loop.liquid"}},match:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(end(?:for|tablerow|paginate))\b/dgv},{captures:{"1":{name:"keyword.control.case.liquid"}},match:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(endcase)\b/dgv},{captures:{"1":{name:"keyword.control.other.liquid"}},match:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(capture|case|comment|form??|if|javascript|paginate|schema|style)\b/dgv},{captures:{"1":{name:"keyword.control.other.liquid"}},match:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(end(?:capture|case|comment|form??|if|javascript|paginate|schema|style))\b/dgv},{captures:{"1":{name:"keyword.control.other.liquid"}},match:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(else|break|continue)\b/dgv}]},tag_for:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(for)\b/dgv,beginCaptures:{"1":{name:"keyword.control.for.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.for.liquid",patterns:[{include:"#tag_for_body"}]},tag_for_body:{patterns:[{match:/\b(in|reversed)\b/dgv,name:"keyword.control.liquid"},{match:/\b(offset|limit):/dgv,name:"keyword.control.liquid"},{include:"#value_expression"}]},tag_for_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(for)\b/dgv,beginCaptures:{"1":{name:"keyword.control.for.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.for.liquid",patterns:[{include:"#tag_for_body"}]},tag_injection:{begin:/(?<!comment %\})(?<!comment -%\})(?<!comment%\})(?<!comment-%\})(?<!raw %\})(?<!raw -%\})(?<!raw%\})(?<!raw-%\})\{%-?(?!-?\p{space}*(end(?:style|javascript|comment|raw)))/dgv,beginCaptures:{"0":{name:"punctuation.definition.tag.end.liquid"}},end:/-?%\}/dgv,endCaptures:{"0":{name:"punctuation.definition.tag.end.liquid"}},name:"meta.tag.liquid",patterns:[{include:"#tag_body"}]},tag_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(liquid)\b/dgv,beginCaptures:{"1":{name:"keyword.control.liquid.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.liquid.liquid",patterns:[{include:"#tag_comment_block_liquid"},{include:"#tag_comment_inline_liquid"},{include:"#tag_assign_liquid"},{include:"#tag_case_liquid"},{include:"#tag_conditional_liquid"},{include:"#tag_for_liquid"},{include:"#tag_paginate_liquid"},{include:"#tag_render_liquid"},{include:"#tag_tablerow_liquid"},{include:"#tag_expression_liquid"}]},tag_paginate:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(paginate)\b/dgv,beginCaptures:{"1":{name:"keyword.control.paginate.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.paginate.liquid",patterns:[{include:"#tag_paginate_body"}]},tag_paginate_body:{patterns:[{match:/\b(by)\b/dgv,name:"keyword.control.liquid"},{include:"#value_expression"}]},tag_paginate_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(paginate)\b/dgv,beginCaptures:{"1":{name:"keyword.control.paginate.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.paginate.liquid",patterns:[{include:"#tag_paginate_body"}]},tag_render:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(render)\b/dgv,beginCaptures:{"1":{name:"entity.name.tag.render.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.render.liquid",patterns:[{include:"#tag_render_special_keywords"},{include:"#attribute"},{include:"#value_expression"}]},tag_render_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(render)\b/dgv,beginCaptures:{"1":{name:"entity.name.tag.render.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.render.liquid",patterns:[{include:"#tag_render_special_keywords"},{include:"#attribute_liquid"},{include:"#value_expression"}]},tag_render_special_keywords:{match:/\b(with|as|for)\b/dgv,name:"keyword.control.other.liquid"},tag_tablerow:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(tablerow)\b/dgv,beginCaptures:{"1":{name:"keyword.control.tablerow.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.tablerow.liquid",patterns:[{include:"#tag_tablerow_body"}]},tag_tablerow_body:{patterns:[{match:/\b(in)\b/dgv,name:"keyword.control.liquid"},{match:/\b(cols|offset|limit):/dgv,name:"keyword.control.liquid"},{include:"#value_expression"}]},tag_tablerow_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(tablerow)\b/dgv,beginCaptures:{"1":{name:"keyword.control.tablerow.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.tablerow.liquid",patterns:[{include:"#tag_tablerow_body"}]},value_expression:{patterns:[{captures:{"2":{name:"invalid.illegal.filter.liquid"},"3":{name:"invalid.illegal.filter.liquid"}},match:/(\[)(\|)(?=[^\]]*)(?=\])/dgv},{match:/(?<=\p{space})([\-\*\+\/])(?=\p{space})/dgv,name:"invalid.illegal.filter.liquid"},{include:"#language_constant"},{include:"#operator"},{include:"#invalid_range"},{include:"#range"},{include:"#number"},{include:"#string"},{include:"#variable_lookup"}]},variable_lookup:{patterns:[{match:/\b(additional_checkout_buttons|address|all_country_option_tags|all_products|articles??|block|blogs??|canonical_url|cart|checkout|collections??|comment|content_for_additional_checkout_buttons|content_for_header|content_for_index|content_for_layout|country_option_tags|currency|current_page|current_tags|customer|customer_address|discount_allocation|discount_application|external_video|font|forloop|form|fulfillment|gift_card|handle|images??|line_item|link|linklists??|location|localization|metafield|model|model_source|order|page|page_description|page_image|page_title|pages|paginate|part|policy|powered_by_link|predictive_search|product|product_option|product_variant|recommendations|request|routes|scripts??|search|section|selling_plan|selling_plan_allocation|selling_plan_group|settings|shipping_method|shop|shop_locale|store_availability|tablerow|tax_line|template|theme|transaction|unit_price_measurement|variant|video|video_source)\b/dgv,name:"variable.language.liquid"},{match:/((?<=[\p{L}\p{M}\p{N}\p{Pc}]:\p{space})[\p{L}\p{M}\p{N}\p{Pc}]+)/dgv,name:"variable.parameter.liquid"},{begin:/(?<=[\p{L}\p{M}\p{N}\p{Pc}])\[/dgv,beginCaptures:{"0":{name:"punctuation.section.brackets.begin.liquid"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.section.brackets.end.liquid"}},name:"meta.brackets.liquid",patterns:[{include:"#string"}]},{match:/(?<=([\]\p{L}\p{M}\p{N}\p{Pc}])\.)([\-\p{L}\p{M}\p{N}\p{Pc}]+\??)/dgv,name:"variable.other.member.liquid"},{match:/(?<=[\p{L}\p{M}\p{N}\p{Pc}])\.(?=[\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"punctuation.accessor.liquid"},{match:/[_a-z]([\p{L}\p{M}\p{N}\p{Pc}]|-(?!\}\}))*/dgiv,name:"variable.other.liquid"}]}},scopeName:"text.html.liquid",embeddedLangs:["html","css","json","javascript"],aliases:undefined})
|
|
7
7
|
|
|
8
8
|
export default [
|
|
9
9
|
...html,
|
package/dist/llvm.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const lang = Object.freeze({displayName:"LLVM IR",name:"llvm",patterns:[{match:/\b(?:void\b|half\b|bfloat\b|float\b|double\b|x86_fp80\b|fp128\b|ppc_fp128\b|label\b|metadata\b|x86_mmx\b|x86_amx\b|type\b|label\b|opaque\b|token\b|i\p{Nd}+\**)/dgv,name:"storage.type.llvm"},{captures:{"1":{name:"storage.type.llvm"}},match:/!([
|
|
1
|
+
const lang = Object.freeze({displayName:"LLVM IR",name:"llvm",patterns:[{match:/\b(?:void\b|half\b|bfloat\b|float\b|double\b|x86_fp80\b|fp128\b|ppc_fp128\b|label\b|metadata\b|x86_mmx\b|x86_amx\b|type\b|label\b|opaque\b|token\b|i\p{Nd}+\**)/dgv,name:"storage.type.llvm"},{captures:{"1":{name:"storage.type.llvm"}},match:/!([A-Za-z]+)\p{space}*\(/dgv},{match:/(?:(?<=\p{space}|^)#dbg_(assign|declare|label|value)|\badd|\baddrspacecast|\balloca|\band|\barcp|\bashr|\batomicrmw|\bbitcast|\bbr|\bcatchpad|\bcatchswitch|\bcatchret|\bcall|\bcallbr|\bcleanuppad|\bcleanupret|\bcmpxchg|\beq|\bexact|\bextractelement|\bextractvalue|\bfadd|\bfast|\bfcmp|\bfdiv|\bfence|\bfmul|\bfpext|\bfptosi|\bfptoui|\bfptrunc|\bfree|\bfrem|\bfreeze|\bfsub|\bfneg|\bgetelementptr|\bicmp|\binbounds|\bindirectbr|\binsertelement|\binsertvalue|\binttoptr|\binvoke|\blandingpad|\bload|\blshr|\bmalloc|\bmax|\bmin|\bmul|\bnand|\bne|\bninf|\bnnan|\bnsw|\bnsz|\bnuw|\boeq|\boge|\bogt|\bole|\bolt|\bone|\bord??|\bphi|\bptrtoint|\bresume|\bret|\bsdiv|\bselect|\bsext|\bsge|\bsgt|\bshl|\bshufflevector|\bsitofp|\bsle|\bslt|\bsrem|\bstore|\bsub|\bswitch|\btrunc|\budiv|\bueq|\buge|\bugt|\buitofp|\bule|\bult|\bumax|\bumin|\bune|\buno|\bunreachable|\bunwind|\burem|\bva_arg|\bxchg|\bxor|\bzext)\b/dgv,name:"keyword.instruction.llvm"},{match:/\b(?:acq_rel|acquire|addrspace|alias|align|alignstack|allocsize|alwaysinline|appending|argmemonly|arm_aapcs_vfpcc|arm_aapcscc|arm_apcscc|asm|atomic|available_externally|blockaddress|builtin|byref|byval|c|caller|catch|ccc??|cleanup|cold|coldcc|comdat|common|constant|convergent|datalayout|declare|default|define|deplibs|dereferenceable|dereferenceable_or_null|distinct|dllexport|dllimport|dso_local|dso_preemptable|except|extern_weak|external|externally_initialized|fastcc|filter|from|gc|global|hhvm_ccc|hhvmcc|hidden|hot|immarg|inaccessiblemem_or_argmemonly|inaccessiblememonly|inalloc|initialexec|inlinehint|inreg|intel_ocl_bicc|inteldialect|internal|jumptable|linkonce|linkonce_odr|local_unnamed_addr|localdynamic|localexec|minsize|module|monotonic|msp430_intrcc|mustprogress|musttail|naked|nest|noalias|nobuiltin|nocallback|nocapture|nocf_check|noduplicate|nofree|noimplicitfloat|noinline|nomerge|nonlazybind|nonnull|noprofile|norecurse|noredzone|noreturn|nosync|noundef|nounwind|nosanitize_bounds|nosanitize_coverage|null_pointer_is_valid|optforfuzzing|optnone|optsize|personality|preallocated|private|protected|ptx_device|ptx_kernel|readnone|readonly|release|returned|returns_twice|safestack|sanitize_address|sanitize_hwaddress|sanitize_memory|sanitize_memtag|sanitize_thread|section|seq_cst|shadowcallstack|sideeffect|signext|source_filename|speculatable|speculative_load_hardening|spir_func|spir_kernel|sret|ssp|sspreq|sspstrong|strictfp|swiftcc|swifterror|swiftself|syncscope|tail|tailcc|target|thread_local|to|triple|unnamed_addr|unordered|uselistorder|uselistorder_bb|uwtable|volatile|weak|weak_odr|willreturn|win64cc|within|writeonly|x86_64_sysvcc|x86_fastcallcc|x86_stdcallcc|x86_thiscallcc|zeroext)\b/dgv,name:"storage.modifier.llvm"},{match:/@[\-\$\.A-Z_a-z][\-\$\.0-9A-Z_a-z]*/dgv,name:"entity.name.function.llvm"},{match:/[\!\%\@]\p{Nd}+\b/dgv,name:"variable.llvm"},{match:/%[\-\$\.A-Z_a-z][\-\$\.0-9A-Z_a-z]*/dgv,name:"variable.llvm"},{captures:{"1":{name:"variable.llvm"}},match:/(![\-\$\.A-Z_a-z][\-\$\.0-9A-Z_a-z]*)\p{space}*(?=\n?$)/dgv},{captures:{"1":{name:"variable.llvm"}},match:/(![\-\$\.A-Z_a-z][\-\$\.0-9A-Z_a-z]*)\p{space}*[\!\=]/dgv},{begin:/"/dgv,end:/"/dgv,name:"string.quoted.double.llvm",patterns:[{match:/\./dgv,name:"constant.character.escape.untitled"}]},{match:/[\-\$\.A-Z_a-z][\-\$\.0-9A-Z_a-z]*:/dgv,name:"entity.name.label.llvm"},{match:/-?\b\p{Nd}+\.\p{Nd}*(e[\-\+]\p{Nd}+)?\b/dgv,name:"constant.numeric.float"},{match:/\b0x\p{AHex}+\b/dgv,name:"constant.numeric.float"},{match:/-?\b\p{Nd}+\b/dgv,name:"constant.numeric.integer"},{match:/\b(?:true|false|null|zeroinitializer|undef|poison|null|none)\b/dgv,name:"constant.language"},{match:/\bD(?:W_TAG_[_a-z]+|W_ATE_[A-Z_a-z]+|W_OP_[0-9A-Z_a-z]+|W_LANG_[0-9A-Z_a-z]+|W_VIRTUALITY_[_a-z]+|IFlag[A-Za-z]+)\b/dgv,name:"constant.other"},{match:/;\p{space}*PR\p{Nd}*\p{space}*(?=\n?$)/dgv,name:"string.regexp"},{match:/;\p{space}*REQUIRES:[^\n]*(?=\n?$)/dgv,name:"string.regexp"},{match:/;\p{space}*RUN:[^\n]*(?=\n?$)/dgv,name:"string.regexp"},{match:/;\p{space}*ALLOW_RETRIES:[^\n]*(?=\n?$)/dgv,name:"string.regexp"},{match:/;\p{space}*CHECK:[^\n]*(?=\n?$)/dgv,name:"string.regexp"},{match:/;\p{space}*CHECK-(NEXT|NOT|DAG|SAME|LABEL):[^\n]*(?=\n?$)/dgv,name:"string.regexp"},{match:/;\p{space}*XFAIL:[^\n]*(?=\n?$)/dgv,name:"string.regexp"},{match:/;[^\n]*(?=\n?$)/dgv,name:"comment.line.llvm"}],scopeName:"source.llvm",embeddedLangs:undefined,aliases:undefined})
|
|
2
2
|
|
|
3
3
|
export default [
|
|
4
4
|
lang
|
package/dist/log.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const lang = Object.freeze({displayName:"Log file",fileTypes:["log"],name:"log",patterns:[{match:/\b(Trace)\b:/dgv,name:"comment log.verbose"},{match:/\[(v(?:erbose|erb|rb|b
|
|
1
|
+
const lang = Object.freeze({displayName:"Log file",fileTypes:["log"],name:"log",patterns:[{match:/\b(Trace)\b:/dgv,name:"comment log.verbose"},{match:/\[(v(?:erbose|erb|rb|b?))\]/dgiv,name:"comment log.verbose"},{match:/(?<=^[p\p{space}\p{Nd}]*)\bV\b/dgv,name:"comment log.verbose"},{match:/\b(D(?:EBUG|ebug))\b|\b([Dd][Ee][Bb][Uu][Gg]):/dgv,name:"markup.changed log.debug"},{match:/\[(d(?:ebug|bug|bg|e?))\]/dgiv,name:"markup.changed log.debug"},{match:/(?<=^[p\p{space}\p{Nd}]*)\bD\b/dgv,name:"markup.changed log.debug"},{match:/\b(HINT|INFO|INFORMATION|Info|NOTICE|II)\b|\b([Ii][Nn][Ff][Oo](?:|[Rr][Mm][Aa][Tt][Ii][Oo][Nn])):/dgv,name:"markup.inserted log.info"},{match:/\[(i(?:nformation|nfo?|n?))\]/dgiv,name:"markup.inserted log.info"},{match:/(?<=^[p\p{space}\p{Nd}]*)\bI\b/dgv,name:"markup.inserted log.info"},{match:/\b(W(?:ARNING|ARN|arn|W))\b|\b([Ww][Aa][Rr][Nn][Ii][Nn][Gg]):/dgv,name:"markup.deleted log.warning"},{match:/\[(w(?:arning|arn|rn|n?))\]/dgiv,name:"markup.deleted log.warning"},{match:/(?<=^[p\p{space}\p{Nd}]*)\bW\b/dgv,name:"markup.deleted log.warning"},{match:/\b(ALERT|CRITICAL|EMERGENCY|ERROR|FAILURE|FAIL|Fatal|FATAL|Error|EE)\b|\b([Ee][Rr][Rr][Oo][Rr]):/dgv,name:"string.regexp, strong log.error"},{match:/\[(error|eror|err?|e|fatal|fatl|ftl|fa?)\]/dgiv,name:"string.regexp, strong log.error"},{match:/(?<=^[p\p{space}\p{Nd}]*)\bE\b/dgv,name:"string.regexp, strong log.error"},{match:/\b\p{Nd}{4}-\p{Nd}{2}-\p{Nd}{2}(?=T|\b)/dgv,name:"comment log.date"},{match:/(?<=(^|\p{space}))\p{Nd}{2}[^\p{L}\p{M}\p{N}\p{Pc}\p{space}]\p{Nd}{2}[^\p{L}\p{M}\p{N}\p{Pc}\p{space}]\p{Nd}{4}\b/dgv,name:"comment log.date"},{match:/T?\p{Nd}{1,2}:\p{Nd}{2}(:\p{Nd}{2}([\,\.]\p{Nd}+)?)?(Z| ?[\-\+]\p{Nd}{1,2}:\p{Nd}{2})?\b/dgv,name:"comment log.date"},{match:/T\p{Nd}{2}\p{Nd}{2}(\p{Nd}{2}([\,\.]\p{Nd}+)?)?(Z| ?[\-\+]\p{Nd}{1,2}\p{Nd}{2})?\b/dgv,name:"comment log.date"},{match:/\b(\p{AHex}{40}|\p{AHex}{10}|\p{AHex}{7})\b/dgv,name:"constant.language"},{match:/\b\p{AHex}{8}-?(\p{AHex}{4}-?){3}\p{AHex}{12}\b/dgv,name:"constant.language log.constant"},{match:/\b(\p{AHex}{2,}[\-\:])+(?:\p{AHex}{2,})+\b/dgv,name:"constant.language log.constant"},{match:/\b([0-9]+|true|false|null)\b/dgv,name:"constant.language log.constant"},{match:/\b(0x\p{AHex}+)\b/dgv,name:"constant.language log.constant"},{match:/"[^"]*"/dgv,name:"string log.string"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])'[^']*'/dgv,name:"string log.string"},{match:/\b([\.A-Za-z]*Exception)\b/dgv,name:"string.regexp, emphasis log.exceptiontype"},{begin:/^[\t ]*at[\t ]/dgv,end:/(?=\n?$)/dgv,name:"string.key, emphasis log.exception"},{match:/\b[a-z]+:\/\/\P{space}+\b\/?/dgv,name:"constant.language log.constant"},{match:/(?<![\/\\\p{L}\p{M}\p{N}\p{Pc}])([\-\p{L}\p{M}\p{N}\p{Pc}]+\.)+([\-\p{L}\p{M}\p{N}\p{Pc}])+(?![\/\\\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"constant.language log.constant"}],scopeName:"text.log",embeddedLangs:undefined,aliases:undefined})
|
|
2
2
|
|
|
3
3
|
export default [
|
|
4
4
|
lang
|
package/dist/logo.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EmulatedRegExp } from 'oniguruma-to-es'
|
|
2
2
|
|
|
3
|
-
const lang = Object.freeze({displayName:"Logo",fileTypes:[],name:"logo",patterns:[{match:/^to [
|
|
3
|
+
const lang = Object.freeze({displayName:"Logo",fileTypes:[],name:"logo",patterns:[{match:/^to [\.\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.function.logo"},{match:/continue|do\.until|do\.while|end|for(each)?|if(else|falsetrue|)|repeat|stop|until/dgv,name:"keyword.control.logo"},{match:/\b(\.defmacro|\.eq|\.macro|\.maybeoutput|\.setbf|\.setfirst|\.setitem|\.setsegmentsize|allopen|allowgetset|and|apply|arc|arctan|arity|arrayp??|arraytolist|ascii|ashift|back|background|backslashedp|beforep|bitand|bitnot|bitor|bitxor|buriedp??|bury|buryall|buryname|butfirsts??|butlast|bye|cascade|case|caseignoredp|catch|char|clean|clearscreen|cleartext|close|closeall|combine|cond|contents|copydef|cos|count|crossmap|cursor|define|definedp|dequeue|difference|dribble|edall|edit|editfile|edns??|edpls??|edps|emptyp|eofp|epspict|equalp|erall|erase|erasefile|erns??|erpls??|erps|erract|error|exp|fence|filep|fill|filter|find|firsts??|forever|form|forward|fput|fullprintp|fullscreen|fulltext|gc|gensym|global|goto|gprop|greaterp|heading|help|hideturtle|home|ignore|int|invoke|iseq|item|keyp|label|last|left|lessp|listp??|listtoarray|ln|load|loadnoisily|loadpict|local|localmake|log10|lowercase|lput|lshift|macroexpand|macrop|make|map|map[^\n]se|mdarray|mditem|mdsetitem|memberp??|minus|modulo|name|namelist|namep|names|nodes|nodribble|norefresh|not|numberp|openappend|openread|openupdate|openwrite|or|output|palette|parse|pause|pen|pencolor|pendownp??|penerase|penmode|penpaint|penreverse|pensize|penup|pick|plistp??|plists|pllist|po|poall|pons??|popl??|popls|pops|pos|pots??|power|pprop|prefix|primitivep|print|printdepthlimit|printwidthlimit|procedurep|procedures|product|push|queue|quoted|quotient|radarctan|radcos|radsin|random|rawascii|readchars??|reader|readlist|readpos|readrawline|readword|redefp|reduce|refresh|remainder|remdup|remove|remprop|repcount|rerandom|reverse|right|round|rseq|run|runparse|runresult|savel??|savepict|screenmode|scrunch|sentence|setbackground|setcursor|seteditor|setheading|sethelploc|setitem|setlibloc|setmargins|setpalette|setpen|setpencolor|setpensize|setpos|setprefix|setread|setreadpos|setscrunch|settemploc|settextcolor|setwrite|setwritepos|setxy??|sety|shell|show|shownp|showturtle|sin|splitscreen|sqrt|standout|startup|step|steppedp??|substringp|sum|tag|test|text|textscreen|thing|throw|towards|traced??|tracedp|transfer|turtlemode|type|unbury|unburyall|unburyname|unburyonedit|unstep|untrace|uppercase|usealternatenam|wait|while|window|wordp??|wrap|writepos|writer|xcor|ycor)\b/dgv,name:"keyword.other.logo"},{captures:{"1":{name:"punctuation.definition.variable.logo"}},match:/(:)(?:\|[^\|]*\||[\-\.\p{L}\p{M}\p{N}\p{Pc}]*)+/dgv,name:"variable.parameter.logo"},{match:/"(?:\|[^\|]*\||[\-\.\p{L}\p{M}\p{N}\p{Pc}]*)+/dgv,name:"string.other.word.logo"},{begin:/(^[\t ]+)?(?=;)/dgv,beginCaptures:{"1":{name:"punctuation.whitespace.comment.leading.logo"}},end:/*@__PURE__*/ new EmulatedRegExp("(?!^)","dgv",{"strategy":"clip_search"}),patterns:[{begin:/;/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.logo"}},end:/\n/dgv,name:"comment.line.semicolon.logo"}]}],scopeName:"source.logo",embeddedLangs:undefined,aliases:undefined})
|
|
4
4
|
|
|
5
5
|
export default [
|
|
6
6
|
lang
|
package/dist/lua.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EmulatedRegExp } from 'oniguruma-to-es'
|
|
2
2
|
import c from './c.mjs'
|
|
3
3
|
|
|
4
|
-
const lang = Object.freeze({displayName:"Lua",name:"lua",patterns:[{begin:/\b(?:(local)\p{space}+)?(function)\b(?![\,\:])/dgv,beginCaptures:{"1":{name:"keyword.local.lua"},"2":{name:"keyword.control.lua"}},end:/(?<=[\)\-\{\}\[\]"'])/dgv,name:"meta.function.lua",patterns:[{include:"#comment"},{begin:/(\()/dgv,beginCaptures:{"1":{name:"punctuation.definition.parameters.begin.lua"}},end:/(\))|(?=[\-\.\{\}\[\]"'])/dgv,endCaptures:{"1":{name:"punctuation.definition.parameters.finish.lua"}},name:"meta.parameter.lua",patterns:[{include:"#comment"},{match:/[a-zA-Z_][a-zA-Z0-9_]*/dgv,name:"variable.parameter.function.lua"},{match:/,/dgv,name:"punctuation.separator.arguments.lua"},{begin:/:/dgv,beginCaptures:{"0":{name:"punctuation.separator.arguments.lua"}},end:/(?=[\)\,])/dgv,patterns:[{include:"#emmydoc.type"}]}]},{match:/\b([a-zA-Z_][a-zA-Z0-9_]*)\b\p{space}*(?=:)/dgv,name:"entity.name.class.lua"},{match:/\b([a-zA-Z_][a-zA-Z0-9_]*)\b/dgv,name:"entity.name.function.lua"}]},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}\p{Nd}\.])0[xX]\p{AHex}+(\.\p{AHex}*)?([eE]-?\p{Nd}*)?([pP][\-\+]\p{Nd}+)?/dgv,name:"constant.numeric.float.hexadecimal.lua"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}\p{Nd}\.])0[xX]\.\p{AHex}+([eE]-?\p{Nd}*)?([pP][\-\+]\p{Nd}+)?/dgv,name:"constant.numeric.float.hexadecimal.lua"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}\p{Nd}\.])0[xX]\p{AHex}+(?![pPeE\.0-9])/dgv,name:"constant.numeric.integer.hexadecimal.lua"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}\p{Nd}\.])\p{Nd}+(\.\p{Nd}*)?([eE]-?\p{Nd}*)?/dgv,name:"constant.numeric.float.lua"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}\p{Nd}\.])\.\p{Nd}+([eE]-?\p{Nd}*)?/dgv,name:"constant.numeric.float.lua"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}\p{Nd}\.])\p{Nd}+(?![pPeE\.0-9])/dgv,name:"constant.numeric.integer.lua"},{include:"#string"},{captures:{"1":{name:"punctuation.definition.comment.lua"}},match:/^(#!)[^\n]*(?=\n?$)\n?/dgv,name:"comment.line.shebang.lua"},{include:"#comment"},{captures:{"1":{name:"keyword.control.goto.lua"},"2":{name:"string.tag.lua"}},match:/\b(goto)\p{space}+([a-zA-Z_][a-zA-Z0-9_]*)/dgv},{captures:{"1":{name:"punctuation.section.embedded.begin.lua"},"2":{name:"punctuation.section.embedded.end.lua"}},match:/(::)\p{space}*[a-zA-Z_][a-zA-Z0-9_]*\p{space}*(::)/dgv,name:"string.tag.lua"},{captures:{"0":{name:"storage.type.attribute.lua"}},match:/<\p{space}*(c(?:onst|lose))\p{space}*>/dgv},{match:/<[a-zA-Z_\*][a-zA-Z0-9_\.\*\-]*>/dgv,name:"storage.type.generic.lua"},{match:/\b(break|do|else|for|if|elseif|goto|return|then|repeat|while|until|end|in)\b/dgv,name:"keyword.control.lua"},{match:/\b(local)\b/dgv,name:"keyword.local.lua"},{match:/\b(function)\b(?![\,\:])/dgv,name:"keyword.control.lua"},{match:/(?<![^\.]\.|:)\b(false|nil(?!:)|true|_ENV|_G|_VERSION|math\.(pi|huge|maxinteger|mininteger)|utf8\.charpattern|io\.(std(?:in|out|err))|package\.(config|cpath|loaded|loaders|path|preload|searchers))\b|(?<!\.)\.{3}(?!\.)/dgv,name:"constant.language.lua"},{match:/(?<![^\.]\.|:)\b(self)\b/dgv,name:"variable.language.self.lua"},{match:/(?<![^\.]\.|:)\b(assert|collectgarbage|dofile|error|getfenv|getmetatable|ipairs|load|loadfile|loadstring|module|next|pairs|pcall|print|rawequal|rawget|rawlen|rawset|require|select|setfenv|setmetatable|tonumber|tostring|type|unpack|xpcall)\b(?!\p{space}*=(?!=))/dgv,name:"support.function.lua"},{match:/(?<![^\.]\.|:)\b(async)\b(?!\p{space}*=(?!=))/dgv,name:"entity.name.tag.lua"},{match:/(?<![^\.]\.|:)\b(coroutine\.(create|isyieldable|close|resume|running|status|wrap|yield)|string\.(byte|char|dump|find|format|gmatch|gsub|len|lower|match|pack|packsize|rep|reverse|sub|unpack|upper)|table\.(concat|insert|maxn|move|pack|remove|sort|unpack)|math\.(abs|acos|asin|atan2?|ceil|cosh?|deg|exp|floor|fmod|frexp|ldexp|log|log10|max|min|modf|pow|rad|random|randomseed|sinh?|sqrt|tanh?|tointeger|type)|io\.(close|flush|input|lines|open|output|popen|read|tmpfile|type|write)|os\.(clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)|package\.(loadlib|seeall|searchpath)|debug\.(debug|[gs]etfenv|[gs]ethook|getinfo|[gs]etlocal|[gs]etmetatable|getregistry|[gs]etupvalue|[gs]etuservalue|set[Cc]stacklimit|traceback|upvalueid|upvaluejoin)|bit32\.(arshift|band|bnot|bor|btest|bxor|extract|replace|lrotate|lshift|rrotate|rshift)|utf8\.(char|codes|codepoint|len|offset))\b(?!\p{space}*=(?!=))/dgv,name:"support.function.library.lua"},{match:/\b(and|or|not|\|\||&&|!)\b/dgv,name:"keyword.operator.lua"},{match:/\b([a-zA-Z_][a-zA-Z0-9_]*)\b(?=\p{space}*(?:[\(\{"']|\[\[))/dgv,name:"support.function.any-method.lua"},{match:/\b([a-zA-Z_][a-zA-Z0-9_]*)\b(?=\p{space}*\??:)/dgv,name:"entity.name.class.lua"},{match:/(?<=[^\.]\.|:)\b([a-zA-Z_][a-zA-Z0-9_]*)\b(?!\p{space}*=\p{space}*\b(function)\b)/dgv,name:"entity.other.attribute.lua"},{match:/\b([a-zA-Z_][a-zA-Z0-9_]*)\b(?!\p{space}*=\p{space}*\b(function)\b)/dgv,name:"variable.other.lua"},{match:/\b([a-zA-Z_][a-zA-Z0-9_]*)\b(?=\p{space}*=\p{space}*\b(function)\b)/dgv,name:"entity.name.function.lua"},{match:/[\+\-\%\#\*\/\^]|==?|~=|!=|<=?|>=?|(?<!\.)\.{2}(?!\.)/dgv,name:"keyword.operator.lua"}],repository:{comment:{patterns:[{begin:/(^[ \t]+)?(?=--)/dgv,beginCaptures:{"1":{name:"punctuation.whitespace.comment.leading.lua"}},end:/*@__PURE__*/ new EmulatedRegExp("(?!^)((?!^)[ \\t]+\\n)?","dgv",{"strategy":"clip_search"}),endCaptures:{"1":{name:"punctuation.whitespace.comment.trailing.lua"}},patterns:[{begin:/--\[(=*)\[@@@/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.begin.lua"}},end:/(--)?\]\1\]/dgv,endCaptures:{"0":{name:"punctuation.definition.comment.end.lua"}},name:"",patterns:[{include:"source.lua"}]},{begin:/--\[(=*)\[/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.begin.lua"}},end:/(--)?\]\1\]/dgv,endCaptures:{"0":{name:"punctuation.definition.comment.end.lua"}},name:"comment.block.lua",patterns:[{include:"#emmydoc"},{include:"#ldoc_tag"}]},{begin:/----/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.lua"}},end:/\n/dgv,name:"comment.line.double-dash.lua"},{begin:/---/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.lua"}},end:/\n/dgv,name:"comment.line.double-dash.documentation.lua",patterns:[{include:"#emmydoc"},{include:"#ldoc_tag"}]},{begin:/--/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.lua"}},end:/\n/dgv,name:"comment.line.double-dash.lua",patterns:[{include:"#ldoc_tag"}]}]},{begin:/\/\*/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.begin.lua"}},end:/\*\//dgv,endCaptures:{"0":{name:"punctuation.definition.comment.end.lua"}},name:"comment.block.lua",patterns:[{include:"#emmydoc"},{include:"#ldoc_tag"}]}]},emmydoc:{patterns:[{begin:/(?<=---)[ \t]*@class/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\@\#])/dgv,patterns:[{match:/\b([a-zA-Z_\*][a-zA-Z0-9_\.\*\-]*)/dgv,name:"support.class.lua"},{match:/[\:\,]/dgv,name:"keyword.operator.lua"}]},{begin:/(?<=---)[ \t]*@enum/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\@\#])/dgv,patterns:[{begin:/\b([a-zA-Z_\*][a-zA-Z0-9_\.\*\-]*)/dgv,beginCaptures:{"0":{name:"variable.lua"}},end:/(?=\n)/dgv}]},{begin:/(?<=---)[ \t]*@type/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\@\#])/dgv,patterns:[{include:"#emmydoc.type"}]},{begin:/(?<=---)[ \t]*@alias/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\@\#])/dgv,patterns:[{begin:/\b([a-zA-Z_\*][a-zA-Z0-9_\.\*\-]*)/dgv,beginCaptures:{"0":{name:"variable.lua"}},end:/(?=[\n\#])/dgv,patterns:[{include:"#emmydoc.type"}]}]},{begin:/(?<=---)[ \t]*(@operator)\p{space}*(\b[a-z]+)?/dgv,beginCaptures:{"1":{name:"storage.type.annotation.lua"},"2":{name:"support.function.library.lua"}},end:/(?=[\n\@\#])/dgv,patterns:[{include:"#emmydoc.type"}]},{begin:/(?<=---)[ \t]*@cast/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\@\#])/dgv,patterns:[{begin:/\b([a-zA-Z_\*][a-zA-Z0-9_\.\*\-]*)/dgv,beginCaptures:{"0":{name:"variable.other.lua"}},end:/(?=\n)/dgv,patterns:[{include:"#emmydoc.type"},{match:/([\+-\|])/dgv,name:"keyword.operator.lua"}]}]},{begin:/(?<=---)[ \t]*@param/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\@\#])/dgv,patterns:[{begin:/\b([a-zA-Z_][a-zA-Z0-9_]*)\b(\??)/dgv,beginCaptures:{"1":{name:"entity.name.variable.lua"},"2":{name:"keyword.operator.lua"}},end:/(?=[\n\#])/dgv,patterns:[{include:"#emmydoc.type"}]}]},{begin:/(?<=---)[ \t]*@return/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\@\#])/dgv,patterns:[{match:/\?/dgv,name:"keyword.operator.lua"},{include:"#emmydoc.type"}]},{begin:/(?<=---)[ \t]*@field/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\@\#])/dgv,patterns:[{begin:/(\b([a-zA-Z_][a-zA-Z0-9_]*)\b|(\[))(\??)/dgv,beginCaptures:{"2":{name:"entity.name.variable.lua"},"3":{name:"keyword.operator.lua"}},end:/(?=[\n\#])/dgv,patterns:[{include:"#string"},{include:"#emmydoc.type"},{match:/\]/dgv,name:"keyword.operator.lua"}]}]},{begin:/(?<=---)[ \t]*@generic/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\@\#])/dgv,patterns:[{begin:/\b([a-zA-Z_][a-zA-Z0-9_]*)\b/dgv,beginCaptures:{"0":{name:"storage.type.generic.lua"}},end:/(?=\n)|(,)/dgv,endCaptures:{"0":{name:"keyword.operator.lua"}},patterns:[{match:/:/dgv,name:"keyword.operator.lua"},{include:"#emmydoc.type"}]}]},{begin:/(?<=---)[ \t]*@vararg/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\@\#])/dgv,patterns:[{include:"#emmydoc.type"}]},{begin:/(?<=---)[ \t]*@overload/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\@\#])/dgv,patterns:[{include:"#emmydoc.type"}]},{begin:/(?<=---)[ \t]*@deprecated/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\@\#])/dgv},{begin:/(?<=---)[ \t]*@meta/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\@\#])/dgv},{begin:/(?<=---)[ \t]*@private/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\@\#])/dgv},{begin:/(?<=---)[ \t]*@protected/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\@\#])/dgv},{begin:/(?<=---)[ \t]*@package/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\@\#])/dgv},{begin:/(?<=---)[ \t]*@version/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\@\#])/dgv,patterns:[{match:/\b(5\.1|5\.2|5\.3|5\.4|JIT)\b/dgv,name:"support.class.lua"},{match:/[\,\>\<]/dgv,name:"keyword.operator.lua"}]},{begin:/(?<=---)[ \t]*@see/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\@\#])/dgv,patterns:[{match:/\b([a-zA-Z_\*][a-zA-Z0-9_\.\*\-]*)/dgv,name:"support.class.lua"},{match:/#/dgv,name:"keyword.operator.lua"}]},{begin:/(?<=---)[ \t]*@diagnostic/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\@\#])/dgv,patterns:[{begin:/([a-zA-Z_\-0-9]+)[ \t]*(:)?/dgv,beginCaptures:{"1":{name:"keyword.other.unit"},"2":{name:"keyword.operator.unit"}},end:/(?=\n)/dgv,patterns:[{match:/\b([a-zA-Z_\*][a-zA-Z0-9_\-]*)/dgv,name:"support.class.lua"},{match:/,/dgv,name:"keyword.operator.lua"}]}]},{begin:/(?<=---)[ \t]*@module/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\@\#])/dgv,patterns:[{include:"#string"}]},{match:/(?<=---)[ \t]*@(async|nodiscard)/dgv,name:"storage.type.annotation.lua"},{begin:/(?<=---)\|\p{space}*[\>\+]?/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\@\#])/dgv,patterns:[{include:"#string"}]}]},"emmydoc.type":{patterns:[{begin:/\bfun\b/dgv,beginCaptures:{"0":{name:"keyword.control.lua"}},end:/(?=[\p{space}\#])/dgv,patterns:[{match:/[\(\)\,\:\?][ \t]*/dgv,name:"keyword.operator.lua"},{match:/([a-zA-Z_][a-zA-Z0-9_\.\*\[\]\<\>\,\-]*)(?<!,)[ \t]*(?=\??:)/dgv,name:"entity.name.variable.lua"},{include:"#emmydoc.type"},{include:"#string"}]},{match:/<[a-zA-Z_\*][a-zA-Z0-9_\.\*\-]*>/dgv,name:"storage.type.generic.lua"},{match:/\basync\b/dgv,name:"entity.name.tag.lua"},{match:/[\{\}\:\,\?\|\`][ \t]*/dgv,name:"keyword.operator.lua"},{begin:/(?=[a-zA-Z_\.\*"'\[])/dgv,end:/(?=[\p{space}\)\,\?\:\}\|\#])/dgv,patterns:[{match:/([a-zA-Z0-9_\.\*\[\]\<\>\,\-]+)(?<!,)[ \t]*/dgv,name:"support.type.lua"},{match:/(\.\.\.)[ \t]*/dgv,name:"constant.language.lua"},{include:"#string"}]}]},escaped_char:{patterns:[{match:/\\[abfnrtv\\"'\n]/dgv,name:"constant.character.escape.lua"},{match:/\\z[\n\t ]*/dgv,name:"constant.character.escape.lua"},{match:/\\\p{Nd}{1,3}/dgv,name:"constant.character.escape.byte.lua"},{match:/\\x\p{AHex}\p{AHex}/dgv,name:"constant.character.escape.byte.lua"},{match:/\\u\{\p{AHex}+\}/dgv,name:"constant.character.escape.unicode.lua"},{match:/\\[^\n]/dgv,name:"invalid.illegal.character.escape.lua"}]},ldoc_tag:{captures:{"1":{name:"punctuation.definition.block.tag.ldoc"},"2":{name:"storage.type.class.ldoc"}},match:/[ \t]*(@)(alias|annotation|author|charset|class|classmod|comment|constructor|copyright|description|example|export|factory|field|file|fixme|function|include|lfunction|license|local|module|name|param|pragma|private|raise|release|return|script|section|see|set|static|submodule|summary|tfield|thread|tparam|treturn|todo|topic|type|usage|warning|within)\b/dgvy},string:{patterns:[{begin:/'/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.lua"}},end:/'[ \t]*|(?=\n)/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.lua"}},name:"string.quoted.single.lua",patterns:[{include:"#escaped_char"}]},{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.lua"}},end:/"[ \t]*|(?=\n)/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.lua"}},name:"string.quoted.double.lua",patterns:[{include:"#escaped_char"}]},{begin:/`/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.lua"}},end:/`[ \t]*|(?=\n)/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.lua"}},name:"string.quoted.double.lua"},{begin:/(?<=\.cdef)\p{space}*(\[(=*)\[)/dgv,beginCaptures:{"0":{name:"string.quoted.other.multiline.lua"},"1":{name:"punctuation.definition.string.begin.lua"}},contentName:"meta.embedded.lua",end:/(\]\2\])[ \t]*()/dgv,endCaptures:{"0":{name:"string.quoted.other.multiline.lua"},"1":{name:"punctuation.definition.string.end.lua"}},patterns:[{include:"source.c"}]},{begin:/(?<!--)\[(=*)\[/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.lua"}},end:/\]\1\][ \t]*()/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.lua"}},name:"string.quoted.other.multiline.lua"}]}},scopeName:"source.lua",embeddedLangs:["c"],aliases:undefined})
|
|
4
|
+
const lang = Object.freeze({displayName:"Lua",name:"lua",patterns:[{begin:/\b(?:(local)\p{space}+)?(function)\b(?![\,\:])/dgv,beginCaptures:{"1":{name:"keyword.local.lua"},"2":{name:"keyword.control.lua"}},end:/(?<=[\-\]"'\)\[\{\}])/dgv,name:"meta.function.lua",patterns:[{include:"#comment"},{begin:/(\()/dgv,beginCaptures:{"1":{name:"punctuation.definition.parameters.begin.lua"}},end:/(\))|(?=[\-\]"'\.\[\{\}])/dgv,endCaptures:{"1":{name:"punctuation.definition.parameters.finish.lua"}},name:"meta.parameter.lua",patterns:[{include:"#comment"},{match:/[A-Z_a-z][0-9A-Z_a-z]*/dgv,name:"variable.parameter.function.lua"},{match:/,/dgv,name:"punctuation.separator.arguments.lua"},{begin:/:/dgv,beginCaptures:{"0":{name:"punctuation.separator.arguments.lua"}},end:/(?=[\)\,])/dgv,patterns:[{include:"#emmydoc.type"}]}]},{match:/\b([A-Z_a-z][0-9A-Z_a-z]*)\b\p{space}*(?=:)/dgv,name:"entity.name.class.lua"},{match:/\b([A-Z_a-z][0-9A-Z_a-z]*)\b/dgv,name:"entity.name.function.lua"}]},{match:/(?<![\.\p{L}\p{M}\p{N}\p{Pc}\p{Nd}])0[Xx]\p{AHex}+(\.\p{AHex}*)?([Ee]-?\p{Nd}*)?([Pp][\-\+]\p{Nd}+)?/dgv,name:"constant.numeric.float.hexadecimal.lua"},{match:/(?<![\.\p{L}\p{M}\p{N}\p{Pc}\p{Nd}])0[Xx]\.\p{AHex}+([Ee]-?\p{Nd}*)?([Pp][\-\+]\p{Nd}+)?/dgv,name:"constant.numeric.float.hexadecimal.lua"},{match:/(?<![\.\p{L}\p{M}\p{N}\p{Pc}\p{Nd}])0[Xx]\p{AHex}+(?![\.0-9EPep])/dgv,name:"constant.numeric.integer.hexadecimal.lua"},{match:/(?<![\.\p{L}\p{M}\p{N}\p{Pc}\p{Nd}])\p{Nd}+(\.\p{Nd}*)?([Ee]-?\p{Nd}*)?/dgv,name:"constant.numeric.float.lua"},{match:/(?<![\.\p{L}\p{M}\p{N}\p{Pc}\p{Nd}])\.\p{Nd}+([Ee]-?\p{Nd}*)?/dgv,name:"constant.numeric.float.lua"},{match:/(?<![\.\p{L}\p{M}\p{N}\p{Pc}\p{Nd}])\p{Nd}+(?![\.0-9EPep])/dgv,name:"constant.numeric.integer.lua"},{include:"#string"},{captures:{"1":{name:"punctuation.definition.comment.lua"}},match:/^(#!)[^\n]*(?=\n?$)\n?/dgv,name:"comment.line.shebang.lua"},{include:"#comment"},{captures:{"1":{name:"keyword.control.goto.lua"},"2":{name:"string.tag.lua"}},match:/\b(goto)\p{space}+([A-Z_a-z][0-9A-Z_a-z]*)/dgv},{captures:{"1":{name:"punctuation.section.embedded.begin.lua"},"2":{name:"punctuation.section.embedded.end.lua"}},match:/(::)\p{space}*[A-Z_a-z][0-9A-Z_a-z]*\p{space}*(::)/dgv,name:"string.tag.lua"},{captures:{"0":{name:"storage.type.attribute.lua"}},match:/<\p{space}*(c(?:onst|lose))\p{space}*>/dgv},{match:/<[\*A-Z_a-z][\-\*\.0-9A-Z_a-z]*>/dgv,name:"storage.type.generic.lua"},{match:/\b(break|do|else|for|if|elseif|goto|return|then|repeat|while|until|end|in)\b/dgv,name:"keyword.control.lua"},{match:/\b(local)\b/dgv,name:"keyword.local.lua"},{match:/\b(function)\b(?![\,\:])/dgv,name:"keyword.control.lua"},{match:/(?<![^\.]\.|:)\b(false|nil(?!:)|true|_ENV|_G|_VERSION|math\.(pi|huge|maxinteger|mininteger)|utf8\.charpattern|io\.(std(?:in|out|err))|package\.(config|cpath|loaded|loaders|path|preload|searchers))\b|(?<!\.)\.{3}(?!\.)/dgv,name:"constant.language.lua"},{match:/(?<![^\.]\.|:)\b(self)\b/dgv,name:"variable.language.self.lua"},{match:/(?<![^\.]\.|:)\b(assert|collectgarbage|dofile|error|getfenv|getmetatable|ipairs|load|loadfile|loadstring|module|next|pairs|pcall|print|rawequal|rawget|rawlen|rawset|require|select|setfenv|setmetatable|tonumber|tostring|type|unpack|xpcall)\b(?!\p{space}*=(?!=))/dgv,name:"support.function.lua"},{match:/(?<![^\.]\.|:)\b(async)\b(?!\p{space}*=(?!=))/dgv,name:"entity.name.tag.lua"},{match:/(?<![^\.]\.|:)\b(coroutine\.(create|isyieldable|close|resume|running|status|wrap|yield)|string\.(byte|char|dump|find|format|gmatch|gsub|len|lower|match|pack|packsize|rep|reverse|sub|unpack|upper)|table\.(concat|insert|maxn|move|pack|remove|sort|unpack)|math\.(abs|acos|asin|atan2?|ceil|cosh?|deg|exp|floor|fmod|frexp|ldexp|log|log10|max|min|modf|pow|rad|random|randomseed|sinh?|sqrt|tanh?|tointeger|type)|io\.(close|flush|input|lines|open|output|popen|read|tmpfile|type|write)|os\.(clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)|package\.(loadlib|seeall|searchpath)|debug\.(debug|[gs]etfenv|[gs]ethook|getinfo|[gs]etlocal|[gs]etmetatable|getregistry|[gs]etupvalue|[gs]etuservalue|set[Cc]stacklimit|traceback|upvalueid|upvaluejoin)|bit32\.(arshift|band|bnot|bor|btest|bxor|extract|replace|lrotate|lshift|rrotate|rshift)|utf8\.(char|codes|codepoint|len|offset))\b(?!\p{space}*=(?!=))/dgv,name:"support.function.library.lua"},{match:/\b(and|or|not|\|\||&&|!)\b/dgv,name:"keyword.operator.lua"},{match:/\b([A-Z_a-z][0-9A-Z_a-z]*)\b(?=\p{space}*(?:["'\(\{]|\[\[))/dgv,name:"support.function.any-method.lua"},{match:/\b([A-Z_a-z][0-9A-Z_a-z]*)\b(?=\p{space}*\??:)/dgv,name:"entity.name.class.lua"},{match:/(?<=[^\.]\.|:)\b([A-Z_a-z][0-9A-Z_a-z]*)\b(?!\p{space}*=\p{space}*\b(function)\b)/dgv,name:"entity.other.attribute.lua"},{match:/\b([A-Z_a-z][0-9A-Z_a-z]*)\b(?!\p{space}*=\p{space}*\b(function)\b)/dgv,name:"variable.other.lua"},{match:/\b([A-Z_a-z][0-9A-Z_a-z]*)\b(?=\p{space}*=\p{space}*\b(function)\b)/dgv,name:"entity.name.function.lua"},{match:/[\-\#\%\*\+\/\^]|==?|~=|!=|<=?|>=?|(?<!\.)\.{2}(?!\.)/dgv,name:"keyword.operator.lua"}],repository:{comment:{patterns:[{begin:/(^[\t ]+)?(?=--)/dgv,beginCaptures:{"1":{name:"punctuation.whitespace.comment.leading.lua"}},end:/*@__PURE__*/ new EmulatedRegExp("(?!^)((?!^)[\\t ]+\\n)?","dgv",{"strategy":"clip_search"}),endCaptures:{"1":{name:"punctuation.whitespace.comment.trailing.lua"}},patterns:[{begin:/--\[(=*)\[@@@/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.begin.lua"}},end:/(--)?\]\1\]/dgv,endCaptures:{"0":{name:"punctuation.definition.comment.end.lua"}},name:"",patterns:[{include:"source.lua"}]},{begin:/--\[(=*)\[/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.begin.lua"}},end:/(--)?\]\1\]/dgv,endCaptures:{"0":{name:"punctuation.definition.comment.end.lua"}},name:"comment.block.lua",patterns:[{include:"#emmydoc"},{include:"#ldoc_tag"}]},{begin:/----/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.lua"}},end:/\n/dgv,name:"comment.line.double-dash.lua"},{begin:/---/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.lua"}},end:/\n/dgv,name:"comment.line.double-dash.documentation.lua",patterns:[{include:"#emmydoc"},{include:"#ldoc_tag"}]},{begin:/--/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.lua"}},end:/\n/dgv,name:"comment.line.double-dash.lua",patterns:[{include:"#ldoc_tag"}]}]},{begin:/\/\*/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.begin.lua"}},end:/\*\//dgv,endCaptures:{"0":{name:"punctuation.definition.comment.end.lua"}},name:"comment.block.lua",patterns:[{include:"#emmydoc"},{include:"#ldoc_tag"}]}]},emmydoc:{patterns:[{begin:/(?<=---)[\t ]*@class/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\#\@])/dgv,patterns:[{match:/\b([\*A-Z_a-z][\-\*\.0-9A-Z_a-z]*)/dgv,name:"support.class.lua"},{match:/[\,\:]/dgv,name:"keyword.operator.lua"}]},{begin:/(?<=---)[\t ]*@enum/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\#\@])/dgv,patterns:[{begin:/\b([\*A-Z_a-z][\-\*\.0-9A-Z_a-z]*)/dgv,beginCaptures:{"0":{name:"variable.lua"}},end:/(?=\n)/dgv}]},{begin:/(?<=---)[\t ]*@type/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\#\@])/dgv,patterns:[{include:"#emmydoc.type"}]},{begin:/(?<=---)[\t ]*@alias/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\#\@])/dgv,patterns:[{begin:/\b([\*A-Z_a-z][\-\*\.0-9A-Z_a-z]*)/dgv,beginCaptures:{"0":{name:"variable.lua"}},end:/(?=[\n\#])/dgv,patterns:[{include:"#emmydoc.type"}]}]},{begin:/(?<=---)[\t ]*(@operator)\p{space}*(\b[a-z]+)?/dgv,beginCaptures:{"1":{name:"storage.type.annotation.lua"},"2":{name:"support.function.library.lua"}},end:/(?=[\n\#\@])/dgv,patterns:[{include:"#emmydoc.type"}]},{begin:/(?<=---)[\t ]*@cast/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\#\@])/dgv,patterns:[{begin:/\b([\*A-Z_a-z][\-\*\.0-9A-Z_a-z]*)/dgv,beginCaptures:{"0":{name:"variable.other.lua"}},end:/(?=\n)/dgv,patterns:[{include:"#emmydoc.type"},{match:/([\+-\|])/dgv,name:"keyword.operator.lua"}]}]},{begin:/(?<=---)[\t ]*@param/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\#\@])/dgv,patterns:[{begin:/\b([A-Z_a-z][0-9A-Z_a-z]*)\b(\??)/dgv,beginCaptures:{"1":{name:"entity.name.variable.lua"},"2":{name:"keyword.operator.lua"}},end:/(?=[\n\#])/dgv,patterns:[{include:"#emmydoc.type"}]}]},{begin:/(?<=---)[\t ]*@return/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\#\@])/dgv,patterns:[{match:/\?/dgv,name:"keyword.operator.lua"},{include:"#emmydoc.type"}]},{begin:/(?<=---)[\t ]*@field/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\#\@])/dgv,patterns:[{begin:/(\b([A-Z_a-z][0-9A-Z_a-z]*)\b|(\[))(\??)/dgv,beginCaptures:{"2":{name:"entity.name.variable.lua"},"3":{name:"keyword.operator.lua"}},end:/(?=[\n\#])/dgv,patterns:[{include:"#string"},{include:"#emmydoc.type"},{match:/\]/dgv,name:"keyword.operator.lua"}]}]},{begin:/(?<=---)[\t ]*@generic/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\#\@])/dgv,patterns:[{begin:/\b([A-Z_a-z][0-9A-Z_a-z]*)\b/dgv,beginCaptures:{"0":{name:"storage.type.generic.lua"}},end:/(?=\n)|(,)/dgv,endCaptures:{"0":{name:"keyword.operator.lua"}},patterns:[{match:/:/dgv,name:"keyword.operator.lua"},{include:"#emmydoc.type"}]}]},{begin:/(?<=---)[\t ]*@vararg/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\#\@])/dgv,patterns:[{include:"#emmydoc.type"}]},{begin:/(?<=---)[\t ]*@overload/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\#\@])/dgv,patterns:[{include:"#emmydoc.type"}]},{begin:/(?<=---)[\t ]*@deprecated/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\#\@])/dgv},{begin:/(?<=---)[\t ]*@meta/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\#\@])/dgv},{begin:/(?<=---)[\t ]*@private/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\#\@])/dgv},{begin:/(?<=---)[\t ]*@protected/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\#\@])/dgv},{begin:/(?<=---)[\t ]*@package/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\#\@])/dgv},{begin:/(?<=---)[\t ]*@version/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\#\@])/dgv,patterns:[{match:/\b(5\.1|5\.2|5\.3|5\.4|JIT)\b/dgv,name:"support.class.lua"},{match:/[\,\<\>]/dgv,name:"keyword.operator.lua"}]},{begin:/(?<=---)[\t ]*@see/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\#\@])/dgv,patterns:[{match:/\b([\*A-Z_a-z][\-\*\.0-9A-Z_a-z]*)/dgv,name:"support.class.lua"},{match:/#/dgv,name:"keyword.operator.lua"}]},{begin:/(?<=---)[\t ]*@diagnostic/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\#\@])/dgv,patterns:[{begin:/([\-0-9A-Z_a-z]+)[\t ]*(:)?/dgv,beginCaptures:{"1":{name:"keyword.other.unit"},"2":{name:"keyword.operator.unit"}},end:/(?=\n)/dgv,patterns:[{match:/\b([\*A-Z_a-z][\-0-9A-Z_a-z]*)/dgv,name:"support.class.lua"},{match:/,/dgv,name:"keyword.operator.lua"}]}]},{begin:/(?<=---)[\t ]*@module/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\#\@])/dgv,patterns:[{include:"#string"}]},{match:/(?<=---)[\t ]*@(async|nodiscard)/dgv,name:"storage.type.annotation.lua"},{begin:/(?<=---)\|\p{space}*[\+\>]?/dgv,beginCaptures:{"0":{name:"storage.type.annotation.lua"}},end:/(?=[\n\#\@])/dgv,patterns:[{include:"#string"}]}]},"emmydoc.type":{patterns:[{begin:/\bfun\b/dgv,beginCaptures:{"0":{name:"keyword.control.lua"}},end:/(?=[\#\p{space}])/dgv,patterns:[{match:/[\(\)\,\:\?][\t ]*/dgv,name:"keyword.operator.lua"},{match:/([A-Z_a-z][\-\]\*\,\.0-9\<\>A-\[_a-z]*)(?<!,)[\t ]*(?=\??:)/dgv,name:"entity.name.variable.lua"},{include:"#emmydoc.type"},{include:"#string"}]},{match:/<[\*A-Z_a-z][\-\*\.0-9A-Z_a-z]*>/dgv,name:"storage.type.generic.lua"},{match:/\basync\b/dgv,name:"entity.name.tag.lua"},{match:/[\,\:\?\`\{\|\}][\t ]*/dgv,name:"keyword.operator.lua"},{begin:/(?=["'\*\.A-\[_a-z])/dgv,end:/(?=[\#\)\,\:\?\|\}\p{space}])/dgv,patterns:[{match:/([\-\]\*\,\.0-9\<\>A-\[_a-z]+)(?<!,)[\t ]*/dgv,name:"support.type.lua"},{match:/(\.\.\.)[\t ]*/dgv,name:"constant.language.lua"},{include:"#string"}]}]},escaped_char:{patterns:[{match:/\\[\n"'\\abfnrtv]/dgv,name:"constant.character.escape.lua"},{match:/\\z[\t\n ]*/dgv,name:"constant.character.escape.lua"},{match:/\\\p{Nd}{1,3}/dgv,name:"constant.character.escape.byte.lua"},{match:/\\x\p{AHex}\p{AHex}/dgv,name:"constant.character.escape.byte.lua"},{match:/\\u\{\p{AHex}+\}/dgv,name:"constant.character.escape.unicode.lua"},{match:/\\[^\n]/dgv,name:"invalid.illegal.character.escape.lua"}]},ldoc_tag:{captures:{"1":{name:"punctuation.definition.block.tag.ldoc"},"2":{name:"storage.type.class.ldoc"}},match:/[\t ]*(@)(alias|annotation|author|charset|class|classmod|comment|constructor|copyright|description|example|export|factory|field|file|fixme|function|include|lfunction|license|local|module|name|param|pragma|private|raise|release|return|script|section|see|set|static|submodule|summary|tfield|thread|tparam|treturn|todo|topic|type|usage|warning|within)\b/dgvy},string:{patterns:[{begin:/'/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.lua"}},end:/'[\t ]*|(?=\n)/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.lua"}},name:"string.quoted.single.lua",patterns:[{include:"#escaped_char"}]},{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.lua"}},end:/"[\t ]*|(?=\n)/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.lua"}},name:"string.quoted.double.lua",patterns:[{include:"#escaped_char"}]},{begin:/`/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.lua"}},end:/`[\t ]*|(?=\n)/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.lua"}},name:"string.quoted.double.lua"},{begin:/(?<=\.cdef)\p{space}*(\[(=*)\[)/dgv,beginCaptures:{"0":{name:"string.quoted.other.multiline.lua"},"1":{name:"punctuation.definition.string.begin.lua"}},contentName:"meta.embedded.lua",end:/(\]\2\])[\t ]*()/dgv,endCaptures:{"0":{name:"string.quoted.other.multiline.lua"},"1":{name:"punctuation.definition.string.end.lua"}},patterns:[{include:"source.c"}]},{begin:/(?<!--)\[(=*)\[/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.lua"}},end:/\]\1\][\t ]*()/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.lua"}},name:"string.quoted.other.multiline.lua"}]}},scopeName:"source.lua",embeddedLangs:["c"],aliases:undefined})
|
|
5
5
|
|
|
6
6
|
export default [
|
|
7
7
|
...c,
|
package/dist/luau.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const lang = Object.freeze({displayName:"Luau",fileTypes:["luau"],name:"luau",patterns:[{include:"#function-definition"},{include:"#number"},{include:"#string"},{include:"#shebang"},{include:"#comment"},{include:"#local-declaration"},{include:"#for-loop"},{include:"#type-alias-declaration"},{include:"#keyword"},{include:"#language_constant"},{include:"#standard_library"},{include:"#identifier"},{include:"#operator"},{include:"#parentheses"},{include:"#table"},{include:"#type_cast"},{include:"#type_annotation"},{include:"#attribute"}],repository:{attribute:{patterns:[{captures:{"1":{name:"keyword.operator.attribute.luau"},"2":{name:"storage.type.attribute.luau"}},match:/(@)([a-zA-Z_][a-zA-Z0-9_]*)/dgv,name:"meta.attribute.luau"}]},comment:{patterns:[{begin:/--\[(=*)\[/dgv,end:/\]\1\]()/dgv,name:"comment.block.luau",patterns:[{begin:/(```luau?)\p{space}+/dgv,beginCaptures:{"1":{name:"comment.luau"}},end:/(```)/dgv,endCaptures:{"1":{name:"comment.luau"}},name:"keyword.operator.other.luau",patterns:[{include:"source.luau"}]},{include:"#doc_comment_tags"}]},{begin:/---/dgv,end:/\n/dgv,name:"comment.line.double-dash.documentation.luau",patterns:[{include:"#doc_comment_tags"}]},{begin:/--/dgv,end:/\n/dgv,name:"comment.line.double-dash.luau"}]},doc_comment_tags:{patterns:[{match:/@[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"storage.type.class.luadoc.luau"},{captures:{"1":{name:"storage.type.class.luadoc.luau"},"2":{name:"variable.parameter.luau"}},match:/((?<=[\p{space}\*\!\/])[\\\@]param)\p{space}+(\b[\p{L}\p{M}\p{N}\p{Pc}]+\b)/dgv}]},"for-loop":{begin:/\b(for)\b/dgv,beginCaptures:{"1":{name:"keyword.control.luau"}},end:/\b(in)\b|(=)/dgv,endCaptures:{"1":{name:"keyword.control.luau"},"2":{name:"keyword.operator.assignment.luau"}},patterns:[{begin:/(:)/dgv,beginCaptures:{"1":{name:"keyword.operator.type.luau"}},end:/(?=\p{space}*in\b|\p{space}*[\=\,]|\p{space}*(?=\n?$))/dgv,patterns:[{include:"#type_literal"}]},{match:/\b([a-zA-Z_][a-zA-Z0-9_]*)\b/dgv,name:"variable.parameter.luau"}]},"function-definition":{begin:/\b(?:(local)\p{space}+)?(function)\b(?![\,\:])/dgv,beginCaptures:{"1":{name:"storage.modifier.local.luau"},"2":{name:"keyword.control.luau"}},end:/(?<=[\)\-\{\}\[\]"'])/dgv,name:"meta.function.luau",patterns:[{include:"#comment"},{include:"#generics-declaration"},{begin:/(\()/dgv,beginCaptures:{"1":{name:"punctuation.definition.parameters.begin.luau"}},end:/(\))/dgv,endCaptures:{"1":{name:"punctuation.definition.parameters.end.luau"}},name:"meta.parameter.luau",patterns:[{include:"#comment"},{match:/\.\.\./dgv,name:"variable.parameter.function.varargs.luau"},{match:/[a-zA-Z_][a-zA-Z0-9_]*/dgv,name:"variable.parameter.function.luau"},{match:/,/dgv,name:"punctuation.separator.arguments.luau"},{begin:/:/dgv,beginCaptures:{"0":{name:"keyword.operator.type.luau"}},end:/(?=[\)\,])/dgv,patterns:[{include:"#type_literal"}]}]},{match:/\b(__(?:add|call|concat|div|eq|index|le|len|lt|metatable|mod|mode|mul|newindex|pow|sub|tostring|unm|iter|idiv))\b/dgv,name:"variable.language.metamethod.luau"},{match:/\b([a-zA-Z_][a-zA-Z0-9_]*)\b/dgv,name:"entity.name.function.luau"}]},"generics-declaration":{begin:/(<)/dgv,end:/(>)/dgv,patterns:[{match:/[a-zA-Z_][a-zA-Z0-9_]*/dgv,name:"entity.name.type.luau"},{match:/=/dgv,name:"keyword.operator.assignment.luau"},{include:"#type_literal"}]},identifier:{patterns:[{match:/\b([a-zA-Z_][a-zA-Z0-9_]*)\b(?=\p{space}*(?:[\(\{"']|\[\[))/dgv,name:"entity.name.function.luau"},{match:/(?<=[^\.]\.|:)\b([a-zA-Z_][a-zA-Z0-9_]*)\b/dgv,name:"variable.other.property.luau"},{match:/\b([A-Z_][A-Z0-9_]*)\b/dgv,name:"variable.other.constant.luau"},{match:/\b([a-zA-Z_][a-zA-Z0-9_]*)\b/dgv,name:"variable.other.readwrite.luau"}]},interpolated_string_expression:{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.interpolated-string-expression.begin.luau"}},contentName:"meta.embedded.line.luau",end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.interpolated-string-expression.end.luau"}},name:"meta.template.expression.luau",patterns:[{include:"source.luau"}]},keyword:{patterns:[{match:/\b(break|do|else|for|if|elseif|return|then|repeat|while|until|end|in|continue)\b/dgv,name:"keyword.control.luau"},{match:/\b(local)\b/dgv,name:"storage.modifier.local.luau"},{match:/\b(function)\b(?![\,\:])/dgv,name:"keyword.control.luau"},{match:/(?<![^\.]\.|:)\b(self)\b/dgv,name:"variable.language.self.luau"},{match:/\b(and|or|not)\b/dgv,name:"keyword.operator.logical.luau keyword.operator.wordlike.luau"},{match:/(?<=[^\.]\.|:)\b(__(?:add|call|concat|div|eq|index|le|len|lt|metatable|mod|mode|mul|newindex|pow|sub|tostring|unm))\b/dgv,name:"variable.language.metamethod.luau"},{match:/(?<!\.)\.{3}(?!\.)/dgv,name:"keyword.other.unit.luau"}]},language_constant:{patterns:[{match:/(?<![^\.]\.|:)\b(false)\b/dgv,name:"constant.language.boolean.false.luau"},{match:/(?<![^\.]\.|:)\b(true)\b/dgv,name:"constant.language.boolean.true.luau"},{match:/(?<![^\.]\.|:)\b(nil(?!:))\b/dgv,name:"constant.language.nil.luau"}]},"local-declaration":{begin:/\b(local)\b/dgv,beginCaptures:{"1":{name:"storage.modifier.local.luau"}},end:/(?=\p{space}*do\b|\p{space}*[\=\;]|\p{space}*(?=\n?$))/dgv,patterns:[{include:"#comment"},{include:"#attribute"},{begin:/(:)/dgv,beginCaptures:{"1":{name:"keyword.operator.type.luau"}},end:/(?=\p{space}*do\b|\p{space}*[\=\;\,]|\p{space}*(?=\n?$))/dgv,patterns:[{include:"#type_literal"}]},{match:/\b([A-Z_][A-Z0-9_]*)\b/dgv,name:"variable.other.constant.luau"},{match:/\b([a-zA-Z_][a-zA-Z0-9_]*)\b/dgv,name:"variable.other.readwrite.luau"}]},number:{patterns:[{match:/\b0_*[xX]_*[\p{Nd}a-fA-F_]*(?:[eE][\+\-]?_*\p{Nd}[\p{Nd}_]*(?:\.[\p{Nd}_]*)?)?/dgv,name:"constant.numeric.hex.luau"},{match:/\b0_*[bB][01_]+(?:[eE][\+\-]?_*\p{Nd}[\p{Nd}_]*(?:\.[\p{Nd}_]*)?)?/dgv,name:"constant.numeric.binary.luau"},{match:/(?:\p{Nd}[\p{Nd}_]*(?:\.[\p{Nd}_]*)?|\.\p{Nd}[\p{Nd}_]*)(?:[eE][\+\-]?_*\p{Nd}[\p{Nd}_]*(?:\.[\p{Nd}_]*)?)?/dgv,name:"constant.numeric.decimal.luau"}]},operator:{patterns:[{match:/==|~=|!=|<=?|>=?/dgv,name:"keyword.operator.comparison.luau"},{match:/\+=|-=|\/=|\/\/=|\*=|%=|\^=|\.\.=|=/dgv,name:"keyword.operator.assignment.luau"},{match:/[\+\-\%\*]|\/\/|[\/\^]/dgv,name:"keyword.operator.arithmetic.luau"},{match:/#|(?<!\.)\.{2}(?!\.)/dgv,name:"keyword.operator.other.luau"}]},parentheses:{begin:/(\()/dgv,beginCaptures:{"1":{name:"punctuation.arguments.begin.luau"}},end:/(\))/dgv,endCaptures:{"1":{name:"punctuation.arguments.end.luau"}},patterns:[{match:/,/dgv,name:"punctuation.separator.arguments.luau"},{include:"source.luau"}]},shebang:{captures:{"1":{name:"punctuation.definition.comment.luau"}},match:/^(#!)[^\n]*(?=\n?$)\n?/dgv,name:"comment.line.shebang.luau"},standard_library:{patterns:[{match:/(?<![^\.]\.|:)\b(assert|collectgarbage|error|gcinfo|getfenv|getmetatable|ipairs|loadstring|newproxy|next|pairs|pcall|print|rawequal|rawset|require|select|setfenv|setmetatable|tonumber|tostring|type|typeof|unpack|xpcall)\b/dgv,name:"support.function.luau"},{match:/(?<![^\.]\.|:)\b(_(?:G|VERSION))\b/dgv,name:"constant.language.luau"},{match:/(?<![^\.]\.|:)\b(bit32\.(?:arshift|band|bnot|bor|btest|bxor|extract|lrotate|lshift|replace|rrotate|rshift|countlz|countrz|byteswap)|coroutine\.(?:create|isyieldable|resume|running|status|wrap|yield|close)|debug\.(?:info|loadmodule|profilebegin|profileend|traceback)|math\.(?:abs|acos|asin|atan|atan2|ceil|clamp|cos|cosh|deg|exp|floor|fmod|frexp|ldexp|log|log10|max|min|modf|noise|pow|rad|random|randomseed|round|sign|sin|sinh|sqrt|tan|tanh)|os\.(?:clock|date|difftime|time)|string\.(?:byte|char|find|format|gmatch|gsub|len|lower|match|pack|packsize|rep|reverse|split|sub|unpack|upper)|table\.(?:concat|create|find|foreach|foreachi|getn|insert|maxn|move|pack|remove|sort|unpack|clear|freeze|isfrozen|clone)|task\.(?:spawn|synchronize|desynchronize|wait|defer|delay)|utf8\.(?:char|codepoint|codes|graphemes|len|nfcnormalize|nfdnormalize|offset)|buffer\.(?:create|fromstring|tostring|len|readi8|readu8|readi16|readu16|readi32|readu32|readf32|readf64|writei8|writeu8|writei16|writeu16|writei32|writeu32|writef32|writef64|readstring|writestring|copy|fill))\b/dgv,name:"support.function.luau"},{match:/(?<![^\.]\.|:)\b(bit32|buffer|coroutine|debug|math(\.(huge|pi))?|os|string|table|task|utf8(\.charpattern)?)\b/dgv,name:"support.constant.luau"},{match:/(?<![^\.]\.|:)\b(delay|DebuggerManager|elapsedTime|PluginManager|printidentity|settings|spawn|stats|tick|time|UserSettings|version|wait|warn)\b/dgv,name:"support.function.luau"},{match:/(?<![^\.]\.|:)\b(game|plugin|shared|script|workspace|Enum(?:\.[\p{L}\p{M}\p{N}\p{Pc}]+){0,2})\b/dgv,name:"constant.language.luau"}]},string:{patterns:[{begin:/"/dgv,end:/"/dgv,name:"string.quoted.double.luau",patterns:[{include:"#string_escape"}]},{begin:/'/dgv,end:/'/dgv,name:"string.quoted.single.luau",patterns:[{include:"#string_escape"}]},{begin:/\[(=*)\[/dgv,end:/\]\1\]()/dgv,name:"string.other.multiline.luau"},{begin:/`/dgv,end:/`/dgv,name:"string.interpolated.luau",patterns:[{include:"#interpolated_string_expression"},{include:"#string_escape"}]}]},string_escape:{patterns:[{match:/\\[abfnrtvz'"\`\{\\]/dgv,name:"constant.character.escape.luau"},{match:/\\\p{Nd}{1,3}/dgv,name:"constant.character.escape.luau"},{match:/\\x\p{AHex}{2}/dgv,name:"constant.character.escape.luau"},{match:/\\u\{\p{AHex}*\}/dgv,name:"constant.character.escape.luau"},{match:/\\(?=\n?$)/dgv,name:"constant.character.escape.luau"}]},table:{begin:/(\{)/dgv,beginCaptures:{"1":{name:"punctuation.table.begin.luau"}},end:/(\})/dgv,endCaptures:{"1":{name:"punctuation.table.end.luau"}},patterns:[{match:/[\,\;]/dgv,name:"punctuation.separator.fields.luau"},{include:"source.luau"}]},"type-alias-declaration":{begin:/^\b(?:(export)\p{space}+)?(type)\b/dgv,beginCaptures:{"1":{name:"storage.modifier.visibility.luau"},"2":{name:"storage.type.luau"}},end:/(?=\p{space}*(?=\n?$))|(?=\p{space}*;)/dgv,patterns:[{include:"#type_literal"},{match:/=/dgv,name:"keyword.operator.assignment.luau"}]},type_annotation:{begin:/:(?!\b([a-zA-Z_][a-zA-Z0-9_]*)\b(?=\p{space}*(?:[\(\{"']|\[\[)))/dgv,end:/(?<=\))(?!\p{space}*->)|[\=\;]|(?=\n?$)|(?=\breturn\b)|(?=\bend\b)/dgv,patterns:[{include:"#comment"},{include:"#type_literal"}]},type_cast:{begin:/(::)/dgv,beginCaptures:{"1":{name:"keyword.operator.typecast.luau"}},end:/(?=^|[\;\)\,\}\]\:\?\-\+\>](?!\p{space}*[\&\|])|(?=\n?$)|\b(break|do|else|for|if|elseif|return|then|repeat|while|until|end|in|continue)\b)/dgv,patterns:[{include:"#type_literal"}]},type_literal:{patterns:[{include:"#comment"},{include:"#string"},{match:/[\?\&\|]/dgv,name:"keyword.operator.type.luau"},{match:/->/dgv,name:"keyword.operator.type.function.luau"},{match:/\b(false)\b/dgv,name:"constant.language.boolean.false.luau"},{match:/\b(true)\b/dgv,name:"constant.language.boolean.true.luau"},{match:/\b(nil|string|number|boolean|thread|userdata|symbol|any)\b/dgv,name:"support.type.primitive.luau"},{begin:/\b(typeof)\b(\()/dgv,beginCaptures:{"1":{name:"support.function.luau"},"2":{name:"punctuation.arguments.begin.typeof.luau"}},end:/(\))/dgv,endCaptures:{"1":{name:"punctuation.arguments.end.typeof.luau"}},patterns:[{include:"source.luau"}]},{begin:/(<)/dgv,beginCaptures:{"1":{name:"punctuation.definition.typeparameters.begin.luau"}},end:/(>)/dgv,endCaptures:{"1":{name:"punctuation.definition.typeparameters.end.luau"}},patterns:[{match:/=/dgv,name:"keyword.operator.assignment.luau"},{include:"#type_literal"}]},{match:/\b([a-zA-Z_][a-zA-Z0-9_]*)\b/dgv,name:"entity.name.type.luau"},{begin:/\{/dgv,end:/\}/dgv,patterns:[{begin:/\[/dgv,end:/\]/dgv,patterns:[{include:"#type_literal"}]},{captures:{"1":{name:"variable.property.luau"},"2":{name:"keyword.operator.type.luau"}},match:/\b([a-zA-Z_][a-zA-Z0-9_]*)\b(:)/dgv},{include:"#type_literal"},{match:/[\,\;]/dgv,name:"punctuation.separator.fields.type.luau"}]},{begin:/\(/dgv,end:/\)/dgv,patterns:[{captures:{"1":{name:"variable.parameter.luau"},"2":{name:"keyword.operator.type.luau"}},match:/\b([a-zA-Z_][a-zA-Z0-9_]*)\b(:)/dgv,name:"variable.parameter.luau"},{include:"#type_literal"}]}]}},scopeName:"source.luau",embeddedLangs:undefined,aliases:undefined})
|
|
1
|
+
const lang = Object.freeze({displayName:"Luau",fileTypes:["luau"],name:"luau",patterns:[{include:"#function-definition"},{include:"#number"},{include:"#string"},{include:"#shebang"},{include:"#comment"},{include:"#local-declaration"},{include:"#for-loop"},{include:"#type-alias-declaration"},{include:"#keyword"},{include:"#language_constant"},{include:"#standard_library"},{include:"#identifier"},{include:"#operator"},{include:"#parentheses"},{include:"#table"},{include:"#type_cast"},{include:"#type_annotation"},{include:"#attribute"}],repository:{attribute:{patterns:[{captures:{"1":{name:"keyword.operator.attribute.luau"},"2":{name:"storage.type.attribute.luau"}},match:/(@)([A-Z_a-z][0-9A-Z_a-z]*)/dgv,name:"meta.attribute.luau"}]},comment:{patterns:[{begin:/--\[(=*)\[/dgv,end:/\]\1\]()/dgv,name:"comment.block.luau",patterns:[{begin:/(```luau?)\p{space}+/dgv,beginCaptures:{"1":{name:"comment.luau"}},end:/(```)/dgv,endCaptures:{"1":{name:"comment.luau"}},name:"keyword.operator.other.luau",patterns:[{include:"source.luau"}]},{include:"#doc_comment_tags"}]},{begin:/---/dgv,end:/\n/dgv,name:"comment.line.double-dash.documentation.luau",patterns:[{include:"#doc_comment_tags"}]},{begin:/--/dgv,end:/\n/dgv,name:"comment.line.double-dash.luau"}]},doc_comment_tags:{patterns:[{match:/@[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"storage.type.class.luadoc.luau"},{captures:{"1":{name:"storage.type.class.luadoc.luau"},"2":{name:"variable.parameter.luau"}},match:/((?<=[\!\*\/\p{space}])[\@\\]param)\p{space}+\b([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv}]},"for-loop":{begin:/\b(for)\b/dgv,beginCaptures:{"1":{name:"keyword.control.luau"}},end:/\b(in)\b|(=)/dgv,endCaptures:{"1":{name:"keyword.control.luau"},"2":{name:"keyword.operator.assignment.luau"}},patterns:[{begin:/(:)/dgv,beginCaptures:{"1":{name:"keyword.operator.type.luau"}},end:/(?=\p{space}*in\b|\p{space}*[\,\=]|\p{space}*(?=\n?$))/dgv,patterns:[{include:"#type_literal"}]},{match:/\b([A-Z_a-z][0-9A-Z_a-z]*)\b/dgv,name:"variable.parameter.luau"}]},"function-definition":{begin:/\b(?:(local)\p{space}+)?(function)\b(?![\,\:])/dgv,beginCaptures:{"1":{name:"storage.modifier.local.luau"},"2":{name:"keyword.control.luau"}},end:/(?<=[\-\]"'\)\[\{\}])/dgv,name:"meta.function.luau",patterns:[{include:"#comment"},{include:"#generics-declaration"},{begin:/(\()/dgv,beginCaptures:{"1":{name:"punctuation.definition.parameters.begin.luau"}},end:/(\))/dgv,endCaptures:{"1":{name:"punctuation.definition.parameters.end.luau"}},name:"meta.parameter.luau",patterns:[{include:"#comment"},{match:/\.\.\./dgv,name:"variable.parameter.function.varargs.luau"},{match:/[A-Z_a-z][0-9A-Z_a-z]*/dgv,name:"variable.parameter.function.luau"},{match:/,/dgv,name:"punctuation.separator.arguments.luau"},{begin:/:/dgv,beginCaptures:{"0":{name:"keyword.operator.type.luau"}},end:/(?=[\)\,])/dgv,patterns:[{include:"#type_literal"}]}]},{match:/\b(__(?:add|call|concat|div|eq|index|len??|lt|metatable|mode??|mul|newindex|pow|sub|tostring|unm|iter|idiv))\b/dgv,name:"variable.language.metamethod.luau"},{match:/\b([A-Z_a-z][0-9A-Z_a-z]*)\b/dgv,name:"entity.name.function.luau"}]},"generics-declaration":{begin:/(<)/dgv,end:/(>)/dgv,patterns:[{match:/[A-Z_a-z][0-9A-Z_a-z]*/dgv,name:"entity.name.type.luau"},{match:/=/dgv,name:"keyword.operator.assignment.luau"},{include:"#type_literal"}]},identifier:{patterns:[{match:/\b([A-Z_a-z][0-9A-Z_a-z]*)\b(?=\p{space}*(?:["'\(\{]|\[\[))/dgv,name:"entity.name.function.luau"},{match:/(?<=[^\.]\.|:)\b([A-Z_a-z][0-9A-Z_a-z]*)\b/dgv,name:"variable.other.property.luau"},{match:/\b([A-Z_][0-9A-Z_]*)\b/dgv,name:"variable.other.constant.luau"},{match:/\b([A-Z_a-z][0-9A-Z_a-z]*)\b/dgv,name:"variable.other.readwrite.luau"}]},interpolated_string_expression:{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.interpolated-string-expression.begin.luau"}},contentName:"meta.embedded.line.luau",end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.interpolated-string-expression.end.luau"}},name:"meta.template.expression.luau",patterns:[{include:"source.luau"}]},keyword:{patterns:[{match:/\b(break|do|else|for|if|elseif|return|then|repeat|while|until|end|in|continue)\b/dgv,name:"keyword.control.luau"},{match:/\b(local)\b/dgv,name:"storage.modifier.local.luau"},{match:/\b(function)\b(?![\,\:])/dgv,name:"keyword.control.luau"},{match:/(?<![^\.]\.|:)\b(self)\b/dgv,name:"variable.language.self.luau"},{match:/\b(and|or|not)\b/dgv,name:"keyword.operator.logical.luau keyword.operator.wordlike.luau"},{match:/(?<=[^\.]\.|:)\b(__(?:add|call|concat|div|eq|index|len??|lt|metatable|mode??|mul|newindex|pow|sub|tostring|unm))\b/dgv,name:"variable.language.metamethod.luau"},{match:/(?<!\.)\.{3}(?!\.)/dgv,name:"keyword.other.unit.luau"}]},language_constant:{patterns:[{match:/(?<![^\.]\.|:)\b(false)\b/dgv,name:"constant.language.boolean.false.luau"},{match:/(?<![^\.]\.|:)\b(true)\b/dgv,name:"constant.language.boolean.true.luau"},{match:/(?<![^\.]\.|:)\b(nil(?!:))\b/dgv,name:"constant.language.nil.luau"}]},"local-declaration":{begin:/\b(local)\b/dgv,beginCaptures:{"1":{name:"storage.modifier.local.luau"}},end:/(?=\p{space}*do\b|\p{space}*[\;\=]|\p{space}*(?=\n?$))/dgv,patterns:[{include:"#comment"},{include:"#attribute"},{begin:/(:)/dgv,beginCaptures:{"1":{name:"keyword.operator.type.luau"}},end:/(?=\p{space}*do\b|\p{space}*[\,\;\=]|\p{space}*(?=\n?$))/dgv,patterns:[{include:"#type_literal"}]},{match:/\b([A-Z_][0-9A-Z_]*)\b/dgv,name:"variable.other.constant.luau"},{match:/\b([A-Z_a-z][0-9A-Z_a-z]*)\b/dgv,name:"variable.other.readwrite.luau"}]},number:{patterns:[{match:/\b0_*[Xx]_*[A-F_a-f\p{Nd}]*(?:[Ee][\-\+]?_*\p{Nd}[_\p{Nd}]*(?:\.[_\p{Nd}]*)?)?/dgv,name:"constant.numeric.hex.luau"},{match:/\b0_*[Bb][01_]+(?:[Ee][\-\+]?_*\p{Nd}[_\p{Nd}]*(?:\.[_\p{Nd}]*)?)?/dgv,name:"constant.numeric.binary.luau"},{match:/(?:\p{Nd}[_\p{Nd}]*(?:\.[_\p{Nd}]*)?|\.\p{Nd}[_\p{Nd}]*)(?:[Ee][\-\+]?_*\p{Nd}[_\p{Nd}]*(?:\.[_\p{Nd}]*)?)?/dgv,name:"constant.numeric.decimal.luau"}]},operator:{patterns:[{match:/==|~=|!=|<=?|>=?/dgv,name:"keyword.operator.comparison.luau"},{match:/(?:[\-\+]|\/\/??|[\%\*\^]|\.\.|)=/dgv,name:"keyword.operator.assignment.luau"},{match:/[\-\%\*\+]|\/\/|[\/\^]/dgv,name:"keyword.operator.arithmetic.luau"},{match:/#|(?<!\.)\.{2}(?!\.)/dgv,name:"keyword.operator.other.luau"}]},parentheses:{begin:/(\()/dgv,beginCaptures:{"1":{name:"punctuation.arguments.begin.luau"}},end:/(\))/dgv,endCaptures:{"1":{name:"punctuation.arguments.end.luau"}},patterns:[{match:/,/dgv,name:"punctuation.separator.arguments.luau"},{include:"source.luau"}]},shebang:{captures:{"1":{name:"punctuation.definition.comment.luau"}},match:/^(#!)[^\n]*(?=\n?$)\n?/dgv,name:"comment.line.shebang.luau"},standard_library:{patterns:[{match:/(?<![^\.]\.|:)\b(assert|collectgarbage|error|gcinfo|getfenv|getmetatable|ipairs|loadstring|newproxy|next|pairs|pcall|print|rawequal|rawset|require|select|setfenv|setmetatable|tonumber|tostring|type|typeof|unpack|xpcall)\b/dgv,name:"support.function.luau"},{match:/(?<![^\.]\.|:)\b(_(?:G|VERSION))\b/dgv,name:"constant.language.luau"},{match:/(?<![^\.]\.|:)\b(bit32\.(?:arshift|band|bnot|bor|btest|bxor|extract|lrotate|lshift|replace|rrotate|rshift|countlz|countrz|byteswap)|coroutine\.(?:create|isyieldable|resume|running|status|wrap|yield|close)|debug\.(?:info|loadmodule|profilebegin|profileend|traceback)|math\.(?:abs|acos|asin|atan2??|ceil|clamp|cosh??|deg|exp|floor|fmod|frexp|ldexp|log|log10|max|min|modf|noise|pow|rad|random|randomseed|round|sign|sinh??|sqrt|tanh??)|os\.(?:clock|date|difftime|time)|string\.(?:byte|char|find|format|gmatch|gsub|len|lower|match|pack|packsize|rep|reverse|split|sub|unpack|upper)|table\.(?:concat|create|find|foreachi??|getn|insert|maxn|move|pack|remove|sort|unpack|clear|freeze|isfrozen|clone)|task\.(?:spawn|synchronize|desynchronize|wait|defer|delay)|utf8\.(?:char|codepoint|codes|graphemes|len|nfcnormalize|nfdnormalize|offset)|buffer\.(?:create|fromstring|tostring|len|readi8|readu8|readi16|readu16|readi32|readu32|readf32|readf64|writei8|writeu8|writei16|writeu16|writei32|writeu32|writef32|writef64|readstring|writestring|copy|fill))\b/dgv,name:"support.function.luau"},{match:/(?<![^\.]\.|:)\b(bit32|buffer|coroutine|debug|math(\.(huge|pi))?|os|string|table|task|utf8(\.charpattern)?)\b/dgv,name:"support.constant.luau"},{match:/(?<![^\.]\.|:)\b(delay|DebuggerManager|elapsedTime|PluginManager|printidentity|settings|spawn|stats|tick|time|UserSettings|version|wait|warn)\b/dgv,name:"support.function.luau"},{match:/(?<![^\.]\.|:)\b(game|plugin|shared|script|workspace|Enum(?:\.[\p{L}\p{M}\p{N}\p{Pc}]+){0,2})\b/dgv,name:"constant.language.luau"}]},string:{patterns:[{begin:/"/dgv,end:/"/dgv,name:"string.quoted.double.luau",patterns:[{include:"#string_escape"}]},{begin:/'/dgv,end:/'/dgv,name:"string.quoted.single.luau",patterns:[{include:"#string_escape"}]},{begin:/\[(=*)\[/dgv,end:/\]\1\]()/dgv,name:"string.other.multiline.luau"},{begin:/`/dgv,end:/`/dgv,name:"string.interpolated.luau",patterns:[{include:"#interpolated_string_expression"},{include:"#string_escape"}]}]},string_escape:{patterns:[{match:/\\["'\\\`abfnrtvz\{]/dgv,name:"constant.character.escape.luau"},{match:/\\\p{Nd}{1,3}/dgv,name:"constant.character.escape.luau"},{match:/\\x\p{AHex}{2}/dgv,name:"constant.character.escape.luau"},{match:/\\u\{\p{AHex}*\}/dgv,name:"constant.character.escape.luau"},{match:/\\(?=\n?$)/dgv,name:"constant.character.escape.luau"}]},table:{begin:/(\{)/dgv,beginCaptures:{"1":{name:"punctuation.table.begin.luau"}},end:/(\})/dgv,endCaptures:{"1":{name:"punctuation.table.end.luau"}},patterns:[{match:/[\,\;]/dgv,name:"punctuation.separator.fields.luau"},{include:"source.luau"}]},"type-alias-declaration":{begin:/^\b(?:(export)\p{space}+)?(type)\b/dgv,beginCaptures:{"1":{name:"storage.modifier.visibility.luau"},"2":{name:"storage.type.luau"}},end:/(?=\p{space}*(?=\n?$))|(?=\p{space}*;)/dgv,patterns:[{include:"#type_literal"},{match:/=/dgv,name:"keyword.operator.assignment.luau"}]},type_annotation:{begin:/:(?!\b([A-Z_a-z][0-9A-Z_a-z]*)\b(?=\p{space}*(?:["'\(\{]|\[\[)))/dgv,end:/(?<=\))(?!\p{space}*->)|[\;\=]|(?=\n?$)|(?=\breturn\b)|(?=\bend\b)/dgv,patterns:[{include:"#comment"},{include:"#type_literal"}]},type_cast:{begin:/(::)/dgv,beginCaptures:{"1":{name:"keyword.operator.typecast.luau"}},end:/(?=^|[\-\]\)\+\,\:\;\>\?\}](?!\p{space}*[\&\|])|(?=\n?$)|\b(break|do|else|for|if|elseif|return|then|repeat|while|until|end|in|continue)\b)/dgv,patterns:[{include:"#type_literal"}]},type_literal:{patterns:[{include:"#comment"},{include:"#string"},{match:/[\&\?\|]/dgv,name:"keyword.operator.type.luau"},{match:/->/dgv,name:"keyword.operator.type.function.luau"},{match:/\b(false)\b/dgv,name:"constant.language.boolean.false.luau"},{match:/\b(true)\b/dgv,name:"constant.language.boolean.true.luau"},{match:/\b(nil|string|number|boolean|thread|userdata|symbol|any)\b/dgv,name:"support.type.primitive.luau"},{begin:/\b(typeof)\b(\()/dgv,beginCaptures:{"1":{name:"support.function.luau"},"2":{name:"punctuation.arguments.begin.typeof.luau"}},end:/(\))/dgv,endCaptures:{"1":{name:"punctuation.arguments.end.typeof.luau"}},patterns:[{include:"source.luau"}]},{begin:/(<)/dgv,beginCaptures:{"1":{name:"punctuation.definition.typeparameters.begin.luau"}},end:/(>)/dgv,endCaptures:{"1":{name:"punctuation.definition.typeparameters.end.luau"}},patterns:[{match:/=/dgv,name:"keyword.operator.assignment.luau"},{include:"#type_literal"}]},{match:/\b([A-Z_a-z][0-9A-Z_a-z]*)\b/dgv,name:"entity.name.type.luau"},{begin:/\{/dgv,end:/\}/dgv,patterns:[{begin:/\[/dgv,end:/\]/dgv,patterns:[{include:"#type_literal"}]},{captures:{"1":{name:"variable.property.luau"},"2":{name:"keyword.operator.type.luau"}},match:/\b([A-Z_a-z][0-9A-Z_a-z]*)\b(:)/dgv},{include:"#type_literal"},{match:/[\,\;]/dgv,name:"punctuation.separator.fields.type.luau"}]},{begin:/\(/dgv,end:/\)/dgv,patterns:[{captures:{"1":{name:"variable.parameter.luau"},"2":{name:"keyword.operator.type.luau"}},match:/\b([A-Z_a-z][0-9A-Z_a-z]*)\b(:)/dgv,name:"variable.parameter.luau"},{include:"#type_literal"}]}]}},scopeName:"source.luau",embeddedLangs:undefined,aliases:undefined})
|
|
2
2
|
|
|
3
3
|
export default [
|
|
4
4
|
lang
|
package/dist/make.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EmulatedRegExp } from 'oniguruma-to-es'
|
|
2
2
|
|
|
3
|
-
const lang = Object.freeze({displayName:"Makefile",name:"make",patterns:[{include:"#comment"},{include:"#variables"},{include:"#variable-assignment"},{include:"#directives"},{include:"#recipe"},{include:"#target"}],repository:{"another-variable-braces":{patterns:[{begin:/(?<=\{)(?!\})/dgv,end:/(?=\}|((?<!\\)\n))/dgv,name:"variable.other.makefile",patterns:[{include:"#variables"},{match:/\\\n/dgv,name:"constant.character.escape.continuation.makefile"}]}]},"another-variable-parentheses":{patterns:[{begin:/(?<=\()(?!\))/dgv,end:/(?=\)|((?<!\\)\n))/dgv,name:"variable.other.makefile",patterns:[{include:"#variables"},{match:/\\\n/dgv,name:"constant.character.escape.continuation.makefile"}]}]},"braces-interpolation":{begin:/\{/dgv,end:/\}/dgv,patterns:[{include:"#variables"},{include:"#interpolation"}]},"builtin-variable-braces":{patterns:[{match:/(?<=\{)(MAKEFILES|VPATH|SHELL|MAKESHELL|MAKE|MAKELEVEL|MAKEFLAGS|MAKECMDGOALS|CURDIR|SUFFIXES|\.LIBPATTERNS)(?=\p{space}*\})/dgv,name:"variable.language.makefile"}]},"builtin-variable-parentheses":{patterns:[{match:/(?<=\()(MAKEFILES|VPATH|SHELL|MAKESHELL|MAKE|MAKELEVEL|MAKEFLAGS|MAKECMDGOALS|CURDIR|SUFFIXES|\.LIBPATTERNS)(?=\p{space}*\))/dgv,name:"variable.language.makefile"}]},comma:{match:/,/dgv,name:"punctuation.separator.delimeter.comma.makefile"},comment:{begin:/(^ +)?((?<!\\)(\\\\)*)(?=#)/dgv,beginCaptures:{"1":{name:"punctuation.whitespace.comment.leading.makefile"}},end:/*@__PURE__*/ new EmulatedRegExp("(?!^)","dgv",{"strategy":"clip_search"}),patterns:[{begin:/#/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.makefile"}},end:/(?=[^\\])(?=\n?$)/dgv,name:"comment.line.number-sign.makefile",patterns:[{match:/\\\n/dgv,name:"constant.character.escape.continuation.makefile"}]}]},directives:{patterns:[{begin:/^ *([s
|
|
3
|
+
const lang = Object.freeze({displayName:"Makefile",name:"make",patterns:[{include:"#comment"},{include:"#variables"},{include:"#variable-assignment"},{include:"#directives"},{include:"#recipe"},{include:"#target"}],repository:{"another-variable-braces":{patterns:[{begin:/(?<=\{)(?!\})/dgv,end:/(?=\}|((?<!\\)\n))/dgv,name:"variable.other.makefile",patterns:[{include:"#variables"},{match:/\\\n/dgv,name:"constant.character.escape.continuation.makefile"}]}]},"another-variable-parentheses":{patterns:[{begin:/(?<=\()(?!\))/dgv,end:/(?=\)|((?<!\\)\n))/dgv,name:"variable.other.makefile",patterns:[{include:"#variables"},{match:/\\\n/dgv,name:"constant.character.escape.continuation.makefile"}]}]},"braces-interpolation":{begin:/\{/dgv,end:/\}/dgv,patterns:[{include:"#variables"},{include:"#interpolation"}]},"builtin-variable-braces":{patterns:[{match:/(?<=\{)(MAKEFILES|VPATH|SHELL|MAKESHELL|MAKE|MAKELEVEL|MAKEFLAGS|MAKECMDGOALS|CURDIR|SUFFIXES|\.LIBPATTERNS)(?=\p{space}*\})/dgv,name:"variable.language.makefile"}]},"builtin-variable-parentheses":{patterns:[{match:/(?<=\()(MAKEFILES|VPATH|SHELL|MAKESHELL|MAKE|MAKELEVEL|MAKEFLAGS|MAKECMDGOALS|CURDIR|SUFFIXES|\.LIBPATTERNS)(?=\p{space}*\))/dgv,name:"variable.language.makefile"}]},comma:{match:/,/dgv,name:"punctuation.separator.delimeter.comma.makefile"},comment:{begin:/(^ +)?((?<!\\)(\\\\)*)(?=#)/dgv,beginCaptures:{"1":{name:"punctuation.whitespace.comment.leading.makefile"}},end:/*@__PURE__*/ new EmulatedRegExp("(?!^)","dgv",{"strategy":"clip_search"}),patterns:[{begin:/#/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.makefile"}},end:/(?=[^\\])(?=\n?$)/dgv,name:"comment.line.number-sign.makefile",patterns:[{match:/\\\n/dgv,name:"constant.character.escape.continuation.makefile"}]}]},directives:{patterns:[{begin:/^ *([\-s]?include)\b/dgv,beginCaptures:{"1":{name:"keyword.control.include.makefile"}},end:/^/dgv,patterns:[{include:"#comment"},{include:"#variables"},{match:/%/dgv,name:"constant.other.placeholder.makefile"}]},{begin:/^ *(vpath)\b/dgv,beginCaptures:{"1":{name:"keyword.control.vpath.makefile"}},end:/^/dgv,patterns:[{include:"#comment"},{include:"#variables"},{match:/%/dgv,name:"constant.other.placeholder.makefile"}]},{begin:/^\p{space}*(?:(override)\p{space}*)?(define)\p{space}*(\P{space}+)\p{space}*([\+\:\?]??=)?(?=\p{space})/dgv,captures:{"1":{name:"keyword.control.override.makefile"},"2":{name:"keyword.control.define.makefile"},"3":{name:"variable.other.makefile"},"4":{name:"punctuation.separator.key-value.makefile"}},end:/^\p{space}*(endef)\b/dgv,name:"meta.scope.conditional.makefile",patterns:[{begin:/(?!\n)/dgvy,end:/^/dgv,patterns:[{include:"#comment"}]},{include:"#variables"},{include:"#directives"}]},{begin:/^ *(export)\b/dgv,beginCaptures:{"1":{name:"keyword.control.$1.makefile"}},end:/^/dgv,patterns:[{include:"#comment"},{include:"#variable-assignment"},{match:/\P{space}+/dgv,name:"variable.other.makefile"}]},{begin:/^ *(override|private)\b/dgv,beginCaptures:{"1":{name:"keyword.control.$1.makefile"}},end:/^/dgv,patterns:[{include:"#comment"},{include:"#variable-assignment"}]},{begin:/^ *(un(?:export|define))\b/dgv,beginCaptures:{"1":{name:"keyword.control.$1.makefile"}},end:/^/dgv,patterns:[{include:"#comment"},{match:/\P{space}+/dgv,name:"variable.other.makefile"}]},{begin:/^\p{space}*(ifn??(?:eq|def))(?=\p{space})/dgv,captures:{"1":{name:"keyword.control.$1.makefile"}},end:/^\p{space}*(endif)\b/dgv,name:"meta.scope.conditional.makefile",patterns:[{begin:/(?:)/dgv,end:/^/dgv,name:"meta.scope.condition.makefile",patterns:[{include:"#comma"},{include:"#variables"},{include:"#comment"}]},{begin:/^\p{space}*else(?=\p{space})\p{space}*(ifn??(?:eq|def))*(?=\p{space})/dgv,beginCaptures:{"0":{name:"keyword.control.else.makefile"}},end:/^/dgv,patterns:[{include:"#comma"},{include:"#variables"},{include:"#comment"}]},{include:"$self"}]}]},"flavor-variable-braces":{patterns:[{begin:/(?<=\{)(origin|flavor)\p{space}(?=[^\}\p{space}]+\p{space}*\})/dgv,beginCaptures:{"1":{name:"support.function.$1.makefile"}},contentName:"variable.other.makefile",end:/(?=\})/dgv,name:"meta.scope.function-call.makefile",patterns:[{include:"#variables"}]}]},"flavor-variable-parentheses":{patterns:[{begin:/(?<=\()(origin|flavor)\p{space}(?=[^\)\p{space}]+\p{space}*\))/dgv,beginCaptures:{"1":{name:"support.function.$1.makefile"}},contentName:"variable.other.makefile",end:/(?=\))/dgv,name:"meta.scope.function-call.makefile",patterns:[{include:"#variables"}]}]},"function-variable-braces":{patterns:[{begin:/(?<=\{)(subst|patsubst|strip|findstring|filter(-out)?|sort|word(list)?|firstword|lastword|dir|notdir|suffix|basename|addsuffix|addprefix|join|wildcard|realpath|abspath|info|error|warning|shell|foreach|if|or|and|call|eval|value|file|guile)\p{space}/dgv,beginCaptures:{"1":{name:"support.function.$1.makefile"}},end:/(?=\}|((?<!\\)\n))/dgv,name:"meta.scope.function-call.makefile",patterns:[{include:"#comma"},{include:"#variables"},{include:"#interpolation"},{match:/[\%\*]/dgv,name:"constant.other.placeholder.makefile"},{match:/\\\n/dgv,name:"constant.character.escape.continuation.makefile"}]}]},"function-variable-parentheses":{patterns:[{begin:/(?<=\()(subst|patsubst|strip|findstring|filter(-out)?|sort|word(list)?|firstword|lastword|dir|notdir|suffix|basename|addsuffix|addprefix|join|wildcard|realpath|abspath|info|error|warning|shell|foreach|if|or|and|call|eval|value|file|guile)\p{space}/dgv,beginCaptures:{"1":{name:"support.function.$1.makefile"}},end:/(?=\)|((?<!\\)\n))/dgv,name:"meta.scope.function-call.makefile",patterns:[{include:"#comma"},{include:"#variables"},{include:"#interpolation"},{match:/[\%\*]/dgv,name:"constant.other.placeholder.makefile"},{match:/\\\n/dgv,name:"constant.character.escape.continuation.makefile"}]}]},interpolation:{patterns:[{include:"#parentheses-interpolation"},{include:"#braces-interpolation"}]},"parentheses-interpolation":{begin:/\(/dgv,end:/\)/dgv,patterns:[{include:"#variables"},{include:"#interpolation"}]},recipe:{begin:/^\t([\-\+\@]*)/dgv,beginCaptures:{"1":{name:"keyword.control.$1.makefile"}},end:/[^\\](?=\n?$)/dgv,name:"meta.scope.recipe.makefile",patterns:[{match:/\\\n/dgv,name:"constant.character.escape.continuation.makefile"},{include:"#variables"}]},"simple-variable":{patterns:[{match:/\$[^\(\)\{\}]/dgv,name:"variable.language.makefile"}]},target:{begin:/^(?!\t)([^\:]*)(:)(?!=)/dgv,beginCaptures:{"1":{patterns:[{captures:{"1":{name:"support.function.target.$1.makefile"}},match:/^\p{space}*(\.(PHONY|SUFFIXES|DEFAULT|PRECIOUS|INTERMEDIATE|SECONDARY|SECONDEXPANSION|DELETE_ON_ERROR|IGNORE|LOW_RESOLUTION_TIME|SILENT|EXPORT_ALL_VARIABLES|NOTPARALLEL|ONESHELL|POSIX))\p{space}*(?=\n?$)/dgv},{begin:/(?=\P{space})/dgv,end:/(?=\p{space}|(?=\n?$))/dgv,name:"entity.name.function.target.makefile",patterns:[{include:"#variables"},{match:/%/dgv,name:"constant.other.placeholder.makefile"}]}]},"2":{name:"punctuation.separator.key-value.makefile"}},end:/[^\\](?=\n?$)/dgv,name:"meta.scope.target.makefile",patterns:[{begin:/(?:)/dgv,end:/(?=[^\\])(?=\n?$)/dgv,name:"meta.scope.prerequisites.makefile",patterns:[{match:/\\\n/dgv,name:"constant.character.escape.continuation.makefile"},{match:/[\%\*]/dgv,name:"constant.other.placeholder.makefile"},{include:"#comment"},{include:"#variables"}]}]},"variable-assignment":{begin:/*@__PURE__*/ new EmulatedRegExp("(^ *|^\\p{space}*)([^\\#\\:\\=\\p{space}]+)\\p{space}*((?:(?<![\\!\\+\\:\\?])|[\\!\\+\\:\\?])=)","dgv",{"strategy":"clip_search"}),beginCaptures:{"2":{name:"variable.other.makefile",patterns:[{include:"#variables"}]},"3":{name:"punctuation.separator.key-value.makefile"}},end:/\n/dgv,patterns:[{match:/\\\n/dgv,name:"constant.character.escape.continuation.makefile"},{include:"#comment"},{include:"#variables"}]},"variable-braces":{patterns:[{begin:/\$\{/dgv,captures:{"0":{name:"punctuation.definition.variable.makefile"}},end:/\}|((?<!\\)\n)/dgv,name:"string.interpolated.makefile",patterns:[{include:"#variables"},{include:"#builtin-variable-braces"},{include:"#function-variable-braces"},{include:"#flavor-variable-braces"},{include:"#another-variable-braces"}]}]},"variable-parentheses":{patterns:[{begin:/\$\(/dgv,captures:{"0":{name:"punctuation.definition.variable.makefile"}},end:/\)|((?<!\\)\n)/dgv,name:"string.interpolated.makefile",patterns:[{include:"#variables"},{include:"#builtin-variable-parentheses"},{include:"#function-variable-parentheses"},{include:"#flavor-variable-parentheses"},{include:"#another-variable-parentheses"}]}]},variables:{patterns:[{include:"#simple-variable"},{include:"#variable-parentheses"},{include:"#variable-braces"}]}},scopeName:"source.makefile",embeddedLangs:undefined,aliases:["makefile"]})
|
|
4
4
|
|
|
5
5
|
export default [
|
|
6
6
|
lang
|
package/dist/markdown-vue.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EmulatedRegExp } from 'oniguruma-to-es'
|
|
2
2
|
|
|
3
|
-
const lang = Object.freeze({fileTypes:[],injectTo:["text.html.markdown"],injectionSelector:"L:text.html.markdown",name:"markdown-vue",patterns:[{include:"#vue-code-block"}],repository:{"vue-code-block":{begin:/*@__PURE__*/ new EmulatedRegExp("(^|^)(\\p{space}*)(`{3,}|~{3,})\\p{space}*(vue)((\\p{space}+|[
|
|
3
|
+
const lang = Object.freeze({fileTypes:[],injectTo:["text.html.markdown"],injectionSelector:"L:text.html.markdown",name:"markdown-vue",patterns:[{include:"#vue-code-block"}],repository:{"vue-code-block":{begin:/*@__PURE__*/ new EmulatedRegExp("(^|^)(\\p{space}*)(`{3,}|~{3,})\\p{space}*(vue)((\\p{space}+|[\\,\\:\\?\\{])[^\\`\\~]*)?(?=\\n?$)","dgiv",{"strategy":"clip_search"}),beginCaptures:{"3":{name:"punctuation.definition.markdown"},"4":{name:"fenced_code.block.language.markdown"},"5":{name:"fenced_code.block.language.attributes.markdown",patterns:[]}},end:/*@__PURE__*/ new EmulatedRegExp("(^|^)((?!)|\\p{space}{0,3})((?!))\\p{space}*(?=\\n?$)","dgv",{"strategy":"clip_search"}),endCaptures:{"3":{name:"punctuation.definition.markdown"}},name:"markup.fenced_code.block.markdown",patterns:[{include:"source.vue"}]}},scopeName:"markdown.vue.codeblock",displayName:undefined,embeddedLangs:undefined,aliases:undefined})
|
|
4
4
|
|
|
5
5
|
export default [
|
|
6
6
|
lang
|