@shikijs/langs-precompiled 3.2.1 → 3.2.2

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/rst.mjs CHANGED
@@ -7,7 +7,7 @@ import yaml from './yaml.mjs'
7
7
  import cmake from './cmake.mjs'
8
8
  import ruby from './ruby.mjs'
9
9
 
10
- const lang = Object.freeze({displayName:"reStructuredText",name:"rst",patterns:[{include:"#body"}],repository:{anchor:{match:/^\.{2}\p{space}+(_[^\:]+:)\p{space}*/dgv,name:"entity.name.tag.anchor"},block:{begin:/^(\p{space}*)(\.{2}\p{space}+\P{space}+::)([^\n]*)/dgv,beginCaptures:{"2":{name:"keyword.control"},"3":{name:"variable"}},end:/^(?!\1\p{space}|\p{space}*(?=\n?$))()/dgv,patterns:[{include:"#block-param"},{include:"#body"}]},"block-comment":{begin:/^(\p{space}*)\.{2}(\p{space}+|(?=\n?$))/dgv,end:/^(?:(?=\P{space})|\p{space}*(?=\n?$))/dgv,name:"comment.block",patterns:[{begin:/^\p{space}{3,}(?=\P{space})/dgv,name:"comment.block",while:/^(?:\p{space}{3}[^\n]*|\p{space}*(?=\n?$))/dgv}]},"block-param":{patterns:[{captures:{"1":{name:"keyword.control"},"2":{name:"variable.parameter"}},match:/(:param\p{space}+([^\n]+?):)(?:\p{space}|(?=\n?$))/dgv},{captures:{"1":{name:"keyword.control"},"2":{patterns:[{match:/\b(0x[a-fA-F\p{Nd}]+|\p{Nd}+)\b/dgv,name:"constant.numeric"},{include:"#inline-markup"}]}},match:/(:[^\n]+?:)(?:(?=\n?$)|\p{space}+([^\n]*))/dgv}]},blocks:{patterns:[{include:"#domains"},{include:"#doctest"},{include:"#code-block-cpp"},{include:"#code-block-py"},{include:"#code-block-console"},{include:"#code-block-javascript"},{include:"#code-block-yaml"},{include:"#code-block-cmake"},{include:"#code-block-kconfig"},{include:"#code-block-ruby"},{include:"#code-block-dts"},{include:"#code-block"},{include:"#doctest-block"},{include:"#raw-html"},{include:"#block"},{include:"#literal-block"},{include:"#block-comment"}]},body:{patterns:[{include:"#title"},{include:"#inline-markup"},{include:"#anchor"},{include:"#line-block"},{include:"#replace-include"},{include:"#footnote"},{include:"#substitution"},{include:"#blocks"},{include:"#table"},{include:"#simple-table"},{include:"#options-list"}]},bold:{begin:/(?<=[\p{space}"'\(\[\{\<]|^)\*{2}[^\p{space}\*]/dgv,end:/\*{2}|^\p{space}*(?=\n?$)/dgv,name:"markup.bold"},citation:{applyEndPatternLast:0,begin:/(?<=[\p{space}"'\(\[\{\<]|^)`[^\p{space}\`]/dgv,end:/`_{0,2}|^\p{space}*(?=\n?$)/dgv,name:"entity.name.tag"},"code-block":{begin:/^(\p{space}*)(\.{2}\p{space}+(code(?:|-block))::)/dgv,beginCaptures:{"2":{name:"keyword.control"}},patterns:[{include:"#block-param"}],while:/^\1(?=\p{space})|^\p{space}*(?=\n?$)()/dgv},"code-block-cmake":{begin:/^(\p{space}*)(\.{2}\p{space}+(code(?:|-block))::)\p{space}*(cmake)\p{space}*(?=\n?$)/dgv,beginCaptures:{"2":{name:"keyword.control"},"4":{name:"variable.parameter.codeblock.cmake"}},patterns:[{include:"#block-param"},{include:"source.cmake"}],while:/^\1(?=\p{space})|^\p{space}*(?=\n?$)()/dgv},"code-block-console":{begin:/^(\p{space}*)(\.{2}\p{space}+(code(?:|-block))::)\p{space}*(console|shell|bash)\p{space}*(?=\n?$)/dgv,beginCaptures:{"2":{name:"keyword.control"},"4":{name:"variable.parameter.codeblock.console"}},patterns:[{include:"#block-param"},{include:"source.shell"}],while:/^\1(?=\p{space})|^\p{space}*(?=\n?$)()/dgv},"code-block-cpp":{begin:/^(\p{space}*)(\.{2}\p{space}+(code(?:|-block))::)\p{space}*(c|c\+\+|cpp|C|C\+\+|CPP|Cpp)\p{space}*(?=\n?$)/dgv,beginCaptures:{"2":{name:"keyword.control"},"4":{name:"variable.parameter.codeblock.cpp"}},patterns:[{include:"#block-param"},{include:"source.cpp"}],while:/^\1(?=\p{space})|^\p{space}*(?=\n?$)()/dgv},"code-block-dts":{begin:/^(\p{space}*)(\.{2}\p{space}+(code(?:|-block))::)\p{space}*(dts|DTS|devicetree)\p{space}*(?=\n?$)/dgv,beginCaptures:{"2":{name:"keyword.control"},"4":{name:"variable.parameter.codeblock.dts"}},patterns:[{include:"#block-param"},{include:"source.dts"}],while:/^\1(?=\p{space})|^\p{space}*(?=\n?$)()/dgv},"code-block-javascript":{begin:/^(\p{space}*)(\.{2}\p{space}+(code(?:|-block))::)\p{space}*(javascript)\p{space}*(?=\n?$)/dgv,beginCaptures:{"2":{name:"keyword.control"},"4":{name:"variable.parameter.codeblock.js"}},patterns:[{include:"#block-param"},{include:"source.js"}],while:/^\1(?=\p{space})|^\p{space}*(?=\n?$)()/dgv},"code-block-kconfig":{begin:/^(\p{space}*)(\.{2}\p{space}+(code(?:|-block))::)\p{space}*([kK]config)\p{space}*(?=\n?$)/dgv,beginCaptures:{"2":{name:"keyword.control"},"4":{name:"variable.parameter.codeblock.kconfig"}},patterns:[{include:"#block-param"},{include:"source.kconfig"}],while:/^\1(?=\p{space})|^\p{space}*(?=\n?$)()/dgv},"code-block-py":{begin:/^(\p{space}*)(\.{2}\p{space}+(code(?:|-block))::)\p{space}*(python)\p{space}*(?=\n?$)/dgv,beginCaptures:{"2":{name:"keyword.control"},"4":{name:"variable.parameter.codeblock.py"}},patterns:[{include:"#block-param"},{include:"source.python"}],while:/^\1(?=\p{space})|^\p{space}*(?=\n?$)()/dgv},"code-block-ruby":{begin:/^(\p{space}*)(\.{2}\p{space}+(code(?:|-block))::)\p{space}*(ruby)\p{space}*(?=\n?$)/dgv,beginCaptures:{"2":{name:"keyword.control"},"4":{name:"variable.parameter.codeblock.ruby"}},patterns:[{include:"#block-param"},{include:"source.ruby"}],while:/^\1(?=\p{space})|^\p{space}*(?=\n?$)()/dgv},"code-block-yaml":{begin:/^(\p{space}*)(\.{2}\p{space}+(code(?:|-block))::)\p{space}*(ya?ml)\p{space}*(?=\n?$)/dgv,beginCaptures:{"2":{name:"keyword.control"},"4":{name:"variable.parameter.codeblock.yaml"}},patterns:[{include:"#block-param"},{include:"source.yaml"}],while:/^\1(?=\p{space})|^\p{space}*(?=\n?$)()/dgv},doctest:{begin:/^(>>>)\p{space}*([^\n]*)/dgv,beginCaptures:{"1":{name:"keyword.control"},"2":{patterns:[{include:"source.python"}]}},end:/^\p{space}*(?=\n?$)/dgv},"doctest-block":{begin:/^(\p{space}*)(\.{2}\p{space}+doctest::)\p{space}*(?=\n?$)/dgv,beginCaptures:{"2":{name:"keyword.control"}},patterns:[{include:"#block-param"},{include:"source.python"}],while:/^\1(?=\p{space})|^\p{space}*(?=\n?$)()/dgv},"domain-auto":{begin:/^(\p{space}*)(\.{2}\p{space}+auto(?:class|module|exception|function|decorator|data|method|attribute|property)::)\p{space}*([^\n]*)/dgv,beginCaptures:{"2":{name:"keyword.control.py"},"3":{patterns:[{include:"source.python"}]}},patterns:[{include:"#block-param"},{include:"#body"}],while:/^\1(?=\p{space})|^\p{space}*(?=\n?$)()/dgv},"domain-cpp":{begin:/^(\p{space}*)(\.{2}\p{space}+c(?:pp|):(?:class|struct|function|member|var|type|enum|enum-struct|enum-class|enumerator|union|concept)::)\p{space}*(?:(@[\p{L}\p{M}\p{N}\p{Pc}]+)|([^\n]*))/dgv,beginCaptures:{"2":{name:"keyword.control"},"3":{name:"entity.name.tag"},"4":{patterns:[{include:"source.cpp"}]}},patterns:[{include:"#block-param"},{include:"#body"}],while:/^\1(?=\p{space})|^\p{space}*(?=\n?$)()/dgv},"domain-js":{begin:/^(\p{space}*)(\.{2}\p{space}+js:[\p{L}\p{M}\p{N}\p{Pc}]+::)\p{space}*([^\n]*)/dgv,beginCaptures:{"2":{name:"keyword.control"},"3":{patterns:[{include:"source.js"}]}},end:/^(?!\1[ \t]|(?=\n?$))()/dgv,patterns:[{include:"#block-param"},{include:"#body"}]},"domain-py":{begin:/^(\p{space}*)(\.{2}\p{space}+py:(?:module|function|data|exception|class|attribute|property|method|staticmethod|classmethod|decorator|decoratormethod)::)\p{space}*([^\n]*)/dgv,beginCaptures:{"2":{name:"keyword.control"},"3":{patterns:[{include:"source.python"}]}},patterns:[{include:"#block-param"},{include:"#body"}],while:/^\1(?=\p{space})|^\p{space}*(?=\n?$)()/dgv},domains:{patterns:[{include:"#domain-cpp"},{include:"#domain-py"},{include:"#domain-auto"},{include:"#domain-js"}]},escaped:{match:/\\[^\n]/dgv,name:"constant.character.escape"},footnote:{match:/^\p{space}*\.{2}\p{space}+\[(?:[\p{L}\p{M}\p{N}\p{Pc}\.\-]+|[\#\*]|#[\p{L}\p{M}\p{N}\p{Pc}]+)\]\p{space}+/dgv,name:"entity.name.tag"},"footnote-ref":{match:/\[(?:[\p{L}\p{M}\p{N}\p{Pc}\.\-]+|[\#\*])\]_/dgv,name:"entity.name.tag"},ignore:{patterns:[{match:/'[\`\*]+'/dgv},{match:/<[\`\*]+>/dgv},{match:/\{[\`\*]+\}/dgv},{match:/\([\`\*]+\)/dgv},{match:/\[[\`\*]+\]/dgv},{match:/"[\`\*]+"/dgv}]},"inline-markup":{patterns:[{include:"#escaped"},{include:"#ignore"},{include:"#ref"},{include:"#literal"},{include:"#monospaced"},{include:"#citation"},{include:"#bold"},{include:"#italic"},{include:"#list"},{include:"#macro"},{include:"#reference"},{include:"#footnote-ref"}]},italic:{begin:/(?<=[\p{space}"'\(\[\{\<]|^)\*[^\p{space}\*]/dgv,end:/\*|^\p{space}*(?=\n?$)/dgv,name:"markup.italic"},"line-block":{match:/^\|\p{space}+/dgv,name:"keyword.control"},list:{match:/^\p{space}*(\p{Nd}+\.|\* -|[a-zA-Z\#]\.|[iIvVxXmMcC]+\.|\(\p{Nd}+\)|\p{Nd}+\)|[\*\+\-])\p{space}+/dgv,name:"keyword.control"},literal:{captures:{"1":{name:"keyword.control"},"2":{name:"entity.name.tag"}},match:/(:\P{space}+:)(`[^\n]*?`\\?)/dgv},"literal-block":{begin:/^(\p{space}*)([^\n]*)(::)\p{space}*(?=\n?$)/dgv,beginCaptures:{"2":{patterns:[{include:"#inline-markup"}]},"3":{name:"keyword.control"}},while:/^\1(?=\p{space})|^\p{space}*(?=\n?$)()/dgv},macro:{match:/\|[^\|]+\|/dgv,name:"entity.name.tag"},monospaced:{begin:/(?<=[\p{space}"'\(\[\{\<]|^)``[^\p{space}\`]/dgv,end:/``|^\p{space}*(?=\n?$)/dgv,name:"string.interpolated"},"options-list":{match:/(?:(?:^|,\p{space}+)(?:[\-\+][\p{L}\p{M}\p{N}\p{Pc}]|--?[a-zA-Z][\p{L}\p{M}\p{N}\p{Pc}\-]+|\/[\p{L}\p{M}\p{N}\p{Pc}]+)(?:[ \=](?:[\p{L}\p{M}\p{N}\p{Pc}]+|<[^\<\>]+?>))?)+(?= |\t|(?=\n?$))/dgv,name:"variable.parameter"},"raw-html":{begin:/^(\p{space}*)(\.{2}\p{space}+raw\p{space}*::)\p{space}+(html)\p{space}*(?=\n?$)/dgv,beginCaptures:{"2":{name:"keyword.control"},"3":{name:"variable.parameter.html"}},patterns:[{include:"#block-param"},{include:"text.html.derivative"}],while:/^\1(?=\p{space})|^\p{space}*(?=\n?$)()/dgv},ref:{begin:/(:ref:)`/dgv,beginCaptures:{"1":{name:"keyword.control"}},end:/`|^\p{space}*(?=\n?$)/dgv,name:"entity.name.tag",patterns:[{match:/<[^\n]*?>/dgv,name:"markup.underline.link"}]},reference:{match:/[\p{L}\p{M}\p{N}\p{Pc}\-]*[a-zA-Z\p{Nd}\-]__?\b/dgv,name:"entity.name.tag"},"replace-include":{captures:{"1":{name:"keyword.control"},"2":{name:"entity.name.tag"},"3":{name:"keyword.control"}},match:/^\p{space}*(\.{2})\p{space}+(\|[^\|]+\|)\p{space}+(replace::)/dgv},"simple-table":{match:/^[\=\p{space}]+(?=\n?$)/dgv,name:"keyword.control.table"},substitution:{match:/^\.{2}\p{space}*\|([^\|]+)\|/dgv,name:"entity.name.tag"},table:{begin:/^\p{space}*\+[\=\+\-]+\+\p{space}*(?=\n?$)/dgv,beginCaptures:{"0":{name:"keyword.control.table"}},end:/^(?![\+\|])/dgv,patterns:[{match:/[\=\+\|\-]/dgv,name:"keyword.control.table"}]},title:{match:/^(\*{3,}|#{3,}|={3,}|~{3,}|\+{3,}|-{3,}|`{3,}|\^{3,}|:{3,}|"{3,}|_{3,}|'{3,})(?=\n?$)/dgv,name:"markup.heading"}},scopeName:"source.rst",embeddedLangs:["html-derivative","cpp","python","javascript","shellscript","yaml","cmake","ruby"],aliases:undefined})
10
+ const lang = Object.freeze({displayName:"reStructuredText",name:"rst",patterns:[{include:"#body"}],repository:{anchor:{match:/^\.{2}\p{space}+(_[^\:]+:)\p{space}*/dgv,name:"entity.name.tag.anchor"},block:{begin:/^(\p{space}*)(\.{2}\p{space}+\P{space}+::)([^\n]*)/dgv,beginCaptures:{"2":{name:"keyword.control"},"3":{name:"variable"}},end:/^(?!\1\p{space}|\p{space}*(?=\n?$))()/dgv,patterns:[{include:"#block-param"},{include:"#body"}]},"block-comment":{begin:/^(\p{space}*)\.{2}(\p{space}+|(?=\n?$))/dgv,end:/^(?:(?=\P{space})|\p{space}*(?=\n?$))/dgv,name:"comment.block",patterns:[{begin:/^\p{space}{3,}(?=\P{space})/dgv,name:"comment.block",while:/^(?:\p{space}{3}[^\n]*|\p{space}*(?=\n?$))/dgv}]},"block-param":{patterns:[{captures:{"1":{name:"keyword.control"},"2":{name:"variable.parameter"}},match:/(:param\p{space}+([^\n]+?):)(?:\p{space}|(?=\n?$))/dgv},{captures:{"1":{name:"keyword.control"},"2":{patterns:[{match:/\b(0x[a-fA-F\p{Nd}]+|\p{Nd}+)\b/dgv,name:"constant.numeric"},{include:"#inline-markup"}]}},match:/(:[^\n]+?:)(?:(?=\n?$)|\p{space}+([^\n]*))/dgv}]},blocks:{patterns:[{include:"#domains"},{include:"#doctest"},{include:"#code-block-cpp"},{include:"#code-block-py"},{include:"#code-block-console"},{include:"#code-block-javascript"},{include:"#code-block-yaml"},{include:"#code-block-cmake"},{include:"#code-block-kconfig"},{include:"#code-block-ruby"},{include:"#code-block-dts"},{include:"#code-block"},{include:"#doctest-block"},{include:"#raw-html"},{include:"#block"},{include:"#literal-block"},{include:"#block-comment"}]},body:{patterns:[{include:"#title"},{include:"#inline-markup"},{include:"#anchor"},{include:"#line-block"},{include:"#replace-include"},{include:"#footnote"},{include:"#substitution"},{include:"#blocks"},{include:"#table"},{include:"#simple-table"},{include:"#options-list"}]},bold:{begin:/(?<=[\p{space}"'\(\[\{\<]|^)\*{2}[^\p{space}\*]/dgv,end:/\*{2}|^\p{space}*(?=\n?$)/dgv,name:"markup.bold"},citation:{applyEndPatternLast:0,begin:/(?<=[\p{space}"'\(\[\{\<]|^)`[^\p{space}\`]/dgv,end:/`_{0,2}|^\p{space}*(?=\n?$)/dgv,name:"entity.name.tag"},"code-block":{begin:/^(\p{space}*)(\.{2}\p{space}+(code(?:|-block))::)/dgv,beginCaptures:{"2":{name:"keyword.control"}},patterns:[{include:"#block-param"}],while:/^(?:\1(?=\p{space})|\p{space}*(?=\n?$))()/dgv},"code-block-cmake":{begin:/^(\p{space}*)(\.{2}\p{space}+(code(?:|-block))::)\p{space}*(cmake)\p{space}*(?=\n?$)/dgv,beginCaptures:{"2":{name:"keyword.control"},"4":{name:"variable.parameter.codeblock.cmake"}},patterns:[{include:"#block-param"},{include:"source.cmake"}],while:/^(?:\1(?=\p{space})|\p{space}*(?=\n?$))()/dgv},"code-block-console":{begin:/^(\p{space}*)(\.{2}\p{space}+(code(?:|-block))::)\p{space}*(console|shell|bash)\p{space}*(?=\n?$)/dgv,beginCaptures:{"2":{name:"keyword.control"},"4":{name:"variable.parameter.codeblock.console"}},patterns:[{include:"#block-param"},{include:"source.shell"}],while:/^(?:\1(?=\p{space})|\p{space}*(?=\n?$))()/dgv},"code-block-cpp":{begin:/^(\p{space}*)(\.{2}\p{space}+(code(?:|-block))::)\p{space}*(c|c\+\+|cpp|C|C\+\+|CPP|Cpp)\p{space}*(?=\n?$)/dgv,beginCaptures:{"2":{name:"keyword.control"},"4":{name:"variable.parameter.codeblock.cpp"}},patterns:[{include:"#block-param"},{include:"source.cpp"}],while:/^(?:\1(?=\p{space})|\p{space}*(?=\n?$))()/dgv},"code-block-dts":{begin:/^(\p{space}*)(\.{2}\p{space}+(code(?:|-block))::)\p{space}*(dts|DTS|devicetree)\p{space}*(?=\n?$)/dgv,beginCaptures:{"2":{name:"keyword.control"},"4":{name:"variable.parameter.codeblock.dts"}},patterns:[{include:"#block-param"},{include:"source.dts"}],while:/^(?:\1(?=\p{space})|\p{space}*(?=\n?$))()/dgv},"code-block-javascript":{begin:/^(\p{space}*)(\.{2}\p{space}+(code(?:|-block))::)\p{space}*(javascript)\p{space}*(?=\n?$)/dgv,beginCaptures:{"2":{name:"keyword.control"},"4":{name:"variable.parameter.codeblock.js"}},patterns:[{include:"#block-param"},{include:"source.js"}],while:/^(?:\1(?=\p{space})|\p{space}*(?=\n?$))()/dgv},"code-block-kconfig":{begin:/^(\p{space}*)(\.{2}\p{space}+(code(?:|-block))::)\p{space}*([kK]config)\p{space}*(?=\n?$)/dgv,beginCaptures:{"2":{name:"keyword.control"},"4":{name:"variable.parameter.codeblock.kconfig"}},patterns:[{include:"#block-param"},{include:"source.kconfig"}],while:/^(?:\1(?=\p{space})|\p{space}*(?=\n?$))()/dgv},"code-block-py":{begin:/^(\p{space}*)(\.{2}\p{space}+(code(?:|-block))::)\p{space}*(python)\p{space}*(?=\n?$)/dgv,beginCaptures:{"2":{name:"keyword.control"},"4":{name:"variable.parameter.codeblock.py"}},patterns:[{include:"#block-param"},{include:"source.python"}],while:/^(?:\1(?=\p{space})|\p{space}*(?=\n?$))()/dgv},"code-block-ruby":{begin:/^(\p{space}*)(\.{2}\p{space}+(code(?:|-block))::)\p{space}*(ruby)\p{space}*(?=\n?$)/dgv,beginCaptures:{"2":{name:"keyword.control"},"4":{name:"variable.parameter.codeblock.ruby"}},patterns:[{include:"#block-param"},{include:"source.ruby"}],while:/^(?:\1(?=\p{space})|\p{space}*(?=\n?$))()/dgv},"code-block-yaml":{begin:/^(\p{space}*)(\.{2}\p{space}+(code(?:|-block))::)\p{space}*(ya?ml)\p{space}*(?=\n?$)/dgv,beginCaptures:{"2":{name:"keyword.control"},"4":{name:"variable.parameter.codeblock.yaml"}},patterns:[{include:"#block-param"},{include:"source.yaml"}],while:/^(?:\1(?=\p{space})|\p{space}*(?=\n?$))()/dgv},doctest:{begin:/^(>>>)\p{space}*([^\n]*)/dgv,beginCaptures:{"1":{name:"keyword.control"},"2":{patterns:[{include:"source.python"}]}},end:/^\p{space}*(?=\n?$)/dgv},"doctest-block":{begin:/^(\p{space}*)(\.{2}\p{space}+doctest::)\p{space}*(?=\n?$)/dgv,beginCaptures:{"2":{name:"keyword.control"}},patterns:[{include:"#block-param"},{include:"source.python"}],while:/^(?:\1(?=\p{space})|\p{space}*(?=\n?$))()/dgv},"domain-auto":{begin:/^(\p{space}*)(\.{2}\p{space}+auto(?:class|module|exception|function|decorator|data|method|attribute|property)::)\p{space}*([^\n]*)/dgv,beginCaptures:{"2":{name:"keyword.control.py"},"3":{patterns:[{include:"source.python"}]}},patterns:[{include:"#block-param"},{include:"#body"}],while:/^(?:\1(?=\p{space})|\p{space}*(?=\n?$))()/dgv},"domain-cpp":{begin:/^(\p{space}*)(\.{2}\p{space}+c(?:pp|):(?:class|struct|function|member|var|type|enum|enum-struct|enum-class|enumerator|union|concept)::)\p{space}*(?:(@[\p{L}\p{M}\p{N}\p{Pc}]+)|([^\n]*))/dgv,beginCaptures:{"2":{name:"keyword.control"},"3":{name:"entity.name.tag"},"4":{patterns:[{include:"source.cpp"}]}},patterns:[{include:"#block-param"},{include:"#body"}],while:/^(?:\1(?=\p{space})|\p{space}*(?=\n?$))()/dgv},"domain-js":{begin:/^(\p{space}*)(\.{2}\p{space}+js:[\p{L}\p{M}\p{N}\p{Pc}]+::)\p{space}*([^\n]*)/dgv,beginCaptures:{"2":{name:"keyword.control"},"3":{patterns:[{include:"source.js"}]}},end:/^(?!\1[ \t]|(?=\n?$))()/dgv,patterns:[{include:"#block-param"},{include:"#body"}]},"domain-py":{begin:/^(\p{space}*)(\.{2}\p{space}+py:(?:module|function|data|exception|class|attribute|property|method|staticmethod|classmethod|decorator|decoratormethod)::)\p{space}*([^\n]*)/dgv,beginCaptures:{"2":{name:"keyword.control"},"3":{patterns:[{include:"source.python"}]}},patterns:[{include:"#block-param"},{include:"#body"}],while:/^(?:\1(?=\p{space})|\p{space}*(?=\n?$))()/dgv},domains:{patterns:[{include:"#domain-cpp"},{include:"#domain-py"},{include:"#domain-auto"},{include:"#domain-js"}]},escaped:{match:/\\[^\n]/dgv,name:"constant.character.escape"},footnote:{match:/^\p{space}*\.{2}\p{space}+\[(?:[\p{L}\p{M}\p{N}\p{Pc}\.\-]+|[\#\*]|#[\p{L}\p{M}\p{N}\p{Pc}]+)\]\p{space}+/dgv,name:"entity.name.tag"},"footnote-ref":{match:/\[(?:[\p{L}\p{M}\p{N}\p{Pc}\.\-]+|[\#\*])\]_/dgv,name:"entity.name.tag"},ignore:{patterns:[{match:/'[\`\*]+'/dgv},{match:/<[\`\*]+>/dgv},{match:/\{[\`\*]+\}/dgv},{match:/\([\`\*]+\)/dgv},{match:/\[[\`\*]+\]/dgv},{match:/"[\`\*]+"/dgv}]},"inline-markup":{patterns:[{include:"#escaped"},{include:"#ignore"},{include:"#ref"},{include:"#literal"},{include:"#monospaced"},{include:"#citation"},{include:"#bold"},{include:"#italic"},{include:"#list"},{include:"#macro"},{include:"#reference"},{include:"#footnote-ref"}]},italic:{begin:/(?<=[\p{space}"'\(\[\{\<]|^)\*[^\p{space}\*]/dgv,end:/\*|^\p{space}*(?=\n?$)/dgv,name:"markup.italic"},"line-block":{match:/^\|\p{space}+/dgv,name:"keyword.control"},list:{match:/^\p{space}*(\p{Nd}+\.|\* -|[a-zA-Z\#]\.|[iIvVxXmMcC]+\.|\(\p{Nd}+\)|\p{Nd}+\)|[\*\+\-])\p{space}+/dgv,name:"keyword.control"},literal:{captures:{"1":{name:"keyword.control"},"2":{name:"entity.name.tag"}},match:/(:\P{space}+:)(`[^\n]*?`\\?)/dgv},"literal-block":{begin:/^(\p{space}*)([^\n]*)(::)\p{space}*(?=\n?$)/dgv,beginCaptures:{"2":{patterns:[{include:"#inline-markup"}]},"3":{name:"keyword.control"}},while:/^(?:\1(?=\p{space})|\p{space}*(?=\n?$))()/dgv},macro:{match:/\|[^\|]+\|/dgv,name:"entity.name.tag"},monospaced:{begin:/(?<=[\p{space}"'\(\[\{\<]|^)``[^\p{space}\`]/dgv,end:/``|^\p{space}*(?=\n?$)/dgv,name:"string.interpolated"},"options-list":{match:/(?:(?:^|,\p{space}+)(?:[\-\+][\p{L}\p{M}\p{N}\p{Pc}]|--?[a-zA-Z][\p{L}\p{M}\p{N}\p{Pc}\-]+|\/[\p{L}\p{M}\p{N}\p{Pc}]+)(?:[ \=](?:[\p{L}\p{M}\p{N}\p{Pc}]+|<[^\<\>]+?>))?)+(?= |\t|(?=\n?$))/dgv,name:"variable.parameter"},"raw-html":{begin:/^(\p{space}*)(\.{2}\p{space}+raw\p{space}*::)\p{space}+(html)\p{space}*(?=\n?$)/dgv,beginCaptures:{"2":{name:"keyword.control"},"3":{name:"variable.parameter.html"}},patterns:[{include:"#block-param"},{include:"text.html.derivative"}],while:/^(?:\1(?=\p{space})|\p{space}*(?=\n?$))()/dgv},ref:{begin:/(:ref:)`/dgv,beginCaptures:{"1":{name:"keyword.control"}},end:/`|^\p{space}*(?=\n?$)/dgv,name:"entity.name.tag",patterns:[{match:/<[^\n]*?>/dgv,name:"markup.underline.link"}]},reference:{match:/[\p{L}\p{M}\p{N}\p{Pc}\-]*[a-zA-Z\p{Nd}\-]__?\b/dgv,name:"entity.name.tag"},"replace-include":{captures:{"1":{name:"keyword.control"},"2":{name:"entity.name.tag"},"3":{name:"keyword.control"}},match:/^\p{space}*(\.{2})\p{space}+(\|[^\|]+\|)\p{space}+(replace::)/dgv},"simple-table":{match:/^[\=\p{space}]+(?=\n?$)/dgv,name:"keyword.control.table"},substitution:{match:/^\.{2}\p{space}*\|([^\|]+)\|/dgv,name:"entity.name.tag"},table:{begin:/^\p{space}*\+[\=\+\-]+\+\p{space}*(?=\n?$)/dgv,beginCaptures:{"0":{name:"keyword.control.table"}},end:/^(?![\+\|])/dgv,patterns:[{match:/[\=\+\|\-]/dgv,name:"keyword.control.table"}]},title:{match:/^(\*{3,}|#{3,}|={3,}|~{3,}|\+{3,}|-{3,}|`{3,}|\^{3,}|:{3,}|"{3,}|_{3,}|'{3,})(?=\n?$)/dgv,name:"markup.heading"}},scopeName:"source.rst",embeddedLangs:["html-derivative","cpp","python","javascript","shellscript","yaml","cmake","ruby"],aliases:undefined})
11
11
 
12
12
  export default [
13
13
  ...html_derivative,
package/dist/rust.mjs CHANGED
@@ -1,4 +1,4 @@
1
- const lang = Object.freeze({displayName:"Rust",name:"rust",patterns:[{begin:/(<)(\[)/dgv,beginCaptures:{"1":{name:"punctuation.brackets.angle.rust"},"2":{name:"punctuation.brackets.square.rust"}},end:/>/dgv,endCaptures:{"0":{name:"punctuation.brackets.angle.rust"}},patterns:[{include:"#block-comments"},{include:"#comments"},{include:"#gtypes"},{include:"#lvariables"},{include:"#lifetimes"},{include:"#punctuation"},{include:"#types"}]},{captures:{"1":{name:"keyword.operator.macro.dollar.rust"},"3":{name:"keyword.other.crate.rust"},"4":{name:"entity.name.type.metavariable.rust"},"6":{name:"keyword.operator.key-value.rust"},"7":{name:"variable.other.metavariable.specifier.rust"}},match:/(\$)((crate)|([A-Z][A-Za-z0-9_]*))((:)(block|expr|ident|item|lifetime|literal|meta|path?|stmt|tt|ty|vis))?/dgv,name:"meta.macro.metavariable.type.rust",patterns:[{include:"#keywords"}]},{captures:{"1":{name:"keyword.operator.macro.dollar.rust"},"2":{name:"variable.other.metavariable.name.rust"},"4":{name:"keyword.operator.key-value.rust"},"5":{name:"variable.other.metavariable.specifier.rust"}},match:/(\$)([a-z][A-Za-z0-9_]*)((:)(block|expr|ident|item|lifetime|literal|meta|path?|stmt|tt|ty|vis))?/dgv,name:"meta.macro.metavariable.rust",patterns:[{include:"#keywords"}]},{captures:{"1":{name:"entity.name.function.macro.rules.rust"},"3":{name:"entity.name.function.macro.rust"},"4":{name:"entity.name.type.macro.rust"},"5":{name:"punctuation.brackets.curly.rust"}},match:/\b(macro_rules!)\p{space}+(([a-z0-9_]+)|([A-Z][a-z0-9_]*))\p{space}+(\{)/dgv,name:"meta.macro.rules.rust"},{captures:{"1":{name:"storage.type.rust"},"2":{name:"entity.name.module.rust"}},match:/(mod)\p{space}+((?:r#(?!crate|[Ss]elf|super))?[a-z][A-Za-z0-9_]*)/dgv},{begin:/\b(extern)\p{space}+(crate)/dgv,beginCaptures:{"1":{name:"storage.type.rust"},"2":{name:"keyword.other.crate.rust"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.semi.rust"}},name:"meta.import.rust",patterns:[{include:"#block-comments"},{include:"#comments"},{include:"#keywords"},{include:"#punctuation"}]},{begin:/\b(use)\p{space}/dgv,beginCaptures:{"1":{name:"keyword.other.rust"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.semi.rust"}},name:"meta.use.rust",patterns:[{include:"#block-comments"},{include:"#comments"},{include:"#keywords"},{include:"#namespaces"},{include:"#punctuation"},{include:"#types"},{include:"#lvariables"}]},{include:"#block-comments"},{include:"#comments"},{include:"#attributes"},{include:"#lvariables"},{include:"#constants"},{include:"#gtypes"},{include:"#functions"},{include:"#types"},{include:"#keywords"},{include:"#lifetimes"},{include:"#macros"},{include:"#namespaces"},{include:"#punctuation"},{include:"#strings"},{include:"#variables"}],repository:{attributes:{begin:/(#)(!?)(\[)/dgv,beginCaptures:{"1":{name:"punctuation.definition.attribute.rust"},"3":{name:"punctuation.brackets.attribute.rust"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.brackets.attribute.rust"}},name:"meta.attribute.rust",patterns:[{include:"#block-comments"},{include:"#comments"},{include:"#keywords"},{include:"#lifetimes"},{include:"#punctuation"},{include:"#strings"},{include:"#gtypes"},{include:"#types"}]},"block-comments":{patterns:[{match:/\/\*\*\//dgv,name:"comment.block.rust"},{begin:/\/\*\*/dgv,end:/\*\//dgv,name:"comment.block.documentation.rust",patterns:[{include:"#block-comments"}]},{begin:/\/\*(?!\*)/dgv,end:/\*\//dgv,name:"comment.block.rust",patterns:[{include:"#block-comments"}]}]},comments:{patterns:[{captures:{"1":{name:"punctuation.definition.comment.rust"}},match:/(\/\/\/)[^\n]*(?=\n?$)/dgv,name:"comment.line.documentation.rust"},{captures:{"1":{name:"punctuation.definition.comment.rust"}},match:/(\/\/)[^\n]*(?=\n?$)/dgv,name:"comment.line.double-slash.rust"}]},constants:{patterns:[{match:/\b[A-Z]{2}[A-Z0-9_]*\b/dgv,name:"constant.other.caps.rust"},{captures:{"1":{name:"storage.type.rust"},"2":{name:"constant.other.caps.rust"}},match:/\b(const)\p{space}+([A-Z][A-Za-z0-9_]*)\b/dgv},{captures:{"1":{name:"punctuation.separator.dot.decimal.rust"},"2":{name:"keyword.operator.exponent.rust"},"3":{name:"keyword.operator.exponent.sign.rust"},"4":{name:"constant.numeric.decimal.exponent.mantissa.rust"},"5":{name:"entity.name.type.numeric.rust"}},match:/\b\p{Nd}[\p{Nd}_]*(\.?)[\p{Nd}_]*(?:([Ee])([\+\-]?)([\p{Nd}_]+))?(f32|f64|i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\b/dgv,name:"constant.numeric.decimal.rust"},{captures:{"1":{name:"entity.name.type.numeric.rust"}},match:/\b0x[\p{Nd}a-fA-F_]+(i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\b/dgv,name:"constant.numeric.hex.rust"},{captures:{"1":{name:"entity.name.type.numeric.rust"}},match:/\b0o[0-7_]+(i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\b/dgv,name:"constant.numeric.oct.rust"},{captures:{"1":{name:"entity.name.type.numeric.rust"}},match:/\b0b[01_]+(i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\b/dgv,name:"constant.numeric.bin.rust"},{match:/\b(true|false)\b/dgv,name:"constant.language.bool.rust"}]},escapes:{captures:{"1":{name:"constant.character.escape.backslash.rust"},"2":{name:"constant.character.escape.bit.rust"},"3":{name:"constant.character.escape.unicode.rust"},"4":{name:"constant.character.escape.unicode.punctuation.rust"},"5":{name:"constant.character.escape.unicode.punctuation.rust"}},match:/(\\)(?:(x[0-7][\p{Nd}a-fA-F])|(u(\{)[\p{Nd}a-fA-F]{4,6}(\}))|[^\n])/dgv,name:"constant.character.escape.rust"},functions:{patterns:[{captures:{"1":{name:"keyword.other.rust"},"2":{name:"punctuation.brackets.round.rust"}},match:/\b(pub)(\()/dgv},{begin:/\b(fn)\p{space}+((?:r#(?!crate|[Ss]elf|super))?[A-Za-z0-9_]+)((\()|(<))/dgv,beginCaptures:{"1":{name:"keyword.other.fn.rust"},"2":{name:"entity.name.function.rust"},"4":{name:"punctuation.brackets.round.rust"},"5":{name:"punctuation.brackets.angle.rust"}},end:/(\{)|(;)/dgv,endCaptures:{"1":{name:"punctuation.brackets.curly.rust"},"2":{name:"punctuation.semi.rust"}},name:"meta.function.definition.rust",patterns:[{include:"#block-comments"},{include:"#comments"},{include:"#keywords"},{include:"#lvariables"},{include:"#constants"},{include:"#gtypes"},{include:"#functions"},{include:"#lifetimes"},{include:"#macros"},{include:"#namespaces"},{include:"#punctuation"},{include:"#strings"},{include:"#types"},{include:"#variables"}]},{begin:/((?:r#(?!crate|[Ss]elf|super))?[A-Za-z0-9_]+)(\()/dgv,beginCaptures:{"1":{name:"entity.name.function.rust"},"2":{name:"punctuation.brackets.round.rust"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.brackets.round.rust"}},name:"meta.function.call.rust",patterns:[{include:"#block-comments"},{include:"#comments"},{include:"#attributes"},{include:"#keywords"},{include:"#lvariables"},{include:"#constants"},{include:"#gtypes"},{include:"#functions"},{include:"#lifetimes"},{include:"#macros"},{include:"#namespaces"},{include:"#punctuation"},{include:"#strings"},{include:"#types"},{include:"#variables"}]},{begin:/((?:r#(?!crate|[Ss]elf|super))?[A-Za-z0-9_]+)(?=::<[^\n]*>\()/dgv,beginCaptures:{"1":{name:"entity.name.function.rust"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.brackets.round.rust"}},name:"meta.function.call.rust",patterns:[{include:"#block-comments"},{include:"#comments"},{include:"#attributes"},{include:"#keywords"},{include:"#lvariables"},{include:"#constants"},{include:"#gtypes"},{include:"#functions"},{include:"#lifetimes"},{include:"#macros"},{include:"#namespaces"},{include:"#punctuation"},{include:"#strings"},{include:"#types"},{include:"#variables"}]}]},gtypes:{patterns:[{match:/\b(Some|None)\b/dgv,name:"entity.name.type.option.rust"},{match:/\b(Ok|Err)\b/dgv,name:"entity.name.type.result.rust"}]},interpolations:{captures:{"1":{name:"punctuation.definition.interpolation.rust"},"2":{name:"punctuation.definition.interpolation.rust"}},match:/(\{)[^"\{\}]*(\})/dgv,name:"meta.interpolation.rust"},keywords:{patterns:[{match:/\b(await|break|continue|do|else|for|if|loop|match|return|try|while|yield)\b/dgv,name:"keyword.control.rust"},{match:/\b(extern|let|macro|mod)\b/dgv,name:"keyword.other.rust storage.type.rust"},{match:/\b(const)\b/dgv,name:"storage.modifier.rust"},{match:/\b(type)\b/dgv,name:"keyword.declaration.type.rust storage.type.rust"},{match:/\b(enum)\b/dgv,name:"keyword.declaration.enum.rust storage.type.rust"},{match:/\b(trait)\b/dgv,name:"keyword.declaration.trait.rust storage.type.rust"},{match:/\b(struct)\b/dgv,name:"keyword.declaration.struct.rust storage.type.rust"},{match:/\b(abstract|static)\b/dgv,name:"storage.modifier.rust"},{match:/\b(as|async|become|box|dyn|move|final|gen|impl|in|override|priv|pub|ref|typeof|union|unsafe|unsized|use|virtual|where)\b/dgv,name:"keyword.other.rust"},{match:/\bfn\b/dgv,name:"keyword.other.fn.rust"},{match:/\bcrate\b/dgv,name:"keyword.other.crate.rust"},{match:/\bmut\b/dgv,name:"storage.modifier.mut.rust"},{match:/([\^\|]|\|\||&&|<<|>>|!)(?!=)/dgv,name:"keyword.operator.logical.rust"},{match:/&(?![\&\=])/dgv,name:"keyword.operator.borrow.and.rust"},{match:/(\+=|-=|\*=|\/=|%=|\^=|&=|\|=|<<=|>>=)/dgv,name:"keyword.operator.assignment.rust"},{match:/(?<![\<\>])=(?![\=\>])/dgv,name:"keyword.operator.assignment.equal.rust"},{match:/(=(=)?(?!>)|!=|<=|(?<!=)>=)/dgv,name:"keyword.operator.comparison.rust"},{match:/(([\+\%]|(\*(?![\p{L}\p{M}\p{N}\p{Pc}])))(?!=))|(-(?!>))|(\/(?!\/))/dgv,name:"keyword.operator.math.rust"},{captures:{"1":{name:"punctuation.brackets.round.rust"},"2":{name:"punctuation.brackets.square.rust"},"3":{name:"punctuation.brackets.curly.rust"},"4":{name:"keyword.operator.comparison.rust"},"5":{name:"punctuation.brackets.round.rust"},"6":{name:"punctuation.brackets.square.rust"},"7":{name:"punctuation.brackets.curly.rust"}},match:/(?:\b|(?:(\))|(\])|(\})))[ \t]+([\<\>])[ \t]+(?:\b|(?:(\()|(\[)|(\{)))/dgv},{match:/::/dgv,name:"keyword.operator.namespace.rust"},{captures:{"1":{name:"keyword.operator.dereference.rust"}},match:/(\*)(?=[\p{L}\p{M}\p{N}\p{Pc}]+)/dgv},{match:/@/dgv,name:"keyword.operator.subpattern.rust"},{match:/\.(?!\.)/dgv,name:"keyword.operator.access.dot.rust"},{match:/\.{2}([\=\.])?/dgv,name:"keyword.operator.range.rust"},{match:/:(?!:)/dgv,name:"keyword.operator.key-value.rust"},{match:/->|<-/dgv,name:"keyword.operator.arrow.skinny.rust"},{match:/=>/dgv,name:"keyword.operator.arrow.fat.rust"},{match:/\$/dgv,name:"keyword.operator.macro.dollar.rust"},{match:/\?/dgv,name:"keyword.operator.question.rust"}]},lifetimes:{patterns:[{captures:{"1":{name:"punctuation.definition.lifetime.rust"},"2":{name:"entity.name.type.lifetime.rust"}},match:/(')([a-zA-Z_][0-9a-zA-Z_]*)(?!')\b/dgv},{captures:{"1":{name:"keyword.operator.borrow.rust"},"2":{name:"punctuation.definition.lifetime.rust"},"3":{name:"entity.name.type.lifetime.rust"}},match:/(&)(')([a-zA-Z_][0-9a-zA-Z_]*)(?!')\b/dgv}]},lvariables:{patterns:[{match:/\b[Ss]elf\b/dgv,name:"variable.language.self.rust"},{match:/\bsuper\b/dgv,name:"variable.language.super.rust"}]},macros:{patterns:[{captures:{"2":{name:"entity.name.function.macro.rust"},"3":{name:"entity.name.type.macro.rust"}},match:/(([a-z_][A-Za-z0-9_]*!)|([A-Z_][A-Za-z0-9_]*!))/dgv,name:"meta.macro.rust"}]},namespaces:{patterns:[{captures:{"1":{name:"entity.name.namespace.rust"},"2":{name:"keyword.operator.namespace.rust"}},match:/(?<![A-Za-z0-9_])([A-Za-z0-9_]+)((?<!s(?:uper|elf))::)/dgv}]},punctuation:{patterns:[{match:/,/dgv,name:"punctuation.comma.rust"},{match:/[\{\}]/dgv,name:"punctuation.brackets.curly.rust"},{match:/[\(\)]/dgv,name:"punctuation.brackets.round.rust"},{match:/;/dgv,name:"punctuation.semi.rust"},{match:/[\[\]]/dgv,name:"punctuation.brackets.square.rust"},{match:/(?<!=)[\<\>]/dgv,name:"punctuation.brackets.angle.rust"}]},strings:{patterns:[{begin:/(b?)(")/dgv,beginCaptures:{"1":{name:"string.quoted.byte.raw.rust"},"2":{name:"punctuation.definition.string.rust"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.rust"}},name:"string.quoted.double.rust",patterns:[{include:"#escapes"},{include:"#interpolations"}]},{begin:/(b?r)(#*)(")/dgv,beginCaptures:{"1":{name:"string.quoted.byte.raw.rust"},"2":{name:"punctuation.definition.string.raw.rust"},"3":{name:"punctuation.definition.string.rust"}},end:/(")((?!))/dgv,endCaptures:{"1":{name:"punctuation.definition.string.rust"},"2":{name:"punctuation.definition.string.raw.rust"}},name:"string.quoted.double.rust"},{begin:/(b)?(')/dgv,beginCaptures:{"1":{name:"string.quoted.byte.raw.rust"},"2":{name:"punctuation.definition.char.rust"}},end:/'/dgv,endCaptures:{"0":{name:"punctuation.definition.char.rust"}},name:"string.quoted.single.char.rust",patterns:[{include:"#escapes"}]}]},types:{patterns:[{captures:{"1":{name:"entity.name.type.numeric.rust"}},match:/(?<![A-Za-z])(f32|f64|i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)\b/dgv},{begin:/\b(_?[A-Z][A-Za-z0-9_]*)(<)/dgv,beginCaptures:{"1":{name:"entity.name.type.rust"},"2":{name:"punctuation.brackets.angle.rust"}},end:/>/dgv,endCaptures:{"0":{name:"punctuation.brackets.angle.rust"}},patterns:[{include:"#block-comments"},{include:"#comments"},{include:"#keywords"},{include:"#lvariables"},{include:"#lifetimes"},{include:"#punctuation"},{include:"#types"},{include:"#variables"}]},{match:/\b(bool|char|str)\b/dgv,name:"entity.name.type.primitive.rust"},{captures:{"1":{name:"keyword.declaration.trait.rust storage.type.rust"},"2":{name:"entity.name.type.trait.rust"}},match:/\b(trait)\p{space}+(_?[A-Z][A-Za-z0-9_]*)\b/dgv},{captures:{"1":{name:"keyword.declaration.struct.rust storage.type.rust"},"2":{name:"entity.name.type.struct.rust"}},match:/\b(struct)\p{space}+(_?[A-Z][A-Za-z0-9_]*)\b/dgv},{captures:{"1":{name:"keyword.declaration.enum.rust storage.type.rust"},"2":{name:"entity.name.type.enum.rust"}},match:/\b(enum)\p{space}+(_?[A-Z][A-Za-z0-9_]*)\b/dgv},{captures:{"1":{name:"keyword.declaration.type.rust storage.type.rust"},"2":{name:"entity.name.type.declaration.rust"}},match:/\b(type)\p{space}+(_?[A-Z][A-Za-z0-9_]*)\b/dgv},{match:/\b_?[A-Z][A-Za-z0-9_]*\b(?!!)/dgv,name:"entity.name.type.rust"}]},variables:{patterns:[{match:/\b(?<!(?<!\.)\.)(?:r#(?!(crate|[Ss]elf|super)))?[a-z0-9_]+\b/dgv,name:"variable.other.rust"}]}},scopeName:"source.rust",embeddedLangs:undefined,aliases:["rs"]})
1
+ const lang = Object.freeze({displayName:"Rust",name:"rust",patterns:[{begin:/(<)(\[)/dgv,beginCaptures:{"1":{name:"punctuation.brackets.angle.rust"},"2":{name:"punctuation.brackets.square.rust"}},end:/>/dgv,endCaptures:{"0":{name:"punctuation.brackets.angle.rust"}},patterns:[{include:"#block-comments"},{include:"#comments"},{include:"#gtypes"},{include:"#lvariables"},{include:"#lifetimes"},{include:"#punctuation"},{include:"#types"}]},{captures:{"1":{name:"keyword.operator.macro.dollar.rust"},"3":{name:"keyword.other.crate.rust"},"4":{name:"entity.name.type.metavariable.rust"},"6":{name:"keyword.operator.key-value.rust"},"7":{name:"variable.other.metavariable.specifier.rust"}},match:/(\$)((crate)|([A-Z][\p{L}\p{M}\p{N}\p{Pc}]*))(\p{space}*(:)\p{space}*(block|expr(?:_2021)?|ident|item|lifetime|literal|meta|pat(?:_param)?|path|stmt|tt|ty|vis)\b)?/dgv,name:"meta.macro.metavariable.type.rust",patterns:[{include:"#keywords"}]},{captures:{"1":{name:"keyword.operator.macro.dollar.rust"},"2":{name:"variable.other.metavariable.name.rust"},"4":{name:"keyword.operator.key-value.rust"},"5":{name:"variable.other.metavariable.specifier.rust"}},match:/(\$)([a-z][\p{L}\p{M}\p{N}\p{Pc}]*)(\p{space}*(:)\p{space}*(block|expr(?:_2021)?|ident|item|lifetime|literal|meta|pat(?:_param)?|path|stmt|tt|ty|vis)\b)?/dgv,name:"meta.macro.metavariable.rust",patterns:[{include:"#keywords"}]},{captures:{"1":{name:"entity.name.function.macro.rules.rust"},"3":{name:"entity.name.function.macro.rust"},"4":{name:"entity.name.type.macro.rust"},"5":{name:"punctuation.brackets.curly.rust"}},match:/\b(macro_rules!)\p{space}+(([a-z0-9_]+)|([A-Z][a-z0-9_]*))\p{space}+(\{)/dgv,name:"meta.macro.rules.rust"},{captures:{"1":{name:"storage.type.rust"},"2":{name:"entity.name.module.rust"}},match:/(mod)\p{space}+((?:r#(?!crate|[Ss]elf|super))?[a-z][A-Za-z0-9_]*)/dgv},{begin:/\b(extern)\p{space}+(crate)/dgv,beginCaptures:{"1":{name:"storage.type.rust"},"2":{name:"keyword.other.crate.rust"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.semi.rust"}},name:"meta.import.rust",patterns:[{include:"#block-comments"},{include:"#comments"},{include:"#keywords"},{include:"#punctuation"}]},{begin:/\b(use)\p{space}/dgv,beginCaptures:{"1":{name:"keyword.other.rust"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.semi.rust"}},name:"meta.use.rust",patterns:[{include:"#block-comments"},{include:"#comments"},{include:"#keywords"},{include:"#namespaces"},{include:"#punctuation"},{include:"#types"},{include:"#lvariables"}]},{include:"#block-comments"},{include:"#comments"},{include:"#attributes"},{include:"#lvariables"},{include:"#constants"},{include:"#gtypes"},{include:"#functions"},{include:"#types"},{include:"#keywords"},{include:"#lifetimes"},{include:"#macros"},{include:"#namespaces"},{include:"#punctuation"},{include:"#strings"},{include:"#variables"}],repository:{attributes:{begin:/(#)(!?)(\[)/dgv,beginCaptures:{"1":{name:"punctuation.definition.attribute.rust"},"3":{name:"punctuation.brackets.attribute.rust"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.brackets.attribute.rust"}},name:"meta.attribute.rust",patterns:[{include:"#block-comments"},{include:"#comments"},{include:"#keywords"},{include:"#lifetimes"},{include:"#punctuation"},{include:"#strings"},{include:"#gtypes"},{include:"#types"}]},"block-comments":{patterns:[{match:/\/\*\*\//dgv,name:"comment.block.rust"},{begin:/\/\*\*/dgv,end:/\*\//dgv,name:"comment.block.documentation.rust",patterns:[{include:"#block-comments"}]},{begin:/\/\*(?!\*)/dgv,end:/\*\//dgv,name:"comment.block.rust",patterns:[{include:"#block-comments"}]}]},comments:{patterns:[{captures:{"1":{name:"punctuation.definition.comment.rust"}},match:/(\/\/\/)[^\n]*(?=\n?$)/dgv,name:"comment.line.documentation.rust"},{captures:{"1":{name:"punctuation.definition.comment.rust"}},match:/(\/\/)[^\n]*(?=\n?$)/dgv,name:"comment.line.double-slash.rust"}]},constants:{patterns:[{match:/\b[A-Z]{2}[A-Z0-9_]*\b/dgv,name:"constant.other.caps.rust"},{captures:{"1":{name:"storage.type.rust"},"2":{name:"constant.other.caps.rust"}},match:/\b(const)\p{space}+([A-Z][A-Za-z0-9_]*)\b/dgv},{captures:{"1":{name:"punctuation.separator.dot.decimal.rust"},"2":{name:"keyword.operator.exponent.rust"},"3":{name:"keyword.operator.exponent.sign.rust"},"4":{name:"constant.numeric.decimal.exponent.mantissa.rust"},"5":{name:"entity.name.type.numeric.rust"}},match:/\b\p{Nd}[\p{Nd}_]*(\.?)[\p{Nd}_]*(?:([Ee])([\+\-]?)([\p{Nd}_]+))?(f32|f64|i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\b/dgv,name:"constant.numeric.decimal.rust"},{captures:{"1":{name:"entity.name.type.numeric.rust"}},match:/\b0x[\p{Nd}a-fA-F_]+(i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\b/dgv,name:"constant.numeric.hex.rust"},{captures:{"1":{name:"entity.name.type.numeric.rust"}},match:/\b0o[0-7_]+(i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\b/dgv,name:"constant.numeric.oct.rust"},{captures:{"1":{name:"entity.name.type.numeric.rust"}},match:/\b0b[01_]+(i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\b/dgv,name:"constant.numeric.bin.rust"},{match:/\b(true|false)\b/dgv,name:"constant.language.bool.rust"}]},escapes:{captures:{"1":{name:"constant.character.escape.backslash.rust"},"2":{name:"constant.character.escape.bit.rust"},"3":{name:"constant.character.escape.unicode.rust"},"4":{name:"constant.character.escape.unicode.punctuation.rust"},"5":{name:"constant.character.escape.unicode.punctuation.rust"}},match:/(\\)(?:(x[0-7][\p{Nd}a-fA-F])|(u(\{)[\p{Nd}a-fA-F]{4,6}(\}))|[^\n])/dgv,name:"constant.character.escape.rust"},functions:{patterns:[{captures:{"1":{name:"keyword.other.rust"},"2":{name:"punctuation.brackets.round.rust"}},match:/\b(pub)(\()/dgv},{begin:/\b(fn)\p{space}+((?:r#(?!crate|[Ss]elf|super))?[A-Za-z0-9_]+)((\()|(<))/dgv,beginCaptures:{"1":{name:"keyword.other.fn.rust"},"2":{name:"entity.name.function.rust"},"4":{name:"punctuation.brackets.round.rust"},"5":{name:"punctuation.brackets.angle.rust"}},end:/(\{)|(;)/dgv,endCaptures:{"1":{name:"punctuation.brackets.curly.rust"},"2":{name:"punctuation.semi.rust"}},name:"meta.function.definition.rust",patterns:[{include:"#block-comments"},{include:"#comments"},{include:"#keywords"},{include:"#lvariables"},{include:"#constants"},{include:"#gtypes"},{include:"#functions"},{include:"#lifetimes"},{include:"#macros"},{include:"#namespaces"},{include:"#punctuation"},{include:"#strings"},{include:"#types"},{include:"#variables"}]},{begin:/((?:r#(?!crate|[Ss]elf|super))?[A-Za-z0-9_]+)(\()/dgv,beginCaptures:{"1":{name:"entity.name.function.rust"},"2":{name:"punctuation.brackets.round.rust"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.brackets.round.rust"}},name:"meta.function.call.rust",patterns:[{include:"#block-comments"},{include:"#comments"},{include:"#attributes"},{include:"#keywords"},{include:"#lvariables"},{include:"#constants"},{include:"#gtypes"},{include:"#functions"},{include:"#lifetimes"},{include:"#macros"},{include:"#namespaces"},{include:"#punctuation"},{include:"#strings"},{include:"#types"},{include:"#variables"}]},{begin:/((?:r#(?!crate|[Ss]elf|super))?[A-Za-z0-9_]+)(?=::<[^\n]*>\()/dgv,beginCaptures:{"1":{name:"entity.name.function.rust"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.brackets.round.rust"}},name:"meta.function.call.rust",patterns:[{include:"#block-comments"},{include:"#comments"},{include:"#attributes"},{include:"#keywords"},{include:"#lvariables"},{include:"#constants"},{include:"#gtypes"},{include:"#functions"},{include:"#lifetimes"},{include:"#macros"},{include:"#namespaces"},{include:"#punctuation"},{include:"#strings"},{include:"#types"},{include:"#variables"}]}]},gtypes:{patterns:[{match:/\b(Some|None)\b/dgv,name:"entity.name.type.option.rust"},{match:/\b(Ok|Err)\b/dgv,name:"entity.name.type.result.rust"}]},interpolations:{captures:{"1":{name:"punctuation.definition.interpolation.rust"},"2":{name:"punctuation.definition.interpolation.rust"}},match:/(\{)[^"\{\}]*(\})/dgv,name:"meta.interpolation.rust"},keywords:{patterns:[{match:/\b(await|break|continue|do|else|for|if|loop|match|return|try|while|yield)\b/dgv,name:"keyword.control.rust"},{match:/\b(extern|let|macro|mod)\b/dgv,name:"keyword.other.rust storage.type.rust"},{match:/\b(const)\b/dgv,name:"storage.modifier.rust"},{match:/\b(type)\b/dgv,name:"keyword.declaration.type.rust storage.type.rust"},{match:/\b(enum)\b/dgv,name:"keyword.declaration.enum.rust storage.type.rust"},{match:/\b(trait)\b/dgv,name:"keyword.declaration.trait.rust storage.type.rust"},{match:/\b(struct)\b/dgv,name:"keyword.declaration.struct.rust storage.type.rust"},{match:/\b(abstract|static)\b/dgv,name:"storage.modifier.rust"},{match:/\b(as|async|become|box|dyn|move|final|gen|impl|in|override|priv|pub|ref|typeof|union|unsafe|unsized|use|virtual|where)\b/dgv,name:"keyword.other.rust"},{match:/\bfn\b/dgv,name:"keyword.other.fn.rust"},{match:/\bcrate\b/dgv,name:"keyword.other.crate.rust"},{match:/\bmut\b/dgv,name:"storage.modifier.mut.rust"},{match:/([\^\|]|\|\||&&|<<|>>|!)(?!=)/dgv,name:"keyword.operator.logical.rust"},{match:/&(?![\&\=])/dgv,name:"keyword.operator.borrow.and.rust"},{match:/(\+=|-=|\*=|\/=|%=|\^=|&=|\|=|<<=|>>=)/dgv,name:"keyword.operator.assignment.rust"},{match:/(?<![\<\>])=(?![\=\>])/dgv,name:"keyword.operator.assignment.equal.rust"},{match:/(=(=)?(?!>)|!=|<=|(?<!=)>=)/dgv,name:"keyword.operator.comparison.rust"},{match:/(([\+\%]|(\*(?![\p{L}\p{M}\p{N}\p{Pc}])))(?!=))|(-(?!>))|(\/(?!\/))/dgv,name:"keyword.operator.math.rust"},{captures:{"1":{name:"punctuation.brackets.round.rust"},"2":{name:"punctuation.brackets.square.rust"},"3":{name:"punctuation.brackets.curly.rust"},"4":{name:"keyword.operator.comparison.rust"},"5":{name:"punctuation.brackets.round.rust"},"6":{name:"punctuation.brackets.square.rust"},"7":{name:"punctuation.brackets.curly.rust"}},match:/(?:\b|(?:(\))|(\])|(\})))[ \t]+([\<\>])[ \t]+(?:\b|(?:(\()|(\[)|(\{)))/dgv},{match:/::/dgv,name:"keyword.operator.namespace.rust"},{captures:{"1":{name:"keyword.operator.dereference.rust"}},match:/(\*)(?=[\p{L}\p{M}\p{N}\p{Pc}]+)/dgv},{match:/@/dgv,name:"keyword.operator.subpattern.rust"},{match:/\.(?!\.)/dgv,name:"keyword.operator.access.dot.rust"},{match:/\.{2}([\=\.])?/dgv,name:"keyword.operator.range.rust"},{match:/:(?!:)/dgv,name:"keyword.operator.key-value.rust"},{match:/->|<-/dgv,name:"keyword.operator.arrow.skinny.rust"},{match:/=>/dgv,name:"keyword.operator.arrow.fat.rust"},{match:/\$/dgv,name:"keyword.operator.macro.dollar.rust"},{match:/\?/dgv,name:"keyword.operator.question.rust"}]},lifetimes:{patterns:[{captures:{"1":{name:"punctuation.definition.lifetime.rust"},"2":{name:"entity.name.type.lifetime.rust"}},match:/(')([a-zA-Z_][0-9a-zA-Z_]*)(?!')\b/dgv},{captures:{"1":{name:"keyword.operator.borrow.rust"},"2":{name:"punctuation.definition.lifetime.rust"},"3":{name:"entity.name.type.lifetime.rust"}},match:/(&)(')([a-zA-Z_][0-9a-zA-Z_]*)(?!')\b/dgv}]},lvariables:{patterns:[{match:/\b[Ss]elf\b/dgv,name:"variable.language.self.rust"},{match:/\bsuper\b/dgv,name:"variable.language.super.rust"}]},macros:{patterns:[{captures:{"2":{name:"entity.name.function.macro.rust"},"3":{name:"entity.name.type.macro.rust"}},match:/(([a-z_][A-Za-z0-9_]*!)|([A-Z_][A-Za-z0-9_]*!))/dgv,name:"meta.macro.rust"}]},namespaces:{patterns:[{captures:{"1":{name:"entity.name.namespace.rust"},"2":{name:"keyword.operator.namespace.rust"}},match:/(?<![A-Za-z0-9_])([A-Za-z0-9_]+)((?<!s(?:uper|elf))::)/dgv}]},punctuation:{patterns:[{match:/,/dgv,name:"punctuation.comma.rust"},{match:/[\{\}]/dgv,name:"punctuation.brackets.curly.rust"},{match:/[\(\)]/dgv,name:"punctuation.brackets.round.rust"},{match:/;/dgv,name:"punctuation.semi.rust"},{match:/[\[\]]/dgv,name:"punctuation.brackets.square.rust"},{match:/(?<!=)[\<\>]/dgv,name:"punctuation.brackets.angle.rust"}]},strings:{patterns:[{begin:/(b?)(")/dgv,beginCaptures:{"1":{name:"string.quoted.byte.raw.rust"},"2":{name:"punctuation.definition.string.rust"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.rust"}},name:"string.quoted.double.rust",patterns:[{include:"#escapes"},{include:"#interpolations"}]},{begin:/(b?r)(#*)(")/dgv,beginCaptures:{"1":{name:"string.quoted.byte.raw.rust"},"2":{name:"punctuation.definition.string.raw.rust"},"3":{name:"punctuation.definition.string.rust"}},end:/(")((?!))/dgv,endCaptures:{"1":{name:"punctuation.definition.string.rust"},"2":{name:"punctuation.definition.string.raw.rust"}},name:"string.quoted.double.rust"},{begin:/(b)?(')/dgv,beginCaptures:{"1":{name:"string.quoted.byte.raw.rust"},"2":{name:"punctuation.definition.char.rust"}},end:/'/dgv,endCaptures:{"0":{name:"punctuation.definition.char.rust"}},name:"string.quoted.single.char.rust",patterns:[{include:"#escapes"}]}]},types:{patterns:[{captures:{"1":{name:"entity.name.type.numeric.rust"}},match:/(?<![A-Za-z])(f32|f64|i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)\b/dgv},{begin:/\b(_?[A-Z][A-Za-z0-9_]*)(<)/dgv,beginCaptures:{"1":{name:"entity.name.type.rust"},"2":{name:"punctuation.brackets.angle.rust"}},end:/>/dgv,endCaptures:{"0":{name:"punctuation.brackets.angle.rust"}},patterns:[{include:"#block-comments"},{include:"#comments"},{include:"#keywords"},{include:"#lvariables"},{include:"#lifetimes"},{include:"#punctuation"},{include:"#types"},{include:"#variables"}]},{match:/\b(bool|char|str)\b/dgv,name:"entity.name.type.primitive.rust"},{captures:{"1":{name:"keyword.declaration.trait.rust storage.type.rust"},"2":{name:"entity.name.type.trait.rust"}},match:/\b(trait)\p{space}+(_?[A-Z][A-Za-z0-9_]*)\b/dgv},{captures:{"1":{name:"keyword.declaration.struct.rust storage.type.rust"},"2":{name:"entity.name.type.struct.rust"}},match:/\b(struct)\p{space}+(_?[A-Z][A-Za-z0-9_]*)\b/dgv},{captures:{"1":{name:"keyword.declaration.enum.rust storage.type.rust"},"2":{name:"entity.name.type.enum.rust"}},match:/\b(enum)\p{space}+(_?[A-Z][A-Za-z0-9_]*)\b/dgv},{captures:{"1":{name:"keyword.declaration.type.rust storage.type.rust"},"2":{name:"entity.name.type.declaration.rust"}},match:/\b(type)\p{space}+(_?[A-Z][A-Za-z0-9_]*)\b/dgv},{match:/\b_?[A-Z][A-Za-z0-9_]*\b(?!!)/dgv,name:"entity.name.type.rust"}]},variables:{patterns:[{match:/\b(?<!(?<!\.)\.)(?:r#(?!(crate|[Ss]elf|super)))?[a-z0-9_]+\b/dgv,name:"variable.other.rust"}]}},scopeName:"source.rust",embeddedLangs:undefined,aliases:["rs"]})
2
2
 
3
3
  export default [
4
4
  lang
@@ -1,6 +1,6 @@
1
1
  import { EmulatedRegExp } from 'oniguruma-to-es'
2
2
 
3
- const lang = Object.freeze({displayName:"Shell",name:"shellscript",patterns:[{include:"#initial_context"}],repository:{alias_statement:{begin:/*@__PURE__*/ new EmulatedRegExp("(?:(?=([ \\t]*))\\1)(alias)(?:(?=([ \\t]*))\\3)((?:((?<![\\p{L}\\p{M}\\p{N}\\p{Pc}])-[\\p{L}\\p{M}\\p{N}\\p{Pc}]+\\b)(?:(?=([ \\t]*))\\6))*)(?:(?=([ \\t]*))\\7)((?<![\\p{L}\\p{M}\\p{N}\\p{Pc}])[a-zA-Z_0-9\\-]+(?![\\p{L}\\p{M}\\p{N}\\p{Pc}]))(?:(\\[)((?:(?:(?:\\$?(?<![\\p{L}\\p{M}\\p{N}\\p{Pc}])[a-zA-Z_0-9\\-]+(?![\\p{L}\\p{M}\\p{N}\\p{Pc}])|@)|\\*)|(-?\\p{Nd}+)))(\\]))?(?:(?:(=)|(\\+=))|(-=))","dgv",{"hiddenCaptures":[1,3,6,7]}),beginCaptures:{"1":{name:"storage.type.alias.shell"},"2":{patterns:[{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])-[\p{L}\p{M}\p{N}\p{Pc}]+\b/dgv,name:"string.unquoted.argument.shell constant.other.option.shell"}]},"3":{name:"string.unquoted.argument.shell constant.other.option.shell"},"4":{name:"variable.other.assignment.shell"},"5":{name:"punctuation.definition.array.access.shell"},"6":{name:"variable.other.assignment.shell"},"7":{name:"constant.numeric.shell constant.numeric.integer.shell"},"8":{name:"punctuation.definition.array.access.shell"},"9":{name:"keyword.operator.assignment.shell"},"10":{name:"keyword.operator.assignment.compound.shell"},"11":{name:"keyword.operator.assignment.compound.shell"}},end:/(?:(?=[ \t]|(?=\n?$))|(?:(?:(?:(;)|(&&))|(\|\|))|(&)))/dgv,endCaptures:{"1":{name:"punctuation.terminator.statement.semicolon.shell"},"2":{name:"punctuation.separator.statement.and.shell"},"3":{name:"punctuation.separator.statement.or.shell"},"4":{name:"punctuation.separator.statement.background.shell"}},name:"meta.expression.assignment.alias.shell",patterns:[{include:"#normal_context"}]},argument:{begin:/*@__PURE__*/ new EmulatedRegExp("(?:(?=([ \\t]+))\\1)(?!(?:[\\&\\|\\(\\[\\#\\n]|(?=\\n?$)|;))","dgv",{"hiddenCaptures":[1]}),beginCaptures:{},end:/(?=[ \t\;\|\&]|(?=\n?$)|[\n\)\`])/dgv,endCaptures:{},name:"meta.argument.shell",patterns:[{include:"#argument_context"},{include:"#line_continuation"}]},argument_context:{patterns:[{captures:{"1":{name:"string.unquoted.argument.shell",patterns:[{match:/\*/dgv,name:"variable.language.special.wildcard.shell"},{include:"#variable"},{include:"#numeric_literal"},{captures:{"1":{name:"constant.language.$1.shell"}},match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(\b(?:true|false)\b)(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv}]}},match:/*@__PURE__*/ new EmulatedRegExp("(?:(?=([ \\t]*))\\1)([^ \\t\\n\\>\\&\\;\\<\\(\\)\\$\\`\\\\\"'\\|]+(?!>))","dgv",{"hiddenCaptures":[1]})},{include:"#normal_context"}]},arithmetic_double:{patterns:[{begin:/\(\(/dgv,beginCaptures:{"0":{name:"punctuation.section.arithmetic.double.shell"}},end:/\)\p{space}*\)/dgv,endCaptures:{"0":{name:"punctuation.section.arithmetic.double.shell"}},name:"meta.arithmetic.shell",patterns:[{include:"#math"},{include:"#string"}]}]},arithmetic_no_dollar:{patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.section.arithmetic.single.shell"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.arithmetic.single.shell"}},name:"meta.arithmetic.shell",patterns:[{include:"#math"},{include:"#string"}]}]},array_access_inline:{captures:{"1":{name:"punctuation.section.array.shell"},"2":{patterns:[{include:"#special_expansion"},{include:"#string"},{include:"#variable"}]},"3":{name:"punctuation.section.array.shell"}},match:/(\[)([^\[\]]+)(\])/dgv},array_value:{begin:/*@__PURE__*/ new EmulatedRegExp("(?:(?=([ \\t]*))\\1)((?<![\\p{L}\\p{M}\\p{N}\\p{Pc}])[a-zA-Z_0-9\\-]+(?![\\p{L}\\p{M}\\p{N}\\p{Pc}]))(?:(\\[)((?:(?:(?:\\$?(?<![\\p{L}\\p{M}\\p{N}\\p{Pc}])[a-zA-Z_0-9\\-]+(?![\\p{L}\\p{M}\\p{N}\\p{Pc}])|@)|\\*)|(-?\\p{Nd}+)))(\\]))?(?:(?:(=)|(\\+=))|(-=))(?:(?=([ \\t]*))\\10)(\\()","dgv",{"hiddenCaptures":[1,10]}),beginCaptures:{"1":{name:"variable.other.assignment.shell"},"2":{name:"punctuation.definition.array.access.shell"},"3":{name:"variable.other.assignment.shell"},"4":{name:"constant.numeric.shell constant.numeric.integer.shell"},"5":{name:"punctuation.definition.array.access.shell"},"6":{name:"keyword.operator.assignment.shell"},"7":{name:"keyword.operator.assignment.compound.shell"},"8":{name:"keyword.operator.assignment.compound.shell"},"9":{name:"punctuation.definition.array.shell"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.array.shell"}},patterns:[{include:"#comment"},{captures:{"1":{name:"variable.other.assignment.array.shell entity.other.attribute-name.shell"},"2":{name:"keyword.operator.assignment.shell punctuation.definition.assignment.shell"}},match:/((?<![\p{L}\p{M}\p{N}\p{Pc}])[a-zA-Z_0-9\-]+(?![\p{L}\p{M}\p{N}\p{Pc}]))(=)/dgv},{captures:{"1":{name:"punctuation.definition.bracket.named-array.shell"},"2":{name:"string.unquoted.shell entity.other.attribute-name.bracket.shell"},"3":{name:"punctuation.definition.bracket.named-array.shell"},"4":{name:"punctuation.definition.assignment.shell"}},match:/(\[)([^\n]+?)(\])(=)/dgv},{include:"#normal_context"},{include:"#simple_unquoted"}]},assignment_statement:{patterns:[{include:"#array_value"},{include:"#modified_assignment_statement"},{include:"#normal_assignment_statement"}]},basic_command_name:{captures:{"1":{name:"storage.modifier.$1.shell"},"2":{name:"entity.name.function.call.shell entity.name.command.shell",patterns:[{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(?:continue|return|break)(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"keyword.control.$0.shell"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|[\:\.])(?!\/)(?![\p{L}\p{M}\p{N}\p{Pc}])(?!-)/dgv,name:"support.function.builtin.shell"},{include:"#variable"}]}},match:/(?!(?:[\!\&\|\(\)\{\[\<\>\#\n]|(?=\n?$)|[\; \t]))(?!nocorrect |nocorrect\t|nocorrect(?=\n?$)|readonly |readonly\t|readonly(?=\n?$)|function |function\t|function(?=\n?$)|foreach |foreach\t|foreach(?=\n?$)|coproc |coproc\t|coproc(?=\n?$)|logout |logout\t|logout(?=\n?$)|export |export\t|export(?=\n?$)|select |select\t|select(?=\n?$)|repeat |repeat\t|repeat(?=\n?$)|pushd |pushd\t|pushd(?=\n?$)|until |until\t|until(?=\n?$)|while |while\t|while(?=\n?$)|local |local\t|local(?=\n?$)|case |case\t|case(?=\n?$)|done |done\t|done(?=\n?$)|elif |elif\t|elif(?=\n?$)|else |else\t|else(?=\n?$)|esac |esac\t|esac(?=\n?$)|popd |popd\t|popd(?=\n?$)|then |then\t|then(?=\n?$)|time |time\t|time(?=\n?$)|for |for\t|for(?=\n?$)|end |end\t|end(?=\n?$)|fi |fi\t|fi(?=\n?$)|do |do\t|do(?=\n?$)|in |in\t|in(?=\n?$)|if |if\t|if(?=\n?$))(?:((?<=^|[\;\& \t])(?:readonly|declare|typeset|export|local)(?=[ \t\;\&]|(?=\n?$)))|((?!["']|\\\n?(?=\n?$))[^\!'"\<\> \t\n\r]+?))(?:(?=[ \t])|(?=[\;\|\&\n\)\`\{\}]|[ \t]*#|\])(?<!\\))/dgv,name:"meta.statement.command.name.basic.shell"},block_comment:{begin:/*@__PURE__*/ new EmulatedRegExp("(?:(?=(\\p{space}*))\\1)(/\\*)","dgv",{"hiddenCaptures":[1]}),beginCaptures:{"1":{name:"punctuation.definition.comment.begin.shell"}},end:/\*\//dgv,endCaptures:{"0":{name:"punctuation.definition.comment.end.shell"}},name:"comment.block.shell"},boolean:{match:/\b(?:true|false)\b/dgv,name:"constant.language.$0.shell"},case_statement:{begin:/*@__PURE__*/ new EmulatedRegExp("(\\bcase\\b)(?:(?=([ \\t]*))\\2)([^\\n]+?)(?:(?=([ \\t]*))\\4)(\\bin\\b)","dgv",{"hiddenCaptures":[2,4]}),beginCaptures:{"1":{name:"keyword.control.case.shell"},"2":{patterns:[{include:"#initial_context"}]},"3":{name:"keyword.control.in.shell"}},end:/\besac\b/dgv,endCaptures:{"0":{name:"keyword.control.esac.shell"}},name:"meta.case.shell",patterns:[{include:"#comment"},{captures:{"1":{name:"keyword.operator.pattern.case.default.shell"}},match:/*@__PURE__*/ new EmulatedRegExp("(?:(?=([ \\t]*))\\1)(\\* *\\))","dgv",{"hiddenCaptures":[1]})},{begin:/*@__PURE__*/ new EmulatedRegExp("(?<!\\))(?!(?:(?=([ \\t]*))\\1)(?:esac\\b|(?=\\n?$)))","dgv",{"hiddenCaptures":[1]}),beginCaptures:{},end:/(?:(?=\besac\b)|(\)))/dgv,endCaptures:{"1":{name:"keyword.operator.pattern.case.shell"}},name:"meta.case.entry.pattern.shell",patterns:[{include:"#case_statement_context"}]},{begin:/(?<=\))/dgv,beginCaptures:{},end:/(?:(;;)|(?=\besac\b))/dgv,endCaptures:{"1":{name:"punctuation.terminator.statement.case.shell"}},name:"meta.case.entry.body.shell",patterns:[{include:"#typical_statements"},{include:"#initial_context"}]}]},case_statement_context:{patterns:[{match:/\*/dgv,name:"variable.language.special.quantifier.star.shell keyword.operator.quantifier.star.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"},{match:/\+/dgv,name:"variable.language.special.quantifier.plus.shell keyword.operator.quantifier.plus.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"},{match:/\?/dgv,name:"variable.language.special.quantifier.question.shell keyword.operator.quantifier.question.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"},{match:/@/dgv,name:"variable.language.special.at.shell keyword.operator.at.shell punctuation.definition.regex.at.shell"},{match:/\|/dgv,name:"keyword.operator.orvariable.language.special.or.shell keyword.operator.alternation.ruby.shell punctuation.definition.regex.alternation.shell punctuation.separator.regex.alternation.shell"},{match:/\\[^\n]/dgv,name:"constant.character.escape.shell"},{match:/(?<=\tin| in|[ \t]|;;)\(/dgv,name:"keyword.operator.pattern.case.shell"},{begin:/(?<=\P{space})(\()/dgv,beginCaptures:{"1":{name:"punctuation.definition.group.shell punctuation.definition.regex.group.shell"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.group.shell punctuation.definition.regex.group.shell"}},name:"meta.parenthese.shell",patterns:[{include:"#case_statement_context"}]},{begin:/\[/dgv,beginCaptures:{"0":{name:"punctuation.definition.character-class.shell"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.definition.character-class.shell"}},name:"string.regexp.character-class.shell",patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.shell"}]},{include:"#string"},{match:/[^\) \t\n\[\?\*\|\@]/dgv,name:"string.unquoted.pattern.shell string.regexp.unquoted.shell"}]},command_name_range:{begin:/(?:)/dgv,beginCaptures:{},end:/(?:(?=[ \t\;\|\&]|(?=\n?$)|[\n\)\`])|(?=<))/dgv,endCaptures:{},name:"meta.statement.command.name.shell",patterns:[{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(?:continue|return|break)(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"entity.name.function.call.shell entity.name.command.shell keyword.control.$0.shell"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|[\:\.])(?!\/)(?![\p{L}\p{M}\p{N}\p{Pc}])(?!-)/dgv,name:"entity.name.function.call.shell entity.name.command.shell support.function.builtin.shell"},{include:"#variable"},{captures:{"1":{name:"entity.name.function.call.shell entity.name.command.shell"}},match:/*@__PURE__*/ new EmulatedRegExp("(?<![\\p{L}\\p{M}\\p{N}\\p{Pc}])(?<=^|['\"\\}\\)])([^ \\n\\t\\r\"'\\=\\;\\&\\|\\`\\)\\{\\<\\>]+)","dgv",{"strategy":"clip_search"})},{begin:/*@__PURE__*/ new EmulatedRegExp("(?:^|(?<![ \\t\\;\\|\\&\\n\\{\\#]))(\\$?)((?:(\")|(')))","dgv",{"strategy":"clip_search"}),beginCaptures:{"1":{name:"meta.statement.command.name.quoted.shell punctuation.definition.string.shell entity.name.function.call.shell entity.name.command.shell"},"2":{},"3":{name:"meta.statement.command.name.quoted.shell string.quoted.double.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"},"4":{name:"meta.statement.command.name.quoted.shell string.quoted.single.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"}},end:/*@__PURE__*/ new EmulatedRegExp("(?<!^)(?<=\\2)()()","dgv",{"strategy":"clip_search"}),endCaptures:{},patterns:[{include:"#continuation_of_single_quoted_command_name"},{include:"#continuation_of_double_quoted_command_name"}]},{include:"#line_continuation"},{include:"#simple_unquoted"}]},command_statement:{begin:/*@__PURE__*/ new EmulatedRegExp("(?:(?=([ \\t]*))\\1)(?!(?:[\\!\\&\\|\\(\\)\\{\\[\\<\\>\\#\\n]|(?=\\n?$)|[\\; \\t]))(?!nocorrect |nocorrect\\t|nocorrect(?=\\n?$)|readonly |readonly\\t|readonly(?=\\n?$)|function |function\\t|function(?=\\n?$)|foreach |foreach\\t|foreach(?=\\n?$)|coproc |coproc\\t|coproc(?=\\n?$)|logout |logout\\t|logout(?=\\n?$)|export |export\\t|export(?=\\n?$)|select |select\\t|select(?=\\n?$)|repeat |repeat\\t|repeat(?=\\n?$)|pushd |pushd\\t|pushd(?=\\n?$)|until |until\\t|until(?=\\n?$)|while |while\\t|while(?=\\n?$)|local |local\\t|local(?=\\n?$)|case |case\\t|case(?=\\n?$)|done |done\\t|done(?=\\n?$)|elif |elif\\t|elif(?=\\n?$)|else |else\\t|else(?=\\n?$)|esac |esac\\t|esac(?=\\n?$)|popd |popd\\t|popd(?=\\n?$)|then |then\\t|then(?=\\n?$)|time |time\\t|time(?=\\n?$)|for |for\\t|for(?=\\n?$)|end |end\\t|end(?=\\n?$)|fi |fi\\t|fi(?=\\n?$)|do |do\\t|do(?=\\n?$)|in |in\\t|in(?=\\n?$)|if |if\\t|if(?=\\n?$))(?!\\\\\\n?(?=\\n?$))","dgv",{"hiddenCaptures":[1]}),beginCaptures:{},end:/(?=[\;\|\&\n\)\`\{\}]|[ \t]*#|\])(?<!\\)/dgv,endCaptures:{},name:"meta.statement.command.shell",patterns:[{include:"#command_name_range"},{include:"#line_continuation"},{include:"#option"},{include:"#argument"},{include:"#string"},{include:"#heredoc"}]},comment:{captures:{"1":{name:"comment.line.number-sign.shell meta.shebang.shell"},"2":{name:"punctuation.definition.comment.shebang.shell"},"3":{name:"comment.line.number-sign.shell"},"4":{name:"punctuation.definition.comment.shell"}},match:/*@__PURE__*/ new EmulatedRegExp("(?:^|(?:(?=([ \\t]+))\\1))(?:((#!)[^\\n]*)|((#)[^\\n]*))","dgv",{"hiddenCaptures":[1]})},comments:{patterns:[{include:"#block_comment"},{include:"#line_comment"}]},"compound-command":{patterns:[{begin:/\[/dgv,beginCaptures:{"0":{name:"punctuation.definition.logical-expression.shell"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.definition.logical-expression.shell"}},name:"meta.scope.logical-expression.shell",patterns:[{include:"#logical-expression"},{include:"#initial_context"}]},{begin:/(?<=\p{space}|^)\{(?=\p{space}|(?=\n?$))/dgv,beginCaptures:{"0":{name:"punctuation.definition.group.shell"}},end:/(?<=^|;)\p{space}*(\})/dgv,endCaptures:{"1":{name:"punctuation.definition.group.shell"}},name:"meta.scope.group.shell",patterns:[{include:"#initial_context"}]}]},continuation_of_double_quoted_command_name:{begin:/(?<=")/dgvy,beginCaptures:{},contentName:"meta.statement.command.name.continuation string.quoted.double entity.name.function.call entity.name.command",end:/"/dgv,endCaptures:{"0":{name:"string.quoted.double.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell"}},patterns:[{match:/\\[\$\n\`"\\]/dgv,name:"constant.character.escape.shell"},{include:"#variable"},{include:"#interpolation"}]},continuation_of_single_quoted_command_name:{begin:/(?<=')/dgvy,beginCaptures:{},contentName:"meta.statement.command.name.continuation string.quoted.single entity.name.function.call entity.name.command",end:/'/dgv,endCaptures:{"0":{name:"string.quoted.single.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell"}}},custom_command_names:{patterns:[]},custom_commands:{patterns:[]},double_quote_context:{patterns:[{match:/\\[\$\`"\\\n]/dgv,name:"constant.character.escape.shell"},{include:"#variable"},{include:"#interpolation"}]},double_quote_escape_char:{match:/\\[\$\`"\\\n]/dgv,name:"constant.character.escape.shell"},floating_keyword:{patterns:[{match:/(?<=^|[\;\& \t])(?:then|elif|else|done|end|do|if|fi)(?=[ \t\;\&]|(?=\n?$))/dgv,name:"keyword.control.$0.shell"}]},for_statement:{patterns:[{begin:/*@__PURE__*/ new EmulatedRegExp("(\\bfor\\b)(?:(?=([ \\t]*))\\2)((?<![\\p{L}\\p{M}\\p{N}\\p{Pc}])[a-zA-Z_0-9\\-]+(?![\\p{L}\\p{M}\\p{N}\\p{Pc}]))(?:(?=([ \\t]*))\\4)(\\bin\\b)","dgv",{"hiddenCaptures":[2,4]}),beginCaptures:{"1":{name:"keyword.control.for.shell"},"2":{name:"variable.other.for.shell"},"3":{name:"keyword.control.in.shell"}},end:/(?=[\;\|\&\n\)\`\{\}]|[ \t]*#|\])(?<!\\)/dgv,endCaptures:{},name:"meta.for.in.shell",patterns:[{include:"#string"},{include:"#simple_unquoted"},{include:"#normal_context"}]},{begin:/(\bfor\b)/dgv,beginCaptures:{"1":{name:"keyword.control.for.shell"}},end:/(?=[\;\|\&\n\)\`\{\}]|[ \t]*#|\])(?<!\\)/dgv,endCaptures:{},name:"meta.for.shell",patterns:[{include:"#arithmetic_double"},{include:"#normal_context"}]}]},function_definition:{applyEndPatternLast:1,begin:/*@__PURE__*/ new EmulatedRegExp("(?:(?=([ \\t]*))\\1)(?:(\\bfunction\\b)(?:(?=([ \\t]*))\\3)([^ \\t\\n\\r\\(\\)\\=\"']+)(?:(\\()(?:(?=([ \\t]*))\\6)(\\)))?|([^ \\t\\n\\r\\(\\)\\=\"']+)(?:(?=([ \\t]*))\\9)(\\()(?:(?=([ \\t]*))\\11)(\\)))","dgv",{"hiddenCaptures":[1,3,6,9,11]}),beginCaptures:{"1":{name:"storage.type.function.shell"},"2":{name:"entity.name.function.shell"},"3":{name:"punctuation.definition.arguments.shell"},"4":{name:"punctuation.definition.arguments.shell"},"5":{name:"entity.name.function.shell"},"6":{name:"punctuation.definition.arguments.shell"},"7":{name:"punctuation.definition.arguments.shell"}},end:/(?<=[\}\)])/dgv,endCaptures:{},name:"meta.function.shell",patterns:[{match:/[\t \n]/dgvy},{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},name:"meta.function.body.shell",patterns:[{include:"#initial_context"}]},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},name:"meta.function.body.shell",patterns:[{include:"#initial_context"}]},{include:"#initial_context"}]},heredoc:{patterns:[{begin:/*@__PURE__*/ new EmulatedRegExp("((?<!<)<<-)(?:(?=([ \\t]*))\\2)([\"'])(?:(?=([ \\t]*))\\4)([^\"']+?)(?=[\\p{space}\\;\\&\\<\"'])(\\3)([^\\n]*)","dgv",{"hiddenCaptures":[2,4]}),beginCaptures:{"1":{name:"keyword.operator.heredoc.shell"},"2":{name:"punctuation.definition.string.heredoc.quote.shell"},"3":{name:"punctuation.definition.string.heredoc.delimiter.shell"},"4":{name:"punctuation.definition.string.heredoc.quote.shell"},"5":{patterns:[{include:"#redirect_fix"},{include:"#typical_statements"}]}},contentName:"string.quoted.heredoc.indent.$3",end:/^\t*\3(?=\p{space}|;|&|(?=\n?$))()()()/dgv,endCaptures:{"0":{name:"punctuation.definition.string.heredoc.$0.shell"}},patterns:[]},{begin:/*@__PURE__*/ new EmulatedRegExp("((?<!<)<<(?!<))(?:(?=([ \\t]*))\\2)([\"'])(?:(?=([ \\t]*))\\4)([^\"']+?)(?=[\\p{space}\\;\\&\\<\"'])(\\3)([^\\n]*)","dgv",{"hiddenCaptures":[2,4]}),beginCaptures:{"1":{name:"keyword.operator.heredoc.shell"},"2":{name:"punctuation.definition.string.heredoc.quote.shell"},"3":{name:"punctuation.definition.string.heredoc.delimiter.shell"},"4":{name:"punctuation.definition.string.heredoc.quote.shell"},"5":{patterns:[{include:"#redirect_fix"},{include:"#typical_statements"}]}},contentName:"string.quoted.heredoc.no-indent.$3",end:/^\3(?=\p{space}|;|&|(?=\n?$))()()()/dgv,endCaptures:{"0":{name:"punctuation.definition.string.heredoc.delimiter.shell"}},patterns:[]},{begin:/*@__PURE__*/ new EmulatedRegExp("((?<!<)<<-)(?:(?=([ \\t]*))\\2)([^\"' \\t]+)(?=[\\p{space}\\;\\&\\<\"'])([^\\n]*)","dgv",{"hiddenCaptures":[2]}),beginCaptures:{"1":{name:"keyword.operator.heredoc.shell"},"2":{name:"punctuation.definition.string.heredoc.delimiter.shell"},"3":{patterns:[{include:"#redirect_fix"},{include:"#typical_statements"}]}},contentName:"string.unquoted.heredoc.indent.$2",end:/^\t*\2(?=\p{space}|;|&|(?=\n?$))()()/dgv,endCaptures:{"0":{name:"punctuation.definition.string.heredoc.delimiter.shell"}},patterns:[{include:"#double_quote_escape_char"},{include:"#variable"},{include:"#interpolation"}]},{begin:/*@__PURE__*/ new EmulatedRegExp("((?<!<)<<(?!<))(?:(?=([ \\t]*))\\2)([^\"' \\t]+)(?=[\\p{space}\\;\\&\\<\"'])([^\\n]*)","dgv",{"hiddenCaptures":[2]}),beginCaptures:{"1":{name:"keyword.operator.heredoc.shell"},"2":{name:"punctuation.definition.string.heredoc.delimiter.shell"},"3":{patterns:[{include:"#redirect_fix"},{include:"#typical_statements"}]}},contentName:"string.unquoted.heredoc.no-indent.$2",end:/^\2(?=\p{space}|;|&|(?=\n?$))()()/dgv,endCaptures:{"0":{name:"punctuation.definition.string.heredoc.delimiter.shell"}},patterns:[{include:"#double_quote_escape_char"},{include:"#variable"},{include:"#interpolation"}]}]},herestring:{patterns:[{begin:/(<<<)\p{space}*(('))/dgv,beginCaptures:{"1":{name:"keyword.operator.herestring.shell"},"2":{name:"string.quoted.single.shell"},"3":{name:"punctuation.definition.string.begin.shell"}},contentName:"string.quoted.single.shell",end:/(')/dgv,endCaptures:{"0":{name:"string.quoted.single.shell"},"1":{name:"punctuation.definition.string.end.shell"}},name:"meta.herestring.shell"},{begin:/(<<<)\p{space}*(("))/dgv,beginCaptures:{"1":{name:"keyword.operator.herestring.shell"},"2":{name:"string.quoted.double.shell"},"3":{name:"punctuation.definition.string.begin.shell"}},contentName:"string.quoted.double.shell",end:/(")/dgv,endCaptures:{"0":{name:"string.quoted.double.shell"},"1":{name:"punctuation.definition.string.end.shell"}},name:"meta.herestring.shell",patterns:[{include:"#double_quote_context"}]},{captures:{"1":{name:"keyword.operator.herestring.shell"},"2":{name:"string.unquoted.herestring.shell",patterns:[{include:"#initial_context"}]}},match:/(<<<)\p{space}*(([^\p{space}\)\\]|\\[^\n])+)/dgv,name:"meta.herestring.shell"}]},initial_context:{patterns:[{include:"#comment"},{include:"#pipeline"},{include:"#normal_statement_seperator"},{include:"#logical_expression_double"},{include:"#logical_expression_single"},{include:"#assignment_statement"},{include:"#case_statement"},{include:"#for_statement"},{include:"#loop"},{include:"#function_definition"},{include:"#line_continuation"},{include:"#arithmetic_double"},{include:"#misc_ranges"},{include:"#variable"},{include:"#interpolation"},{include:"#heredoc"},{include:"#herestring"},{include:"#redirection"},{include:"#pathname"},{include:"#floating_keyword"},{include:"#alias_statement"},{include:"#normal_statement"},{include:"#string"},{include:"#support"}]},inline_comment:{captures:{"1":{name:"comment.block.shell punctuation.definition.comment.begin.shell"},"2":{name:"comment.block.shell"},"3":{patterns:[{match:/\*\//dgv,name:"comment.block.shell punctuation.definition.comment.end.shell"},{match:/\*/dgv,name:"comment.block.shell"}]}},match:/*@__PURE__*/ new EmulatedRegExp("(/\\*)((?:(?=((?:[^\\*]|(?:(?=(\\*+))\\4)[^\\/])*))\\3)((?:(?=(\\*+))\\6)/))","dgv",{"hiddenCaptures":[3,4,6]})},interpolation:{patterns:[{include:"#arithmetic_dollar"},{include:"#subshell_dollar"},{begin:/`/dgv,beginCaptures:{"0":{name:"punctuation.definition.evaluation.backticks.shell"}},end:/`/dgv,endCaptures:{"0":{name:"punctuation.definition.evaluation.backticks.shell"}},name:"string.interpolated.backtick.shell",patterns:[{match:/\\[\`\\\$]/dgv,name:"constant.character.escape.shell"},{begin:/(?<=[^\p{L}\p{M}\p{N}\p{Pc}])(?=#)(?!#\{)/dgv,beginCaptures:{"1":{name:"punctuation.whitespace.comment.leading.shell"}},end:/*@__PURE__*/ new EmulatedRegExp("(?!^)","dgv",{"strategy":"clip_search"}),patterns:[{begin:/#/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.shell"}},end:/(?=`)/dgv,name:"comment.line.number-sign.shell"}]},{include:"#initial_context"}]}]},keyword:{patterns:[{match:/(?<=^|[\;\&\p{space}])(then|else|elif|fi|for|in|do|done|select|continue|esac|while|until|return)(?=[\p{space}\;\&]|(?=\n?$))/dgv,name:"keyword.control.shell"},{match:/(?<=^|[\;\&\p{space}])(?:export|declare|typeset|local|readonly)(?=[\p{space}\;\&]|(?=\n?$))/dgv,name:"storage.modifier.shell"}]},line_comment:{begin:/*@__PURE__*/ new EmulatedRegExp("(?:(?=(\\p{space}*))\\1)(//)","dgv",{"hiddenCaptures":[1]}),beginCaptures:{"1":{name:"punctuation.definition.comment.shell"}},end:/(?<=\n)(?<!\\\n)/dgv,endCaptures:{},name:"comment.line.double-slash.shell",patterns:[{include:"#line_continuation_character"}]},line_continuation:{match:/\\(?=\n)/dgv,name:"constant.character.escape.line-continuation.shell"},"logical-expression":{patterns:[{include:"#arithmetic_no_dollar"},{match:/=[\=\~]?|!=?|[\<\>]|&&|\|\|/dgv,name:"keyword.operator.logical.shell"},{match:/(?<!\P{space})-(nt|ot|ef|eq|ne|l[te]|g[te]|[a-hknoprstuwxzOGLSN])\b/dgv,name:"keyword.operator.logical.shell"}]},logical_expression_context:{patterns:[{include:"#regex_comparison"},{include:"#arithmetic_no_dollar"},{include:"#logical-expression"},{include:"#logical_expression_single"},{include:"#logical_expression_double"},{include:"#comment"},{include:"#boolean"},{include:"#redirect_number"},{include:"#numeric_literal"},{include:"#pipeline"},{include:"#normal_statement_seperator"},{include:"#string"},{include:"#variable"},{include:"#interpolation"},{include:"#heredoc"},{include:"#herestring"},{include:"#pathname"},{include:"#floating_keyword"},{include:"#support"}]},logical_expression_double:{begin:/\[\[/dgv,beginCaptures:{"0":{name:"punctuation.definition.logical-expression.shell"}},end:/\]\]/dgv,endCaptures:{"0":{name:"punctuation.definition.logical-expression.shell"}},name:"meta.scope.logical-expression.shell",patterns:[{include:"#logical_expression_context"}]},logical_expression_single:{begin:/\[/dgv,beginCaptures:{"0":{name:"punctuation.definition.logical-expression.shell"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.definition.logical-expression.shell"}},name:"meta.scope.logical-expression.shell",patterns:[{include:"#logical_expression_context"}]},loop:{patterns:[{begin:/(?<=^|[\;\&\p{space}])(for)\p{space}+([^\n]+?)\p{space}+(in)(?=[\p{space}\;\&]|(?=\n?$))/dgv,beginCaptures:{"1":{name:"keyword.control.shell"},"2":{name:"variable.other.loop.shell",patterns:[{include:"#string"}]},"3":{name:"keyword.control.shell"}},end:/(?<=^|[\;\&\p{space}])done(?=[\p{space}\;\&]|(?=\n?$)|\))/dgv,endCaptures:{"0":{name:"keyword.control.shell"}},name:"meta.scope.for-in-loop.shell",patterns:[{include:"#initial_context"}]},{begin:/(?<=^|[\;\&\p{space}])(while|until)(?=[\p{space}\;\&]|(?=\n?$))/dgv,beginCaptures:{"1":{name:"keyword.control.shell"}},end:/(?<=^|[\;\&\p{space}])done(?=[\p{space}\;\&]|(?=\n?$)|\))/dgv,endCaptures:{"0":{name:"keyword.control.shell"}},name:"meta.scope.while-loop.shell",patterns:[{include:"#initial_context"}]},{begin:/(?<=^|[\;\&\p{space}])(select)\p{space}+((?:[^\p{space}\\]|\\[^\n])+)(?=[\p{space}\;\&]|(?=\n?$))/dgv,beginCaptures:{"1":{name:"keyword.control.shell"},"2":{name:"variable.other.loop.shell"}},end:/(?<=^|[\;\&\p{space}])(done)(?=[\p{space}\;\&]|(?=\n?$)|\))/dgv,endCaptures:{"1":{name:"keyword.control.shell"}},name:"meta.scope.select-block.shell",patterns:[{include:"#initial_context"}]},{begin:/(?<=^|[\;\&\p{space}])if(?=[\p{space}\;\&]|(?=\n?$))/dgv,beginCaptures:{"0":{name:"keyword.control.if.shell"}},end:/(?<=^|[\;\&\p{space}])fi(?=[\p{space}\;\&]|(?=\n?$))/dgv,endCaptures:{"0":{name:"keyword.control.fi.shell"}},name:"meta.scope.if-block.shell",patterns:[{include:"#initial_context"}]}]},math:{patterns:[{include:"#variable"},{match:/\+{1,2}|-{1,2}|[\!\~]|\*{1,2}|[\/\%]|<[\<\=]?|>[\>\=]?|==|!=|^|\|{1,2}|&{1,2}|[\?\:\,\=]|[\*\/\%\+\-\&\^\|]=|<<=|>>=/dgv,name:"keyword.operator.arithmetic.shell"},{match:/0[xX]\p{AHex}+/dgv,name:"constant.numeric.hex.shell"},{match:/;/dgv,name:"punctuation.separator.semicolon.range"},{match:/0\p{Nd}+/dgv,name:"constant.numeric.octal.shell"},{match:/\p{Nd}{1,2}#[0-9a-zA-Z\@_]+/dgv,name:"constant.numeric.other.shell"},{match:/\p{Nd}+/dgv,name:"constant.numeric.integer.shell"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])[a-zA-Z_0-9]+(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"variable.other.normal.shell"}]},math_operators:{patterns:[{match:/\+{1,2}|-{1,2}|[\!\~]|\*{1,2}|[\/\%]|<[\<\=]?|>[\>\=]?|==|!=|^|\|{1,2}|&{1,2}|[\?\:\,\=]|[\*\/\%\+\-\&\^\|]=|<<=|>>=/dgv,name:"keyword.operator.arithmetic.shell"},{match:/0[xX]\p{AHex}+/dgv,name:"constant.numeric.hex.shell"},{match:/0\p{Nd}+/dgv,name:"constant.numeric.octal.shell"},{match:/\p{Nd}{1,2}#[0-9a-zA-Z\@_]+/dgv,name:"constant.numeric.other.shell"},{match:/\p{Nd}+/dgv,name:"constant.numeric.integer.shell"}]},misc_ranges:{patterns:[{include:"#logical_expression_single"},{include:"#logical_expression_double"},{include:"#subshell_dollar"},{begin:/(?<![^ \t])(\{)(?![\p{L}\p{M}\p{N}\p{Pc}\$])/dgv,beginCaptures:{"1":{name:"punctuation.definition.group.shell"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.group.shell"}},name:"meta.scope.group.shell",patterns:[{include:"#initial_context"}]}]},modified_assignment_statement:{begin:/(?<=^|[\;\& \t])(?:readonly|declare|typeset|export|local)(?=[ \t\;\&]|(?=\n?$))/dgv,beginCaptures:{"0":{name:"storage.modifier.$0.shell"}},end:/(?=[\;\|\&\n\)\`\{\}]|[ \t]*#|\])(?<!\\)/dgv,endCaptures:{},name:"meta.statement.shell meta.expression.assignment.modified.shell",patterns:[{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])-[\p{L}\p{M}\p{N}\p{Pc}]+\b/dgv,name:"string.unquoted.argument.shell constant.other.option.shell"},{include:"#array_value"},{captures:{"1":{name:"variable.other.assignment.shell"},"2":{name:"punctuation.definition.array.access.shell"},"3":{name:"variable.other.assignment.shell"},"4":{name:"constant.numeric.shell constant.numeric.integer.shell"},"5":{name:"punctuation.definition.array.access.shell"},"6":{name:"keyword.operator.assignment.shell"},"7":{name:"keyword.operator.assignment.compound.shell"},"8":{name:"keyword.operator.assignment.compound.shell"},"9":{name:"constant.numeric.shell constant.numeric.hex.shell"},"10":{name:"constant.numeric.shell constant.numeric.octal.shell"},"11":{name:"constant.numeric.shell constant.numeric.other.shell"},"12":{name:"constant.numeric.shell constant.numeric.decimal.shell"},"13":{name:"constant.numeric.shell constant.numeric.version.shell"},"14":{name:"constant.numeric.shell constant.numeric.integer.shell"}},match:/((?<![\p{L}\p{M}\p{N}\p{Pc}])[a-zA-Z_0-9\-]+(?![\p{L}\p{M}\p{N}\p{Pc}]))(?:(\[)((?:(?:(?:\$?(?<![\p{L}\p{M}\p{N}\p{Pc}])[a-zA-Z_0-9\-]+(?![\p{L}\p{M}\p{N}\p{Pc}])|@)|\*)|(-?\p{Nd}+)))(\]))?(?:(?:(=)|(\+=))|(-=))?(?:(?<=[\= \t]|^|[\{\(\[])(?:(?:(?:(?:(?:(0[xX]\p{AHex}+)|(0\p{Nd}+))|(\p{Nd}{1,2}#[0-9a-zA-Z\@_]+))|(-?\p{Nd}+\.\p{Nd}+))|(-?\p{Nd}+(?:\.\p{Nd}+)+))|(-?\p{Nd}+))(?=[ \t]|(?=\n?$)|[\}\)\;]))?/dgv},{include:"#normal_context"}]},modifiers:{match:/(?<=^|[\;\& \t])(?:readonly|declare|typeset|export|local)(?=[ \t\;\&]|(?=\n?$))/dgv,name:"storage.modifier.$0.shell"},normal_assignment_statement:{begin:/*@__PURE__*/ new EmulatedRegExp("(?:(?=([ \\t]*))\\1)((?<![\\p{L}\\p{M}\\p{N}\\p{Pc}])[a-zA-Z_0-9\\-]+(?![\\p{L}\\p{M}\\p{N}\\p{Pc}]))(?:(\\[)((?:(?:(?:\\$?(?<![\\p{L}\\p{M}\\p{N}\\p{Pc}])[a-zA-Z_0-9\\-]+(?![\\p{L}\\p{M}\\p{N}\\p{Pc}])|@)|\\*)|(-?\\p{Nd}+)))(\\]))?(?:(?:(=)|(\\+=))|(-=))","dgv",{"hiddenCaptures":[1]}),beginCaptures:{"1":{name:"variable.other.assignment.shell"},"2":{name:"punctuation.definition.array.access.shell"},"3":{name:"variable.other.assignment.shell"},"4":{name:"constant.numeric.shell constant.numeric.integer.shell"},"5":{name:"punctuation.definition.array.access.shell"},"6":{name:"keyword.operator.assignment.shell"},"7":{name:"keyword.operator.assignment.compound.shell"},"8":{name:"keyword.operator.assignment.compound.shell"}},end:/(?=[\;\|\&\n\)\`\{\}]|[ \t]*#|\])(?<!\\)/dgv,endCaptures:{},name:"meta.expression.assignment.shell",patterns:[{include:"#comment"},{include:"#string"},{include:"#normal_assignment_statement"},{begin:/(?<=[ \t])(?![ \t]|[\p{L}\p{M}\p{N}\p{Pc}]+=)/dgv,beginCaptures:{},end:/(?=[\;\|\&\n\)\`\{\}]|[ \t]*#|\])(?<!\\)/dgv,endCaptures:{},name:"meta.statement.command.env.shell",patterns:[{include:"#command_name_range"},{include:"#line_continuation"},{include:"#option"},{include:"#argument"},{include:"#string"}]},{include:"#simple_unquoted"},{include:"#normal_context"}]},normal_context:{patterns:[{include:"#comment"},{include:"#pipeline"},{include:"#normal_statement_seperator"},{include:"#misc_ranges"},{include:"#boolean"},{include:"#redirect_number"},{include:"#numeric_literal"},{include:"#string"},{include:"#variable"},{include:"#interpolation"},{include:"#heredoc"},{include:"#herestring"},{include:"#redirection"},{include:"#pathname"},{include:"#floating_keyword"},{include:"#support"},{include:"#parenthese"}]},normal_statement:{begin:/*@__PURE__*/ new EmulatedRegExp("(?!^(?:(?=([ \\t]*))\\1)(?=\\n?$))(?:(?<=^until | until |\\tuntil |^while | while |\\twhile |^elif | elif |\\telif |^else | else |\\telse |^then | then |\\tthen |^do | do |\\tdo |^if | if |\\tif )|(?<=(?:^|[\\;\\|\\&\\!\\(\\{\\`])))(?:(?=([ \\t]*))\\2)(?!nocorrect[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|nocorrect\\$|function[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|function\\$|foreach[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|foreach\\$|repeat[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|repeat\\$|logout[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|logout\\$|coproc[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|coproc\\$|select[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|select\\$|while[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|while\\$|pushd[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|pushd\\$|until[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|until\\$|case[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|case\\$|done[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|done\\$|elif[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|elif\\$|else[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|else\\$|esac[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|esac\\$|popd[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|popd\\$|then[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|then\\$|time[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|time\\$|for[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|for\\$|end[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|end\\$|fi[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|fi\\$|do[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|do\\$|in[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|in\\$|if[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|if\\$)","dgv",{"hiddenCaptures":[1,2]}),beginCaptures:{},end:/(?=[\;\|\&\n\)\`\{\}]|[ \t]*#|\])(?<!\\)/dgv,endCaptures:{},name:"meta.statement.shell",patterns:[{include:"#typical_statements"}]},normal_statement_seperator:{captures:{"1":{name:"punctuation.terminator.statement.semicolon.shell"},"2":{name:"punctuation.separator.statement.and.shell"},"3":{name:"punctuation.separator.statement.or.shell"},"4":{name:"punctuation.separator.statement.background.shell"}},match:/(?:(?:(?:(;)|(&&))|(\|\|))|(&))/dgv},numeric_literal:{captures:{"1":{name:"constant.numeric.shell constant.numeric.hex.shell"},"2":{name:"constant.numeric.shell constant.numeric.octal.shell"},"3":{name:"constant.numeric.shell constant.numeric.other.shell"},"4":{name:"constant.numeric.shell constant.numeric.decimal.shell"},"5":{name:"constant.numeric.shell constant.numeric.version.shell"},"6":{name:"constant.numeric.shell constant.numeric.integer.shell"}},match:/(?<=[\= \t]|^|[\{\(\[])(?:(?:(?:(?:(?:(0[xX]\p{AHex}+)|(0\p{Nd}+))|(\p{Nd}{1,2}#[0-9a-zA-Z\@_]+))|(-?\p{Nd}+\.\p{Nd}+))|(-?\p{Nd}+(?:\.\p{Nd}+)+))|(-?\p{Nd}+))(?=[ \t]|(?=\n?$)|[\}\)\;])/dgv},option:{begin:/*@__PURE__*/ new EmulatedRegExp("(?:(?=([ \\t]+))\\1)(-)((?!(?:[\\!\\&\\|\\(\\)\\{\\[\\<\\>\\#\\n]|(?=\\n?$)|[\\; \\t])))","dgv",{"hiddenCaptures":[1]}),beginCaptures:{"1":{name:"string.unquoted.argument.shell constant.other.option.dash.shell"},"2":{name:"string.unquoted.argument.shell constant.other.option.shell"}},contentName:"string.unquoted.argument constant.other.option",end:/(?:(?=[ \t])|(?=[\;\|\&\n\)\`\{\}]|[ \t]*#|\])(?<!\\))/dgv,endCaptures:{},patterns:[{include:"#option_context"}]},option_context:{patterns:[{include:"#misc_ranges"},{include:"#string"},{include:"#variable"},{include:"#interpolation"},{include:"#heredoc"},{include:"#herestring"},{include:"#redirection"},{include:"#pathname"},{include:"#floating_keyword"},{include:"#support"}]},parenthese:{patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.section.parenthese.shell"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.parenthese.shell"}},name:"meta.parenthese.group.shell",patterns:[{include:"#initial_context"}]}]},pathname:{patterns:[{match:/(?<=[\p{space}\:\=]|^)~/dgv,name:"keyword.operator.tilde.shell"},{match:/[\*\?]/dgv,name:"keyword.operator.glob.shell"},{begin:/([\?\*\+\@\!])(\()/dgv,beginCaptures:{"1":{name:"keyword.operator.extglob.shell"},"2":{name:"punctuation.definition.extglob.shell"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.extglob.shell"}},name:"meta.structure.extglob.shell",patterns:[{include:"#initial_context"}]}]},pipeline:{patterns:[{match:/(?<=^|[\;\&\p{space}])(time)(?=[\p{space}\;\&]|(?=\n?$))/dgv,name:"keyword.other.shell"},{match:/[\|\!]/dgv,name:"keyword.operator.pipe.shell"}]},redirect_fix:{captures:{"1":{name:"keyword.operator.redirect.shell"},"2":{name:"string.unquoted.argument.shell"}},match:/*@__PURE__*/ new EmulatedRegExp("(>>?)(?:(?=([ \\t]*))\\2)([^ \\t\\n\\>\\&\\;\\<\\(\\)\\$\\`\\\\\"'\\|]+)","dgv",{"hiddenCaptures":[2]})},redirect_number:{captures:{"1":{name:"keyword.operator.redirect.stdout.shell"},"2":{name:"keyword.operator.redirect.stderr.shell"},"3":{name:"keyword.operator.redirect.$3.shell"}},match:/(?<=[ \t])(?:(1)|(2)|(\p{Nd}+))(?=>)/dgv},redirection:{patterns:[{begin:/[\>\<]\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.shell"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.shell"}},name:"string.interpolated.process-substitution.shell",patterns:[{include:"#initial_context"}]},{match:/(?<![\<\>])(&>|\p{Nd}*>&\p{Nd}*|\p{Nd}*(>>|[\>\<])|\p{Nd}*<&|\p{Nd}*<>)(?![\<\>])/dgv,name:"keyword.operator.redirect.shell"}]},regex_comparison:{match:/=~/dgv,name:"keyword.operator.logical.regex.shell"},regexp:{patterns:[{match:/[^\n]+/dgv}]},simple_options:{captures:{"0":{patterns:[{captures:{"1":{name:"string.unquoted.argument.shell constant.other.option.dash.shell"},"2":{name:"string.unquoted.argument.shell constant.other.option.shell"}},match:/*@__PURE__*/ new EmulatedRegExp("(?:(?=([ \\t]+))\\1)(-)([\\p{L}\\p{M}\\p{N}\\p{Pc}]+)","dgv",{"hiddenCaptures":[1]})}]}},match:/*@__PURE__*/ new EmulatedRegExp("(?:(?:(?=([ \\t]+))\\1)-[\\p{L}\\p{M}\\p{N}\\p{Pc}]+)*","dgv",{"hiddenCaptures":[1]})},simple_unquoted:{match:/[^ \t\n\>\&\;\<\(\)\$\`\\"'\|]/dgv,name:"string.unquoted.shell"},special_expansion:{match:/!|:[\-\=\?]?|[\*\@]|##|#|%%|[\%\/]/dgv,name:"keyword.operator.expansion.shell"},start_of_command:{match:/*@__PURE__*/ new EmulatedRegExp("(?:(?=([ \\t]*))\\1)(?!(?:[\\!\\&\\|\\(\\)\\{\\[\\<\\>\\#\\n]|(?=\\n?$)|[\\; \\t]))(?!nocorrect |nocorrect\\t|nocorrect(?=\\n?$)|readonly |readonly\\t|readonly(?=\\n?$)|function |function\\t|function(?=\\n?$)|foreach |foreach\\t|foreach(?=\\n?$)|coproc |coproc\\t|coproc(?=\\n?$)|logout |logout\\t|logout(?=\\n?$)|export |export\\t|export(?=\\n?$)|select |select\\t|select(?=\\n?$)|repeat |repeat\\t|repeat(?=\\n?$)|pushd |pushd\\t|pushd(?=\\n?$)|until |until\\t|until(?=\\n?$)|while |while\\t|while(?=\\n?$)|local |local\\t|local(?=\\n?$)|case |case\\t|case(?=\\n?$)|done |done\\t|done(?=\\n?$)|elif |elif\\t|elif(?=\\n?$)|else |else\\t|else(?=\\n?$)|esac |esac\\t|esac(?=\\n?$)|popd |popd\\t|popd(?=\\n?$)|then |then\\t|then(?=\\n?$)|time |time\\t|time(?=\\n?$)|for |for\\t|for(?=\\n?$)|end |end\\t|end(?=\\n?$)|fi |fi\\t|fi(?=\\n?$)|do |do\\t|do(?=\\n?$)|in |in\\t|in(?=\\n?$)|if |if\\t|if(?=\\n?$))(?!\\\\\\n?(?=\\n?$))","dgv",{"hiddenCaptures":[1]})},string:{patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.shell"},{begin:/'/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.shell"}},end:/'/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.shell"}},name:"string.quoted.single.shell"},{begin:/\$?"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.shell"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.shell"}},name:"string.quoted.double.shell",patterns:[{match:/\\[\$\n\`"\\]/dgv,name:"constant.character.escape.shell"},{include:"#variable"},{include:"#interpolation"}]},{begin:/\$'/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.shell"}},end:/'/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.shell"}},name:"string.quoted.single.dollar.shell",patterns:[{match:/\\[abefnrtv\\']/dgv,name:"constant.character.escape.ansi-c.shell"},{match:/\\[0-9]{3}"/dgv,name:"constant.character.escape.octal.shell"},{match:/\\x\p{AHex}{2}"/dgv,name:"constant.character.escape.hex.shell"},{match:/\\c[^\n]"/dgv,name:"constant.character.escape.control-char.shell"}]}]},subshell_dollar:{patterns:[{begin:/\$\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.subshell.single.shell"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.subshell.single.shell"}},name:"meta.scope.subshell",patterns:[{include:"#parenthese"},{include:"#initial_context"}]}]},support:{patterns:[{match:/(?<=^|[\;\&\p{space}])[\:\.](?=[\p{space}\;\&]|(?=\n?$))/dgv,name:"support.function.builtin.shell"}]},typical_statements:{patterns:[{include:"#assignment_statement"},{include:"#case_statement"},{include:"#for_statement"},{include:"#while_statement"},{include:"#function_definition"},{include:"#command_statement"},{include:"#line_continuation"},{include:"#arithmetic_double"},{include:"#normal_context"}]},variable:{patterns:[{captures:{"1":{name:"punctuation.definition.variable.shell variable.parameter.positional.all.shell"},"2":{name:"variable.parameter.positional.all.shell"}},match:/(\$)(@(?![\p{L}\p{M}\p{N}\p{Pc}]))/dgv},{captures:{"1":{name:"punctuation.definition.variable.shell variable.parameter.positional.shell"},"2":{name:"variable.parameter.positional.shell"}},match:/(\$)([0-9](?![\p{L}\p{M}\p{N}\p{Pc}]))/dgv},{captures:{"1":{name:"punctuation.definition.variable.shell variable.language.special.shell"},"2":{name:"variable.language.special.shell"}},match:/(\$)([\-\*\#\?\$\!0_](?![\p{L}\p{M}\p{N}\p{Pc}]))/dgv},{begin:/*@__PURE__*/ new EmulatedRegExp("(\\$)(\\{)(?:(?=([ \\t]*))\\3)(?=\\p{Nd})","dgv",{"hiddenCaptures":[3]}),beginCaptures:{"1":{name:"punctuation.definition.variable.shell variable.parameter.positional.shell"},"2":{name:"punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell variable.parameter.positional.shell"}},contentName:"meta.parameter-expansion",end:/\}/dgv,endCaptures:{"0":{name:"punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell variable.parameter.positional.shell"}},patterns:[{include:"#special_expansion"},{include:"#array_access_inline"},{match:/[0-9]+/dgv,name:"variable.parameter.positional.shell"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])[a-zA-Z_0-9\-]+(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"variable.other.normal.shell"},{include:"#variable"},{include:"#string"}]},{begin:/(\$)(\{)/dgv,beginCaptures:{"1":{name:"punctuation.definition.variable.shell"},"2":{name:"punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell"}},contentName:"meta.parameter-expansion",end:/\}/dgv,endCaptures:{"0":{name:"punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell"}},patterns:[{include:"#special_expansion"},{include:"#array_access_inline"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])[a-zA-Z_0-9\-]+(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"variable.other.normal.shell"},{include:"#variable"},{include:"#string"}]},{captures:{"1":{name:"punctuation.definition.variable.shell variable.other.normal.shell"},"2":{name:"variable.other.normal.shell"}},match:/(\$)([\p{L}\p{M}\p{N}\p{Pc}]+(?![\p{L}\p{M}\p{N}\p{Pc}]))/dgv}]},while_statement:{patterns:[{begin:/(\bwhile\b)/dgv,beginCaptures:{"1":{name:"keyword.control.while.shell"}},end:/(?=[\;\|\&\n\)\`\{\}]|[ \t]*#|\])(?<!\\)/dgv,endCaptures:{},name:"meta.while.shell",patterns:[{include:"#line_continuation"},{include:"#math_operators"},{include:"#option"},{include:"#simple_unquoted"},{include:"#normal_context"},{include:"#string"}]}]}},scopeName:"source.shell",embeddedLangs:undefined,aliases:["bash","sh","shell","zsh"]})
3
+ const lang = Object.freeze({displayName:"Shell",name:"shellscript",patterns:[{include:"#initial_context"}],repository:{alias_statement:{begin:/*@__PURE__*/ new EmulatedRegExp("(?:(?=([ \\t]*))\\1)(alias)(?:(?=([ \\t]*))\\3)((?:((?<![\\p{L}\\p{M}\\p{N}\\p{Pc}])-[\\p{L}\\p{M}\\p{N}\\p{Pc}]+\\b)(?:(?=([ \\t]*))\\6))*)(?:(?=([ \\t]*))\\7)((?<![\\p{L}\\p{M}\\p{N}\\p{Pc}])[a-zA-Z_0-9\\-]+(?![\\p{L}\\p{M}\\p{N}\\p{Pc}]))(?:(\\[)((?:(?:(?:\\$?(?<![\\p{L}\\p{M}\\p{N}\\p{Pc}])[a-zA-Z_0-9\\-]+(?![\\p{L}\\p{M}\\p{N}\\p{Pc}])|@)|\\*)|(-?\\p{Nd}+)))(\\]))?(?:(?:(=)|(\\+=))|(-=))","dgv",{"hiddenCaptures":[1,3,6,7]}),beginCaptures:{"1":{name:"storage.type.alias.shell"},"2":{patterns:[{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])-[\p{L}\p{M}\p{N}\p{Pc}]+\b/dgv,name:"string.unquoted.argument.shell constant.other.option.shell"}]},"3":{name:"string.unquoted.argument.shell constant.other.option.shell"},"4":{name:"variable.other.assignment.shell"},"5":{name:"punctuation.definition.array.access.shell"},"6":{name:"variable.other.assignment.shell"},"7":{name:"constant.numeric.shell constant.numeric.integer.shell"},"8":{name:"punctuation.definition.array.access.shell"},"9":{name:"keyword.operator.assignment.shell"},"10":{name:"keyword.operator.assignment.compound.shell"},"11":{name:"keyword.operator.assignment.compound.shell"}},end:/(?:(?=[ \t]|(?=\n?$))|(?:(?:(?:(;)|(&&))|(\|\|))|(&)))/dgv,endCaptures:{"1":{name:"punctuation.terminator.statement.semicolon.shell"},"2":{name:"punctuation.separator.statement.and.shell"},"3":{name:"punctuation.separator.statement.or.shell"},"4":{name:"punctuation.separator.statement.background.shell"}},name:"meta.expression.assignment.alias.shell",patterns:[{include:"#normal_context"}]},argument:{begin:/*@__PURE__*/ new EmulatedRegExp("(?:(?=([ \\t]+))\\1)(?!(?:[\\&\\|\\(\\[\\#\\n]|(?=\\n?$)|;))","dgv",{"hiddenCaptures":[1]}),beginCaptures:{},end:/(?=[ \t\;\|\&]|(?=\n?$)|[\n\)\`])/dgv,endCaptures:{},name:"meta.argument.shell",patterns:[{include:"#argument_context"},{include:"#line_continuation"}]},argument_context:{patterns:[{captures:{"1":{name:"string.unquoted.argument.shell",patterns:[{match:/\*/dgv,name:"variable.language.special.wildcard.shell"},{include:"#variable"},{include:"#numeric_literal"},{captures:{"1":{name:"constant.language.$1.shell"}},match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(\b(?:true|false)\b)(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv}]}},match:/*@__PURE__*/ new EmulatedRegExp("(?:(?=([ \\t]*))\\1)([^ \\t\\n\\>\\&\\;\\<\\(\\)\\$\\`\\\\\"'\\|]+(?!>))","dgv",{"hiddenCaptures":[1]})},{include:"#normal_context"}]},arithmetic_double:{patterns:[{begin:/\(\(/dgv,beginCaptures:{"0":{name:"punctuation.section.arithmetic.double.shell"}},end:/\)\p{space}*\)/dgv,endCaptures:{"0":{name:"punctuation.section.arithmetic.double.shell"}},name:"meta.arithmetic.shell",patterns:[{include:"#math"},{include:"#string"}]}]},arithmetic_no_dollar:{patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.section.arithmetic.single.shell"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.arithmetic.single.shell"}},name:"meta.arithmetic.shell",patterns:[{include:"#math"},{include:"#string"}]}]},array_access_inline:{captures:{"1":{name:"punctuation.section.array.shell"},"2":{patterns:[{include:"#special_expansion"},{include:"#string"},{include:"#variable"}]},"3":{name:"punctuation.section.array.shell"}},match:/(\[)([^\[\]]+)(\])/dgv},array_value:{begin:/*@__PURE__*/ new EmulatedRegExp("(?:(?=([ \\t]*))\\1)((?<![\\p{L}\\p{M}\\p{N}\\p{Pc}])[a-zA-Z_0-9\\-]+(?![\\p{L}\\p{M}\\p{N}\\p{Pc}]))(?:(\\[)((?:(?:(?:\\$?(?<![\\p{L}\\p{M}\\p{N}\\p{Pc}])[a-zA-Z_0-9\\-]+(?![\\p{L}\\p{M}\\p{N}\\p{Pc}])|@)|\\*)|(-?\\p{Nd}+)))(\\]))?(?:(?:(=)|(\\+=))|(-=))(?:(?=([ \\t]*))\\10)(\\()","dgv",{"hiddenCaptures":[1,10]}),beginCaptures:{"1":{name:"variable.other.assignment.shell"},"2":{name:"punctuation.definition.array.access.shell"},"3":{name:"variable.other.assignment.shell"},"4":{name:"constant.numeric.shell constant.numeric.integer.shell"},"5":{name:"punctuation.definition.array.access.shell"},"6":{name:"keyword.operator.assignment.shell"},"7":{name:"keyword.operator.assignment.compound.shell"},"8":{name:"keyword.operator.assignment.compound.shell"},"9":{name:"punctuation.definition.array.shell"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.array.shell"}},patterns:[{include:"#comment"},{captures:{"1":{name:"variable.other.assignment.array.shell entity.other.attribute-name.shell"},"2":{name:"keyword.operator.assignment.shell punctuation.definition.assignment.shell"}},match:/((?<![\p{L}\p{M}\p{N}\p{Pc}])[a-zA-Z_0-9\-]+(?![\p{L}\p{M}\p{N}\p{Pc}]))(=)/dgv},{captures:{"1":{name:"punctuation.definition.bracket.named-array.shell"},"2":{name:"string.unquoted.shell entity.other.attribute-name.bracket.shell"},"3":{name:"punctuation.definition.bracket.named-array.shell"},"4":{name:"punctuation.definition.assignment.shell"}},match:/(\[)([^\n]+?)(\])(=)/dgv},{include:"#normal_context"},{include:"#simple_unquoted"}]},assignment_statement:{patterns:[{include:"#array_value"},{include:"#modified_assignment_statement"},{include:"#normal_assignment_statement"}]},basic_command_name:{captures:{"1":{name:"storage.modifier.$1.shell"},"2":{name:"entity.name.function.call.shell entity.name.command.shell",patterns:[{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(?:continue|return|break)(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"keyword.control.$0.shell"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|[\:\.])(?!\/)(?![\p{L}\p{M}\p{N}\p{Pc}])(?!-)/dgv,name:"support.function.builtin.shell"},{include:"#variable"}]}},match:/(?!(?:[\!\&\|\(\)\{\[\<\>\#\n]|(?=\n?$)|[\; \t]))(?!nocorrect |nocorrect\t|nocorrect(?=\n?$)|readonly |readonly\t|readonly(?=\n?$)|function |function\t|function(?=\n?$)|foreach |foreach\t|foreach(?=\n?$)|coproc |coproc\t|coproc(?=\n?$)|logout |logout\t|logout(?=\n?$)|export |export\t|export(?=\n?$)|select |select\t|select(?=\n?$)|repeat |repeat\t|repeat(?=\n?$)|pushd |pushd\t|pushd(?=\n?$)|until |until\t|until(?=\n?$)|while |while\t|while(?=\n?$)|local |local\t|local(?=\n?$)|case |case\t|case(?=\n?$)|done |done\t|done(?=\n?$)|elif |elif\t|elif(?=\n?$)|else |else\t|else(?=\n?$)|esac |esac\t|esac(?=\n?$)|popd |popd\t|popd(?=\n?$)|then |then\t|then(?=\n?$)|time |time\t|time(?=\n?$)|for |for\t|for(?=\n?$)|end |end\t|end(?=\n?$)|fi |fi\t|fi(?=\n?$)|do |do\t|do(?=\n?$)|in |in\t|in(?=\n?$)|if |if\t|if(?=\n?$))(?:((?<=^|[\;\& \t])(?:readonly|declare|typeset|export|local)(?=[ \t\;\&]|(?=\n?$)))|((?!["']|\\\n?(?=\n?$))[^\!'"\<\> \t\n\r]+?))(?:(?=[ \t])|(?=[\;\|\&\n\)\`\{\}]|[ \t]*#|\])(?<!\\))/dgv,name:"meta.statement.command.name.basic.shell"},block_comment:{begin:/*@__PURE__*/ new EmulatedRegExp("(?:(?=(\\p{space}*))\\1)(/\\*)","dgv",{"hiddenCaptures":[1]}),beginCaptures:{"1":{name:"punctuation.definition.comment.begin.shell"}},end:/\*\//dgv,endCaptures:{"0":{name:"punctuation.definition.comment.end.shell"}},name:"comment.block.shell"},boolean:{match:/\b(?:true|false)\b/dgv,name:"constant.language.$0.shell"},case_statement:{begin:/*@__PURE__*/ new EmulatedRegExp("(\\bcase\\b)(?:(?=([ \\t]*))\\2)([^\\n]+?)(?:(?=([ \\t]*))\\4)(\\bin\\b)","dgv",{"hiddenCaptures":[2,4]}),beginCaptures:{"1":{name:"keyword.control.case.shell"},"2":{patterns:[{include:"#initial_context"}]},"3":{name:"keyword.control.in.shell"}},end:/\besac\b/dgv,endCaptures:{"0":{name:"keyword.control.esac.shell"}},name:"meta.case.shell",patterns:[{include:"#comment"},{captures:{"1":{name:"keyword.operator.pattern.case.default.shell"}},match:/*@__PURE__*/ new EmulatedRegExp("(?:(?=([ \\t]*))\\1)(\\* *\\))","dgv",{"hiddenCaptures":[1]})},{begin:/*@__PURE__*/ new EmulatedRegExp("(?<!\\))(?!(?:(?=([ \\t]*))\\1)(?:esac\\b|(?=\\n?$)))","dgv",{"hiddenCaptures":[1]}),beginCaptures:{},end:/(?:(?=\besac\b)|(\)))/dgv,endCaptures:{"1":{name:"keyword.operator.pattern.case.shell"}},name:"meta.case.entry.pattern.shell",patterns:[{include:"#case_statement_context"}]},{begin:/(?<=\))/dgv,beginCaptures:{},end:/(?:(;;)|(?=\besac\b))/dgv,endCaptures:{"1":{name:"punctuation.terminator.statement.case.shell"}},name:"meta.case.entry.body.shell",patterns:[{include:"#typical_statements"},{include:"#initial_context"}]}]},case_statement_context:{patterns:[{match:/\*/dgv,name:"variable.language.special.quantifier.star.shell keyword.operator.quantifier.star.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"},{match:/\+/dgv,name:"variable.language.special.quantifier.plus.shell keyword.operator.quantifier.plus.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"},{match:/\?/dgv,name:"variable.language.special.quantifier.question.shell keyword.operator.quantifier.question.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"},{match:/@/dgv,name:"variable.language.special.at.shell keyword.operator.at.shell punctuation.definition.regex.at.shell"},{match:/\|/dgv,name:"keyword.operator.orvariable.language.special.or.shell keyword.operator.alternation.ruby.shell punctuation.definition.regex.alternation.shell punctuation.separator.regex.alternation.shell"},{match:/\\[^\n]/dgv,name:"constant.character.escape.shell"},{match:/(?<=\tin| in|[ \t]|;;)\(/dgv,name:"keyword.operator.pattern.case.shell"},{begin:/(?<=\P{space})(\()/dgv,beginCaptures:{"1":{name:"punctuation.definition.group.shell punctuation.definition.regex.group.shell"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.group.shell punctuation.definition.regex.group.shell"}},name:"meta.parenthese.shell",patterns:[{include:"#case_statement_context"}]},{begin:/\[/dgv,beginCaptures:{"0":{name:"punctuation.definition.character-class.shell"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.definition.character-class.shell"}},name:"string.regexp.character-class.shell",patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.shell"}]},{include:"#string"},{match:/[^\) \t\n\[\?\*\|\@]/dgv,name:"string.unquoted.pattern.shell string.regexp.unquoted.shell"}]},command_name_range:{begin:/(?:)/dgv,beginCaptures:{},end:/(?:(?=[ \t\;\|\&]|(?=\n?$)|[\n\)\`])|(?=<))/dgv,endCaptures:{},name:"meta.statement.command.name.shell",patterns:[{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(?:continue|return|break)(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"entity.name.function.call.shell entity.name.command.shell keyword.control.$0.shell"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|[\:\.])(?!\/)(?![\p{L}\p{M}\p{N}\p{Pc}])(?!-)/dgv,name:"entity.name.function.call.shell entity.name.command.shell support.function.builtin.shell"},{include:"#variable"},{captures:{"1":{name:"entity.name.function.call.shell entity.name.command.shell"}},match:/*@__PURE__*/ new EmulatedRegExp("(?<![\\p{L}\\p{M}\\p{N}\\p{Pc}])(?<=^|['\"\\}\\)])([^ \\n\\t\\r\"'\\=\\;\\&\\|\\`\\)\\{\\<\\>]+)","dgv",{"strategy":"clip_search"})},{begin:/*@__PURE__*/ new EmulatedRegExp("(?:^|(?<![ \\t\\;\\|\\&\\n\\{\\#]))(\\$?)((?:(\")|(')))","dgv",{"strategy":"clip_search"}),beginCaptures:{"1":{name:"meta.statement.command.name.quoted.shell punctuation.definition.string.shell entity.name.function.call.shell entity.name.command.shell"},"2":{},"3":{name:"meta.statement.command.name.quoted.shell string.quoted.double.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"},"4":{name:"meta.statement.command.name.quoted.shell string.quoted.single.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"}},end:/*@__PURE__*/ new EmulatedRegExp("(?<!^)(?<=\\2)()()","dgv",{"strategy":"clip_search"}),endCaptures:{},patterns:[{include:"#continuation_of_single_quoted_command_name"},{include:"#continuation_of_double_quoted_command_name"}]},{include:"#line_continuation"},{include:"#simple_unquoted"}]},command_statement:{begin:/*@__PURE__*/ new EmulatedRegExp("(?:(?=([ \\t]*))\\1)(?!(?:[\\!\\&\\|\\(\\)\\{\\[\\<\\>\\#\\n]|(?=\\n?$)|[\\; \\t]))(?!nocorrect |nocorrect\\t|nocorrect(?=\\n?$)|readonly |readonly\\t|readonly(?=\\n?$)|function |function\\t|function(?=\\n?$)|foreach |foreach\\t|foreach(?=\\n?$)|coproc |coproc\\t|coproc(?=\\n?$)|logout |logout\\t|logout(?=\\n?$)|export |export\\t|export(?=\\n?$)|select |select\\t|select(?=\\n?$)|repeat |repeat\\t|repeat(?=\\n?$)|pushd |pushd\\t|pushd(?=\\n?$)|until |until\\t|until(?=\\n?$)|while |while\\t|while(?=\\n?$)|local |local\\t|local(?=\\n?$)|case |case\\t|case(?=\\n?$)|done |done\\t|done(?=\\n?$)|elif |elif\\t|elif(?=\\n?$)|else |else\\t|else(?=\\n?$)|esac |esac\\t|esac(?=\\n?$)|popd |popd\\t|popd(?=\\n?$)|then |then\\t|then(?=\\n?$)|time |time\\t|time(?=\\n?$)|for |for\\t|for(?=\\n?$)|end |end\\t|end(?=\\n?$)|fi |fi\\t|fi(?=\\n?$)|do |do\\t|do(?=\\n?$)|in |in\\t|in(?=\\n?$)|if |if\\t|if(?=\\n?$))(?!\\\\\\n?(?=\\n?$))","dgv",{"hiddenCaptures":[1]}),beginCaptures:{},end:/(?=[\;\|\&\n\)\`\{\}]|[ \t]*#|\])(?<!\\)/dgv,endCaptures:{},name:"meta.statement.command.shell",patterns:[{include:"#command_name_range"},{include:"#line_continuation"},{include:"#option"},{include:"#argument"},{include:"#string"},{include:"#heredoc"}]},comment:{captures:{"1":{name:"comment.line.number-sign.shell meta.shebang.shell"},"2":{name:"punctuation.definition.comment.shebang.shell"},"3":{name:"comment.line.number-sign.shell"},"4":{name:"punctuation.definition.comment.shell"}},match:/*@__PURE__*/ new EmulatedRegExp("(?:^|(?:(?=([ \\t]+))\\1))(?:((#!)[^\\n]*)|((#)[^\\n]*))","dgv",{"hiddenCaptures":[1]})},comments:{patterns:[{include:"#block_comment"},{include:"#line_comment"}]},"compound-command":{patterns:[{begin:/\[/dgv,beginCaptures:{"0":{name:"punctuation.definition.logical-expression.shell"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.definition.logical-expression.shell"}},name:"meta.scope.logical-expression.shell",patterns:[{include:"#logical-expression"},{include:"#initial_context"}]},{begin:/(?<=\p{space}|^)\{(?=\p{space}|(?=\n?$))/dgv,beginCaptures:{"0":{name:"punctuation.definition.group.shell"}},end:/(?<=^|;)\p{space}*(\})/dgv,endCaptures:{"1":{name:"punctuation.definition.group.shell"}},name:"meta.scope.group.shell",patterns:[{include:"#initial_context"}]}]},continuation_of_double_quoted_command_name:{begin:/(?<=")/dgvy,beginCaptures:{},contentName:"meta.statement.command.name.continuation string.quoted.double entity.name.function.call entity.name.command",end:/"/dgv,endCaptures:{"0":{name:"string.quoted.double.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell"}},patterns:[{match:/\\[\$\n\`"\\]/dgv,name:"constant.character.escape.shell"},{include:"#variable"},{include:"#interpolation"}]},continuation_of_single_quoted_command_name:{begin:/(?<=')/dgvy,beginCaptures:{},contentName:"meta.statement.command.name.continuation string.quoted.single entity.name.function.call entity.name.command",end:/'/dgv,endCaptures:{"0":{name:"string.quoted.single.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell"}}},custom_command_names:{patterns:[]},custom_commands:{patterns:[]},double_quote_context:{patterns:[{match:/\\[\$\`"\\\n]/dgv,name:"constant.character.escape.shell"},{include:"#variable"},{include:"#interpolation"}]},double_quote_escape_char:{match:/\\[\$\`"\\\n]/dgv,name:"constant.character.escape.shell"},floating_keyword:{patterns:[{match:/(?<=^|[\;\& \t])(?:then|elif|else|done|end|do|if|fi)(?=[ \t\;\&]|(?=\n?$))/dgv,name:"keyword.control.$0.shell"}]},for_statement:{patterns:[{begin:/*@__PURE__*/ new EmulatedRegExp("(\\bfor\\b)(?:(?=([ \\t]*))\\2)((?<![\\p{L}\\p{M}\\p{N}\\p{Pc}])[a-zA-Z_0-9\\-]+(?![\\p{L}\\p{M}\\p{N}\\p{Pc}]))(?:(?=([ \\t]*))\\4)(\\bin\\b)","dgv",{"hiddenCaptures":[2,4]}),beginCaptures:{"1":{name:"keyword.control.for.shell"},"2":{name:"variable.other.for.shell"},"3":{name:"keyword.control.in.shell"}},end:/(?=[\;\|\&\n\)\`\{\}]|[ \t]*#|\])(?<!\\)/dgv,endCaptures:{},name:"meta.for.in.shell",patterns:[{include:"#string"},{include:"#simple_unquoted"},{include:"#normal_context"}]},{begin:/(\bfor\b)/dgv,beginCaptures:{"1":{name:"keyword.control.for.shell"}},end:/(?=[\;\|\&\n\)\`\{\}]|[ \t]*#|\])(?<!\\)/dgv,endCaptures:{},name:"meta.for.shell",patterns:[{include:"#arithmetic_double"},{include:"#normal_context"}]}]},function_definition:{applyEndPatternLast:1,begin:/*@__PURE__*/ new EmulatedRegExp("(?:(?=([ \\t]*))\\1)(?:(\\bfunction\\b)(?:(?=([ \\t]*))\\3)([^ \\t\\n\\r\\(\\)\\=\"']+)(?:(\\()(?:(?=([ \\t]*))\\6)(\\)))?|([^ \\t\\n\\r\\(\\)\\=\"']+)(?:(?=([ \\t]*))\\9)(\\()(?:(?=([ \\t]*))\\11)(\\)))","dgv",{"hiddenCaptures":[1,3,6,9,11]}),beginCaptures:{"1":{name:"storage.type.function.shell"},"2":{name:"entity.name.function.shell"},"3":{name:"punctuation.definition.arguments.shell"},"4":{name:"punctuation.definition.arguments.shell"},"5":{name:"entity.name.function.shell"},"6":{name:"punctuation.definition.arguments.shell"},"7":{name:"punctuation.definition.arguments.shell"}},end:/(?<=[\}\)])/dgv,endCaptures:{},name:"meta.function.shell",patterns:[{match:/[\t \n]/dgvy},{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},name:"meta.function.body.shell",patterns:[{include:"#initial_context"}]},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},name:"meta.function.body.shell",patterns:[{include:"#initial_context"}]},{include:"#initial_context"}]},heredoc:{patterns:[{begin:/*@__PURE__*/ new EmulatedRegExp("((?<!<)<<-)(?:(?=([ \\t]*))\\2)([\"'])(?:(?=([ \\t]*))\\4)([^\"']+?)(?=[\\p{space}\\;\\&\\<\"'])(\\3)([^\\n]*)","dgv",{"hiddenCaptures":[2,4]}),beginCaptures:{"1":{name:"keyword.operator.heredoc.shell"},"2":{name:"punctuation.definition.string.heredoc.quote.shell"},"3":{name:"punctuation.definition.string.heredoc.delimiter.shell"},"4":{name:"punctuation.definition.string.heredoc.quote.shell"},"5":{patterns:[{include:"#redirect_fix"},{include:"#typical_statements"}]}},contentName:"string.quoted.heredoc.indent.$3",end:/^\t*\3(?=[\p{space}\;\&]|(?=\n?$))()()()/dgv,endCaptures:{"0":{name:"punctuation.definition.string.heredoc.$0.shell"}},patterns:[]},{begin:/*@__PURE__*/ new EmulatedRegExp("((?<!<)<<(?!<))(?:(?=([ \\t]*))\\2)([\"'])(?:(?=([ \\t]*))\\4)([^\"']+?)(?=[\\p{space}\\;\\&\\<\"'])(\\3)([^\\n]*)","dgv",{"hiddenCaptures":[2,4]}),beginCaptures:{"1":{name:"keyword.operator.heredoc.shell"},"2":{name:"punctuation.definition.string.heredoc.quote.shell"},"3":{name:"punctuation.definition.string.heredoc.delimiter.shell"},"4":{name:"punctuation.definition.string.heredoc.quote.shell"},"5":{patterns:[{include:"#redirect_fix"},{include:"#typical_statements"}]}},contentName:"string.quoted.heredoc.no-indent.$3",end:/^\3(?=[\p{space}\;\&]|(?=\n?$))()()()/dgv,endCaptures:{"0":{name:"punctuation.definition.string.heredoc.delimiter.shell"}},patterns:[]},{begin:/*@__PURE__*/ new EmulatedRegExp("((?<!<)<<-)(?:(?=([ \\t]*))\\2)([^\"' \\t]+)(?=[\\p{space}\\;\\&\\<\"'])([^\\n]*)","dgv",{"hiddenCaptures":[2]}),beginCaptures:{"1":{name:"keyword.operator.heredoc.shell"},"2":{name:"punctuation.definition.string.heredoc.delimiter.shell"},"3":{patterns:[{include:"#redirect_fix"},{include:"#typical_statements"}]}},contentName:"string.unquoted.heredoc.indent.$2",end:/^\t*\2(?=[\p{space}\;\&]|(?=\n?$))()()/dgv,endCaptures:{"0":{name:"punctuation.definition.string.heredoc.delimiter.shell"}},patterns:[{include:"#double_quote_escape_char"},{include:"#variable"},{include:"#interpolation"}]},{begin:/*@__PURE__*/ new EmulatedRegExp("((?<!<)<<(?!<))(?:(?=([ \\t]*))\\2)([^\"' \\t]+)(?=[\\p{space}\\;\\&\\<\"'])([^\\n]*)","dgv",{"hiddenCaptures":[2]}),beginCaptures:{"1":{name:"keyword.operator.heredoc.shell"},"2":{name:"punctuation.definition.string.heredoc.delimiter.shell"},"3":{patterns:[{include:"#redirect_fix"},{include:"#typical_statements"}]}},contentName:"string.unquoted.heredoc.no-indent.$2",end:/^\2(?=[\p{space}\;\&]|(?=\n?$))()()/dgv,endCaptures:{"0":{name:"punctuation.definition.string.heredoc.delimiter.shell"}},patterns:[{include:"#double_quote_escape_char"},{include:"#variable"},{include:"#interpolation"}]}]},herestring:{patterns:[{begin:/(<<<)\p{space}*(('))/dgv,beginCaptures:{"1":{name:"keyword.operator.herestring.shell"},"2":{name:"string.quoted.single.shell"},"3":{name:"punctuation.definition.string.begin.shell"}},contentName:"string.quoted.single.shell",end:/(')/dgv,endCaptures:{"0":{name:"string.quoted.single.shell"},"1":{name:"punctuation.definition.string.end.shell"}},name:"meta.herestring.shell"},{begin:/(<<<)\p{space}*(("))/dgv,beginCaptures:{"1":{name:"keyword.operator.herestring.shell"},"2":{name:"string.quoted.double.shell"},"3":{name:"punctuation.definition.string.begin.shell"}},contentName:"string.quoted.double.shell",end:/(")/dgv,endCaptures:{"0":{name:"string.quoted.double.shell"},"1":{name:"punctuation.definition.string.end.shell"}},name:"meta.herestring.shell",patterns:[{include:"#double_quote_context"}]},{captures:{"1":{name:"keyword.operator.herestring.shell"},"2":{name:"string.unquoted.herestring.shell",patterns:[{include:"#initial_context"}]}},match:/(<<<)\p{space}*(([^\p{space}\)\\]|\\[^\n])+)/dgv,name:"meta.herestring.shell"}]},initial_context:{patterns:[{include:"#comment"},{include:"#pipeline"},{include:"#normal_statement_seperator"},{include:"#logical_expression_double"},{include:"#logical_expression_single"},{include:"#assignment_statement"},{include:"#case_statement"},{include:"#for_statement"},{include:"#loop"},{include:"#function_definition"},{include:"#line_continuation"},{include:"#arithmetic_double"},{include:"#misc_ranges"},{include:"#variable"},{include:"#interpolation"},{include:"#heredoc"},{include:"#herestring"},{include:"#redirection"},{include:"#pathname"},{include:"#floating_keyword"},{include:"#alias_statement"},{include:"#normal_statement"},{include:"#string"},{include:"#support"}]},inline_comment:{captures:{"1":{name:"comment.block.shell punctuation.definition.comment.begin.shell"},"2":{name:"comment.block.shell"},"3":{patterns:[{match:/\*\//dgv,name:"comment.block.shell punctuation.definition.comment.end.shell"},{match:/\*/dgv,name:"comment.block.shell"}]}},match:/*@__PURE__*/ new EmulatedRegExp("(/\\*)((?:(?=((?:[^\\*]|(?:(?=(\\*+))\\4)[^\\/])*))\\3)((?:(?=(\\*+))\\6)/))","dgv",{"hiddenCaptures":[3,4,6]})},interpolation:{patterns:[{include:"#arithmetic_dollar"},{include:"#subshell_dollar"},{begin:/`/dgv,beginCaptures:{"0":{name:"punctuation.definition.evaluation.backticks.shell"}},end:/`/dgv,endCaptures:{"0":{name:"punctuation.definition.evaluation.backticks.shell"}},name:"string.interpolated.backtick.shell",patterns:[{match:/\\[\`\\\$]/dgv,name:"constant.character.escape.shell"},{begin:/(?<=[^\p{L}\p{M}\p{N}\p{Pc}])(?=#)(?!#\{)/dgv,beginCaptures:{"1":{name:"punctuation.whitespace.comment.leading.shell"}},end:/*@__PURE__*/ new EmulatedRegExp("(?!^)","dgv",{"strategy":"clip_search"}),patterns:[{begin:/#/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.shell"}},end:/(?=`)/dgv,name:"comment.line.number-sign.shell"}]},{include:"#initial_context"}]}]},keyword:{patterns:[{match:/(?<=^|[\;\&\p{space}])(then|else|elif|fi|for|in|do|done|select|continue|esac|while|until|return)(?=[\p{space}\;\&]|(?=\n?$))/dgv,name:"keyword.control.shell"},{match:/(?<=^|[\;\&\p{space}])(?:export|declare|typeset|local|readonly)(?=[\p{space}\;\&]|(?=\n?$))/dgv,name:"storage.modifier.shell"}]},line_comment:{begin:/*@__PURE__*/ new EmulatedRegExp("(?:(?=(\\p{space}*))\\1)(//)","dgv",{"hiddenCaptures":[1]}),beginCaptures:{"1":{name:"punctuation.definition.comment.shell"}},end:/(?<=\n)(?<!\\\n)/dgv,endCaptures:{},name:"comment.line.double-slash.shell",patterns:[{include:"#line_continuation_character"}]},line_continuation:{match:/\\(?=\n)/dgv,name:"constant.character.escape.line-continuation.shell"},"logical-expression":{patterns:[{include:"#arithmetic_no_dollar"},{match:/=[\=\~]?|!=?|[\<\>]|&&|\|\|/dgv,name:"keyword.operator.logical.shell"},{match:/(?<!\P{space})-(nt|ot|ef|eq|ne|l[te]|g[te]|[a-hknoprstuwxzOGLSN])\b/dgv,name:"keyword.operator.logical.shell"}]},logical_expression_context:{patterns:[{include:"#regex_comparison"},{include:"#arithmetic_no_dollar"},{include:"#logical-expression"},{include:"#logical_expression_single"},{include:"#logical_expression_double"},{include:"#comment"},{include:"#boolean"},{include:"#redirect_number"},{include:"#numeric_literal"},{include:"#pipeline"},{include:"#normal_statement_seperator"},{include:"#string"},{include:"#variable"},{include:"#interpolation"},{include:"#heredoc"},{include:"#herestring"},{include:"#pathname"},{include:"#floating_keyword"},{include:"#support"}]},logical_expression_double:{begin:/\[\[/dgv,beginCaptures:{"0":{name:"punctuation.definition.logical-expression.shell"}},end:/\]\]/dgv,endCaptures:{"0":{name:"punctuation.definition.logical-expression.shell"}},name:"meta.scope.logical-expression.shell",patterns:[{include:"#logical_expression_context"}]},logical_expression_single:{begin:/\[/dgv,beginCaptures:{"0":{name:"punctuation.definition.logical-expression.shell"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.definition.logical-expression.shell"}},name:"meta.scope.logical-expression.shell",patterns:[{include:"#logical_expression_context"}]},loop:{patterns:[{begin:/(?<=^|[\;\&\p{space}])(for)\p{space}+([^\n]+?)\p{space}+(in)(?=[\p{space}\;\&]|(?=\n?$))/dgv,beginCaptures:{"1":{name:"keyword.control.shell"},"2":{name:"variable.other.loop.shell",patterns:[{include:"#string"}]},"3":{name:"keyword.control.shell"}},end:/(?<=^|[\;\&\p{space}])done(?=[\p{space}\;\&]|(?=\n?$)|\))/dgv,endCaptures:{"0":{name:"keyword.control.shell"}},name:"meta.scope.for-in-loop.shell",patterns:[{include:"#initial_context"}]},{begin:/(?<=^|[\;\&\p{space}])(while|until)(?=[\p{space}\;\&]|(?=\n?$))/dgv,beginCaptures:{"1":{name:"keyword.control.shell"}},end:/(?<=^|[\;\&\p{space}])done(?=[\p{space}\;\&]|(?=\n?$)|\))/dgv,endCaptures:{"0":{name:"keyword.control.shell"}},name:"meta.scope.while-loop.shell",patterns:[{include:"#initial_context"}]},{begin:/(?<=^|[\;\&\p{space}])(select)\p{space}+((?:[^\p{space}\\]|\\[^\n])+)(?=[\p{space}\;\&]|(?=\n?$))/dgv,beginCaptures:{"1":{name:"keyword.control.shell"},"2":{name:"variable.other.loop.shell"}},end:/(?<=^|[\;\&\p{space}])(done)(?=[\p{space}\;\&]|(?=\n?$)|\))/dgv,endCaptures:{"1":{name:"keyword.control.shell"}},name:"meta.scope.select-block.shell",patterns:[{include:"#initial_context"}]},{begin:/(?<=^|[\;\&\p{space}])if(?=[\p{space}\;\&]|(?=\n?$))/dgv,beginCaptures:{"0":{name:"keyword.control.if.shell"}},end:/(?<=^|[\;\&\p{space}])fi(?=[\p{space}\;\&]|(?=\n?$))/dgv,endCaptures:{"0":{name:"keyword.control.fi.shell"}},name:"meta.scope.if-block.shell",patterns:[{include:"#initial_context"}]}]},math:{patterns:[{include:"#variable"},{match:/\+{1,2}|-{1,2}|[\!\~]|\*{1,2}|[\/\%]|<[\<\=]?|>[\>\=]?|==|!=|^|\|{1,2}|&{1,2}|[\?\:\,\=]|[\*\/\%\+\-\&\^\|]=|<<=|>>=/dgv,name:"keyword.operator.arithmetic.shell"},{match:/0[xX]\p{AHex}+/dgv,name:"constant.numeric.hex.shell"},{match:/;/dgv,name:"punctuation.separator.semicolon.range"},{match:/0\p{Nd}+/dgv,name:"constant.numeric.octal.shell"},{match:/\p{Nd}{1,2}#[0-9a-zA-Z\@_]+/dgv,name:"constant.numeric.other.shell"},{match:/\p{Nd}+/dgv,name:"constant.numeric.integer.shell"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])[a-zA-Z_0-9]+(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"variable.other.normal.shell"}]},math_operators:{patterns:[{match:/\+{1,2}|-{1,2}|[\!\~]|\*{1,2}|[\/\%]|<[\<\=]?|>[\>\=]?|==|!=|^|\|{1,2}|&{1,2}|[\?\:\,\=]|[\*\/\%\+\-\&\^\|]=|<<=|>>=/dgv,name:"keyword.operator.arithmetic.shell"},{match:/0[xX]\p{AHex}+/dgv,name:"constant.numeric.hex.shell"},{match:/0\p{Nd}+/dgv,name:"constant.numeric.octal.shell"},{match:/\p{Nd}{1,2}#[0-9a-zA-Z\@_]+/dgv,name:"constant.numeric.other.shell"},{match:/\p{Nd}+/dgv,name:"constant.numeric.integer.shell"}]},misc_ranges:{patterns:[{include:"#logical_expression_single"},{include:"#logical_expression_double"},{include:"#subshell_dollar"},{begin:/(?<![^ \t])(\{)(?![\p{L}\p{M}\p{N}\p{Pc}\$])/dgv,beginCaptures:{"1":{name:"punctuation.definition.group.shell"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.group.shell"}},name:"meta.scope.group.shell",patterns:[{include:"#initial_context"}]}]},modified_assignment_statement:{begin:/(?<=^|[\;\& \t])(?:readonly|declare|typeset|export|local)(?=[ \t\;\&]|(?=\n?$))/dgv,beginCaptures:{"0":{name:"storage.modifier.$0.shell"}},end:/(?=[\;\|\&\n\)\`\{\}]|[ \t]*#|\])(?<!\\)/dgv,endCaptures:{},name:"meta.statement.shell meta.expression.assignment.modified.shell",patterns:[{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])-[\p{L}\p{M}\p{N}\p{Pc}]+\b/dgv,name:"string.unquoted.argument.shell constant.other.option.shell"},{include:"#array_value"},{captures:{"1":{name:"variable.other.assignment.shell"},"2":{name:"punctuation.definition.array.access.shell"},"3":{name:"variable.other.assignment.shell"},"4":{name:"constant.numeric.shell constant.numeric.integer.shell"},"5":{name:"punctuation.definition.array.access.shell"},"6":{name:"keyword.operator.assignment.shell"},"7":{name:"keyword.operator.assignment.compound.shell"},"8":{name:"keyword.operator.assignment.compound.shell"},"9":{name:"constant.numeric.shell constant.numeric.hex.shell"},"10":{name:"constant.numeric.shell constant.numeric.octal.shell"},"11":{name:"constant.numeric.shell constant.numeric.other.shell"},"12":{name:"constant.numeric.shell constant.numeric.decimal.shell"},"13":{name:"constant.numeric.shell constant.numeric.version.shell"},"14":{name:"constant.numeric.shell constant.numeric.integer.shell"}},match:/((?<![\p{L}\p{M}\p{N}\p{Pc}])[a-zA-Z_0-9\-]+(?![\p{L}\p{M}\p{N}\p{Pc}]))(?:(\[)((?:(?:(?:\$?(?<![\p{L}\p{M}\p{N}\p{Pc}])[a-zA-Z_0-9\-]+(?![\p{L}\p{M}\p{N}\p{Pc}])|@)|\*)|(-?\p{Nd}+)))(\]))?(?:(?:(=)|(\+=))|(-=))?(?:(?<=[\= \t]|^|[\{\(\[])(?:(?:(?:(?:(?:(0[xX]\p{AHex}+)|(0\p{Nd}+))|(\p{Nd}{1,2}#[0-9a-zA-Z\@_]+))|(-?\p{Nd}+\.\p{Nd}+))|(-?\p{Nd}+(?:\.\p{Nd}+)+))|(-?\p{Nd}+))(?=[ \t]|(?=\n?$)|[\}\)\;]))?/dgv},{include:"#normal_context"}]},modifiers:{match:/(?<=^|[\;\& \t])(?:readonly|declare|typeset|export|local)(?=[ \t\;\&]|(?=\n?$))/dgv,name:"storage.modifier.$0.shell"},normal_assignment_statement:{begin:/*@__PURE__*/ new EmulatedRegExp("(?:(?=([ \\t]*))\\1)((?<![\\p{L}\\p{M}\\p{N}\\p{Pc}])[a-zA-Z_0-9\\-]+(?![\\p{L}\\p{M}\\p{N}\\p{Pc}]))(?:(\\[)((?:(?:(?:\\$?(?<![\\p{L}\\p{M}\\p{N}\\p{Pc}])[a-zA-Z_0-9\\-]+(?![\\p{L}\\p{M}\\p{N}\\p{Pc}])|@)|\\*)|(-?\\p{Nd}+)))(\\]))?(?:(?:(=)|(\\+=))|(-=))","dgv",{"hiddenCaptures":[1]}),beginCaptures:{"1":{name:"variable.other.assignment.shell"},"2":{name:"punctuation.definition.array.access.shell"},"3":{name:"variable.other.assignment.shell"},"4":{name:"constant.numeric.shell constant.numeric.integer.shell"},"5":{name:"punctuation.definition.array.access.shell"},"6":{name:"keyword.operator.assignment.shell"},"7":{name:"keyword.operator.assignment.compound.shell"},"8":{name:"keyword.operator.assignment.compound.shell"}},end:/(?=[\;\|\&\n\)\`\{\}]|[ \t]*#|\])(?<!\\)/dgv,endCaptures:{},name:"meta.expression.assignment.shell",patterns:[{include:"#comment"},{include:"#string"},{include:"#normal_assignment_statement"},{begin:/(?<=[ \t])(?![ \t]|[\p{L}\p{M}\p{N}\p{Pc}]+=)/dgv,beginCaptures:{},end:/(?=[\;\|\&\n\)\`\{\}]|[ \t]*#|\])(?<!\\)/dgv,endCaptures:{},name:"meta.statement.command.env.shell",patterns:[{include:"#command_name_range"},{include:"#line_continuation"},{include:"#option"},{include:"#argument"},{include:"#string"}]},{include:"#simple_unquoted"},{include:"#normal_context"}]},normal_context:{patterns:[{include:"#comment"},{include:"#pipeline"},{include:"#normal_statement_seperator"},{include:"#misc_ranges"},{include:"#boolean"},{include:"#redirect_number"},{include:"#numeric_literal"},{include:"#string"},{include:"#variable"},{include:"#interpolation"},{include:"#heredoc"},{include:"#herestring"},{include:"#redirection"},{include:"#pathname"},{include:"#floating_keyword"},{include:"#support"},{include:"#parenthese"}]},normal_statement:{begin:/*@__PURE__*/ new EmulatedRegExp("(?!^(?:(?=([ \\t]*))\\1)(?=\\n?$))(?:(?<=^until | until |\\tuntil |^while | while |\\twhile |^elif | elif |\\telif |^else | else |\\telse |^then | then |\\tthen |^do | do |\\tdo |^if | if |\\tif )|(?<=(?:^|[\\;\\|\\&\\!\\(\\{\\`])))(?:(?=([ \\t]*))\\2)(?!nocorrect[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|nocorrect\\$|function[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|function\\$|foreach[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|foreach\\$|repeat[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|repeat\\$|logout[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|logout\\$|coproc[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|coproc\\$|select[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|select\\$|while[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|while\\$|pushd[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|pushd\\$|until[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|until\\$|case[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|case\\$|done[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|done\\$|elif[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|elif\\$|else[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|else\\$|esac[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|esac\\$|popd[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|popd\\$|then[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|then\\$|time[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|time\\$|for[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|for\\$|end[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|end\\$|fi[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|fi\\$|do[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|do\\$|in[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|in\\$|if[^\\p{L}\\p{M}\\p{N}\\p{Pc}]|if\\$)","dgv",{"hiddenCaptures":[1,2]}),beginCaptures:{},end:/(?=[\;\|\&\n\)\`\{\}]|[ \t]*#|\])(?<!\\)/dgv,endCaptures:{},name:"meta.statement.shell",patterns:[{include:"#typical_statements"}]},normal_statement_seperator:{captures:{"1":{name:"punctuation.terminator.statement.semicolon.shell"},"2":{name:"punctuation.separator.statement.and.shell"},"3":{name:"punctuation.separator.statement.or.shell"},"4":{name:"punctuation.separator.statement.background.shell"}},match:/(?:(?:(?:(;)|(&&))|(\|\|))|(&))/dgv},numeric_literal:{captures:{"1":{name:"constant.numeric.shell constant.numeric.hex.shell"},"2":{name:"constant.numeric.shell constant.numeric.octal.shell"},"3":{name:"constant.numeric.shell constant.numeric.other.shell"},"4":{name:"constant.numeric.shell constant.numeric.decimal.shell"},"5":{name:"constant.numeric.shell constant.numeric.version.shell"},"6":{name:"constant.numeric.shell constant.numeric.integer.shell"}},match:/(?<=[\= \t]|^|[\{\(\[])(?:(?:(?:(?:(?:(0[xX]\p{AHex}+)|(0\p{Nd}+))|(\p{Nd}{1,2}#[0-9a-zA-Z\@_]+))|(-?\p{Nd}+\.\p{Nd}+))|(-?\p{Nd}+(?:\.\p{Nd}+)+))|(-?\p{Nd}+))(?=[ \t]|(?=\n?$)|[\}\)\;])/dgv},option:{begin:/*@__PURE__*/ new EmulatedRegExp("(?:(?=([ \\t]+))\\1)(-)((?!(?:[\\!\\&\\|\\(\\)\\{\\[\\<\\>\\#\\n]|(?=\\n?$)|[\\; \\t])))","dgv",{"hiddenCaptures":[1]}),beginCaptures:{"1":{name:"string.unquoted.argument.shell constant.other.option.dash.shell"},"2":{name:"string.unquoted.argument.shell constant.other.option.shell"}},contentName:"string.unquoted.argument constant.other.option",end:/(?:(?=[ \t])|(?=[\;\|\&\n\)\`\{\}]|[ \t]*#|\])(?<!\\))/dgv,endCaptures:{},patterns:[{include:"#option_context"}]},option_context:{patterns:[{include:"#misc_ranges"},{include:"#string"},{include:"#variable"},{include:"#interpolation"},{include:"#heredoc"},{include:"#herestring"},{include:"#redirection"},{include:"#pathname"},{include:"#floating_keyword"},{include:"#support"}]},parenthese:{patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.section.parenthese.shell"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.parenthese.shell"}},name:"meta.parenthese.group.shell",patterns:[{include:"#initial_context"}]}]},pathname:{patterns:[{match:/(?<=[\p{space}\:\=]|^)~/dgv,name:"keyword.operator.tilde.shell"},{match:/[\*\?]/dgv,name:"keyword.operator.glob.shell"},{begin:/([\?\*\+\@\!])(\()/dgv,beginCaptures:{"1":{name:"keyword.operator.extglob.shell"},"2":{name:"punctuation.definition.extglob.shell"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.extglob.shell"}},name:"meta.structure.extglob.shell",patterns:[{include:"#initial_context"}]}]},pipeline:{patterns:[{match:/(?<=^|[\;\&\p{space}])(time)(?=[\p{space}\;\&]|(?=\n?$))/dgv,name:"keyword.other.shell"},{match:/[\|\!]/dgv,name:"keyword.operator.pipe.shell"}]},redirect_fix:{captures:{"1":{name:"keyword.operator.redirect.shell"},"2":{name:"string.unquoted.argument.shell"}},match:/*@__PURE__*/ new EmulatedRegExp("(>>?)(?:(?=([ \\t]*))\\2)([^ \\t\\n\\>\\&\\;\\<\\(\\)\\$\\`\\\\\"'\\|]+)","dgv",{"hiddenCaptures":[2]})},redirect_number:{captures:{"1":{name:"keyword.operator.redirect.stdout.shell"},"2":{name:"keyword.operator.redirect.stderr.shell"},"3":{name:"keyword.operator.redirect.$3.shell"}},match:/(?<=[ \t])(?:(1)|(2)|(\p{Nd}+))(?=>)/dgv},redirection:{patterns:[{begin:/[\>\<]\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.shell"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.shell"}},name:"string.interpolated.process-substitution.shell",patterns:[{include:"#initial_context"}]},{match:/(?<![\<\>])(&>|\p{Nd}*>&\p{Nd}*|\p{Nd}*(>>|[\>\<])|\p{Nd}*<&|\p{Nd}*<>)(?![\<\>])/dgv,name:"keyword.operator.redirect.shell"}]},regex_comparison:{match:/=~/dgv,name:"keyword.operator.logical.regex.shell"},regexp:{patterns:[{match:/[^\n]+/dgv}]},simple_options:{captures:{"0":{patterns:[{captures:{"1":{name:"string.unquoted.argument.shell constant.other.option.dash.shell"},"2":{name:"string.unquoted.argument.shell constant.other.option.shell"}},match:/*@__PURE__*/ new EmulatedRegExp("(?:(?=([ \\t]+))\\1)(-)([\\p{L}\\p{M}\\p{N}\\p{Pc}]+)","dgv",{"hiddenCaptures":[1]})}]}},match:/*@__PURE__*/ new EmulatedRegExp("(?:(?:(?=([ \\t]+))\\1)-[\\p{L}\\p{M}\\p{N}\\p{Pc}]+)*","dgv",{"hiddenCaptures":[1]})},simple_unquoted:{match:/[^ \t\n\>\&\;\<\(\)\$\`\\"'\|]/dgv,name:"string.unquoted.shell"},special_expansion:{match:/!|:[\-\=\?]?|[\*\@]|##|#|%%|[\%\/]/dgv,name:"keyword.operator.expansion.shell"},start_of_command:{match:/*@__PURE__*/ new EmulatedRegExp("(?:(?=([ \\t]*))\\1)(?!(?:[\\!\\&\\|\\(\\)\\{\\[\\<\\>\\#\\n]|(?=\\n?$)|[\\; \\t]))(?!nocorrect |nocorrect\\t|nocorrect(?=\\n?$)|readonly |readonly\\t|readonly(?=\\n?$)|function |function\\t|function(?=\\n?$)|foreach |foreach\\t|foreach(?=\\n?$)|coproc |coproc\\t|coproc(?=\\n?$)|logout |logout\\t|logout(?=\\n?$)|export |export\\t|export(?=\\n?$)|select |select\\t|select(?=\\n?$)|repeat |repeat\\t|repeat(?=\\n?$)|pushd |pushd\\t|pushd(?=\\n?$)|until |until\\t|until(?=\\n?$)|while |while\\t|while(?=\\n?$)|local |local\\t|local(?=\\n?$)|case |case\\t|case(?=\\n?$)|done |done\\t|done(?=\\n?$)|elif |elif\\t|elif(?=\\n?$)|else |else\\t|else(?=\\n?$)|esac |esac\\t|esac(?=\\n?$)|popd |popd\\t|popd(?=\\n?$)|then |then\\t|then(?=\\n?$)|time |time\\t|time(?=\\n?$)|for |for\\t|for(?=\\n?$)|end |end\\t|end(?=\\n?$)|fi |fi\\t|fi(?=\\n?$)|do |do\\t|do(?=\\n?$)|in |in\\t|in(?=\\n?$)|if |if\\t|if(?=\\n?$))(?!\\\\\\n?(?=\\n?$))","dgv",{"hiddenCaptures":[1]})},string:{patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.shell"},{begin:/'/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.shell"}},end:/'/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.shell"}},name:"string.quoted.single.shell"},{begin:/\$?"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.shell"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.shell"}},name:"string.quoted.double.shell",patterns:[{match:/\\[\$\n\`"\\]/dgv,name:"constant.character.escape.shell"},{include:"#variable"},{include:"#interpolation"}]},{begin:/\$'/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.shell"}},end:/'/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.shell"}},name:"string.quoted.single.dollar.shell",patterns:[{match:/\\[abefnrtv\\']/dgv,name:"constant.character.escape.ansi-c.shell"},{match:/\\[0-9]{3}"/dgv,name:"constant.character.escape.octal.shell"},{match:/\\x\p{AHex}{2}"/dgv,name:"constant.character.escape.hex.shell"},{match:/\\c[^\n]"/dgv,name:"constant.character.escape.control-char.shell"}]}]},subshell_dollar:{patterns:[{begin:/\$\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.subshell.single.shell"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.subshell.single.shell"}},name:"meta.scope.subshell",patterns:[{include:"#parenthese"},{include:"#initial_context"}]}]},support:{patterns:[{match:/(?<=^|[\;\&\p{space}])[\:\.](?=[\p{space}\;\&]|(?=\n?$))/dgv,name:"support.function.builtin.shell"}]},typical_statements:{patterns:[{include:"#assignment_statement"},{include:"#case_statement"},{include:"#for_statement"},{include:"#while_statement"},{include:"#function_definition"},{include:"#command_statement"},{include:"#line_continuation"},{include:"#arithmetic_double"},{include:"#normal_context"}]},variable:{patterns:[{captures:{"1":{name:"punctuation.definition.variable.shell variable.parameter.positional.all.shell"},"2":{name:"variable.parameter.positional.all.shell"}},match:/(\$)(@(?![\p{L}\p{M}\p{N}\p{Pc}]))/dgv},{captures:{"1":{name:"punctuation.definition.variable.shell variable.parameter.positional.shell"},"2":{name:"variable.parameter.positional.shell"}},match:/(\$)([0-9](?![\p{L}\p{M}\p{N}\p{Pc}]))/dgv},{captures:{"1":{name:"punctuation.definition.variable.shell variable.language.special.shell"},"2":{name:"variable.language.special.shell"}},match:/(\$)([\-\*\#\?\$\!0_](?![\p{L}\p{M}\p{N}\p{Pc}]))/dgv},{begin:/*@__PURE__*/ new EmulatedRegExp("(\\$)(\\{)(?:(?=([ \\t]*))\\3)(?=\\p{Nd})","dgv",{"hiddenCaptures":[3]}),beginCaptures:{"1":{name:"punctuation.definition.variable.shell variable.parameter.positional.shell"},"2":{name:"punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell variable.parameter.positional.shell"}},contentName:"meta.parameter-expansion",end:/\}/dgv,endCaptures:{"0":{name:"punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell variable.parameter.positional.shell"}},patterns:[{include:"#special_expansion"},{include:"#array_access_inline"},{match:/[0-9]+/dgv,name:"variable.parameter.positional.shell"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])[a-zA-Z_0-9\-]+(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"variable.other.normal.shell"},{include:"#variable"},{include:"#string"}]},{begin:/(\$)(\{)/dgv,beginCaptures:{"1":{name:"punctuation.definition.variable.shell"},"2":{name:"punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell"}},contentName:"meta.parameter-expansion",end:/\}/dgv,endCaptures:{"0":{name:"punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell"}},patterns:[{include:"#special_expansion"},{include:"#array_access_inline"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])[a-zA-Z_0-9\-]+(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"variable.other.normal.shell"},{include:"#variable"},{include:"#string"}]},{captures:{"1":{name:"punctuation.definition.variable.shell variable.other.normal.shell"},"2":{name:"variable.other.normal.shell"}},match:/(\$)([\p{L}\p{M}\p{N}\p{Pc}]+(?![\p{L}\p{M}\p{N}\p{Pc}]))/dgv}]},while_statement:{patterns:[{begin:/(\bwhile\b)/dgv,beginCaptures:{"1":{name:"keyword.control.while.shell"}},end:/(?=[\;\|\&\n\)\`\{\}]|[ \t]*#|\])(?<!\\)/dgv,endCaptures:{},name:"meta.while.shell",patterns:[{include:"#line_continuation"},{include:"#math_operators"},{include:"#option"},{include:"#simple_unquoted"},{include:"#normal_context"},{include:"#string"}]}]}},scopeName:"source.shell",embeddedLangs:undefined,aliases:["bash","sh","shell","zsh"]})
4
4
 
5
5
  export default [
6
6
  lang
package/dist/solidity.mjs CHANGED
@@ -1,4 +1,4 @@
1
- const lang = Object.freeze({displayName:"Solidity",fileTypes:["sol"],name:"solidity",patterns:[{include:"#natspec"},{include:"#declaration-userType"},{include:"#comment"},{include:"#operator"},{include:"#global"},{include:"#control"},{include:"#constant"},{include:"#primitive"},{include:"#type-primitive"},{include:"#type-modifier-extended-scope"},{include:"#declaration"},{include:"#function-call"},{include:"#assembly"},{include:"#punctuation"}],repository:{assembly:{patterns:[{match:/\b(assembly)\b/dgv,name:"keyword.control.assembly"},{match:/\b(let)\b/dgv,name:"storage.type.assembly"}]},comment:{patterns:[{include:"#comment-line"},{include:"#comment-block"}]},"comment-block":{begin:/\/\*/dgv,end:/\*\//dgv,name:"comment.block",patterns:[{include:"#comment-todo"}]},"comment-line":{begin:/(?<!tp:)\/\//dgv,end:/(?=\n?$)/dgv,name:"comment.line",patterns:[{include:"#comment-todo"}]},"comment-todo":{match:/\b(FIXME|TODO|CHANGED|XXX|IDEA|HACK|NOTE|REVIEW|NB|BUG|QUESTION|COMBAK|TEMP|SUPPRESS|LINT|[\p{L}\p{M}\p{N}\p{Pc}]+-disable|[\p{L}\p{M}\p{N}\p{Pc}]+-suppress)\b/dgiv,name:"keyword.comment.todo"},constant:{patterns:[{include:"#constant-boolean"},{include:"#constant-time"},{include:"#constant-currency"}]},"constant-boolean":{match:/\b(true|false)\b/dgv,name:"constant.language.boolean"},"constant-currency":{match:/\b(ether|wei|gwei|finney|szabo)\b/dgv,name:"constant.language.currency"},"constant-time":{match:/\b(seconds|minutes|hours|days|weeks|years)\b/dgv,name:"constant.language.time"},control:{patterns:[{include:"#control-flow"},{include:"#control-using"},{include:"#control-import"},{include:"#control-pragma"},{include:"#control-underscore"},{include:"#control-unchecked"},{include:"#control-other"}]},"control-flow":{patterns:[{match:/\b(if|else|for|while|do|break|continue|try|catch|finally|throw|return|global)\b/dgv,name:"keyword.control.flow"},{begin:/\b(returns)\b/dgv,beginCaptures:{"1":{name:"keyword.control.flow.return"}},end:/(?=\))/dgv,patterns:[{include:"#declaration-function-parameters"}]}]},"control-import":{patterns:[{begin:/\b(import)\b/dgv,beginCaptures:{"1":{name:"keyword.control.import"}},end:/(?=;)/dgv,patterns:[{begin:/((?=\{))/dgv,end:/((?=\}))/dgv,patterns:[{match:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,name:"entity.name.type.interface"}]},{match:/\b(from)\b/dgv,name:"keyword.control.import.from"},{include:"#string"},{include:"#punctuation"}]},{match:/\b(import)\b/dgv,name:"keyword.control.import"}]},"control-other":{match:/\b(new|delete|emit)\b/dgv,name:"keyword.control"},"control-pragma":{captures:{"1":{name:"keyword.control.pragma"},"2":{name:"entity.name.tag.pragma"},"3":{name:"constant.other.pragma"}},match:/\b(pragma)(?:\p{space}+([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}+(\P{space}+))?\b/dgv},"control-unchecked":{match:/\b(unchecked)\b/dgv,name:"keyword.control.unchecked"},"control-underscore":{match:/\b(_)\b/dgv,name:"constant.other.underscore"},"control-using":{patterns:[{captures:{"1":{name:"keyword.control.using"},"2":{name:"entity.name.type.library"},"3":{name:"keyword.control.for"},"4":{name:"entity.name.type"}},match:/\b(using)\b\p{space}+\b([A-Za-z\p{Nd}_]+)\b\p{space}+\b(for)\b\p{space}+\b([A-Za-z\p{Nd}_]+)/dgv},{match:/\b(using)\b/dgv,name:"keyword.control.using"}]},declaration:{patterns:[{include:"#declaration-contract"},{include:"#declaration-userType"},{include:"#declaration-interface"},{include:"#declaration-library"},{include:"#declaration-function"},{include:"#declaration-modifier"},{include:"#declaration-constructor"},{include:"#declaration-event"},{include:"#declaration-storage"},{include:"#declaration-error"}]},"declaration-constructor":{patterns:[{begin:/\b(constructor)\b/dgv,beginCaptures:{"1":{name:"storage.type.constructor"}},end:/(?=\{)/dgv,patterns:[{begin:/\p{space}*(?=\()/dgvy,end:/(?=\))/dgv,patterns:[{include:"#declaration-function-parameters"}]},{begin:/(?<=\))/dgv,end:/(?=\{)/dgv,patterns:[{include:"#type-modifier-access"},{include:"#function-call"}]}]},{captures:{"1":{name:"storage.type.constructor"}},match:/\b(constructor)\b/dgv}]},"declaration-contract":{patterns:[{begin:/\b(contract)\b\p{space}+([\p{L}\p{M}\p{N}\p{Pc}]+)\b\p{space}+\b(is)\b\p{space}+/dgv,beginCaptures:{"1":{name:"storage.type.contract"},"2":{name:"entity.name.type.contract"},"3":{name:"storage.modifier.is"}},end:/(?=\{)/dgv,patterns:[{match:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,name:"entity.name.type.contract.extend"}]},{captures:{"1":{name:"storage.type.contract"},"2":{name:"entity.name.type.contract"}},match:/\b(contract)(\p{space}+([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*))?\b/dgv}]},"declaration-enum":{patterns:[{begin:/\b(enum)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,beginCaptures:{"1":{name:"storage.type.enum"},"2":{name:"entity.name.type.enum"}},end:/(?=\})/dgv,patterns:[{match:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,name:"variable.other.enummember"},{include:"#punctuation"},{include:"#comment"}]},{captures:{"1":{name:"storage.type.enum"},"3":{name:"entity.name.type.enum"}},match:/\b(enum)(\p{space}+([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*))?\b/dgv}]},"declaration-error":{captures:{"1":{name:"storage.type.error"},"3":{name:"entity.name.type.error"}},match:/\b(error)(\p{space}+([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*))?\b/dgv},"declaration-event":{patterns:[{begin:/\b(event)\b(?:\p{space}+([\p{L}\p{M}\p{N}\p{Pc}]+)\b)?/dgv,beginCaptures:{"1":{name:"storage.type.event"},"2":{name:"entity.name.type.event"}},end:/(?=\))/dgv,patterns:[{include:"#type-primitive"},{captures:{"1":{name:"storage.type.modifier.indexed"},"2":{name:"variable.parameter.event"}},match:/\b(?:(indexed)\p{space})?([\p{L}\p{M}\p{N}\p{Pc}]+)(?:,\p{space}*|)/dgv},{include:"#punctuation"}]},{captures:{"1":{name:"storage.type.event"},"3":{name:"entity.name.type.event"}},match:/\b(event)(\p{space}+([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*))?\b/dgv}]},"declaration-function":{patterns:[{begin:/\b(function)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,beginCaptures:{"1":{name:"storage.type.function"},"2":{name:"entity.name.function"}},end:/(?=[\{\;])/dgv,patterns:[{include:"#natspec"},{include:"#global"},{include:"#declaration-function-parameters"},{include:"#type-modifier-access"},{include:"#type-modifier-payable"},{include:"#type-modifier-immutable"},{include:"#type-modifier-extended-scope"},{include:"#control-flow"},{include:"#function-call"},{include:"#modifier-call"},{include:"#punctuation"}]},{captures:{"1":{name:"storage.type.function"},"2":{name:"entity.name.function"}},match:/\b(function)\p{space}+([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*)\b/dgv}]},"declaration-function-parameters":{begin:/\p{space}*(?=\()/dgvy,end:/(?=\))/dgv,patterns:[{include:"#type-primitive"},{include:"#type-modifier-extended-scope"},{captures:{"1":{name:"storage.type.struct"}},match:/\b([A-Z][\p{L}\p{M}\p{N}\p{Pc}]*)\b/dgv},{include:"#variable"},{include:"#punctuation"},{include:"#comment"}]},"declaration-interface":{patterns:[{begin:/\b(interface)\b\p{space}+([\p{L}\p{M}\p{N}\p{Pc}]+)\b\p{space}+\b(is)\b\p{space}+/dgv,beginCaptures:{"1":{name:"storage.type.interface"},"2":{name:"entity.name.type.interface"},"3":{name:"storage.modifier.is"}},end:/(?=\{)/dgv,patterns:[{match:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,name:"entity.name.type.interface.extend"}]},{captures:{"1":{name:"storage.type.interface"},"2":{name:"entity.name.type.interface"}},match:/\b(interface)(\p{space}+([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*))?\b/dgv}]},"declaration-library":{captures:{"1":{name:"storage.type.library"},"3":{name:"entity.name.type.library"}},match:/\b(library)(\p{space}+([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*))?\b/dgv},"declaration-modifier":{patterns:[{begin:/\b(modifier)\b\p{space}*([\p{L}\p{M}\p{N}\p{Pc}]+)/dgv,beginCaptures:{"1":{name:"storage.type.function.modifier"},"2":{name:"entity.name.function.modifier"}},end:/(?=\{)/dgv,patterns:[{include:"#declaration-function-parameters"},{begin:/(?<=\))/dgv,end:/(?=\{)/dgv,patterns:[{include:"#declaration-function-parameters"},{include:"#type-modifier-access"},{include:"#type-modifier-payable"},{include:"#type-modifier-immutable"},{include:"#type-modifier-extended-scope"},{include:"#function-call"},{include:"#modifier-call"},{include:"#control-flow"}]}]},{captures:{"1":{name:"storage.type.modifier"},"3":{name:"entity.name.function"}},match:/\b(modifier)(\p{space}+([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*))?\b/dgv}]},"declaration-storage":{patterns:[{include:"#declaration-storage-mapping"},{include:"#declaration-struct"},{include:"#declaration-enum"},{include:"#declaration-storage-field"}]},"declaration-storage-field":{patterns:[{include:"#comment"},{include:"#control"},{include:"#type-primitive"},{include:"#type-modifier-access"},{include:"#type-modifier-immutable"},{include:"#type-modifier-extend-scope"},{include:"#type-modifier-payable"},{include:"#type-modifier-constant"},{include:"#primitive"},{include:"#constant"},{include:"#operator"},{include:"#punctuation"}]},"declaration-storage-mapping":{patterns:[{begin:/\b(mapping)\b/dgv,beginCaptures:{"1":{name:"storage.type.mapping"}},end:/(?=\))/dgv,patterns:[{include:"#declaration-storage-mapping"},{include:"#type-primitive"},{include:"#punctuation"},{include:"#operator"}]},{match:/\b(mapping)\b/dgv,name:"storage.type.mapping"}]},"declaration-struct":{patterns:[{captures:{"1":{name:"storage.type.struct"},"3":{name:"entity.name.type.struct"}},match:/\b(struct)(\p{space}+([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*))?\b/dgv},{begin:/\b(struct)\b\p{space}*([\p{L}\p{M}\p{N}\p{Pc}]+)?\b\p{space}*(?=\{)/dgv,beginCaptures:{"1":{name:"storage.type.struct"},"2":{name:"entity.name.type.struct"}},end:/(?=\})/dgv,patterns:[{include:"#type-primitive"},{include:"#variable"},{include:"#punctuation"},{include:"#comment"}]}]},"declaration-userType":{captures:{"1":{name:"storage.type.userType"},"2":{name:"entity.name.type.userType"},"3":{name:"storage.modifier.is"}},match:/\b(type)\b\p{space}+([\p{L}\p{M}\p{N}\p{Pc}]+)\b\p{space}+\b(is)\b/dgv},"function-call":{captures:{"1":{name:"entity.name.function"},"2":{name:"punctuation.parameters.begin"}},match:/\b([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(\()/dgv},global:{patterns:[{include:"#global-variables"},{include:"#global-functions"}]},"global-functions":{patterns:[{match:/\b(require|assert|revert)\b/dgv,name:"keyword.control.exceptions"},{match:/\b(s(?:elfdestruct|uicide))\b/dgv,name:"keyword.control.contract"},{match:/\b(addmod|mulmod|keccak256|sha256|sha3|ripemd160|ecrecover)\b/dgv,name:"support.function.math"},{match:/\b(unicode)\b/dgv,name:"support.function.string"},{match:/\b(blockhash|gasleft)\b/dgv,name:"variable.language.transaction"},{match:/\b(type)\b/dgv,name:"variable.language.type"}]},"global-variables":{patterns:[{match:/\b(this)\b/dgv,name:"variable.language.this"},{match:/\b(super)\b/dgv,name:"variable.language.super"},{match:/\b(abi)\b/dgv,name:"variable.language.builtin.abi"},{match:/\b(msg\.sender|msg|block|tx|now)\b/dgv,name:"variable.language.transaction"},{match:/\b(tx\.origin|tx\.gasprice|msg\.data|msg\.sig|msg\.value)\b/dgv,name:"variable.language.transaction"}]},"modifier-call":{patterns:[{include:"#function-call"},{match:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,name:"entity.name.function.modifier"}]},natspec:{patterns:[{begin:/\/\*\*/dgv,end:/\*\//dgv,name:"comment.block.documentation",patterns:[{include:"#natspec-tags"}]},{begin:/\/\/\//dgv,end:/(?=\n?$)/dgv,name:"comment.block.documentation",patterns:[{include:"#natspec-tags"}]}]},"natspec-tag-author":{match:/(@author)\b/dgv,name:"storage.type.author.natspec"},"natspec-tag-custom":{match:/(@custom:[\p{L}\p{M}\p{N}\p{Pc}]*)\b/dgv,name:"storage.type.dev.natspec"},"natspec-tag-dev":{match:/(@dev)\b/dgv,name:"storage.type.dev.natspec"},"natspec-tag-inheritdoc":{match:/(@inheritdoc)\b/dgv,name:"storage.type.author.natspec"},"natspec-tag-notice":{match:/(@notice)\b/dgv,name:"storage.type.dev.natspec"},"natspec-tag-param":{captures:{"1":{name:"storage.type.param.natspec"},"3":{name:"variable.other.natspec"}},match:/(@param)(\p{space}+([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*))?\b/dgv},"natspec-tag-return":{captures:{"1":{name:"storage.type.return.natspec"},"3":{name:"variable.other.natspec"}},match:/(@return)(\p{space}+([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*))?\b/dgv},"natspec-tag-title":{match:/(@title)\b/dgv,name:"storage.type.title.natspec"},"natspec-tags":{patterns:[{include:"#comment-todo"},{include:"#natspec-tag-title"},{include:"#natspec-tag-author"},{include:"#natspec-tag-notice"},{include:"#natspec-tag-dev"},{include:"#natspec-tag-param"},{include:"#natspec-tag-return"},{include:"#natspec-tag-custom"},{include:"#natspec-tag-inheritdoc"}]},number:{patterns:[{include:"#number-decimal"},{include:"#number-hex"},{include:"#number-scientific"}]},"number-decimal":{match:/\b([0-9_]+(\.[0-9_]+)?)\b/dgv,name:"constant.numeric.decimal"},"number-hex":{match:/\b(0[xX]\p{AHex}+)\b/dgv,name:"constant.numeric.hexadecimal"},"number-scientific":{match:/\b(?:0\.(?:0[0-9]|[0-9][0-9_]?)|[0-9][0-9_]*(?:\.\p{Nd}{1,2})?)(?:e[\+\-]?[0-9_]+)?/dgv,name:"constant.numeric.scientific"},operator:{patterns:[{include:"#operator-logic"},{include:"#operator-mapping"},{include:"#operator-arithmetic"},{include:"#operator-binary"},{include:"#operator-assignment"}]},"operator-arithmetic":{match:/([\+\-\/\*])/dgv,name:"keyword.operator.arithmetic"},"operator-assignment":{match:/(:?=)/dgv,name:"keyword.operator.assignment"},"operator-binary":{match:/([\^\&\|]|<<|>>)/dgv,name:"keyword.operator.binary"},"operator-logic":{match:/(==|!=|<(?!<)|<=|>(?!>)|>=|&&|\|\||:(?!=)|[\?\!])/dgv,name:"keyword.operator.logic"},"operator-mapping":{match:/(=>)/dgv,name:"keyword.operator.mapping"},primitive:{patterns:[{include:"#number-decimal"},{include:"#number-hex"},{include:"#number-scientific"},{include:"#string"}]},punctuation:{patterns:[{match:/;/dgv,name:"punctuation.terminator.statement"},{match:/\./dgv,name:"punctuation.accessor"},{match:/,/dgv,name:"punctuation.separator"},{match:/\{/dgv,name:"punctuation.brace.curly.begin"},{match:/\}/dgv,name:"punctuation.brace.curly.end"},{match:/\[/dgv,name:"punctuation.brace.square.begin"},{match:/\]/dgv,name:"punctuation.brace.square.end"},{match:/\(/dgv,name:"punctuation.parameters.begin"},{match:/\)/dgv,name:"punctuation.parameters.end"}]},string:{patterns:[{match:/"(?:\\"|[^"])*"/dgv,name:"string.quoted.double"},{match:/'(?:\\'|[^'])*'/dgv,name:"string.quoted.single"}]},"type-modifier-access":{match:/\b(internal|external|private|public)\b/dgv,name:"storage.type.modifier.access"},"type-modifier-constant":{match:/\b(constant)\b/dgv,name:"storage.type.modifier.readonly"},"type-modifier-extended-scope":{match:/\b(pure|view|inherited|indexed|storage|memory|virtual|calldata|override|abstract)\b/dgv,name:"storage.type.modifier.extendedscope"},"type-modifier-immutable":{match:/\b(immutable)\b/dgv,name:"storage.type.modifier.readonly"},"type-modifier-payable":{match:/\b(nonpayable|payable)\b/dgv,name:"storage.type.modifier.payable"},"type-primitive":{patterns:[{begin:/\b(address|string\p{Nd}*|bytes\p{Nd}*|int\p{Nd}*|uint\p{Nd}*|bool|hash\p{Nd}*)\b\[\](\()/dgv,beginCaptures:{"1":{name:"support.type.primitive"}},end:/(\))/dgv,patterns:[{include:"#primitive"},{include:"#punctuation"},{include:"#global"},{include:"#variable"}]},{match:/\b(address|string\p{Nd}*|bytes\p{Nd}*|int\p{Nd}*|uint\p{Nd}*|bool|hash\p{Nd}*)\b/dgv,name:"support.type.primitive"}]},variable:{patterns:[{captures:{"1":{name:"variable.parameter.function"}},match:/\b(_[\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv},{captures:{"1":{name:"support.variable.property"}},match:/\.([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv},{captures:{"1":{name:"variable.parameter.other"}},match:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv}]}},scopeName:"source.solidity",embeddedLangs:undefined,aliases:undefined})
1
+ const lang = Object.freeze({displayName:"Solidity",fileTypes:["sol"],name:"solidity",patterns:[{include:"#natspec"},{include:"#declaration-userType"},{include:"#comment"},{include:"#operator"},{include:"#global"},{include:"#control"},{include:"#constant"},{include:"#primitive"},{include:"#type-primitive"},{include:"#type-modifier-extended-scope"},{include:"#declaration"},{include:"#function-call"},{include:"#assembly"},{include:"#punctuation"}],repository:{assembly:{patterns:[{match:/\b(assembly)\b/dgv,name:"keyword.control.assembly"},{match:/\b(let)\b/dgv,name:"storage.type.assembly"}]},comment:{patterns:[{include:"#comment-line"},{include:"#comment-block"}]},"comment-block":{begin:/\/\*/dgv,end:/\*\//dgv,name:"comment.block",patterns:[{include:"#comment-todo"}]},"comment-line":{begin:/(?<!tp:)\/\//dgv,end:/(?=\n?$)/dgv,name:"comment.line",patterns:[{include:"#comment-todo"}]},"comment-todo":{match:/\b(FIXME|TODO|CHANGED|XXX|IDEA|HACK|NOTE|REVIEW|NB|BUG|QUESTION|COMBAK|TEMP|SUPPRESS|LINT|[\p{L}\p{M}\p{N}\p{Pc}]+-disable|[\p{L}\p{M}\p{N}\p{Pc}]+-suppress)\b/dgiv,name:"keyword.comment.todo"},constant:{patterns:[{include:"#constant-boolean"},{include:"#constant-time"},{include:"#constant-currency"}]},"constant-boolean":{match:/\b(true|false)\b/dgv,name:"constant.language.boolean"},"constant-currency":{match:/\b(ether|wei|gwei|finney|szabo)\b/dgv,name:"constant.language.currency"},"constant-time":{match:/\b(seconds|minutes|hours|days|weeks|years)\b/dgv,name:"constant.language.time"},control:{patterns:[{include:"#control-flow"},{include:"#control-using"},{include:"#control-import"},{include:"#control-pragma"},{include:"#control-underscore"},{include:"#control-unchecked"},{include:"#control-other"}]},"control-flow":{patterns:[{match:/\b(if|else|for|while|do|break|continue|try|catch|finally|throw|return|global)\b/dgv,name:"keyword.control.flow"},{begin:/\b(returns)\b/dgv,beginCaptures:{"1":{name:"keyword.control.flow.return"}},end:/(?=\))/dgv,patterns:[{include:"#declaration-function-parameters"}]}]},"control-import":{patterns:[{begin:/\b(import)\b/dgv,beginCaptures:{"1":{name:"keyword.control.import"}},end:/(?=;)/dgv,patterns:[{begin:/((?=\{))/dgv,end:/((?=\}))/dgv,patterns:[{match:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,name:"entity.name.type.interface"}]},{match:/\b(from)\b/dgv,name:"keyword.control.import.from"},{include:"#string"},{include:"#punctuation"}]},{match:/\b(import)\b/dgv,name:"keyword.control.import"}]},"control-other":{match:/\b(new|delete|emit)\b/dgv,name:"keyword.control"},"control-pragma":{captures:{"1":{name:"keyword.control.pragma"},"2":{name:"entity.name.tag.pragma"},"3":{name:"constant.other.pragma"}},match:/\b(pragma)(?:\p{space}+([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}+(\P{space}+))?\b/dgv},"control-unchecked":{match:/\b(unchecked)\b/dgv,name:"keyword.control.unchecked"},"control-underscore":{match:/\b(_)\b/dgv,name:"constant.other.underscore"},"control-using":{patterns:[{captures:{"1":{name:"keyword.control.using"},"2":{name:"entity.name.type.library"},"3":{name:"keyword.control.for"},"4":{name:"entity.name.type"}},match:/\b(using)\b\p{space}+\b([A-Za-z\p{Nd}_]+)\b\p{space}+\b(for)\b\p{space}+\b([A-Za-z\p{Nd}_]+)/dgv},{match:/\b(using)\b/dgv,name:"keyword.control.using"}]},declaration:{patterns:[{include:"#declaration-contract"},{include:"#declaration-userType"},{include:"#declaration-interface"},{include:"#declaration-library"},{include:"#declaration-function"},{include:"#declaration-modifier"},{include:"#declaration-constructor"},{include:"#declaration-event"},{include:"#declaration-storage"},{include:"#declaration-error"}]},"declaration-constructor":{patterns:[{begin:/\b(constructor)\b/dgv,beginCaptures:{"1":{name:"storage.type.constructor"}},end:/(?=\{)/dgv,patterns:[{begin:/\p{space}*(?=\()/dgvy,end:/(?=\))/dgv,patterns:[{include:"#declaration-function-parameters"}]},{begin:/(?<=\))/dgv,end:/(?=\{)/dgv,patterns:[{include:"#type-modifier-access"},{include:"#function-call"}]}]},{captures:{"1":{name:"storage.type.constructor"}},match:/\b(constructor)\b/dgv}]},"declaration-contract":{patterns:[{begin:/\b(contract)\b\p{space}+([\p{L}\p{M}\p{N}\p{Pc}]+)\b\p{space}+\b(is)\b\p{space}+/dgv,beginCaptures:{"1":{name:"storage.type.contract"},"2":{name:"entity.name.type.contract"},"3":{name:"storage.modifier.is"}},end:/(?=\{)/dgv,patterns:[{match:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,name:"entity.name.type.contract.extend"}]},{captures:{"1":{name:"storage.type.contract"},"2":{name:"entity.name.type.contract"}},match:/\b(contract)(\p{space}+([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*))?\b/dgv}]},"declaration-enum":{patterns:[{begin:/\b(enum)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,beginCaptures:{"1":{name:"storage.type.enum"},"2":{name:"entity.name.type.enum"}},end:/(?=\})/dgv,patterns:[{match:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,name:"variable.other.enummember"},{include:"#punctuation"},{include:"#comment"}]},{captures:{"1":{name:"storage.type.enum"},"3":{name:"entity.name.type.enum"}},match:/\b(enum)(\p{space}+([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*))?\b/dgv}]},"declaration-error":{captures:{"1":{name:"storage.type.error"},"3":{name:"entity.name.type.error"}},match:/\b(error)(\p{space}+([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*))?\b/dgv},"declaration-event":{patterns:[{begin:/\b(event)\b(?:\p{space}+([\p{L}\p{M}\p{N}\p{Pc}]+)\b)?/dgv,beginCaptures:{"1":{name:"storage.type.event"},"2":{name:"entity.name.type.event"}},end:/(?=\))/dgv,patterns:[{include:"#type-primitive"},{captures:{"1":{name:"storage.type.modifier.indexed"},"2":{name:"variable.parameter.event"}},match:/\b(?:(indexed)\p{space})?([\p{L}\p{M}\p{N}\p{Pc}]+)(?:,\p{space}*|)/dgv},{include:"#punctuation"}]},{captures:{"1":{name:"storage.type.event"},"3":{name:"entity.name.type.event"}},match:/\b(event)(\p{space}+([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*))?\b/dgv}]},"declaration-function":{patterns:[{begin:/\b(function)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,beginCaptures:{"1":{name:"storage.type.function"},"2":{name:"entity.name.function"}},end:/(?=[\{\;])/dgv,patterns:[{include:"#natspec"},{include:"#global"},{include:"#declaration-function-parameters"},{include:"#type-modifier-access"},{include:"#type-modifier-payable"},{include:"#type-modifier-immutable"},{include:"#type-modifier-extended-scope"},{include:"#control-flow"},{include:"#function-call"},{include:"#modifier-call"},{include:"#punctuation"}]},{captures:{"1":{name:"storage.type.function"},"2":{name:"entity.name.function"}},match:/\b(function)\p{space}+([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*)\b/dgv}]},"declaration-function-parameters":{begin:/\p{space}*(?=\()/dgvy,end:/(?=\))/dgv,patterns:[{include:"#type-primitive"},{include:"#type-modifier-extended-scope"},{captures:{"1":{name:"storage.type.struct"}},match:/\b([A-Z][\p{L}\p{M}\p{N}\p{Pc}]*)\b/dgv},{include:"#variable"},{include:"#punctuation"},{include:"#comment"}]},"declaration-interface":{patterns:[{begin:/\b(interface)\b\p{space}+([\p{L}\p{M}\p{N}\p{Pc}]+)\b\p{space}+\b(is)\b\p{space}+/dgv,beginCaptures:{"1":{name:"storage.type.interface"},"2":{name:"entity.name.type.interface"},"3":{name:"storage.modifier.is"}},end:/(?=\{)/dgv,patterns:[{match:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,name:"entity.name.type.interface.extend"}]},{captures:{"1":{name:"storage.type.interface"},"2":{name:"entity.name.type.interface"}},match:/\b(interface)(\p{space}+([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*))?\b/dgv}]},"declaration-library":{captures:{"1":{name:"storage.type.library"},"3":{name:"entity.name.type.library"}},match:/\b(library)(\p{space}+([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*))?\b/dgv},"declaration-modifier":{patterns:[{begin:/\b(modifier)\b\p{space}*([\p{L}\p{M}\p{N}\p{Pc}]+)/dgv,beginCaptures:{"1":{name:"storage.type.function.modifier"},"2":{name:"entity.name.function.modifier"}},end:/(?=\{)/dgv,patterns:[{include:"#declaration-function-parameters"},{begin:/(?<=\))/dgv,end:/(?=\{)/dgv,patterns:[{include:"#declaration-function-parameters"},{include:"#type-modifier-access"},{include:"#type-modifier-payable"},{include:"#type-modifier-immutable"},{include:"#type-modifier-extended-scope"},{include:"#function-call"},{include:"#modifier-call"},{include:"#control-flow"}]}]},{captures:{"1":{name:"storage.type.modifier"},"3":{name:"entity.name.function"}},match:/\b(modifier)(\p{space}+([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*))?\b/dgv}]},"declaration-storage":{patterns:[{include:"#declaration-storage-mapping"},{include:"#declaration-struct"},{include:"#declaration-enum"},{include:"#declaration-storage-field"}]},"declaration-storage-field":{patterns:[{include:"#comment"},{include:"#control"},{include:"#type-primitive"},{include:"#type-modifier-access"},{include:"#type-modifier-immutable"},{include:"#type-modifier-transient"},{include:"#type-modifier-extend-scope"},{include:"#type-modifier-payable"},{include:"#type-modifier-constant"},{include:"#primitive"},{include:"#constant"},{include:"#operator"},{include:"#punctuation"}]},"declaration-storage-mapping":{patterns:[{begin:/\b(mapping)\b/dgv,beginCaptures:{"1":{name:"storage.type.mapping"}},end:/(?=\))/dgv,patterns:[{include:"#declaration-storage-mapping"},{include:"#type-primitive"},{include:"#punctuation"},{include:"#operator"}]},{match:/\b(mapping)\b/dgv,name:"storage.type.mapping"}]},"declaration-struct":{patterns:[{captures:{"1":{name:"storage.type.struct"},"3":{name:"entity.name.type.struct"}},match:/\b(struct)(\p{space}+([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*))?\b/dgv},{begin:/\b(struct)\b\p{space}*([\p{L}\p{M}\p{N}\p{Pc}]+)?\b\p{space}*(?=\{)/dgv,beginCaptures:{"1":{name:"storage.type.struct"},"2":{name:"entity.name.type.struct"}},end:/(?=\})/dgv,patterns:[{include:"#type-primitive"},{include:"#variable"},{include:"#punctuation"},{include:"#comment"}]}]},"declaration-userType":{captures:{"1":{name:"storage.type.userType"},"2":{name:"entity.name.type.userType"},"3":{name:"storage.modifier.is"}},match:/\b(type)\b\p{space}+([\p{L}\p{M}\p{N}\p{Pc}]+)\b\p{space}+\b(is)\b/dgv},"function-call":{captures:{"1":{name:"entity.name.function"},"2":{name:"punctuation.parameters.begin"}},match:/\b([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(\()/dgv},global:{patterns:[{include:"#global-variables"},{include:"#global-functions"}]},"global-functions":{patterns:[{match:/\b(require|assert|revert)\b/dgv,name:"keyword.control.exceptions"},{match:/\b(s(?:elfdestruct|uicide))\b/dgv,name:"keyword.control.contract"},{match:/\b(addmod|mulmod|keccak256|sha256|sha3|ripemd160|ecrecover)\b/dgv,name:"support.function.math"},{match:/\b(unicode)\b/dgv,name:"support.function.string"},{match:/\b(blockhash|gasleft)\b/dgv,name:"variable.language.transaction"},{match:/\b(type)\b/dgv,name:"variable.language.type"}]},"global-variables":{patterns:[{match:/\b(this)\b/dgv,name:"variable.language.this"},{match:/\b(super)\b/dgv,name:"variable.language.super"},{match:/\b(abi)\b/dgv,name:"variable.language.builtin.abi"},{match:/\b(msg\.sender|msg|block|tx|now)\b/dgv,name:"variable.language.transaction"},{match:/\b(tx\.origin|tx\.gasprice|msg\.data|msg\.sig|msg\.value)\b/dgv,name:"variable.language.transaction"}]},"modifier-call":{patterns:[{include:"#function-call"},{match:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,name:"entity.name.function.modifier"}]},natspec:{patterns:[{begin:/\/\*\*/dgv,end:/\*\//dgv,name:"comment.block.documentation",patterns:[{include:"#natspec-tags"}]},{begin:/\/\/\//dgv,end:/(?=\n?$)/dgv,name:"comment.block.documentation",patterns:[{include:"#natspec-tags"}]}]},"natspec-tag-author":{match:/(@author)\b/dgv,name:"storage.type.author.natspec"},"natspec-tag-custom":{match:/(@custom:[\p{L}\p{M}\p{N}\p{Pc}]*)\b/dgv,name:"storage.type.dev.natspec"},"natspec-tag-dev":{match:/(@dev)\b/dgv,name:"storage.type.dev.natspec"},"natspec-tag-inheritdoc":{match:/(@inheritdoc)\b/dgv,name:"storage.type.author.natspec"},"natspec-tag-notice":{match:/(@notice)\b/dgv,name:"storage.type.dev.natspec"},"natspec-tag-param":{captures:{"1":{name:"storage.type.param.natspec"},"3":{name:"variable.other.natspec"}},match:/(@param)(\p{space}+([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*))?\b/dgv},"natspec-tag-return":{captures:{"1":{name:"storage.type.return.natspec"},"3":{name:"variable.other.natspec"}},match:/(@return)(\p{space}+([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*))?\b/dgv},"natspec-tag-title":{match:/(@title)\b/dgv,name:"storage.type.title.natspec"},"natspec-tags":{patterns:[{include:"#comment-todo"},{include:"#natspec-tag-title"},{include:"#natspec-tag-author"},{include:"#natspec-tag-notice"},{include:"#natspec-tag-dev"},{include:"#natspec-tag-param"},{include:"#natspec-tag-return"},{include:"#natspec-tag-custom"},{include:"#natspec-tag-inheritdoc"}]},number:{patterns:[{include:"#number-decimal"},{include:"#number-hex"},{include:"#number-scientific"}]},"number-decimal":{match:/\b([0-9_]+(\.[0-9_]+)?)\b/dgv,name:"constant.numeric.decimal"},"number-hex":{match:/\b(0[xX]\p{AHex}+)\b/dgv,name:"constant.numeric.hexadecimal"},"number-scientific":{match:/\b(?:0\.(?:0[0-9]|[0-9][0-9_]?)|[0-9][0-9_]*(?:\.\p{Nd}{1,2})?)(?:e[\+\-]?[0-9_]+)?/dgv,name:"constant.numeric.scientific"},operator:{patterns:[{include:"#operator-logic"},{include:"#operator-mapping"},{include:"#operator-arithmetic"},{include:"#operator-binary"},{include:"#operator-assignment"}]},"operator-arithmetic":{match:/([\+\-\/\*])/dgv,name:"keyword.operator.arithmetic"},"operator-assignment":{match:/(:?=)/dgv,name:"keyword.operator.assignment"},"operator-binary":{match:/([\^\&\|]|<<|>>)/dgv,name:"keyword.operator.binary"},"operator-logic":{match:/(==|!=|<(?!<)|<=|>(?!>)|>=|&&|\|\||:(?!=)|[\?\!])/dgv,name:"keyword.operator.logic"},"operator-mapping":{match:/(=>)/dgv,name:"keyword.operator.mapping"},primitive:{patterns:[{include:"#number-decimal"},{include:"#number-hex"},{include:"#number-scientific"},{include:"#string"}]},punctuation:{patterns:[{match:/;/dgv,name:"punctuation.terminator.statement"},{match:/\./dgv,name:"punctuation.accessor"},{match:/,/dgv,name:"punctuation.separator"},{match:/\{/dgv,name:"punctuation.brace.curly.begin"},{match:/\}/dgv,name:"punctuation.brace.curly.end"},{match:/\[/dgv,name:"punctuation.brace.square.begin"},{match:/\]/dgv,name:"punctuation.brace.square.end"},{match:/\(/dgv,name:"punctuation.parameters.begin"},{match:/\)/dgv,name:"punctuation.parameters.end"}]},string:{patterns:[{match:/"(?:\\"|[^"])*"/dgv,name:"string.quoted.double"},{match:/'(?:\\'|[^'])*'/dgv,name:"string.quoted.single"}]},"type-modifier-access":{match:/\b(internal|external|private|public)\b/dgv,name:"storage.type.modifier.access"},"type-modifier-constant":{match:/\b(constant)\b/dgv,name:"storage.type.modifier.readonly"},"type-modifier-extended-scope":{match:/\b(pure|view|inherited|indexed|storage|memory|virtual|calldata|override|abstract)\b/dgv,name:"storage.type.modifier.extendedscope"},"type-modifier-immutable":{match:/\b(immutable)\b/dgv,name:"storage.type.modifier.readonly"},"type-modifier-payable":{match:/\b(nonpayable|payable)\b/dgv,name:"storage.type.modifier.payable"},"type-modifier-transient":{match:/\b(transient)\b/dgv,name:"storage.type.modifier.readonly"},"type-primitive":{patterns:[{begin:/\b(address|string\p{Nd}*|bytes\p{Nd}*|int\p{Nd}*|uint\p{Nd}*|bool|hash\p{Nd}*)\b\[\](\()/dgv,beginCaptures:{"1":{name:"support.type.primitive"}},end:/(\))/dgv,patterns:[{include:"#primitive"},{include:"#punctuation"},{include:"#global"},{include:"#variable"}]},{match:/\b(address|string\p{Nd}*|bytes\p{Nd}*|int\p{Nd}*|uint\p{Nd}*|bool|hash\p{Nd}*)\b/dgv,name:"support.type.primitive"}]},variable:{patterns:[{captures:{"1":{name:"variable.parameter.function"}},match:/\b(_[\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv},{captures:{"1":{name:"support.variable.property"}},match:/\.([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv},{captures:{"1":{name:"variable.parameter.other"}},match:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv}]}},scopeName:"source.solidity",embeddedLangs:undefined,aliases:undefined})
2
2
 
3
3
  export default [
4
4
  lang
package/dist/tex.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { EmulatedRegExp } from 'oniguruma-to-es'
2
2
  import r from './r.mjs'
3
3
 
4
- const lang = Object.freeze({displayName:"TeX",name:"tex",patterns:[{begin:/(?<=^\p{space}*)((\\)iffalse)(?!\p{space}*[\{\}]\p{space}*\\fi)/dgv,beginCaptures:{"1":{name:"keyword.control.tex"},"2":{name:"punctuation.definition.keyword.tex"}},contentName:"comment.line.percentage.tex",end:/((\\)(?:else|fi))/dgv,endCaptures:{"1":{name:"keyword.control.tex"},"2":{name:"punctuation.definition.keyword.tex"}},patterns:[{include:"#comment"},{include:"#braces"},{include:"#conditionals"}]},{captures:{"1":{name:"punctuation.definition.keyword.tex"}},match:/(\\)(backmatter|csname|else|endcsname|fi|frontmatter|mainmatter|unless|if(case|cat|csname|defined|dim|eof|false|fontchar|hbox|hmode|inner|mmode|num|odd|true|vbox|vmode|void|x)?)(?![a-zA-Z\@])/dgv,name:"keyword.control.tex"},{captures:{"1":{name:"keyword.control.catcode.tex"},"2":{name:"punctuation.definition.keyword.tex"},"3":{name:"punctuation.separator.key-value.tex"},"4":{name:"constant.numeric.category.tex"}},match:/((\\)catcode)`\\?[^\n](=)(\p{Nd}+)/dgv,name:"meta.catcode.tex"},{include:"#comment"},{match:/[\[\]]/dgv,name:"punctuation.definition.brackets.tex"},{begin:/(\$(?:\$|))/dgv,beginCaptures:{"1":{name:"punctuation.definition.string.begin.tex"}},end:/((?!))/dgv,endCaptures:{"1":{name:"punctuation.definition.string.end.tex"}},name:"meta.math.block.tex support.class.math.block.tex",patterns:[{match:/\\\$/dgv,name:"constant.character.escape.tex"},{include:"#math"},{include:"$self"}]},{match:/\\\\/dgv,name:"keyword.control.newline.tex"},{captures:{"1":{name:"punctuation.definition.function.tex"}},match:/(\\)_*[\p{Alphabetic}\@]+(?:_[\p{Alphabetic}\@]+)*:[NncVvoxefTFpwD]*/dgv,name:"support.class.general.latex3.tex"},{captures:{"1":{name:"punctuation.definition.function.tex"}},match:/(\.)[\p{Alphabetic}\@]+(?:_[\p{Alphabetic}\@]+)*:[NncVvoxefTFpwD]*/dgv,name:"support.class.general.latex3.tex"},{captures:{"1":{name:"punctuation.definition.function.tex"}},match:/(\\)(?:[\,\;]|[\p{Alphabetic}\@]+)/dgv,name:"support.function.general.tex"},{captures:{"1":{name:"punctuation.definition.keyword.tex"}},match:/(\\)[^a-zA-Z\@]/dgv,name:"constant.character.escape.tex"}],repository:{braces:{begin:/(?<!\\)\{/dgv,beginCaptures:{"0":{name:"punctuation.group.begin.tex"}},end:/(?<!\\)\}/dgv,endCaptures:{"0":{name:"punctuation.group.end.tex"}},name:"meta.group.braces.tex",patterns:[{include:"#braces"}]},comment:{begin:/(^[ \t]+)?(?=%)/dgv,beginCaptures:{"1":{name:"punctuation.whitespace.comment.leading.tex"}},end:/*@__PURE__*/ new EmulatedRegExp("(?!^)","dgv",{"strategy":"clip_search"}),patterns:[{begin:/%:?/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.tex"}},end:/(?=\n?$)\n?/dgv,name:"comment.line.percentage.tex"},{begin:/^(%!TEX) (\P{space}*) =/dgv,beginCaptures:{"1":{name:"punctuation.definition.comment.tex"}},end:/(?=\n?$)\n?/dgv,name:"comment.line.percentage.directive.tex"}]},conditionals:{begin:/(?<=^\p{space}*)\\if[a-z]*/dgv,end:/(?<=^\p{space}*)\\fi/dgv,patterns:[{include:"#comment"},{include:"#conditionals"}]},math:{patterns:[{begin:/((\\)(?:text|mbox))(\{)/dgv,beginCaptures:{"1":{name:"constant.other.math.tex"},"2":{name:"punctuation.definition.function.tex"},"3":{name:"punctuation.definition.arguments.begin.tex meta.text.normal.tex"}},contentName:"meta.text.normal.tex",end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.arguments.end.tex meta.text.normal.tex"}},patterns:[{include:"#math"},{include:"$self"}]},{match:/\\[\{\}]/dgv,name:"punctuation.math.bracket.pair.tex"},{match:/\\(left|right|((big|bigg|Big|Bigg)[lr]?))([\(\[\<\>\]\)\.\|]|\\[\{\}\|]|\\[lr]?[Vv]ert|\\[lr]angle)/dgv,name:"punctuation.math.bracket.pair.big.tex"},{captures:{"1":{name:"punctuation.definition.constant.math.tex"}},match:/*@__PURE__*/ new EmulatedRegExp("(\\\\)(s(s(earrow|warrow|lash)|h(ort(downarrow|uparrow|parallel|leftarrow|rightarrow|mid)|arp)|tar|i(gma|m(eq)?)|u(cc(sim|n(sim|approx)|curlyeq|eq|approx)?|pset(neq(q)?|plus(eq)?|eq(q)?)?|rd|m|bset(neq(q)?|plus(eq)?|eq(q)?)?)|p(hericalangle|adesuit)|e(tminus|arrow)|q(su(pset(eq)?|bset(eq)?)|c(up|ap)|uare)|warrow|m(ile|all(s(etminus|mile)|frown)))|h(slash|ook(leftarrow|rightarrow)|eartsuit|bar)|R(sh|ightarrow|e|bag)|Gam(e|ma)|n(s(hort(parallel|mid)|im|u(cc(eq)?|pseteq(q)?|bseteq))|Rightarrow|n(earrow|warrow)|cong|triangle(left(eq(slant)?)?|right(eq(slant)?)?)|i(plus)?|u|p(lus|arallel|rec(eq)?)|e(q|arrow|g|xists)|v(dash|Dash)|warrow|le(ss|q(slant|q)?|ft(arrow|rightarrow))|a(tural|bla)|VDash|rightarrow|g(tr|eq(slant|q)?)|mid|Left(arrow|rightarrow))|c(hi|irc(eq|le(d(circ|S|dash|ast)|arrow(left|right)))?|o(ng|prod|lon|mplement)|dot([sp])?|u(p|r(vearrow(left|right)|ly(eq(succ|prec)|vee(downarrow|uparrow)?|wedge(downarrow|uparrow)?)))|enterdot|lubsuit|ap)|Xi|Maps(to(char)?|from(char)?)|B(ox|umpeq|bbk)|t(h(ick(sim|approx)|e(ta|refore))|imes|op|wohead(leftarrow|rightarrow)|a(u|lloblong)|riangle(down|q|left(eq(slant)?)?|right(eq(slant)?)?)?)|i(n(t(er(cal|leave))?|plus|fty)?|ota|math)|S(igma|u(pset|bset))|zeta|o(slash|times|int|dot|plus|vee|wedge|lessthan|greaterthan|m(inus|ega)|b(slash|long|ar))|d(i(v(ideontimes)?|a(g(down|up)|mond(suit)?)|gamma)|o(t(plus|eq(dot)?)|ublebarwedge|wn(harpoon(left|right)|downarrows|arrow))|d(ots|agger)|elta|a(sh(v|leftarrow|rightarrow)|leth|gger))|Y(down|up|left|right)|C(up|ap)|u(n(lhd|rhd)|p(silon|harpoon(left|right)|downarrow|uparrows|lus|arrow)|lcorner|rcorner)|jmath|Theta|Im|p(si|hi|i(tchfork)?|erp|ar(tial|allel)|r(ime|o(d|pto)|ec(sim|n(sim|approx)|curlyeq|eq|approx)?)|m)|e(t([ha])|psilon|q(slant(less|gtr)|circ|uiv)|ll|xists|mptyset)|Omega|D(iamond|ownarrow|elta)|v(d(ots|ash)|ee(bar)?|Dash|ar(s(igma|u(psetneq(q)?|bsetneq(q)?))|nothing|curly(vee|wedge)|t(heta|imes|riangle(left|right)?)|o(slash|circle|times|dot|plus|vee|wedge|lessthan|ast|greaterthan|minus|b(slash|ar))|p(hi|i|ropto)|epsilon|kappa|rho|bigcirc))|kappa|Up(silon|downarrow|arrow)|Join|f(orall|lat|a(t(s(emi|lash)|bslash)|llingdotseq)|rown)|P(si|hi|i)|w(p|edge|r)|l(hd|n(sim|eq(q)?|approx)|ceil|times|ightning|o(ng(left(arrow|rightarrow)|rightarrow|maps(to|from))|zenge|oparrow(left|right))|dot([sp])|e(ss(sim|dot|eq(qgtr|gtr)|approx|gtr)|q(slant|q)?|ft(slice|harpoon(down|up)|threetimes|leftarrows|arrow(t(ail|riangle))?|right(squigarrow|harpoons|arrow(s|triangle|eq)?))|adsto)|vertneqq|floor|l(c(orner|eil)|floor|l|bracket)?|a(ngle|mbda)|rcorner|bag)|a(s(ymp|t)|ngle|pprox(eq)?|l(pha|eph)|rrownot|malg)|V(dash|vdash)|r(h([od])|ceil|times|i(singdotseq|ght(s(quigarrow|lice)|harpoon(down|up)|threetimes|left(harpoons|arrows)|arrow(t(ail|riangle))?|rightarrows))|floor|angle|r(ceil|parenthesis|floor|bracket)|bag)|g(n(sim|eq(q)?|approx)|tr(sim|dot|eq(qless|less)|less|approx)|imel|eq(slant|q)?|vertneqq|amma|g(g)?)|Finv|xi|m(ho|i(nuso|d)|o(o|dels)|u(ltimap)?|p|e(asuredangle|rge)|aps(to|from(char)?))|b(i(n(dnasrepma|ampersand)|g(s(tar|qc(up|ap))|nplus|c(irc|u(p|rly(vee|wedge))|ap)|triangle(down|up)|interleave|o(times|dot|plus)|uplus|parallel|vee|wedge|box))|o(t|wtie|x(slash|circle|times|dot|plus|empty|ast|minus|b(slash|ox|ar)))|u(llet|mpeq)|e(cause|t(h|ween|a))|lack(square|triangle(down|left|right)?|lozenge)|a(ck(s(im(eq)?|lash)|prime|epsilon)|r(o|wedge))|bslash)|L(sh|ong(left(arrow|rightarrow)|rightarrow|maps(to|from))|eft(arrow|rightarrow)|leftarrow|ambda|bag)|Arrownot)(?![a-zA-Z\\@])","dgv",{"lazyCompile":true}),name:"constant.character.math.tex"},{captures:{"1":{name:"punctuation.definition.constant.math.tex"}},match:/(\\)(sum|prod|coprod|int|oint|bigcap|bigcup|bigsqcup|bigvee|bigwedge|bigodot|bigotimes|bogoplus|biguplus)\b/dgv,name:"constant.character.math.tex"},{captures:{"1":{name:"punctuation.definition.constant.math.tex"}},match:/(\\)(arccos|arcsin|arctan|arg|cos|cosh|cot|coth|csc|deg|det|dim|exp|gcd|hom|inf|ker|lg|lim|liminf|limsup|ln|log|max|min|pr|sec|sin|sinh|sup|tan|tanh)\b/dgv,name:"constant.other.math.tex"},{begin:/((\\)Sexpr(\{))/dgv,beginCaptures:{"1":{name:"support.function.sexpr.math.tex"},"2":{name:"punctuation.definition.function.math.tex"},"3":{name:"punctuation.section.embedded.begin.math.tex"}},contentName:"support.function.sexpr.math.tex",end:/(((\})))/dgv,endCaptures:{"1":{name:"support.function.sexpr.math.tex"},"2":{name:"punctuation.section.embedded.end.math.tex"},"3":{name:"source.r"}},name:"meta.embedded.line.r",patterns:[{begin:/(?!\})/dgvy,end:/(?=\})/dgv,name:"source.r",patterns:[{include:"source.r"}]}]},{captures:{"1":{name:"punctuation.definition.constant.math.tex"}},match:/(\\)(?!begin\{|verb)([A-Za-z]+)/dgv,name:"constant.other.general.math.tex"},{match:/(?<!\\)\{/dgv,name:"punctuation.math.begin.bracket.curly.tex"},{match:/(?<!\\)\}/dgv,name:"punctuation.math.end.bracket.curly.tex"},{match:/(?<!\\)\(/dgv,name:"punctuation.math.begin.bracket.round.tex"},{match:/(?<!\\)\)/dgv,name:"punctuation.math.end.bracket.round.tex"},{match:/(([0-9]*\.[0-9]+)|[0-9]+)/dgv,name:"constant.numeric.math.tex"},{match:/[\+\*\/_\^\-]/dgv,name:"punctuation.math.operator.tex"}]}},scopeName:"text.tex",embeddedLangs:["r"],aliases:undefined})
4
+ const lang = Object.freeze({displayName:"TeX",name:"tex",patterns:[{include:"#iffalse-block"},{include:"#macro-control"},{include:"#catcode"},{include:"#comment"},{match:/[\[\]]/dgv,name:"punctuation.definition.brackets.tex"},{include:"#dollar-math"},{match:/\\\\/dgv,name:"keyword.control.newline.tex"},{include:"#macro-general"}],repository:{braces:{begin:/(?<!\\)\{/dgv,beginCaptures:{"0":{name:"punctuation.group.begin.tex"}},end:/(?<!\\)\}/dgv,endCaptures:{"0":{name:"punctuation.group.end.tex"}},name:"meta.group.braces.tex",patterns:[{include:"#braces"}]},catcode:{captures:{"1":{name:"keyword.control.catcode.tex"},"2":{name:"punctuation.definition.keyword.tex"},"3":{name:"punctuation.separator.key-value.tex"},"4":{name:"constant.numeric.category.tex"}},match:/((\\)catcode)`\\?[^\n](=)(\p{Nd}+)/dgv,name:"meta.catcode.tex"},comment:{begin:/(^[ \t]+)?(?=%)/dgv,beginCaptures:{"1":{name:"punctuation.whitespace.comment.leading.tex"}},end:/*@__PURE__*/ new EmulatedRegExp("(?!^)","dgv",{"strategy":"clip_search"}),patterns:[{begin:/%:?/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.tex"}},end:/(?=\n?$)\n?/dgv,name:"comment.line.percentage.tex"},{begin:/^(%!TEX) (\P{space}*) =/dgv,beginCaptures:{"1":{name:"punctuation.definition.comment.tex"}},end:/(?=\n?$)\n?/dgv,name:"comment.line.percentage.directive.tex"}]},conditionals:{begin:/(?<=^\p{space}*)\\if[a-z]*/dgv,end:/(?<=^\p{space}*)\\fi/dgv,patterns:[{include:"#comment"},{include:"#conditionals"}]},"dollar-math":{begin:/(\$(?:\$|))/dgv,beginCaptures:{"1":{name:"punctuation.definition.string.begin.tex"}},end:/((?!))/dgv,endCaptures:{"1":{name:"punctuation.definition.string.end.tex"}},name:"meta.math.block.tex support.class.math.block.tex",patterns:[{match:/\\\$/dgv,name:"constant.character.escape.tex"},{include:"#math-content"},{include:"$self"}]},"iffalse-block":{begin:/(?<=^\p{space}*)((\\)iffalse)(?!\p{space}*[\{\}]\p{space}*\\fi)/dgv,beginCaptures:{"1":{name:"keyword.control.tex"},"2":{name:"punctuation.definition.keyword.tex"}},contentName:"comment.line.percentage.tex",end:/((\\)(?:else|fi))/dgv,endCaptures:{"1":{name:"keyword.control.tex"},"2":{name:"punctuation.definition.keyword.tex"}},patterns:[{include:"#comment"},{include:"#braces"},{include:"#conditionals"}]},"macro-control":{captures:{"1":{name:"punctuation.definition.keyword.tex"}},match:/(\\)(backmatter|csname|else|endcsname|fi|frontmatter|mainmatter|unless|if(case|cat|csname|defined|dim|eof|false|fontchar|hbox|hmode|inner|mmode|num|odd|true|vbox|vmode|void|x)?)(?![a-zA-Z\@])/dgv,name:"keyword.control.tex"},"macro-general":{patterns:[{captures:{"1":{name:"punctuation.definition.function.tex"}},match:/(\\)_*[\p{Alphabetic}\@]+(?:_[\p{Alphabetic}\@]+)*:[NncVvoxefTFpwD]*/dgv,name:"support.class.general.latex3.tex"},{captures:{"1":{name:"punctuation.definition.function.tex"}},match:/(\.)[\p{Alphabetic}\@]+(?:_[\p{Alphabetic}\@]+)*:[NncVvoxefTFpwD]*/dgv,name:"support.class.general.latex3.tex"},{captures:{"1":{name:"punctuation.definition.function.tex"}},match:/(\\)(?:[\,\;]|[\p{Alphabetic}\@]+)/dgv,name:"support.function.general.tex"},{captures:{"1":{name:"punctuation.definition.keyword.tex"}},match:/(\\)[^a-zA-Z\@]/dgv,name:"constant.character.escape.tex"}]},"math-content":{patterns:[{begin:/((\\)(?:text|mbox))(\{)/dgv,beginCaptures:{"1":{name:"constant.other.math.tex"},"2":{name:"punctuation.definition.function.tex"},"3":{name:"punctuation.definition.arguments.begin.tex meta.text.normal.tex"}},contentName:"meta.text.normal.tex",end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.arguments.end.tex meta.text.normal.tex"}},patterns:[{include:"#math-content"},{include:"$self"}]},{match:/\\[\{\}]/dgv,name:"punctuation.math.bracket.pair.tex"},{match:/\\(left|right|((big|bigg|Big|Bigg)[lr]?))([\(\[\<\>\]\)\.\|]|\\[\{\}\|]|\\[lr]?[Vv]ert|\\[lr]angle)/dgv,name:"punctuation.math.bracket.pair.big.tex"},{captures:{"1":{name:"punctuation.definition.constant.math.tex"}},match:/*@__PURE__*/ new EmulatedRegExp("(\\\\)(s(s(earrow|warrow|lash)|h(ort(downarrow|uparrow|parallel|leftarrow|rightarrow|mid)|arp)|tar|i(gma|m(eq)?)|u(cc(sim|n(sim|approx)|curlyeq|eq|approx)?|pset(neq(q)?|plus(eq)?|eq(q)?)?|rd|m|bset(neq(q)?|plus(eq)?|eq(q)?)?)|p(hericalangle|adesuit)|e(tminus|arrow)|q(su(pset(eq)?|bset(eq)?)|c(up|ap)|uare)|warrow|m(ile|all(s(etminus|mile)|frown)))|h(slash|ook(leftarrow|rightarrow)|eartsuit|bar)|R(sh|ightarrow|e|bag)|Gam(e|ma)|n(s(hort(parallel|mid)|im|u(cc(eq)?|pseteq(q)?|bseteq))|Rightarrow|n(earrow|warrow)|cong|triangle(left(eq(slant)?)?|right(eq(slant)?)?)|i(plus)?|u|p(lus|arallel|rec(eq)?)|e(q|arrow|g|xists)|v(dash|Dash)|warrow|le(ss|q(slant|q)?|ft(arrow|rightarrow))|a(tural|bla)|VDash|rightarrow|g(tr|eq(slant|q)?)|mid|Left(arrow|rightarrow))|c(hi|irc(eq|le(d(circ|S|dash|ast)|arrow(left|right)))?|o(ng|prod|lon|mplement)|dot([sp])?|u(p|r(vearrow(left|right)|ly(eq(succ|prec)|vee(downarrow|uparrow)?|wedge(downarrow|uparrow)?)))|enterdot|lubsuit|ap)|Xi|Maps(to(char)?|from(char)?)|B(ox|umpeq|bbk)|t(h(ick(sim|approx)|e(ta|refore))|imes|op|wohead(leftarrow|rightarrow)|a(u|lloblong)|riangle(down|q|left(eq(slant)?)?|right(eq(slant)?)?)?)|i(n(t(er(cal|leave))?|plus|fty)?|ota|math)|S(igma|u(pset|bset))|zeta|o(slash|times|int|dot|plus|vee|wedge|lessthan|greaterthan|m(inus|ega)|b(slash|long|ar))|d(i(v(ideontimes)?|a(g(down|up)|mond(suit)?)|gamma)|o(t(plus|eq(dot)?)|ublebarwedge|wn(harpoon(left|right)|downarrows|arrow))|d(ots|agger)|elta|a(sh(v|leftarrow|rightarrow)|leth|gger))|Y(down|up|left|right)|C(up|ap)|u(n(lhd|rhd)|p(silon|harpoon(left|right)|downarrow|uparrows|lus|arrow)|lcorner|rcorner)|jmath|Theta|Im|p(si|hi|i(tchfork)?|erp|ar(tial|allel)|r(ime|o(d|pto)|ec(sim|n(sim|approx)|curlyeq|eq|approx)?)|m)|e(t([ha])|psilon|q(slant(less|gtr)|circ|uiv)|ll|xists|mptyset)|Omega|D(iamond|ownarrow|elta)|v(d(ots|ash)|ee(bar)?|Dash|ar(s(igma|u(psetneq(q)?|bsetneq(q)?))|nothing|curly(vee|wedge)|t(heta|imes|riangle(left|right)?)|o(slash|circle|times|dot|plus|vee|wedge|lessthan|ast|greaterthan|minus|b(slash|ar))|p(hi|i|ropto)|epsilon|kappa|rho|bigcirc))|kappa|Up(silon|downarrow|arrow)|Join|f(orall|lat|a(t(s(emi|lash)|bslash)|llingdotseq)|rown)|P(si|hi|i)|w(p|edge|r)|l(hd|n(sim|eq(q)?|approx)|ceil|times|ightning|o(ng(left(arrow|rightarrow)|rightarrow|maps(to|from))|zenge|oparrow(left|right))|dot([sp])|e(ss(sim|dot|eq(qgtr|gtr)|approx|gtr)|q(slant|q)?|ft(slice|harpoon(down|up)|threetimes|leftarrows|arrow(t(ail|riangle))?|right(squigarrow|harpoons|arrow(s|triangle|eq)?))|adsto)|vertneqq|floor|l(c(orner|eil)|floor|l|bracket)?|a(ngle|mbda)|rcorner|bag)|a(s(ymp|t)|ngle|pprox(eq)?|l(pha|eph)|rrownot|malg)|V(dash|vdash)|r(h([od])|ceil|times|i(singdotseq|ght(s(quigarrow|lice)|harpoon(down|up)|threetimes|left(harpoons|arrows)|arrow(t(ail|riangle))?|rightarrows))|floor|angle|r(ceil|parenthesis|floor|bracket)|bag)|g(n(sim|eq(q)?|approx)|tr(sim|dot|eq(qless|less)|less|approx)|imel|eq(slant|q)?|vertneqq|amma|g(g)?)|Finv|xi|m(ho|i(nuso|d)|o(o|dels)|u(ltimap)?|p|e(asuredangle|rge)|aps(to|from(char)?))|b(i(n(dnasrepma|ampersand)|g(s(tar|qc(up|ap))|nplus|c(irc|u(p|rly(vee|wedge))|ap)|triangle(down|up)|interleave|o(times|dot|plus)|uplus|parallel|vee|wedge|box))|o(t|wtie|x(slash|circle|times|dot|plus|empty|ast|minus|b(slash|ox|ar)))|u(llet|mpeq)|e(cause|t(h|ween|a))|lack(square|triangle(down|left|right)?|lozenge)|a(ck(s(im(eq)?|lash)|prime|epsilon)|r(o|wedge))|bslash)|L(sh|ong(left(arrow|rightarrow)|rightarrow|maps(to|from))|eft(arrow|rightarrow)|leftarrow|ambda|bag)|Arrownot)(?![a-zA-Z\\@])","dgv",{"lazyCompile":true}),name:"constant.character.math.tex"},{captures:{"1":{name:"punctuation.definition.constant.math.tex"}},match:/(\\)(sum|prod|coprod|int|oint|bigcap|bigcup|bigsqcup|bigvee|bigwedge|bigodot|bigotimes|bogoplus|biguplus)\b/dgv,name:"constant.character.math.tex"},{captures:{"1":{name:"punctuation.definition.constant.math.tex"}},match:/(\\)(arccos|arcsin|arctan|arg|cos|cosh|cot|coth|csc|deg|det|dim|exp|gcd|hom|inf|ker|lg|lim|liminf|limsup|ln|log|max|min|pr|sec|sin|sinh|sup|tan|tanh)\b/dgv,name:"constant.other.math.tex"},{begin:/((\\)Sexpr(\{))/dgv,beginCaptures:{"1":{name:"support.function.sexpr.math.tex"},"2":{name:"punctuation.definition.function.math.tex"},"3":{name:"punctuation.section.embedded.begin.math.tex"}},contentName:"support.function.sexpr.math.tex",end:/(((\})))/dgv,endCaptures:{"1":{name:"support.function.sexpr.math.tex"},"2":{name:"punctuation.section.embedded.end.math.tex"},"3":{name:"source.r"}},name:"meta.embedded.line.r",patterns:[{begin:/(?!\})/dgvy,end:/(?=\})/dgv,name:"source.r",patterns:[{include:"source.r"}]}]},{captures:{"1":{name:"punctuation.definition.constant.math.tex"}},match:/(\\)(?!begin\{|verb)([A-Za-z]+)/dgv,name:"constant.other.general.math.tex"},{match:/(?<!\\)\{/dgv,name:"punctuation.math.begin.bracket.curly.tex"},{match:/(?<!\\)\}/dgv,name:"punctuation.math.end.bracket.curly.tex"},{match:/(?<!\\)\(/dgv,name:"punctuation.math.begin.bracket.round.tex"},{match:/(?<!\\)\)/dgv,name:"punctuation.math.end.bracket.round.tex"},{match:/(([0-9]*\.[0-9]+)|[0-9]+)/dgv,name:"constant.numeric.math.tex"},{match:/[\+\*\/\-]|(?<!\^)\^(?!\^)|(?<!_)_(?!_)/dgv,name:"punctuation.math.operator.tex"}]}},scopeName:"text.tex",embeddedLangs:["r"],aliases:undefined})
5
5
 
6
6
  export default [
7
7
  ...r,