@shikijs/langs-precompiled 1.26.2 → 1.27.1
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/angular-ts.mjs +1 -1
- package/dist/apex.mjs +1 -1
- package/dist/apl.mjs +1 -1
- package/dist/applescript.mjs +1 -1
- package/dist/ara.mjs +1 -1
- package/dist/asciidoc.mjs +1 -1
- package/dist/asm.mjs +1 -1
- package/dist/astro.mjs +1 -1
- package/dist/blade.mjs +1 -1
- package/dist/c.mjs +1 -1
- package/dist/cadence.mjs +1 -1
- package/dist/common-lisp.mjs +1 -1
- package/dist/cpp-macro.mjs +1 -1
- package/dist/cpp.mjs +1 -1
- package/dist/crystal.mjs +1 -1
- package/dist/css.mjs +1 -1
- package/dist/dream-maker.mjs +1 -1
- package/dist/elixir.mjs +1 -1
- package/dist/emacs-lisp.mjs +1 -1
- package/dist/erlang.mjs +1 -1
- package/dist/fortran-free-form.mjs +1 -1
- package/dist/gdscript.mjs +3 -1
- package/dist/glimmer-js.mjs +1 -1
- package/dist/glimmer-ts.mjs +1 -1
- package/dist/go.mjs +1 -1
- package/dist/graphql.mjs +1 -1
- package/dist/hack.mjs +1 -1
- package/dist/haml.mjs +1 -1
- package/dist/haskell.mjs +1 -1
- package/dist/html.mjs +1 -1
- package/dist/imba.mjs +1 -1
- package/dist/ini.mjs +1 -1
- package/dist/java.mjs +1 -1
- package/dist/javascript.mjs +1 -1
- package/dist/jsx.mjs +1 -1
- package/dist/julia.mjs +1 -1
- package/dist/kotlin.mjs +1 -1
- package/dist/kusto.mjs +1 -1
- package/dist/latex.mjs +2 -1
- package/dist/logo.mjs +1 -1
- package/dist/lua.mjs +1 -1
- package/dist/make.mjs +1 -1
- package/dist/markdown-vue.mjs +1 -1
- package/dist/markdown.mjs +1 -1
- package/dist/matlab.mjs +1 -1
- package/dist/mdc.mjs +1 -1
- package/dist/mdx.mjs +1 -1
- package/dist/mermaid.mjs +1 -1
- package/dist/mipsasm.mjs +1 -1
- package/dist/mojo.mjs +1 -1
- package/dist/nginx.mjs +2 -1
- package/dist/nim.mjs +1 -1
- package/dist/nushell.mjs +1 -1
- package/dist/objective-c.mjs +1 -1
- package/dist/objective-cpp.mjs +1 -1
- package/dist/pascal.mjs +1 -1
- package/dist/perl.mjs +1 -1
- package/dist/php.mjs +1 -1
- package/dist/po.mjs +1 -1
- package/dist/polar.mjs +1 -1
- package/dist/powershell.mjs +1 -1
- package/dist/pug.mjs +2 -1
- package/dist/python.mjs +1 -1
- package/dist/r.mjs +1 -1
- package/dist/raku.mjs +1 -1
- package/dist/riscv.mjs +1 -1
- package/dist/ruby.mjs +1 -1
- package/dist/scala.mjs +1 -1
- package/dist/scheme.mjs +1 -1
- package/dist/scss.mjs +1 -1
- package/dist/shellscript.mjs +1 -1
- package/dist/smalltalk.mjs +1 -1
- package/dist/sql.mjs +1 -1
- package/dist/ssh-config.mjs +1 -1
- package/dist/stylus.mjs +1 -1
- package/dist/svelte.mjs +1 -1
- package/dist/systemd.mjs +3 -1
- package/dist/templ.mjs +1 -1
- package/dist/tex.mjs +1 -1
- package/dist/toml.mjs +1 -1
- package/dist/tsx.mjs +1 -1
- package/dist/twig.mjs +1 -1
- package/dist/typescript.mjs +1 -1
- package/dist/v.mjs +1 -1
- package/dist/vb.mjs +1 -1
- package/dist/verilog.mjs +1 -1
- package/dist/vue-html.mjs +1 -1
- package/dist/vue.mjs +1 -1
- package/dist/vyper.mjs +1 -1
- package/dist/wikitext.mjs +1 -1
- package/dist/wolfram.mjs +1 -1
- package/dist/yaml.mjs +1 -1
- package/package.json +4 -4
package/dist/scss.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EmulatedRegExp } from 'oniguruma-to-es'
|
|
2
2
|
import css from './css.mjs'
|
|
3
3
|
|
|
4
|
-
const lang = Object.freeze({displayName:"SCSS",name:"scss",patterns:[{include:"#variable_setting"},{include:"#at_rule_forward"},{include:"#at_rule_use"},{include:"#at_rule_include"},{include:"#at_rule_import"},{include:"#general"},{include:"#flow_control"},{include:"#rules"},{include:"#property_list"},{include:"#at_rule_mixin"},{include:"#at_rule_media"},{include:"#at_rule_function"},{include:"#at_rule_charset"},{include:"#at_rule_option"},{include:"#at_rule_namespace"},{include:"#at_rule_fontface"},{include:"#at_rule_page"},{include:"#at_rule_keyframes"},{include:"#at_rule_at_root"},{include:"#at_rule_supports"},{match:/;/dgv,name:"punctuation.terminator.rule.css"}],repository:{at_rule_at_root:{begin:/\p{space}*((@)(at-root))(\p{space}+|(?=$|\n))/dgv,beginCaptures:{"1":{name:"keyword.control.at-rule.at-root.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*(?=\{)/dgv,name:"meta.at-rule.at-root.scss",patterns:[{include:"#function_attributes"},{include:"#functions"},{include:"#selectors"}]},at_rule_charset:{begin:/\p{space}*((@)charset\b)\p{space}*/dgv,captures:{"1":{name:"keyword.control.at-rule.charset.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*((?=;|(?=$|\n)))/dgv,name:"meta.at-rule.charset.scss",patterns:[{include:"#variable"},{include:"#string_single"},{include:"#string_double"}]},at_rule_content:{begin:/\p{space}*((@)content\b)\p{space}*/dgv,captures:{"1":{name:"keyword.control.content.scss"}},end:/\p{space}*((?=;))/dgv,name:"meta.content.scss",patterns:[{include:"#variable"},{include:"#selectors"},{include:"#property_values"}]},at_rule_each:{begin:/\p{space}*((@)each\b)\p{space}*/dgv,captures:{"1":{name:"keyword.control.each.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*((?=\}))/dgv,name:"meta.at-rule.each.scss",patterns:[{match:/\b(in|,)\b/dgv,name:"keyword.control.operator"},{include:"#variable"},{include:"#property_values"},{include:"$self"}]},at_rule_else:{begin:/\p{space}*((@)else(\p{space}*(if)?))\p{space}*/dgv,captures:{"1":{name:"keyword.control.else.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*(?=\{)/dgv,name:"meta.at-rule.else.scss",patterns:[{include:"#conditional_operators"},{include:"#variable"},{include:"#property_values"}]},at_rule_extend:{begin:/\p{space}*((@)extend\b)\p{space}*/dgv,captures:{"1":{name:"keyword.control.at-rule.extend.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*(?=;)/dgv,name:"meta.at-rule.extend.scss",patterns:[{include:"#variable"},{include:"#selectors"},{include:"#property_values"}]},at_rule_fontface:{patterns:[{begin:/(?<=^|\n(?!$))\p{space}*((@)font-face\b)/dgv,beginCaptures:{"1":{name:"keyword.control.at-rule.fontface.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*(?=\{)/dgv,name:"meta.at-rule.fontface.scss",patterns:[{include:"#function_attributes"}]}]},at_rule_for:{begin:/\p{space}*((@)for\b)\p{space}*/dgv,captures:{"1":{name:"keyword.control.for.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*(?=\{)/dgv,name:"meta.at-rule.for.scss",patterns:[{match:/(==|!=|<=|>=|<|>|from|to|through)/dgv,name:"keyword.control.operator"},{include:"#variable"},{include:"#property_values"},{include:"$self"}]},at_rule_forward:{begin:/\p{space}*((@)forward\b)\p{space}*/dgv,captures:{"1":{name:"keyword.control.at-rule.forward.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*(?=;)/dgv,name:"meta.at-rule.forward.scss",patterns:[{match:/\b(as|hide|show)\b/dgv,name:"keyword.control.operator"},{captures:{"1":{name:"entity.other.attribute-name.module.scss"},"2":{name:"punctuation.definition.wildcard.scss"}},match:/\b([\p{L}\p{M}\p{N}\p{Pc}\-]+)(\*)/dgv},{match:/\b[\p{L}\p{M}\p{N}\p{Pc}\-]+\b/dgv,name:"entity.name.function.scss"},{include:"#variable"},{include:"#string_single"},{include:"#string_double"},{include:"#comment_line"},{include:"#comment_block"}]},at_rule_function:{patterns:[{begin:/\p{space}*((@)function\b)\p{space}*/dgv,captures:{"1":{name:"keyword.control.at-rule.function.scss"},"2":{name:"punctuation.definition.keyword.scss"},"3":{name:"entity.name.function.scss"}},end:/\p{space}*(?=\{)/dgv,name:"meta.at-rule.function.scss",patterns:[{include:"#function_attributes"}]},{captures:{"1":{name:"keyword.control.at-rule.function.scss"},"2":{name:"punctuation.definition.keyword.scss"},"3":{name:"entity.name.function.scss"}},match:/\p{space}*((@)function\b)\p{space}*/dgv,name:"meta.at-rule.function.scss"}]},at_rule_if:{begin:/\p{space}*((@)if\b)\p{space}*/dgv,captures:{"1":{name:"keyword.control.if.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*(?=\{)/dgv,name:"meta.at-rule.if.scss",patterns:[{include:"#conditional_operators"},{include:"#variable"},{include:"#property_values"}]},at_rule_import:{begin:/\p{space}*((@)import\b)\p{space}*/dgv,captures:{"1":{name:"keyword.control.at-rule.import.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*((?=;)|(?=\}))/dgv,name:"meta.at-rule.import.scss",patterns:[{include:"#variable"},{include:"#string_single"},{include:"#string_double"},{include:"#functions"},{include:"#comment_line"}]},at_rule_include:{patterns:[{begin:/(?<=@include)\p{space}+(?:([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*(\.))?([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*(\()/dgv,beginCaptures:{"1":{name:"variable.scss"},"2":{name:"punctuation.access.module.scss"},"3":{name:"entity.name.function.scss"},"4":{name:"punctuation.definition.parameters.begin.bracket.round.scss"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.parameters.end.bracket.round.scss"}},name:"meta.at-rule.include.scss",patterns:[{include:"#function_attributes"}]},{captures:{"0":{name:"meta.at-rule.include.scss"},"1":{name:"variable.scss"},"2":{name:"punctuation.access.module.scss"},"3":{name:"entity.name.function.scss"}},match:/(?<=@include)\p{space}+(?:([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*(\.))?([\p{L}\p{M}\p{N}\p{Pc}\-]+)/dgv},{captures:{"0":{name:"meta.at-rule.include.scss"},"1":{name:"keyword.control.at-rule.include.scss"},"2":{name:"punctuation.definition.keyword.scss"}},match:/((@)include)\b/dgv}]},at_rule_keyframes:{begin:/(?<=(?<=^|\n(?!$))|\p{space})(@)(?:-(?:webkit|moz)-)?keyframes\b/dgv,beginCaptures:{"0":{name:"keyword.control.at-rule.keyframes.scss"},"1":{name:"punctuation.definition.keyword.scss"}},end:/(?<=\})/dgv,name:"meta.at-rule.keyframes.scss",patterns:[{captures:{"1":{name:"entity.name.function.scss"}},match:/(?<=@keyframes)\p{space}+((?:[_A-Za-z][\-\p{L}\p{M}\p{N}\p{Pc}]|-[_A-Za-z])[\-\p{L}\p{M}\p{N}\p{Pc}]*)/dgv},{begin:/(?<=@keyframes)\p{space}+(")/dgv,beginCaptures:{"1":{name:"punctuation.definition.string.begin.scss"}},contentName:"entity.name.function.scss",end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.scss"}},name:"string.quoted.double.scss",patterns:[{match:/\\(\p{AHex}{1,6}|[^\n])/dgv,name:"constant.character.escape.scss"},{include:"#interpolation"}]},{begin:/(?<=@keyframes)\p{space}+(')/dgv,beginCaptures:{"1":{name:"punctuation.definition.string.begin.scss"}},contentName:"entity.name.function.scss",end:/'/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.scss"}},name:"string.quoted.single.scss",patterns:[{match:/\\(\p{AHex}{1,6}|[^\n])/dgv,name:"constant.character.escape.scss"},{include:"#interpolation"}]},{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.section.keyframes.begin.scss"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.section.keyframes.end.scss"}},patterns:[{match:/\b(?:(?:100|[1-9]\p{Nd}|\p{Nd})%|from|to)(?=\p{space}*\{)/dgv,name:"entity.other.attribute-name.scss"},{include:"#flow_control"},{include:"#interpolation"},{include:"#property_list"},{include:"#rules"}]}]},at_rule_media:{patterns:[{begin:/(?<=^|\n(?!$))\p{space}*((@)media)\b/dgv,beginCaptures:{"1":{name:"keyword.control.at-rule.media.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*(?=\{)/dgv,name:"meta.at-rule.media.scss",patterns:[{include:"#comment_docblock"},{include:"#comment_block"},{include:"#comment_line"},{match:/\b(only)\b/dgv,name:"keyword.control.operator.css.scss"},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.media-query.begin.bracket.round.scss"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.media-query.end.bracket.round.scss"}},name:"meta.property-list.media-query.scss",patterns:[{begin:/(?<![\-a-z])(?=[\-a-z])/dgv,end:/(?=$|\n)|(?![\-a-z])/dgv,name:"meta.property-name.media-query.scss",patterns:[{include:"source.css#media-features"},{include:"source.css#property-names"}]},{begin:/(:)\p{space}*(?!(\p{space}*\{))/dgv,beginCaptures:{"1":{name:"punctuation.separator.key-value.scss"}},contentName:"meta.property-value.media-query.scss",end:/\p{space}*(;|(?=\}|\)))/dgv,endCaptures:{"1":{name:"punctuation.terminator.rule.scss"}},patterns:[{include:"#general"},{include:"#property_values"}]}]},{include:"#variable"},{include:"#conditional_operators"},{include:"source.css#media-types"}]}]},at_rule_mixin:{patterns:[{begin:/(?<=@mixin)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*(\()/dgv,beginCaptures:{"1":{name:"entity.name.function.scss"},"2":{name:"punctuation.definition.parameters.begin.bracket.round.scss"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.parameters.end.bracket.round.scss"}},name:"meta.at-rule.mixin.scss",patterns:[{include:"#function_attributes"}]},{captures:{"1":{name:"entity.name.function.scss"}},match:/(?<=@mixin)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-]+)/dgv,name:"meta.at-rule.mixin.scss"},{captures:{"1":{name:"keyword.control.at-rule.mixin.scss"},"2":{name:"punctuation.definition.keyword.scss"}},match:/((@)mixin)\b/dgv,name:"meta.at-rule.mixin.scss"}]},at_rule_namespace:{patterns:[{begin:/(?<=@namespace)\p{space}+(?=url)/dgv,end:/(?=;|(?=$|\n))/dgv,name:"meta.at-rule.namespace.scss",patterns:[{include:"#property_values"},{include:"#string_single"},{include:"#string_double"}]},{begin:/(?<=@namespace)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-]*)/dgv,captures:{"1":{name:"entity.name.namespace-prefix.scss"}},end:/(?=;|(?=$|\n))/dgv,name:"meta.at-rule.namespace.scss",patterns:[{include:"#variables"},{include:"#property_values"},{include:"#string_single"},{include:"#string_double"}]},{captures:{"1":{name:"keyword.control.at-rule.namespace.scss"},"2":{name:"punctuation.definition.keyword.scss"}},match:/((@)namespace)\b/dgv,name:"meta.at-rule.namespace.scss"}]},at_rule_option:{captures:{"1":{name:"keyword.control.at-rule.charset.scss"},"2":{name:"punctuation.definition.keyword.scss"}},match:/(?<=^|\n(?!$))\p{space}*((@)option\b)\p{space}*/dgv,name:"meta.at-rule.option.scss"},at_rule_page:{patterns:[{begin:/(?<=^|\n(?!$))\p{space}*((@)page)(?=:|\p{space})\p{space}*([\-\:\p{L}\p{M}\p{N}\p{Pc}]*)/dgv,captures:{"1":{name:"keyword.control.at-rule.page.scss"},"2":{name:"punctuation.definition.keyword.scss"},"3":{name:"entity.name.function.scss"}},end:/\p{space}*(?=\{)/dgv,name:"meta.at-rule.page.scss"}]},at_rule_return:{begin:/\p{space}*((@)(return)\b)/dgv,captures:{"1":{name:"keyword.control.return.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*((?=;))/dgv,name:"meta.at-rule.return.scss",patterns:[{include:"#variable"},{include:"#property_values"}]},at_rule_supports:{begin:/(?<=(?<=^|\n(?!$))|\p{space})(@)supports\b/dgv,captures:{"0":{name:"keyword.control.at-rule.supports.scss"},"1":{name:"punctuation.definition.keyword.scss"}},end:/(?=\{)|(?=$|\n)/dgv,name:"meta.at-rule.supports.scss",patterns:[{include:"#logical_operators"},{include:"#properties"},{match:/\(/dgv,name:"punctuation.definition.condition.begin.bracket.round.scss"},{match:/\)/dgv,name:"punctuation.definition.condition.end.bracket.round.scss"}]},at_rule_use:{begin:/\p{space}*((@)use\b)\p{space}*/dgv,captures:{"1":{name:"keyword.control.at-rule.use.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*(?=;)/dgv,name:"meta.at-rule.use.scss",patterns:[{match:/\b(as|with)\b/dgv,name:"keyword.control.operator"},{match:/\b[\p{L}\p{M}\p{N}\p{Pc}\-]+\b/dgv,name:"variable.scss"},{match:/\*/dgv,name:"variable.language.expanded-namespace.scss"},{include:"#string_single"},{include:"#string_double"},{include:"#comment_line"},{include:"#comment_block"},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.parameters.begin.bracket.round.scss"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.parameters.end.bracket.round.scss"}},patterns:[{include:"#function_attributes"}]}]},at_rule_warn:{begin:/\p{space}*((@)(warn|debug|error)\b)\p{space}*/dgv,captures:{"1":{name:"keyword.control.warn.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*(?=;)/dgv,name:"meta.at-rule.warn.scss",patterns:[{include:"#variable"},{include:"#string_double"},{include:"#string_single"}]},at_rule_while:{begin:/\p{space}*((@)while\b)\p{space}*/dgv,captures:{"1":{name:"keyword.control.while.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*(?=\})/dgv,name:"meta.at-rule.while.scss",patterns:[{include:"#conditional_operators"},{include:"#variable"},{include:"#property_values"},{include:"$self"}]},comment_block:{begin:/\/\*/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.scss"}},end:/\*\//dgv,endCaptures:{"0":{name:"punctuation.definition.comment.scss"}},name:"comment.block.scss"},comment_docblock:{begin:/\/\/\//dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.scss"}},end:/(?=(?=$|\n))/dgv,name:"comment.block.documentation.scss",patterns:[{include:"source.sassdoc"}]},comment_line:{begin:/\/\//dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.scss"}},end:/\n/dgv,name:"comment.line.scss"},comparison_operators:{match:/==|!=|<=|>=|<|>/dgv,name:"keyword.operator.comparison.scss"},conditional_operators:{patterns:[{include:"#comparison_operators"},{include:"#logical_operators"}]},constant_default:{match:/!default/dgv,name:"keyword.other.default.scss"},constant_functions:{begin:/(?:([\p{L}\p{M}\p{N}\p{Pc}\-]+)(\.))?([\p{L}\p{M}\p{N}\p{Pc}\-]+)(\()/dgv,beginCaptures:{"1":{name:"variable.scss"},"2":{name:"punctuation.access.module.scss"},"3":{name:"support.function.misc.scss"},"4":{name:"punctuation.section.function.scss"}},end:/(\))/dgv,endCaptures:{"1":{name:"punctuation.section.function.scss"}},patterns:[{include:"#parameters"}]},constant_important:{match:/!important/dgv,name:"keyword.other.important.scss"},constant_mathematical_symbols:{match:/\b(\+|-|\*|\/)\b/dgv,name:"support.constant.mathematical-symbols.scss"},constant_optional:{match:/!optional/dgv,name:"keyword.other.optional.scss"},constant_sass_functions:{begin:/(headings|stylesheet-url|rgba?|hsla?|ie-hex-str|red|green|blue|alpha|opacity|hue|saturation|lightness|prefixed|prefix|-moz|-svg|-css2|-pie|-webkit|-ms|font-(?:files|url)|grid-image|image-(?:width|height|url|color)|sprites?|sprite-(?:map|map-name|file|url|position)|inline-(?:font-files|image)|opposite-position|grad-point|grad-end-position|color-stops|color-stops-in-percentages|grad-color-stops|(?:radial|linear)-(?:gradient|svg-gradient)|opacify|fade-?in|transparentize|fade-?out|lighten|darken|saturate|desaturate|grayscale|adjust-(?:hue|lightness|saturation|color)|scale-(?:lightness|saturation|color)|change-color|spin|complement|invert|mix|-compass-(?:list|space-list|slice|nth|list-size)|blank|compact|nth|first-value-of|join|length|append|nest|append-selector|headers|enumerate|range|percentage|unitless|unit|if|type-of|comparable|elements-of-type|quote|unquote|escape|e|sin|cos|tan|abs|round|ceil|floor|pi|translate(?:X|Y))(\()/dgv,beginCaptures:{"1":{name:"support.function.misc.scss"},"2":{name:"punctuation.section.function.scss"}},end:/(\))/dgv,endCaptures:{"1":{name:"punctuation.section.function.scss"}},patterns:[{include:"#parameters"}]},flow_control:{patterns:[{include:"#at_rule_if"},{include:"#at_rule_else"},{include:"#at_rule_warn"},{include:"#at_rule_for"},{include:"#at_rule_while"},{include:"#at_rule_each"},{include:"#at_rule_return"}]},function_attributes:{patterns:[{match:/:/dgv,name:"punctuation.separator.key-value.scss"},{include:"#general"},{include:"#property_values"},{match:/[\=\{\}\?\;\@]/dgv,name:"invalid.illegal.scss"}]},functions:{patterns:[{begin:/([\p{L}\p{M}\p{N}\p{Pc}\-]+)(\()\p{space}*/dgv,beginCaptures:{"1":{name:"support.function.misc.scss"},"2":{name:"punctuation.section.function.scss"}},end:/(\))/dgv,endCaptures:{"1":{name:"punctuation.section.function.scss"}},patterns:[{include:"#parameters"}]},{match:/([\p{L}\p{M}\p{N}\p{Pc}\-]+)/dgv,name:"support.function.misc.scss"}]},general:{patterns:[{include:"#variable"},{include:"#comment_docblock"},{include:"#comment_block"},{include:"#comment_line"}]},interpolation:{begin:/#\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.interpolation.begin.bracket.curly.scss"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.interpolation.end.bracket.curly.scss"}},name:"variable.interpolation.scss",patterns:[{include:"#variable"},{include:"#property_values"}]},logical_operators:{match:/\b(not|or|and)\b/dgv,name:"keyword.operator.logical.scss"},map:{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.map.begin.bracket.round.scss"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.map.end.bracket.round.scss"}},name:"meta.definition.variable.map.scss",patterns:[{include:"#comment_docblock"},{include:"#comment_block"},{include:"#comment_line"},{captures:{"1":{name:"support.type.map.key.scss"},"2":{name:"punctuation.separator.key-value.scss"}},match:/\b([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*(:)/dgv},{match:/,/dgv,name:"punctuation.separator.delimiter.scss"},{include:"#map"},{include:"#variable"},{include:"#property_values"}]},operators:{match:/[\-\+\*\/](?!\p{space}*[\-\+\*\/])/dgv,name:"keyword.operator.css"},parameters:{patterns:[{include:"#variable"},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.begin.bracket.round.scss"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.scss"}},patterns:[{include:"#function_attributes"}]},{include:"#property_values"},{include:"#comment_block"},{match:/[^'"\,\) \t]+/dgv,name:"variable.parameter.url.scss"},{match:/,/dgv,name:"punctuation.separator.delimiter.scss"}]},parent_selector_suffix:{captures:{"1":{name:"punctuation.definition.entity.css"},"2":{patterns:[{include:"#interpolation"},{match:/\\([0-9a-fA-F]{1,6}|[^\n])/dgv,name:"constant.character.escape.scss"},{match:/\$|\}/dgv,name:"invalid.illegal.identifier.scss"}]}},match:/(?<=&)((?:[\-a-zA-Z_0-9]|[^\x00-\x7F]|\\(?:[0-9a-fA-F]{1,6}|[^\n])|#\{|\$|\})+)(?=(?=$|\n)|[\p{space}\,\.\#\)\[\:\{\>\+\~\|]|\/\*)/dgv,name:"entity.other.attribute-name.parent-selector-suffix.css"},properties:{patterns:[{begin:/(?<![\-a-z])(?=[\-a-z])/dgv,end:/(?=$|\n)|(?![\-a-z])/dgv,name:"meta.property-name.scss",patterns:[{include:"source.css#property-names"},{include:"#at_rule_include"}]},{begin:/(:)\p{space}*(?!(\p{space}*\{))/dgv,beginCaptures:{"1":{name:"punctuation.separator.key-value.scss"}},contentName:"meta.property-value.scss",end:/\p{space}*(;|(?=\}|\)))/dgv,endCaptures:{"1":{name:"punctuation.terminator.rule.scss"}},patterns:[{include:"#general"},{include:"#property_values"}]}]},property_list:{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.section.property-list.begin.bracket.curly.scss"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.section.property-list.end.bracket.curly.scss"}},name:"meta.property-list.scss",patterns:[{include:"#flow_control"},{include:"#rules"},{include:"#properties"},{include:"$self"}]},property_values:{patterns:[{include:"#string_single"},{include:"#string_double"},{include:"#constant_functions"},{include:"#constant_sass_functions"},{include:"#constant_important"},{include:"#constant_default"},{include:"#constant_optional"},{include:"source.css#numeric-values"},{include:"source.css#property-keywords"},{include:"source.css#color-keywords"},{include:"source.css#property-names"},{include:"#constant_mathematical_symbols"},{include:"#operators"},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.begin.bracket.round.scss"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.scss"}},patterns:[{include:"#general"},{include:"#property_values"}]}]},rules:{patterns:[{include:"#general"},{include:"#at_rule_extend"},{include:"#at_rule_content"},{include:"#at_rule_include"},{include:"#at_rule_media"},{include:"#selectors"}]},selector_attribute:{captures:{"1":{name:"punctuation.definition.attribute-selector.begin.bracket.square.scss"},"2":{name:"entity.other.attribute-name.attribute.scss",patterns:[{include:"#interpolation"},{match:/\\([0-9a-fA-F]{1,6}|[^\n])/dgv,name:"constant.character.escape.scss"},{match:/\$|\}/dgv,name:"invalid.illegal.scss"}]},"3":{name:"keyword.operator.scss"},"4":{name:"string.unquoted.attribute-value.scss",patterns:[{include:"#interpolation"},{match:/\\([0-9a-fA-F]{1,6}|[^\n])/dgv,name:"constant.character.escape.scss"},{match:/\$|\}/dgv,name:"invalid.illegal.scss"}]},"5":{name:"string.quoted.double.attribute-value.scss"},"6":{name:"punctuation.definition.string.begin.scss"},"7":{patterns:[{include:"#interpolation"},{match:/\\([0-9a-fA-F]{1,6}|[^\n])/dgv,name:"constant.character.escape.scss"},{match:/\$|\}/dgv,name:"invalid.illegal.scss"}]},"8":{name:"punctuation.definition.string.end.scss"},"9":{name:"string.quoted.single.attribute-value.scss"},"10":{name:"punctuation.definition.string.begin.scss"},"11":{patterns:[{include:"#interpolation"},{match:/\\([0-9a-fA-F]{1,6}|[^\n])/dgv,name:"constant.character.escape.scss"},{match:/\$|\}/dgv,name:"invalid.illegal.scss"}]},"12":{name:"punctuation.definition.string.end.scss"},"13":{name:"punctuation.definition.attribute-selector.end.bracket.square.scss"}},match:/(\[)\p{space}*((?:[\-a-zA-Z_0-9]|[^\x00-\x7F]|\\(?:[0-9a-fA-F]{1,6}|[^\n])|#\{|\.?\$|\})+?)(?:\p{space}*([\~\|\^\$\*]?=)\p{space}*(?:((?:[\-a-zA-Z_0-9]|[^\x00-\x7F]|\\(?:[0-9a-fA-F]{1,6}|[^\n])|#\{|\.?\$|\})+)|((")([^\n]*?)("))|((')([^\n]*?)('))))?\p{space}*(\])/dgiv,name:"meta.attribute-selector.scss"},selector_class:{captures:{"1":{name:"punctuation.definition.entity.css"},"2":{patterns:[{include:"#interpolation"},{match:/\\([0-9a-fA-F]{1,6}|[^\n])/dgv,name:"constant.character.escape.scss"},{match:/\$|\}/dgv,name:"invalid.illegal.scss"}]}},match:/(\.)((?:[\-a-zA-Z_0-9]|[^\x00-\x7F]|\\(?:[0-9a-fA-F]{1,6}|[^\n])|#\{|\.?\$|\})+)(?=(?=$|\n)|[\p{space}\,\#\)\[\:\{\>\+\~\|]|\.[^\$]|\/\*|;)/dgv,name:"entity.other.attribute-name.class.css"},selector_custom:{match:new EmulatedRegExp("\\b([a-zA-Z0-9]+(-[a-zA-Z0-9]+)+)(?=\\.|(?:(?=($E$\\p{space}+))\\3)[^\\:]|\\p{space}*[\\,\\[\\{]|:(link|visited|hover|active|focus|target|lang|disabled|enabled|checked|indeterminate|root|nth-(child|last-child|of-type|last-of-type)|first-child|last-child|first-of-type|last-of-type|only-child|only-of-type|empty|not|valid|invalid)(\\([0-9A-Za-z]*\\))?)","dgv",{"useEmulationGroups":true}),name:"entity.name.tag.custom.scss"},selector_id:{captures:{"1":{name:"punctuation.definition.entity.css"},"2":{patterns:[{include:"#interpolation"},{match:/\\([0-9a-fA-F]{1,6}|[^\n])/dgv,name:"constant.character.escape.scss"},{match:/\$|\}/dgv,name:"invalid.illegal.identifier.scss"}]}},match:/(#)((?:[\-a-zA-Z_0-9]|[^\x00-\x7F]|\\(?:[0-9a-fA-F]{1,6}|[^\n])|#\{|\.?\$|\})+)(?=(?=$|\n)|[\p{space}\,\#\)\[\:\{\>\+\~\|]|\.[^\$]|\/\*)/dgv,name:"entity.other.attribute-name.id.css"},selector_placeholder:{captures:{"1":{name:"punctuation.definition.entity.css"},"2":{patterns:[{include:"#interpolation"},{match:/\\([0-9a-fA-F]{1,6}|[^\n])/dgv,name:"constant.character.escape.scss"},{match:/\$|\}/dgv,name:"invalid.illegal.identifier.scss"}]}},match:/(%)((?:[\-a-zA-Z_0-9]|[^\x00-\x7F]|\\(?:[0-9a-fA-F]{1,6}|[^\n])|#\{|\.\$|\$|\})+)(?=;|(?=$|\n)|[\p{space}\,\#\)\[\:\{\>\+\~\|]|\.[^\$]|\/\*)/dgv,name:"entity.other.attribute-name.placeholder.css"},selector_pseudo_class:{patterns:[{begin:/((:)\bnth-(?:child|last-child|of-type|last-of-type))(\()/dgv,beginCaptures:{"1":{name:"entity.other.attribute-name.pseudo-class.css"},"2":{name:"punctuation.definition.entity.css"},"3":{name:"punctuation.definition.pseudo-class.begin.bracket.round.css"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.pseudo-class.end.bracket.round.css"}},patterns:[{include:"#interpolation"},{match:/\p{Nd}+/dgv,name:"constant.numeric.css"},{match:/(?<=\p{Nd})n\b|\b(n|even|odd)\b/dgv,name:"constant.other.scss"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"invalid.illegal.scss"}]},{include:"source.css#pseudo-classes"},{include:"source.css#pseudo-elements"},{include:"source.css#functional-pseudo-classes"}]},selectors:{patterns:[{include:"source.css#tag-names"},{include:"#selector_custom"},{include:"#selector_class"},{include:"#selector_id"},{include:"#selector_pseudo_class"},{include:"#tag_wildcard"},{include:"#tag_parent_reference"},{include:"source.css#pseudo-elements"},{include:"#selector_attribute"},{include:"#selector_placeholder"},{include:"#parent_selector_suffix"}]},string_double:{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.scss"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.scss"}},name:"string.quoted.double.scss",patterns:[{match:/\\(\p{AHex}{1,6}|[^\n])/dgv,name:"constant.character.escape.scss"},{include:"#interpolation"}]},string_single:{begin:/'/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.scss"}},end:/'/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.scss"}},name:"string.quoted.single.scss",patterns:[{match:/\\(\p{AHex}{1,6}|[^\n])/dgv,name:"constant.character.escape.scss"},{include:"#interpolation"}]},tag_parent_reference:{match:/&/dgv,name:"entity.name.tag.reference.scss"},tag_wildcard:{match:/\*/dgv,name:"entity.name.tag.wildcard.scss"},variable:{patterns:[{include:"#variables"},{include:"#interpolation"}]},variable_setting:{begin:/(?=\$[\p{L}\p{M}\p{N}\p{Pc}\-]+\p{space}*:)/dgv,contentName:"meta.definition.variable.scss",end:/;/dgv,endCaptures:{"0":{name:"punctuation.terminator.rule.scss"}},patterns:[{match:/\$[\p{L}\p{M}\p{N}\p{Pc}\-]+(?=\p{space}*:)/dgv,name:"variable.scss"},{begin:/:/dgv,beginCaptures:{"0":{name:"punctuation.separator.key-value.scss"}},end:/(?=;)/dgv,patterns:[{include:"#comment_docblock"},{include:"#comment_block"},{include:"#comment_line"},{include:"#map"},{include:"#property_values"},{include:"#variable"},{match:/,/dgv,name:"punctuation.separator.delimiter.scss"}]}]},variables:{patterns:[{captures:{"1":{name:"variable.scss"},"2":{name:"punctuation.access.module.scss"},"3":{name:"variable.scss"}},match:/\b([\p{L}\p{M}\p{N}\p{Pc}\-]+)(\.)(\$[\p{L}\p{M}\p{N}\p{Pc}\-]+)\b/dgv},{match:/(\$|--)[A-Za-z0-9_\-]+\b/dgv,name:"variable.scss"}]}},scopeName:"source.css.scss",embeddedLangs:["css"],aliases:undefined})
|
|
4
|
+
const lang = Object.freeze({displayName:"SCSS",name:"scss",patterns:[{include:"#variable_setting"},{include:"#at_rule_forward"},{include:"#at_rule_use"},{include:"#at_rule_include"},{include:"#at_rule_import"},{include:"#general"},{include:"#flow_control"},{include:"#rules"},{include:"#property_list"},{include:"#at_rule_mixin"},{include:"#at_rule_media"},{include:"#at_rule_function"},{include:"#at_rule_charset"},{include:"#at_rule_option"},{include:"#at_rule_namespace"},{include:"#at_rule_fontface"},{include:"#at_rule_page"},{include:"#at_rule_keyframes"},{include:"#at_rule_at_root"},{include:"#at_rule_supports"},{match:/;/dgv,name:"punctuation.terminator.rule.css"}],repository:{at_rule_at_root:{begin:/\p{space}*((@)(at-root))(\p{space}+|(?=$|\n))/dgv,beginCaptures:{"1":{name:"keyword.control.at-rule.at-root.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*(?=\{)/dgv,name:"meta.at-rule.at-root.scss",patterns:[{include:"#function_attributes"},{include:"#functions"},{include:"#selectors"}]},at_rule_charset:{begin:/\p{space}*((@)charset\b)\p{space}*/dgv,captures:{"1":{name:"keyword.control.at-rule.charset.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*((?=;|(?=$|\n)))/dgv,name:"meta.at-rule.charset.scss",patterns:[{include:"#variable"},{include:"#string_single"},{include:"#string_double"}]},at_rule_content:{begin:/\p{space}*((@)content\b)\p{space}*/dgv,captures:{"1":{name:"keyword.control.content.scss"}},end:/\p{space}*((?=;))/dgv,name:"meta.content.scss",patterns:[{include:"#variable"},{include:"#selectors"},{include:"#property_values"}]},at_rule_each:{begin:/\p{space}*((@)each\b)\p{space}*/dgv,captures:{"1":{name:"keyword.control.each.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*((?=\}))/dgv,name:"meta.at-rule.each.scss",patterns:[{match:/\b(in|,)\b/dgv,name:"keyword.control.operator"},{include:"#variable"},{include:"#property_values"},{include:"$self"}]},at_rule_else:{begin:/\p{space}*((@)else(\p{space}*(if)?))\p{space}*/dgv,captures:{"1":{name:"keyword.control.else.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*(?=\{)/dgv,name:"meta.at-rule.else.scss",patterns:[{include:"#conditional_operators"},{include:"#variable"},{include:"#property_values"}]},at_rule_extend:{begin:/\p{space}*((@)extend\b)\p{space}*/dgv,captures:{"1":{name:"keyword.control.at-rule.extend.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*(?=;)/dgv,name:"meta.at-rule.extend.scss",patterns:[{include:"#variable"},{include:"#selectors"},{include:"#property_values"}]},at_rule_fontface:{patterns:[{begin:/(?<=^|\n(?!$))\p{space}*((@)font-face\b)/dgv,beginCaptures:{"1":{name:"keyword.control.at-rule.fontface.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*(?=\{)/dgv,name:"meta.at-rule.fontface.scss",patterns:[{include:"#function_attributes"}]}]},at_rule_for:{begin:/\p{space}*((@)for\b)\p{space}*/dgv,captures:{"1":{name:"keyword.control.for.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*(?=\{)/dgv,name:"meta.at-rule.for.scss",patterns:[{match:/(==|!=|<=|>=|<|>|from|to|through)/dgv,name:"keyword.control.operator"},{include:"#variable"},{include:"#property_values"},{include:"$self"}]},at_rule_forward:{begin:/\p{space}*((@)forward\b)\p{space}*/dgv,captures:{"1":{name:"keyword.control.at-rule.forward.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*(?=;)/dgv,name:"meta.at-rule.forward.scss",patterns:[{match:/\b(as|hide|show)\b/dgv,name:"keyword.control.operator"},{captures:{"1":{name:"entity.other.attribute-name.module.scss"},"2":{name:"punctuation.definition.wildcard.scss"}},match:/\b([\p{L}\p{M}\p{N}\p{Pc}\-]+)(\*)/dgv},{match:/\b[\p{L}\p{M}\p{N}\p{Pc}\-]+\b/dgv,name:"entity.name.function.scss"},{include:"#variable"},{include:"#string_single"},{include:"#string_double"},{include:"#comment_line"},{include:"#comment_block"}]},at_rule_function:{patterns:[{begin:/\p{space}*((@)function\b)\p{space}*/dgv,captures:{"1":{name:"keyword.control.at-rule.function.scss"},"2":{name:"punctuation.definition.keyword.scss"},"3":{name:"entity.name.function.scss"}},end:/\p{space}*(?=\{)/dgv,name:"meta.at-rule.function.scss",patterns:[{include:"#function_attributes"}]},{captures:{"1":{name:"keyword.control.at-rule.function.scss"},"2":{name:"punctuation.definition.keyword.scss"},"3":{name:"entity.name.function.scss"}},match:/\p{space}*((@)function\b)\p{space}*/dgv,name:"meta.at-rule.function.scss"}]},at_rule_if:{begin:/\p{space}*((@)if\b)\p{space}*/dgv,captures:{"1":{name:"keyword.control.if.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*(?=\{)/dgv,name:"meta.at-rule.if.scss",patterns:[{include:"#conditional_operators"},{include:"#variable"},{include:"#property_values"}]},at_rule_import:{begin:/\p{space}*((@)import\b)\p{space}*/dgv,captures:{"1":{name:"keyword.control.at-rule.import.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*((?=;)|(?=\}))/dgv,name:"meta.at-rule.import.scss",patterns:[{include:"#variable"},{include:"#string_single"},{include:"#string_double"},{include:"#functions"},{include:"#comment_line"}]},at_rule_include:{patterns:[{begin:/(?<=@include)\p{space}+(?:([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*(\.))?([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*(\()/dgv,beginCaptures:{"1":{name:"variable.scss"},"2":{name:"punctuation.access.module.scss"},"3":{name:"entity.name.function.scss"},"4":{name:"punctuation.definition.parameters.begin.bracket.round.scss"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.parameters.end.bracket.round.scss"}},name:"meta.at-rule.include.scss",patterns:[{include:"#function_attributes"}]},{captures:{"0":{name:"meta.at-rule.include.scss"},"1":{name:"variable.scss"},"2":{name:"punctuation.access.module.scss"},"3":{name:"entity.name.function.scss"}},match:/(?<=@include)\p{space}+(?:([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*(\.))?([\p{L}\p{M}\p{N}\p{Pc}\-]+)/dgv},{captures:{"0":{name:"meta.at-rule.include.scss"},"1":{name:"keyword.control.at-rule.include.scss"},"2":{name:"punctuation.definition.keyword.scss"}},match:/((@)include)\b/dgv}]},at_rule_keyframes:{begin:/(?<=(?<=^|\n(?!$))|\p{space})(@)(?:-(?:webkit|moz)-)?keyframes\b/dgv,beginCaptures:{"0":{name:"keyword.control.at-rule.keyframes.scss"},"1":{name:"punctuation.definition.keyword.scss"}},end:/(?<=\})/dgv,name:"meta.at-rule.keyframes.scss",patterns:[{captures:{"1":{name:"entity.name.function.scss"}},match:/(?<=@keyframes)\p{space}+((?:[_A-Za-z][\-\p{L}\p{M}\p{N}\p{Pc}]|-[_A-Za-z])[\-\p{L}\p{M}\p{N}\p{Pc}]*)/dgv},{begin:/(?<=@keyframes)\p{space}+(")/dgv,beginCaptures:{"1":{name:"punctuation.definition.string.begin.scss"}},contentName:"entity.name.function.scss",end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.scss"}},name:"string.quoted.double.scss",patterns:[{match:/\\(\p{AHex}{1,6}|[^\n])/dgv,name:"constant.character.escape.scss"},{include:"#interpolation"}]},{begin:/(?<=@keyframes)\p{space}+(')/dgv,beginCaptures:{"1":{name:"punctuation.definition.string.begin.scss"}},contentName:"entity.name.function.scss",end:/'/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.scss"}},name:"string.quoted.single.scss",patterns:[{match:/\\(\p{AHex}{1,6}|[^\n])/dgv,name:"constant.character.escape.scss"},{include:"#interpolation"}]},{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.section.keyframes.begin.scss"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.section.keyframes.end.scss"}},patterns:[{match:/\b(?:(?:100|[1-9]\p{Nd}|\p{Nd})%|from|to)(?=\p{space}*\{)/dgv,name:"entity.other.attribute-name.scss"},{include:"#flow_control"},{include:"#interpolation"},{include:"#property_list"},{include:"#rules"}]}]},at_rule_media:{patterns:[{begin:/(?<=^|\n(?!$))\p{space}*((@)media)\b/dgv,beginCaptures:{"1":{name:"keyword.control.at-rule.media.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*(?=\{)/dgv,name:"meta.at-rule.media.scss",patterns:[{include:"#comment_docblock"},{include:"#comment_block"},{include:"#comment_line"},{match:/\b(only)\b/dgv,name:"keyword.control.operator.css.scss"},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.media-query.begin.bracket.round.scss"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.media-query.end.bracket.round.scss"}},name:"meta.property-list.media-query.scss",patterns:[{begin:/(?<![\-a-z])(?=[\-a-z])/dgv,end:/(?=$|\n)|(?![\-a-z])/dgv,name:"meta.property-name.media-query.scss",patterns:[{include:"source.css#media-features"},{include:"source.css#property-names"}]},{begin:/(:)\p{space}*(?!(\p{space}*\{))/dgv,beginCaptures:{"1":{name:"punctuation.separator.key-value.scss"}},contentName:"meta.property-value.media-query.scss",end:/\p{space}*(;|(?=\}|\)))/dgv,endCaptures:{"1":{name:"punctuation.terminator.rule.scss"}},patterns:[{include:"#general"},{include:"#property_values"}]}]},{include:"#variable"},{include:"#conditional_operators"},{include:"source.css#media-types"}]}]},at_rule_mixin:{patterns:[{begin:/(?<=@mixin)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*(\()/dgv,beginCaptures:{"1":{name:"entity.name.function.scss"},"2":{name:"punctuation.definition.parameters.begin.bracket.round.scss"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.parameters.end.bracket.round.scss"}},name:"meta.at-rule.mixin.scss",patterns:[{include:"#function_attributes"}]},{captures:{"1":{name:"entity.name.function.scss"}},match:/(?<=@mixin)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-]+)/dgv,name:"meta.at-rule.mixin.scss"},{captures:{"1":{name:"keyword.control.at-rule.mixin.scss"},"2":{name:"punctuation.definition.keyword.scss"}},match:/((@)mixin)\b/dgv,name:"meta.at-rule.mixin.scss"}]},at_rule_namespace:{patterns:[{begin:/(?<=@namespace)\p{space}+(?=url)/dgv,end:/(?=;|(?=$|\n))/dgv,name:"meta.at-rule.namespace.scss",patterns:[{include:"#property_values"},{include:"#string_single"},{include:"#string_double"}]},{begin:/(?<=@namespace)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-]*)/dgv,captures:{"1":{name:"entity.name.namespace-prefix.scss"}},end:/(?=;|(?=$|\n))/dgv,name:"meta.at-rule.namespace.scss",patterns:[{include:"#variables"},{include:"#property_values"},{include:"#string_single"},{include:"#string_double"}]},{captures:{"1":{name:"keyword.control.at-rule.namespace.scss"},"2":{name:"punctuation.definition.keyword.scss"}},match:/((@)namespace)\b/dgv,name:"meta.at-rule.namespace.scss"}]},at_rule_option:{captures:{"1":{name:"keyword.control.at-rule.charset.scss"},"2":{name:"punctuation.definition.keyword.scss"}},match:/(?<=^|\n(?!$))\p{space}*((@)option\b)\p{space}*/dgv,name:"meta.at-rule.option.scss"},at_rule_page:{patterns:[{begin:/(?<=^|\n(?!$))\p{space}*((@)page)(?=:|\p{space})\p{space}*([\-\:\p{L}\p{M}\p{N}\p{Pc}]*)/dgv,captures:{"1":{name:"keyword.control.at-rule.page.scss"},"2":{name:"punctuation.definition.keyword.scss"},"3":{name:"entity.name.function.scss"}},end:/\p{space}*(?=\{)/dgv,name:"meta.at-rule.page.scss"}]},at_rule_return:{begin:/\p{space}*((@)(return)\b)/dgv,captures:{"1":{name:"keyword.control.return.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*((?=;))/dgv,name:"meta.at-rule.return.scss",patterns:[{include:"#variable"},{include:"#property_values"}]},at_rule_supports:{begin:/(?<=(?<=^|\n(?!$))|\p{space})(@)supports\b/dgv,captures:{"0":{name:"keyword.control.at-rule.supports.scss"},"1":{name:"punctuation.definition.keyword.scss"}},end:/(?=\{)|(?=$|\n)/dgv,name:"meta.at-rule.supports.scss",patterns:[{include:"#logical_operators"},{include:"#properties"},{match:/\(/dgv,name:"punctuation.definition.condition.begin.bracket.round.scss"},{match:/\)/dgv,name:"punctuation.definition.condition.end.bracket.round.scss"}]},at_rule_use:{begin:/\p{space}*((@)use\b)\p{space}*/dgv,captures:{"1":{name:"keyword.control.at-rule.use.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*(?=;)/dgv,name:"meta.at-rule.use.scss",patterns:[{match:/\b(as|with)\b/dgv,name:"keyword.control.operator"},{match:/\b[\p{L}\p{M}\p{N}\p{Pc}\-]+\b/dgv,name:"variable.scss"},{match:/\*/dgv,name:"variable.language.expanded-namespace.scss"},{include:"#string_single"},{include:"#string_double"},{include:"#comment_line"},{include:"#comment_block"},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.parameters.begin.bracket.round.scss"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.parameters.end.bracket.round.scss"}},patterns:[{include:"#function_attributes"}]}]},at_rule_warn:{begin:/\p{space}*((@)(warn|debug|error)\b)\p{space}*/dgv,captures:{"1":{name:"keyword.control.warn.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*(?=;)/dgv,name:"meta.at-rule.warn.scss",patterns:[{include:"#variable"},{include:"#string_double"},{include:"#string_single"}]},at_rule_while:{begin:/\p{space}*((@)while\b)\p{space}*/dgv,captures:{"1":{name:"keyword.control.while.scss"},"2":{name:"punctuation.definition.keyword.scss"}},end:/\p{space}*(?=\})/dgv,name:"meta.at-rule.while.scss",patterns:[{include:"#conditional_operators"},{include:"#variable"},{include:"#property_values"},{include:"$self"}]},comment_block:{begin:/\/\*/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.scss"}},end:/\*\//dgv,endCaptures:{"0":{name:"punctuation.definition.comment.scss"}},name:"comment.block.scss"},comment_docblock:{begin:/\/\/\//dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.scss"}},end:/(?=(?=$|\n))/dgv,name:"comment.block.documentation.scss",patterns:[{include:"source.sassdoc"}]},comment_line:{begin:/\/\//dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.scss"}},end:/\n/dgv,name:"comment.line.scss"},comparison_operators:{match:/==|!=|<=|>=|<|>/dgv,name:"keyword.operator.comparison.scss"},conditional_operators:{patterns:[{include:"#comparison_operators"},{include:"#logical_operators"}]},constant_default:{match:/!default/dgv,name:"keyword.other.default.scss"},constant_functions:{begin:/(?:([\p{L}\p{M}\p{N}\p{Pc}\-]+)(\.))?([\p{L}\p{M}\p{N}\p{Pc}\-]+)(\()/dgv,beginCaptures:{"1":{name:"variable.scss"},"2":{name:"punctuation.access.module.scss"},"3":{name:"support.function.misc.scss"},"4":{name:"punctuation.section.function.scss"}},end:/(\))/dgv,endCaptures:{"1":{name:"punctuation.section.function.scss"}},patterns:[{include:"#parameters"}]},constant_important:{match:/!important/dgv,name:"keyword.other.important.scss"},constant_mathematical_symbols:{match:/\b(\+|-|\*|\/)\b/dgv,name:"support.constant.mathematical-symbols.scss"},constant_optional:{match:/!optional/dgv,name:"keyword.other.optional.scss"},constant_sass_functions:{begin:/(headings|stylesheet-url|rgba?|hsla?|ie-hex-str|red|green|blue|alpha|opacity|hue|saturation|lightness|prefixed|prefix|-moz|-svg|-css2|-pie|-webkit|-ms|font-(?:files|url)|grid-image|image-(?:width|height|url|color)|sprites?|sprite-(?:map|map-name|file|url|position)|inline-(?:font-files|image)|opposite-position|grad-point|grad-end-position|color-stops|color-stops-in-percentages|grad-color-stops|(?:radial|linear)-(?:gradient|svg-gradient)|opacify|fade-?in|transparentize|fade-?out|lighten|darken|saturate|desaturate|grayscale|adjust-(?:hue|lightness|saturation|color)|scale-(?:lightness|saturation|color)|change-color|spin|complement|invert|mix|-compass-(?:list|space-list|slice|nth|list-size)|blank|compact|nth|first-value-of|join|length|append|nest|append-selector|headers|enumerate|range|percentage|unitless|unit|if|type-of|comparable|elements-of-type|quote|unquote|escape|e|sin|cos|tan|abs|round|ceil|floor|pi|translate(?:X|Y))(\()/dgv,beginCaptures:{"1":{name:"support.function.misc.scss"},"2":{name:"punctuation.section.function.scss"}},end:/(\))/dgv,endCaptures:{"1":{name:"punctuation.section.function.scss"}},patterns:[{include:"#parameters"}]},flow_control:{patterns:[{include:"#at_rule_if"},{include:"#at_rule_else"},{include:"#at_rule_warn"},{include:"#at_rule_for"},{include:"#at_rule_while"},{include:"#at_rule_each"},{include:"#at_rule_return"}]},function_attributes:{patterns:[{match:/:/dgv,name:"punctuation.separator.key-value.scss"},{include:"#general"},{include:"#property_values"},{match:/[\=\{\}\?\;\@]/dgv,name:"invalid.illegal.scss"}]},functions:{patterns:[{begin:/([\p{L}\p{M}\p{N}\p{Pc}\-]+)(\()\p{space}*/dgv,beginCaptures:{"1":{name:"support.function.misc.scss"},"2":{name:"punctuation.section.function.scss"}},end:/(\))/dgv,endCaptures:{"1":{name:"punctuation.section.function.scss"}},patterns:[{include:"#parameters"}]},{match:/([\p{L}\p{M}\p{N}\p{Pc}\-]+)/dgv,name:"support.function.misc.scss"}]},general:{patterns:[{include:"#variable"},{include:"#comment_docblock"},{include:"#comment_block"},{include:"#comment_line"}]},interpolation:{begin:/#\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.interpolation.begin.bracket.curly.scss"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.interpolation.end.bracket.curly.scss"}},name:"variable.interpolation.scss",patterns:[{include:"#variable"},{include:"#property_values"}]},logical_operators:{match:/\b(not|or|and)\b/dgv,name:"keyword.operator.logical.scss"},map:{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.map.begin.bracket.round.scss"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.map.end.bracket.round.scss"}},name:"meta.definition.variable.map.scss",patterns:[{include:"#comment_docblock"},{include:"#comment_block"},{include:"#comment_line"},{captures:{"1":{name:"support.type.map.key.scss"},"2":{name:"punctuation.separator.key-value.scss"}},match:/\b([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*(:)/dgv},{match:/,/dgv,name:"punctuation.separator.delimiter.scss"},{include:"#map"},{include:"#variable"},{include:"#property_values"}]},operators:{match:/[\-\+\*\/](?!\p{space}*[\-\+\*\/])/dgv,name:"keyword.operator.css"},parameters:{patterns:[{include:"#variable"},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.begin.bracket.round.scss"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.scss"}},patterns:[{include:"#function_attributes"}]},{include:"#property_values"},{include:"#comment_block"},{match:/[^'"\,\) \t]+/dgv,name:"variable.parameter.url.scss"},{match:/,/dgv,name:"punctuation.separator.delimiter.scss"}]},parent_selector_suffix:{captures:{"1":{name:"punctuation.definition.entity.css"},"2":{patterns:[{include:"#interpolation"},{match:/\\([0-9a-fA-F]{1,6}|[^\n])/dgv,name:"constant.character.escape.scss"},{match:/\$|\}/dgv,name:"invalid.illegal.identifier.scss"}]}},match:/(?<=&)((?:[\-a-zA-Z_0-9]|[^\x00-\x7F]|\\(?:[0-9a-fA-F]{1,6}|[^\n])|#\{|\$|\})+)(?=(?=$|\n)|[\p{space}\,\.\#\)\[\:\{\>\+\~\|]|\/\*)/dgv,name:"entity.other.attribute-name.parent-selector-suffix.css"},properties:{patterns:[{begin:/(?<![\-a-z])(?=[\-a-z])/dgv,end:/(?=$|\n)|(?![\-a-z])/dgv,name:"meta.property-name.scss",patterns:[{include:"source.css#property-names"},{include:"#at_rule_include"}]},{begin:/(:)\p{space}*(?!(\p{space}*\{))/dgv,beginCaptures:{"1":{name:"punctuation.separator.key-value.scss"}},contentName:"meta.property-value.scss",end:/\p{space}*(;|(?=\}|\)))/dgv,endCaptures:{"1":{name:"punctuation.terminator.rule.scss"}},patterns:[{include:"#general"},{include:"#property_values"}]}]},property_list:{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.section.property-list.begin.bracket.curly.scss"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.section.property-list.end.bracket.curly.scss"}},name:"meta.property-list.scss",patterns:[{include:"#flow_control"},{include:"#rules"},{include:"#properties"},{include:"$self"}]},property_values:{patterns:[{include:"#string_single"},{include:"#string_double"},{include:"#constant_functions"},{include:"#constant_sass_functions"},{include:"#constant_important"},{include:"#constant_default"},{include:"#constant_optional"},{include:"source.css#numeric-values"},{include:"source.css#property-keywords"},{include:"source.css#color-keywords"},{include:"source.css#property-names"},{include:"#constant_mathematical_symbols"},{include:"#operators"},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.begin.bracket.round.scss"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.scss"}},patterns:[{include:"#general"},{include:"#property_values"}]}]},rules:{patterns:[{include:"#general"},{include:"#at_rule_extend"},{include:"#at_rule_content"},{include:"#at_rule_include"},{include:"#at_rule_media"},{include:"#selectors"}]},selector_attribute:{captures:{"1":{name:"punctuation.definition.attribute-selector.begin.bracket.square.scss"},"2":{name:"entity.other.attribute-name.attribute.scss",patterns:[{include:"#interpolation"},{match:/\\([0-9a-fA-F]{1,6}|[^\n])/dgv,name:"constant.character.escape.scss"},{match:/\$|\}/dgv,name:"invalid.illegal.scss"}]},"3":{name:"keyword.operator.scss"},"4":{name:"string.unquoted.attribute-value.scss",patterns:[{include:"#interpolation"},{match:/\\([0-9a-fA-F]{1,6}|[^\n])/dgv,name:"constant.character.escape.scss"},{match:/\$|\}/dgv,name:"invalid.illegal.scss"}]},"5":{name:"string.quoted.double.attribute-value.scss"},"6":{name:"punctuation.definition.string.begin.scss"},"7":{patterns:[{include:"#interpolation"},{match:/\\([0-9a-fA-F]{1,6}|[^\n])/dgv,name:"constant.character.escape.scss"},{match:/\$|\}/dgv,name:"invalid.illegal.scss"}]},"8":{name:"punctuation.definition.string.end.scss"},"9":{name:"string.quoted.single.attribute-value.scss"},"10":{name:"punctuation.definition.string.begin.scss"},"11":{patterns:[{include:"#interpolation"},{match:/\\([0-9a-fA-F]{1,6}|[^\n])/dgv,name:"constant.character.escape.scss"},{match:/\$|\}/dgv,name:"invalid.illegal.scss"}]},"12":{name:"punctuation.definition.string.end.scss"},"13":{name:"punctuation.definition.attribute-selector.end.bracket.square.scss"}},match:/(\[)\p{space}*((?:[\-a-zA-Z_0-9]|[^\x00-\x7F]|\\(?:[0-9a-fA-F]{1,6}|[^\n])|#\{|\.?\$|\})+?)(?:\p{space}*([\~\|\^\$\*]?=)\p{space}*(?:((?:[\-a-zA-Z_0-9]|[^\x00-\x7F]|\\(?:[0-9a-fA-F]{1,6}|[^\n])|#\{|\.?\$|\})+)|((")([^\n]*?)("))|((')([^\n]*?)('))))?\p{space}*(\])/dgiv,name:"meta.attribute-selector.scss"},selector_class:{captures:{"1":{name:"punctuation.definition.entity.css"},"2":{patterns:[{include:"#interpolation"},{match:/\\([0-9a-fA-F]{1,6}|[^\n])/dgv,name:"constant.character.escape.scss"},{match:/\$|\}/dgv,name:"invalid.illegal.scss"}]}},match:/(\.)((?:[\-a-zA-Z_0-9]|[^\x00-\x7F]|\\(?:[0-9a-fA-F]{1,6}|[^\n])|#\{|\.?\$|\})+)(?=(?=$|\n)|[\p{space}\,\#\)\[\:\{\>\+\~\|]|\.[^\$]|\/\*|;)/dgv,name:"entity.other.attribute-name.class.css"},selector_custom:{match:/*@__PURE__*/ new EmulatedRegExp("\\b([a-zA-Z0-9]+(-[a-zA-Z0-9]+)+)(?=\\.|(?:(?=($E$\\p{space}+))\\3)[^\\:]|\\p{space}*[\\,\\[\\{]|:(link|visited|hover|active|focus|target|lang|disabled|enabled|checked|indeterminate|root|nth-(child|last-child|of-type|last-of-type)|first-child|last-child|first-of-type|last-of-type|only-child|only-of-type|empty|not|valid|invalid)(\\([0-9A-Za-z]*\\))?)","dgv",{"useEmulationGroups":true}),name:"entity.name.tag.custom.scss"},selector_id:{captures:{"1":{name:"punctuation.definition.entity.css"},"2":{patterns:[{include:"#interpolation"},{match:/\\([0-9a-fA-F]{1,6}|[^\n])/dgv,name:"constant.character.escape.scss"},{match:/\$|\}/dgv,name:"invalid.illegal.identifier.scss"}]}},match:/(#)((?:[\-a-zA-Z_0-9]|[^\x00-\x7F]|\\(?:[0-9a-fA-F]{1,6}|[^\n])|#\{|\.?\$|\})+)(?=(?=$|\n)|[\p{space}\,\#\)\[\:\{\>\+\~\|]|\.[^\$]|\/\*)/dgv,name:"entity.other.attribute-name.id.css"},selector_placeholder:{captures:{"1":{name:"punctuation.definition.entity.css"},"2":{patterns:[{include:"#interpolation"},{match:/\\([0-9a-fA-F]{1,6}|[^\n])/dgv,name:"constant.character.escape.scss"},{match:/\$|\}/dgv,name:"invalid.illegal.identifier.scss"}]}},match:/(%)((?:[\-a-zA-Z_0-9]|[^\x00-\x7F]|\\(?:[0-9a-fA-F]{1,6}|[^\n])|#\{|\.\$|\$|\})+)(?=;|(?=$|\n)|[\p{space}\,\#\)\[\:\{\>\+\~\|]|\.[^\$]|\/\*)/dgv,name:"entity.other.attribute-name.placeholder.css"},selector_pseudo_class:{patterns:[{begin:/((:)\bnth-(?:child|last-child|of-type|last-of-type))(\()/dgv,beginCaptures:{"1":{name:"entity.other.attribute-name.pseudo-class.css"},"2":{name:"punctuation.definition.entity.css"},"3":{name:"punctuation.definition.pseudo-class.begin.bracket.round.css"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.pseudo-class.end.bracket.round.css"}},patterns:[{include:"#interpolation"},{match:/\p{Nd}+/dgv,name:"constant.numeric.css"},{match:/(?<=\p{Nd})n\b|\b(n|even|odd)\b/dgv,name:"constant.other.scss"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"invalid.illegal.scss"}]},{include:"source.css#pseudo-classes"},{include:"source.css#pseudo-elements"},{include:"source.css#functional-pseudo-classes"}]},selectors:{patterns:[{include:"source.css#tag-names"},{include:"#selector_custom"},{include:"#selector_class"},{include:"#selector_id"},{include:"#selector_pseudo_class"},{include:"#tag_wildcard"},{include:"#tag_parent_reference"},{include:"source.css#pseudo-elements"},{include:"#selector_attribute"},{include:"#selector_placeholder"},{include:"#parent_selector_suffix"}]},string_double:{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.scss"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.scss"}},name:"string.quoted.double.scss",patterns:[{match:/\\(\p{AHex}{1,6}|[^\n])/dgv,name:"constant.character.escape.scss"},{include:"#interpolation"}]},string_single:{begin:/'/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.scss"}},end:/'/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.scss"}},name:"string.quoted.single.scss",patterns:[{match:/\\(\p{AHex}{1,6}|[^\n])/dgv,name:"constant.character.escape.scss"},{include:"#interpolation"}]},tag_parent_reference:{match:/&/dgv,name:"entity.name.tag.reference.scss"},tag_wildcard:{match:/\*/dgv,name:"entity.name.tag.wildcard.scss"},variable:{patterns:[{include:"#variables"},{include:"#interpolation"}]},variable_setting:{begin:/(?=\$[\p{L}\p{M}\p{N}\p{Pc}\-]+\p{space}*:)/dgv,contentName:"meta.definition.variable.scss",end:/;/dgv,endCaptures:{"0":{name:"punctuation.terminator.rule.scss"}},patterns:[{match:/\$[\p{L}\p{M}\p{N}\p{Pc}\-]+(?=\p{space}*:)/dgv,name:"variable.scss"},{begin:/:/dgv,beginCaptures:{"0":{name:"punctuation.separator.key-value.scss"}},end:/(?=;)/dgv,patterns:[{include:"#comment_docblock"},{include:"#comment_block"},{include:"#comment_line"},{include:"#map"},{include:"#property_values"},{include:"#variable"},{match:/,/dgv,name:"punctuation.separator.delimiter.scss"}]}]},variables:{patterns:[{captures:{"1":{name:"variable.scss"},"2":{name:"punctuation.access.module.scss"},"3":{name:"variable.scss"}},match:/\b([\p{L}\p{M}\p{N}\p{Pc}\-]+)(\.)(\$[\p{L}\p{M}\p{N}\p{Pc}\-]+)\b/dgv},{match:/(\$|--)[A-Za-z0-9_\-]+\b/dgv,name:"variable.scss"}]}},scopeName:"source.css.scss",embeddedLangs:["css"],aliases:undefined})
|
|
5
5
|
|
|
6
6
|
export default [
|
|
7
7
|
...css,
|
package/dist/shellscript.mjs
CHANGED
|
@@ -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:new EmulatedRegExp("(?:(?=($E$[ \\t]*))\\1)(alias)(?:(?=($E$[ \\t]*))\\3)((?:((?<![\\p{L}\\p{M}\\p{N}\\p{Pc}])-[\\p{L}\\p{M}\\p{N}\\p{Pc}]+\\b)(?:(?=($E$[ \\t]*))\\6))*)(?:(?=($E$[ \\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",{"useEmulationGroups":true}),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:new EmulatedRegExp("(?:(?=($E$[ \\t]+))\\1)(?!(?:&|\\||\\(|\\[|#|\\n|(?=$|\\n)|;))","dgv",{"useEmulationGroups":true}),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:new EmulatedRegExp("(?:(?=($E$[ \\t]*))\\1)([^ \\t\\n\\>\\&\\;\\<\\>\\(\\)\\$\\`\\\\\"'\\<\\|]+(?!>))","dgv",{"useEmulationGroups":true})},{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:new EmulatedRegExp("(?:(?=($E$[ \\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}+)))(\\]))?(?:(?:(=)|(\\+=))|(-=))(?:(?=($E$[ \\t]*))\\10)(\\()","dgv",{"useEmulationGroups":true}),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))(?:((?<=(?<=^|\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:new EmulatedRegExp("(?:(?=($E$\\p{space}*))\\1)(/\\*)","dgv",{"useEmulationGroups":true}),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:new EmulatedRegExp("(\\bcase\\b)(?:(?=($E$[ \\t]*))\\2)([^\\n]+?)(?:(?=($E$[ \\t]*))\\4)(\\bin\\b)","dgv",{"useEmulationGroups":true}),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:new EmulatedRegExp("(?:(?=($E$[ \\t]*))\\1)(\\* *\\))","dgv",{"useEmulationGroups":true})},{begin:new EmulatedRegExp("(?<!\\))(?!(?:(?=($E$[ \\t]*))\\1)(?:esac\\b|(?=$|\\n)))","dgv",{"useEmulationGroups":true}),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:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(?<=|'|"|\}|\))([^ \n\t\r"'\=\;\&\|\`\)\{\<\>]+)/dgv},{begin:/(?:|(?<! |\t|;|\||&|\n|\{|#))(\$?)((?:(")|(')))/dgv,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:new EmulatedRegExp("(?<=\\2)()()","dgv",{"strategy":"not_search_start"}),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:new EmulatedRegExp("(?:(?=($E$[ \\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",{"useEmulationGroups":true}),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:new EmulatedRegExp("(?:(?<=^|\\n(?!$))|(?:(?=($E$[ \\t]+))\\1))(?:((#!)[^\\n]*)|((#)[^\\n]*))","dgv",{"useEmulationGroups":true})},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}|(?<=^|\n(?!$)))\{(?=\p{space}|(?=$|\n))/dgv,beginCaptures:{"0":{name:"punctuation.definition.group.shell"}},end:/(?<=(?<=^|\n(?!$))|;)\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:/(?<=(?<=^|\n(?!$))|;|&| |\t)(?:then|elif|else|done|end|do|if|fi)(?= |\t|;|&|(?=$|\n))/dgv,name:"keyword.control.$0.shell"}]},for_statement:{patterns:[{begin:new EmulatedRegExp("(\\bfor\\b)(?:(?=($E$[ \\t]*))\\2)((?<![\\p{L}\\p{M}\\p{N}\\p{Pc}])[a-zA-Z_0-9\\-]+(?![\\p{L}\\p{M}\\p{N}\\p{Pc}]))(?:(?=($E$[ \\t]*))\\4)(\\bin\\b)","dgv",{"useEmulationGroups":true}),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:new EmulatedRegExp("(?:(?=($E$[ \\t]*))\\1)(?:(\\bfunction\\b)(?:(?=($E$[ \\t]*))\\3)([^ \\t\\n\\r\\(\\)\\=\"']+)(?:(\\()(?:(?=($E$[ \\t]*))\\6)(\\)))?|([^ \\t\\n\\r\\(\\)\\=\"']+)(?:(?=($E$[ \\t]*))\\9)(\\()(?:(?=($E$[ \\t]*))\\11)(\\)))","dgv",{"useEmulationGroups":true}),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:new EmulatedRegExp("((?<!<)<<-)(?:(?=($E$[ \\t]*))\\2)(\"|')(?:(?=($E$[ \\t]*))\\4)([^\"']+?)(?=\\p{space}|;|&|<|\"|')(\\3)([^\\n]*)","dgv",{"useEmulationGroups":true}),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:/(?<=^|\n(?!$))\t*\3(?=\p{space}|;|&|(?=$|\n))()()()/dgv,endCaptures:{"0":{name:"punctuation.definition.string.heredoc.$0.shell"}},patterns:[]},{begin:new EmulatedRegExp("((?<!<)<<(?!<))(?:(?=($E$[ \\t]*))\\2)(\"|')(?:(?=($E$[ \\t]*))\\4)([^\"']+?)(?=\\p{space}|;|&|<|\"|')(\\3)([^\\n]*)","dgv",{"useEmulationGroups":true}),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:/(?<=^|\n(?!$))\3(?=\p{space}|;|&|(?=$|\n))()()()/dgv,endCaptures:{"0":{name:"punctuation.definition.string.heredoc.delimiter.shell"}},patterns:[]},{begin:new EmulatedRegExp("((?<!<)<<-)(?:(?=($E$[ \\t]*))\\2)([^\"' \\t]+)(?=\\p{space}|;|&|<|\"|')([^\\n]*)","dgv",{"useEmulationGroups":true}),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:/(?<=^|\n(?!$))\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:new EmulatedRegExp("((?<!<)<<(?!<))(?:(?=($E$[ \\t]*))\\2)([^\"' \\t]+)(?=\\p{space}|;|&|<|\"|')([^\\n]*)","dgv",{"useEmulationGroups":true}),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:/(?<=^|\n(?!$))\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:new EmulatedRegExp("(/\\*)((?:(?=($E$(?:[^\\*]|(?:(?=($E$\\*+))\\4)[^\\/])*))\\3)((?:(?=($E$\\*+))\\6)/))","dgv",{"useEmulationGroups":true})},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:new EmulatedRegExp("","dgv",{"strategy":"not_search_start"}),patterns:[{begin:/#/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.shell"}},end:/(?=`)/dgv,name:"comment.line.number-sign.shell"}]},{include:"#initial_context"}]}]},keyword:{patterns:[{match:/(?<=(?<=^|\n(?!$))|;|&|\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:/(?<=(?<=^|\n(?!$))|;|&|\p{space})(?:export|declare|typeset|local|readonly)(?=\p{space}|;|&|(?=$|\n))/dgv,name:"storage.modifier.shell"}]},line_comment:{begin:new EmulatedRegExp("(?:(?=($E$\\p{space}*))\\1)(//)","dgv",{"useEmulationGroups":true}),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"},{comment:"do we want a special rule for ( expr )?",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:/(?<=(?<=^|\n(?!$))|;|&|\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:/(?<=(?<=^|\n(?!$))|;|&|\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:/(?<=(?<=^|\n(?!$))|;|&|\p{space})(while|until)(?=\p{space}|;|&|(?=$|\n))/dgv,beginCaptures:{"1":{name:"keyword.control.shell"}},end:/(?<=(?<=^|\n(?!$))|;|&|\p{space})done(?=\p{space}|;|&|(?=$|\n)|\))/dgv,endCaptures:{"0":{name:"keyword.control.shell"}},name:"meta.scope.while-loop.shell",patterns:[{include:"#initial_context"}]},{begin:/(?<=(?<=^|\n(?!$))|;|&|\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:/(?<=(?<=^|\n(?!$))|;|&|\p{space})(done)(?=\p{space}|;|&|(?=$|\n)|\))/dgv,endCaptures:{"1":{name:"keyword.control.shell"}},name:"meta.scope.select-block.shell",patterns:[{include:"#initial_context"}]},{begin:/(?<=(?<=^|\n(?!$))|;|&|\p{space})if(?=\p{space}|;|&|(?=$|\n))/dgv,beginCaptures:{"0":{name:"keyword.control.if.shell"}},end:/(?<=(?<=^|\n(?!$))|;|&|\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}|\/|%|<[\<\=]?|>[\>\=]?|==|!=|(?<=^|\n(?!$))|\|{1,2}|&{1,2}|\?|:|,|=|[\*\/\%\+\-\&\^\|]=|<<=|>>=/dgv,name:"keyword.operator.arithmetic.shell"},{match:/0[xX][0-9A-Fa-f]+/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}|\/|%|<[\<\=]?|>[\>\=]?|==|!=|(?<=^|\n(?!$))|\|{1,2}|&{1,2}|\?|:|,|=|[\*\/\%\+\-\&\^\|]=|<<=|>>=/dgv,name:"keyword.operator.arithmetic.shell"},{match:/0[xX][0-9A-Fa-f]+/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:/(?<=(?<=^|\n(?!$))|;|&|[ \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|(?<=^|\n(?!$))|\{|\(|\[)(?:(?:(?:(?:(?:(0[xX][0-9A-Fa-f]+)|(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:/(?<=(?<=^|\n(?!$))|;|&|[ \t])(?:readonly|declare|typeset|export|local)(?=[ \t]|;|&|(?=$|\n))/dgv,name:"storage.modifier.$0.shell"},normal_assignment_statement:{begin:new EmulatedRegExp("(?:(?=($E$[ \\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",{"useEmulationGroups":true}),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:new EmulatedRegExp("(?!(?<=^|\\n(?!$))(?:(?=($E$[ \\t]*))\\1)(?=$|\\n))(?:(?<=(?<=^|\\n(?!$))until | until |\\tuntil |(?<=^|\\n(?!$))while | while |\\twhile |(?<=^|\\n(?!$))elif | elif |\\telif |(?<=^|\\n(?!$))else | else |\\telse |(?<=^|\\n(?!$))then | then |\\tthen |(?<=^|\\n(?!$))do | do |\\tdo |(?<=^|\\n(?!$))if | if |\\tif )|(?<=(?:(?<=^|\\n(?!$))|;|\\||&|!|\\(|\\{|`)))(?:(?=($E$[ \\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",{"useEmulationGroups":true}),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|(?<=^|\n(?!$))|\{|\(|\[)(?:(?:(?:(?:(?:(0[xX][0-9A-Fa-f]+)|(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:new EmulatedRegExp("(?:(?=($E$[ \\t]+))\\1)(-)((?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|(?=$|\\n)|;|[ \\t])))","dgv",{"useEmulationGroups":true}),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}|:|=|(?<=^|\n(?!$)))~/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:/(?<=(?<=^|\n(?!$))|;|&|\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:new EmulatedRegExp("(>>?)(?:(?=($E$[ \\t]*))\\2)([^ \\t\\n\\>\\&\\;\\<\\>\\(\\)\\$\\`\\\\\"'\\<\\|]+)","dgv",{"useEmulationGroups":true})},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:new EmulatedRegExp("(?:(?=($E$[ \\t]+))\\1)(-)([\\p{L}\\p{M}\\p{N}\\p{Pc}]+)","dgv",{"useEmulationGroups":true})}]}},match:new EmulatedRegExp("(?:(?:(?=($E$[ \\t]+))\\1)-[\\p{L}\\p{M}\\p{N}\\p{Pc}]+)*","dgv",{"useEmulationGroups":true})},simple_unquoted:{match:/[^ \t\n\>\&\;\<\>\(\)\$\`\\"'\<\|]/dgv,name:"string.unquoted.shell"},special_expansion:{match:/!|:[\-\=\?]?|\*|@|##|#|%%|%|\//dgv,name:"keyword.operator.expansion.shell"},start_of_command:{match:new EmulatedRegExp("(?:(?=($E$[ \\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",{"useEmulationGroups":true})},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:/\\(?:a|b|e|f|n|r|t|v|\\|')/dgv,name:"constant.character.escape.ansi-c.shell"},{match:/\\[0-9]{3}"/dgv,name:"constant.character.escape.octal.shell"},{match:/\\x[0-9a-fA-F]{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:/(?<=(?<=^|\n(?!$))|;|&|\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:new EmulatedRegExp("(\\$)(\\{)(?:(?=($E$[ \\t]*))\\3)(?=\\p{Nd})","dgv",{"useEmulationGroups":true}),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("(?:(?=($E$[ \\t]*))\\1)(alias)(?:(?=($E$[ \\t]*))\\3)((?:((?<![\\p{L}\\p{M}\\p{N}\\p{Pc}])-[\\p{L}\\p{M}\\p{N}\\p{Pc}]+\\b)(?:(?=($E$[ \\t]*))\\6))*)(?:(?=($E$[ \\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",{"useEmulationGroups":true}),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("(?:(?=($E$[ \\t]+))\\1)(?!(?:&|\\||\\(|\\[|#|\\n|(?=$|\\n)|;))","dgv",{"useEmulationGroups":true}),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("(?:(?=($E$[ \\t]*))\\1)([^ \\t\\n\\>\\&\\;\\<\\>\\(\\)\\$\\`\\\\\"'\\<\\|]+(?!>))","dgv",{"useEmulationGroups":true})},{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("(?:(?=($E$[ \\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}+)))(\\]))?(?:(?:(=)|(\\+=))|(-=))(?:(?=($E$[ \\t]*))\\10)(\\()","dgv",{"useEmulationGroups":true}),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))(?:((?<=(?<=^|\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("(?:(?=($E$\\p{space}*))\\1)(/\\*)","dgv",{"useEmulationGroups":true}),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)(?:(?=($E$[ \\t]*))\\2)([^\\n]+?)(?:(?=($E$[ \\t]*))\\4)(\\bin\\b)","dgv",{"useEmulationGroups":true}),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("(?:(?=($E$[ \\t]*))\\1)(\\* *\\))","dgv",{"useEmulationGroups":true})},{begin:/*@__PURE__*/ new EmulatedRegExp("(?<!\\))(?!(?:(?=($E$[ \\t]*))\\1)(?:esac\\b|(?=$|\\n)))","dgv",{"useEmulationGroups":true}),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":"search_start_clip"})},{begin:/*@__PURE__*/ new EmulatedRegExp("(?:^|(?<! |\\t|;|\\||&|\\n|\\{|#))(\\$?)((?:(\")|(')))","dgv",{"strategy":"search_start_clip"}),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":"search_start_clip"}),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("(?:(?=($E$[ \\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",{"useEmulationGroups":true}),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("(?:(?<=^|\\n(?!$))|(?:(?=($E$[ \\t]+))\\1))(?:((#!)[^\\n]*)|((#)[^\\n]*))","dgv",{"useEmulationGroups":true})},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}|(?<=^|\n(?!$)))\{(?=\p{space}|(?=$|\n))/dgv,beginCaptures:{"0":{name:"punctuation.definition.group.shell"}},end:/(?<=(?<=^|\n(?!$))|;)\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:/(?<=(?<=^|\n(?!$))|;|&| |\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)(?:(?=($E$[ \\t]*))\\2)((?<![\\p{L}\\p{M}\\p{N}\\p{Pc}])[a-zA-Z_0-9\\-]+(?![\\p{L}\\p{M}\\p{N}\\p{Pc}]))(?:(?=($E$[ \\t]*))\\4)(\\bin\\b)","dgv",{"useEmulationGroups":true}),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("(?:(?=($E$[ \\t]*))\\1)(?:(\\bfunction\\b)(?:(?=($E$[ \\t]*))\\3)([^ \\t\\n\\r\\(\\)\\=\"']+)(?:(\\()(?:(?=($E$[ \\t]*))\\6)(\\)))?|([^ \\t\\n\\r\\(\\)\\=\"']+)(?:(?=($E$[ \\t]*))\\9)(\\()(?:(?=($E$[ \\t]*))\\11)(\\)))","dgv",{"useEmulationGroups":true}),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("((?<!<)<<-)(?:(?=($E$[ \\t]*))\\2)(\"|')(?:(?=($E$[ \\t]*))\\4)([^\"']+?)(?=\\p{space}|;|&|<|\"|')(\\3)([^\\n]*)","dgv",{"useEmulationGroups":true}),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:/(?<=^|\n(?!$))\t*\3(?=\p{space}|;|&|(?=$|\n))()()()/dgv,endCaptures:{"0":{name:"punctuation.definition.string.heredoc.$0.shell"}},patterns:[]},{begin:/*@__PURE__*/ new EmulatedRegExp("((?<!<)<<(?!<))(?:(?=($E$[ \\t]*))\\2)(\"|')(?:(?=($E$[ \\t]*))\\4)([^\"']+?)(?=\\p{space}|;|&|<|\"|')(\\3)([^\\n]*)","dgv",{"useEmulationGroups":true}),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:/(?<=^|\n(?!$))\3(?=\p{space}|;|&|(?=$|\n))()()()/dgv,endCaptures:{"0":{name:"punctuation.definition.string.heredoc.delimiter.shell"}},patterns:[]},{begin:/*@__PURE__*/ new EmulatedRegExp("((?<!<)<<-)(?:(?=($E$[ \\t]*))\\2)([^\"' \\t]+)(?=\\p{space}|;|&|<|\"|')([^\\n]*)","dgv",{"useEmulationGroups":true}),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:/(?<=^|\n(?!$))\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("((?<!<)<<(?!<))(?:(?=($E$[ \\t]*))\\2)([^\"' \\t]+)(?=\\p{space}|;|&|<|\"|')([^\\n]*)","dgv",{"useEmulationGroups":true}),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:/(?<=^|\n(?!$))\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("(/\\*)((?:(?=($E$(?:[^\\*]|(?:(?=($E$\\*+))\\4)[^\\/])*))\\3)((?:(?=($E$\\*+))\\6)/))","dgv",{"useEmulationGroups":true})},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":"search_start_clip"}),patterns:[{begin:/#/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.shell"}},end:/(?=`)/dgv,name:"comment.line.number-sign.shell"}]},{include:"#initial_context"}]}]},keyword:{patterns:[{match:/(?<=(?<=^|\n(?!$))|;|&|\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:/(?<=(?<=^|\n(?!$))|;|&|\p{space})(?:export|declare|typeset|local|readonly)(?=\p{space}|;|&|(?=$|\n))/dgv,name:"storage.modifier.shell"}]},line_comment:{begin:/*@__PURE__*/ new EmulatedRegExp("(?:(?=($E$\\p{space}*))\\1)(//)","dgv",{"useEmulationGroups":true}),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"},{comment:"do we want a special rule for ( expr )?",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:/(?<=(?<=^|\n(?!$))|;|&|\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:/(?<=(?<=^|\n(?!$))|;|&|\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:/(?<=(?<=^|\n(?!$))|;|&|\p{space})(while|until)(?=\p{space}|;|&|(?=$|\n))/dgv,beginCaptures:{"1":{name:"keyword.control.shell"}},end:/(?<=(?<=^|\n(?!$))|;|&|\p{space})done(?=\p{space}|;|&|(?=$|\n)|\))/dgv,endCaptures:{"0":{name:"keyword.control.shell"}},name:"meta.scope.while-loop.shell",patterns:[{include:"#initial_context"}]},{begin:/(?<=(?<=^|\n(?!$))|;|&|\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:/(?<=(?<=^|\n(?!$))|;|&|\p{space})(done)(?=\p{space}|;|&|(?=$|\n)|\))/dgv,endCaptures:{"1":{name:"keyword.control.shell"}},name:"meta.scope.select-block.shell",patterns:[{include:"#initial_context"}]},{begin:/(?<=(?<=^|\n(?!$))|;|&|\p{space})if(?=\p{space}|;|&|(?=$|\n))/dgv,beginCaptures:{"0":{name:"keyword.control.if.shell"}},end:/(?<=(?<=^|\n(?!$))|;|&|\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}|\/|%|<[\<\=]?|>[\>\=]?|==|!=|(?<=^|\n(?!$))|\|{1,2}|&{1,2}|\?|:|,|=|[\*\/\%\+\-\&\^\|]=|<<=|>>=/dgv,name:"keyword.operator.arithmetic.shell"},{match:/0[xX][0-9A-Fa-f]+/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}|\/|%|<[\<\=]?|>[\>\=]?|==|!=|(?<=^|\n(?!$))|\|{1,2}|&{1,2}|\?|:|,|=|[\*\/\%\+\-\&\^\|]=|<<=|>>=/dgv,name:"keyword.operator.arithmetic.shell"},{match:/0[xX][0-9A-Fa-f]+/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:/(?<=(?<=^|\n(?!$))|;|&|[ \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|(?<=^|\n(?!$))|\{|\(|\[)(?:(?:(?:(?:(?:(0[xX][0-9A-Fa-f]+)|(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:/(?<=(?<=^|\n(?!$))|;|&|[ \t])(?:readonly|declare|typeset|export|local)(?=[ \t]|;|&|(?=$|\n))/dgv,name:"storage.modifier.$0.shell"},normal_assignment_statement:{begin:/*@__PURE__*/ new EmulatedRegExp("(?:(?=($E$[ \\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",{"useEmulationGroups":true}),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("(?!(?<=^|\\n(?!$))(?:(?=($E$[ \\t]*))\\1)(?=$|\\n))(?:(?<=(?<=^|\\n(?!$))until | until |\\tuntil |(?<=^|\\n(?!$))while | while |\\twhile |(?<=^|\\n(?!$))elif | elif |\\telif |(?<=^|\\n(?!$))else | else |\\telse |(?<=^|\\n(?!$))then | then |\\tthen |(?<=^|\\n(?!$))do | do |\\tdo |(?<=^|\\n(?!$))if | if |\\tif )|(?<=(?:(?<=^|\\n(?!$))|;|\\||&|!|\\(|\\{|`)))(?:(?=($E$[ \\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",{"useEmulationGroups":true}),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|(?<=^|\n(?!$))|\{|\(|\[)(?:(?:(?:(?:(?:(0[xX][0-9A-Fa-f]+)|(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("(?:(?=($E$[ \\t]+))\\1)(-)((?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|(?=$|\\n)|;|[ \\t])))","dgv",{"useEmulationGroups":true}),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}|:|=|(?<=^|\n(?!$)))~/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:/(?<=(?<=^|\n(?!$))|;|&|\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("(>>?)(?:(?=($E$[ \\t]*))\\2)([^ \\t\\n\\>\\&\\;\\<\\>\\(\\)\\$\\`\\\\\"'\\<\\|]+)","dgv",{"useEmulationGroups":true})},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("(?:(?=($E$[ \\t]+))\\1)(-)([\\p{L}\\p{M}\\p{N}\\p{Pc}]+)","dgv",{"useEmulationGroups":true})}]}},match:/*@__PURE__*/ new EmulatedRegExp("(?:(?:(?=($E$[ \\t]+))\\1)-[\\p{L}\\p{M}\\p{N}\\p{Pc}]+)*","dgv",{"useEmulationGroups":true})},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("(?:(?=($E$[ \\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",{"useEmulationGroups":true})},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:/\\(?:a|b|e|f|n|r|t|v|\\|')/dgv,name:"constant.character.escape.ansi-c.shell"},{match:/\\[0-9]{3}"/dgv,name:"constant.character.escape.octal.shell"},{match:/\\x[0-9a-fA-F]{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:/(?<=(?<=^|\n(?!$))|;|&|\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("(\\$)(\\{)(?:(?=($E$[ \\t]*))\\3)(?=\\p{Nd})","dgv",{"useEmulationGroups":true}),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/smalltalk.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EmulatedRegExp } from 'oniguruma-to-es'
|
|
2
2
|
|
|
3
|
-
const lang = Object.freeze({displayName:"Smalltalk",fileTypes:["st"],foldingStartMarker:/\[/dgv,foldingStopMarker:/(?<=^|\n(?!$))\p{space}*\]|(?<=^|\n(?!$))\p{space}\]/dgv,name:"smalltalk",patterns:[{match:/\$[^\n]/dgv,name:"constant.character.smalltalk"},{match:/\b(class)\b/dgv,name:"storage.type.$1.smalltalk"},{match:/\b(extend|super|self)\b/dgv,name:"storage.modifier.$1.smalltalk"},{match:/\b(yourself|new|Smalltalk)\b/dgv,name:"keyword.control.$1.smalltalk"},{match:/:=/dgv,name:"keyword.operator.assignment.smalltalk"},{comment:"Parse the variable declaration like: |a b c|",match:/\/(?<=^|\n(?!$)):[\p{L}\p{M}\p{N}\p{Pc}]*\p{space}*\|\//dgv,name:"constant.other.block.smalltalk"},{captures:{"1":{name:"punctuation.definition.instance-variables.begin.smalltalk"},"2":{patterns:[{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"support.type.variable.declaration.smalltalk"}]},"3":{name:"punctuation.definition.instance-variables.end.smalltalk"}},match:/(\|)(\p{space}*[\p{L}\p{M}\p{N}\p{Pc}][\p{L}\p{M}\p{N}\p{Pc} ]*)(\|)/dgv},{captures:{"1":{patterns:[{match:/:[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.function.block.smalltalk"}]}},comment:"Parse the blocks like: [ :a :b | ...... ]",match:/\[((\p{space}+|:[\p{L}\p{M}\p{N}\p{Pc}]+)*)\|/dgv},{include:"#numeric"},{match:/<(?!<|=)|>(?!<|=|>)|<=|>=|=|==|~=|~~|>>|\^/dgv,name:"keyword.operator.comparison.smalltalk"},{match:/(\*|\+|-|\/|\\)/dgv,name:"keyword.operator.arithmetic.smalltalk"},{match:/(?<=[ \t])!+|\bnot\b|&|\band\b|\||\bor\b/dgv,name:"keyword.operator.logical.smalltalk"},{comment:"Fake reserved word -> main Smalltalk messages",match:/(?<!\.)\b(ensure|resume|retry|signal)\b(?![\?\!])/dgv,name:"keyword.control.smalltalk"},{comment:"Fake conditionals. Smalltalk Methods.",match:/ifCurtailed:|ifTrue:|ifFalse:|whileFalse:|whileTrue:/dgv,name:"keyword.control.conditionals.smalltalk"},{captures:{"1":{name:"entity.other.inherited-class.smalltalk"},"3":{name:"keyword.control.smalltalk"},"4":{name:"entity.name.type.class.smalltalk"}},match:/([\p{L}\p{M}\p{N}\p{Pc}]+)(\p{space}+(subclass:))\p{space}*([\p{L}\p{M}\p{N}\p{Pc}]*)/dgv,name:"meta.class.smalltalk"},{begin:/"/dgv,beginCaptures:[{name:"punctuation.definition.comment.begin.smalltalk"}],end:/"/dgv,endCaptures:[{name:"punctuation.definition.comment.end.smalltalk"}],name:"comment.block.smalltalk"},{match:/\b(true|false)\b/dgv,name:"constant.language.boolean.smalltalk"},{match:/\b(nil)\b/dgv,name:"constant.language.nil.smalltalk"},{captures:{"1":{name:"punctuation.definition.constant.smalltalk"}},comment:"messages/methods",match
|
|
3
|
+
const lang = Object.freeze({displayName:"Smalltalk",fileTypes:["st"],foldingStartMarker:/\[/dgv,foldingStopMarker:/(?<=^|\n(?!$))\p{space}*\]|(?<=^|\n(?!$))\p{space}\]/dgv,name:"smalltalk",patterns:[{match:/\$[^\n]/dgv,name:"constant.character.smalltalk"},{match:/\b(class)\b/dgv,name:"storage.type.$1.smalltalk"},{match:/\b(extend|super|self)\b/dgv,name:"storage.modifier.$1.smalltalk"},{match:/\b(yourself|new|Smalltalk)\b/dgv,name:"keyword.control.$1.smalltalk"},{match:/:=/dgv,name:"keyword.operator.assignment.smalltalk"},{comment:"Parse the variable declaration like: |a b c|",match:/\/(?<=^|\n(?!$)):[\p{L}\p{M}\p{N}\p{Pc}]*\p{space}*\|\//dgv,name:"constant.other.block.smalltalk"},{captures:{"1":{name:"punctuation.definition.instance-variables.begin.smalltalk"},"2":{patterns:[{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"support.type.variable.declaration.smalltalk"}]},"3":{name:"punctuation.definition.instance-variables.end.smalltalk"}},match:/(\|)(\p{space}*[\p{L}\p{M}\p{N}\p{Pc}][\p{L}\p{M}\p{N}\p{Pc} ]*)(\|)/dgv},{captures:{"1":{patterns:[{match:/:[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.function.block.smalltalk"}]}},comment:"Parse the blocks like: [ :a :b | ...... ]",match:/\[((\p{space}+|:[\p{L}\p{M}\p{N}\p{Pc}]+)*)\|/dgv},{include:"#numeric"},{match:/<(?!<|=)|>(?!<|=|>)|<=|>=|=|==|~=|~~|>>|\^/dgv,name:"keyword.operator.comparison.smalltalk"},{match:/(\*|\+|-|\/|\\)/dgv,name:"keyword.operator.arithmetic.smalltalk"},{match:/(?<=[ \t])!+|\bnot\b|&|\band\b|\||\bor\b/dgv,name:"keyword.operator.logical.smalltalk"},{comment:"Fake reserved word -> main Smalltalk messages",match:/(?<!\.)\b(ensure|resume|retry|signal)\b(?![\?\!])/dgv,name:"keyword.control.smalltalk"},{comment:"Fake conditionals. Smalltalk Methods.",match:/ifCurtailed:|ifTrue:|ifFalse:|whileFalse:|whileTrue:/dgv,name:"keyword.control.conditionals.smalltalk"},{captures:{"1":{name:"entity.other.inherited-class.smalltalk"},"3":{name:"keyword.control.smalltalk"},"4":{name:"entity.name.type.class.smalltalk"}},match:/([\p{L}\p{M}\p{N}\p{Pc}]+)(\p{space}+(subclass:))\p{space}*([\p{L}\p{M}\p{N}\p{Pc}]*)/dgv,name:"meta.class.smalltalk"},{begin:/"/dgv,beginCaptures:[{name:"punctuation.definition.comment.begin.smalltalk"}],end:/"/dgv,endCaptures:[{name:"punctuation.definition.comment.end.smalltalk"}],name:"comment.block.smalltalk"},{match:/\b(true|false)\b/dgv,name:"constant.language.boolean.smalltalk"},{match:/\b(nil)\b/dgv,name:"constant.language.nil.smalltalk"},{captures:{"1":{name:"punctuation.definition.constant.smalltalk"}},comment:"messages/methods",match:/*@__PURE__*/ new EmulatedRegExp("(?:(?=($E$[a-zA-Z_][\\p{L}\\p{M}\\p{N}\\p{Pc}]*(?:(?=($E$[\\?\\!]))\\2)?))\\1)(:)(?!:)","dgv",{"useEmulationGroups":true}),name:"constant.other.messages.smalltalk"},{captures:{"1":{name:"punctuation.definition.constant.smalltalk"}},comment:"symbols",match:/(#)[a-zA-Z_][a-zA-Z0-9_\:]*/dgv,name:"constant.other.symbol.smalltalk"},{begin:/#\[/dgv,beginCaptures:[{name:"punctuation.definition.constant.begin.smalltalk"}],end:/\]/dgv,endCaptures:[{name:"punctuation.definition.constant.end.smalltalk"}],name:"meta.array.byte.smalltalk",patterns:[{match:/[0-9]+(r[a-zA-Z0-9]+)?/dgv,name:"constant.numeric.integer.smalltalk"},{match:/[^\p{space}\]]+/dgv,name:"invalid.illegal.character-not-allowed-here.smalltalk"}]},{begin:/#\(/dgv,beginCaptures:[{name:"punctuation.definition.constant.begin.smalltalk"}],comment:"Array Constructor",end:/\)/dgv,endCaptures:[{name:"punctuation.definition.constant.end.smalltalk"}],name:"constant.other.array.smalltalk"},{begin:/'/dgv,beginCaptures:[{name:"punctuation.definition.string.begin.smalltalk"}],end:/'/dgv,endCaptures:[{name:"punctuation.definition.string.end.smalltalk"}],name:"string.quoted.single.smalltalk"},{match:/\b[A-Z][\p{L}\p{M}\p{N}\p{Pc}]*\b/dgv,name:"variable.other.constant.smalltalk"}],repository:{numeric:{patterns:[{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])[0-9]+\.[0-9]+s[0-9]*/dgv,name:"constant.numeric.float.scaled.smalltalk"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])[0-9]+\.[0-9]+([edq]-?[0-9]+)?/dgv,name:"constant.numeric.float.smalltalk"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])-?[0-9]+r[a-zA-Z0-9]+/dgv,name:"constant.numeric.integer.radix.smalltalk"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])-?[0-9]+([edq]-?[0-9]+)?/dgv,name:"constant.numeric.integer.smalltalk"}]}},scopeName:"source.smalltalk",embeddedLangs:undefined,aliases:undefined})
|
|
4
4
|
|
|
5
5
|
export default [
|
|
6
6
|
lang
|
package/dist/sql.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EmulatedRegExp } from 'oniguruma-to-es'
|
|
2
2
|
|
|
3
|
-
const lang = Object.freeze({displayName:"SQL",name:"sql",patterns:[{match:/((?<!@)@)\b([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,name:"text.variable"},{match:/(\[)[^\]]*(\])/dgv,name:"text.bracketed"},{include:"#comments"},{captures:{"1":{name:"keyword.other.create.sql"},"2":{name:"keyword.other.sql"},"5":{name:"entity.name.function.sql"}},match:/(?<=^|\n(?!$))\p{space}*([Cc][Rr][Ee][Aa][Tt][Ee](?:\p{space}+[Oo][Rr]\p{space}+[Rr][Ee][Pp][Ll][Aa][Cc][Ee])?)\p{space}+([Aa][Gg][Gg][Rr][Ee][Gg][Aa][Tt][Ee]|[Cc][Oo][Nn][Vv][Ee][Rr][Ssſ][Ii][Oo][Nn]|[Dd][Aa][Tt][Aa][Bb][Aa][Ssſ][Ee]|[Dd][Oo][Mm][Aa][Ii][Nn]|[Ff][Uu][Nn][Cc][Tt][Ii][Oo][Nn]|[Gg][Rr][Oo][Uu][Pp]|([Uu][Nn][Ii][Qq][Uu][Ee]\p{space}+)?[Ii][Nn][Dd][Ee][Xx]|[Ll][Aa][Nn][Gg][Uu][Aa][Gg][Ee]|[Oo][Pp][Ee][Rr][Aa][Tt][Oo][Rr] [Cc][Ll][Aa][Ssſ][Ssſ]|[Oo][Pp][Ee][Rr][Aa][Tt][Oo][Rr]|[Rr][Uu][Ll][Ee]|[Ssſ][Cc][Hh][Ee][Mm][Aa]|[Ssſ][Ee][Qq][Uu][Ee][Nn][Cc][Ee]|[Tt][Aa][Bb][Ll][Ee]|[Tt][Aa][Bb][Ll][Ee][Ssſ][Pp][Aa][Cc][Ee]|[Tt][Rr][Ii][Gg][Gg][Ee][Rr]|[Tt][Yy][Pp][Ee]|[Uu][Ssſ][Ee][Rr]|[Vv][Ii][Ee][Ww])\p{space}+(['"\`]?)([\p{L}\p{M}\p{N}\p{Pc}]+)\4/dgv,name:"meta.create.sql"},{captures:{"1":{name:"keyword.other.create.sql"},"2":{name:"keyword.other.sql"}},match:/(?<=^|\n(?!$))\p{space}*(drop)\p{space}+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view)/dgiv,name:"meta.drop.sql"},{captures:{"1":{name:"keyword.other.create.sql"},"2":{name:"keyword.other.table.sql"},"3":{name:"entity.name.function.sql"},"4":{name:"keyword.other.cascade.sql"}},match:/\p{space}*(drop)\p{space}+(table)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}]+)(\p{space}+cascade)?\b/dgiv,name:"meta.drop.sql"},{captures:{"1":{name:"keyword.other.create.sql"},"2":{name:"keyword.other.table.sql"}},match:/(?<=^|\n(?!$))\p{space}*(alter)\p{space}+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|proc(edure)?|rule|schema|sequence|table|tablespace|trigger|type|user|view)\p{space}+/dgiv,name:"meta.alter.sql"},{captures:{"1":{name:"storage.type.sql"},"2":{name:"storage.type.sql"},"3":{name:"constant.numeric.sql"},"4":{name:"storage.type.sql"},"5":{name:"constant.numeric.sql"},"6":{name:"storage.type.sql"},"7":{name:"constant.numeric.sql"},"8":{name:"constant.numeric.sql"},"9":{name:"storage.type.sql"},"10":{name:"constant.numeric.sql"},"11":{name:"storage.type.sql"},"12":{name:"storage.type.sql"},"13":{name:"storage.type.sql"},"14":{name:"constant.numeric.sql"},"15":{name:"storage.type.sql"}},match:/\b(bigint|bigserial|bit|boolean|box|bytea|cidr|circle|date|double\p{space}precision|inet|int|integer|line|lseg|macaddr|money|oid|path|point|polygon|real|serial|smallint|sysdate|text)\b|\b(bit\p{space}varying|character\p{space}(?:varying)?|tinyint|var\p{space}char|float|interval)\((\p{Nd}+)\)|\b(char|number|varchar\p{Nd}?)\b(?:\((\p{Nd}+)\))?|\b(numeric|decimal)\b(?:\((\p{Nd}+),(\p{Nd}+)\))?|\b(times?)\b(?:\((\p{Nd}+)\))?(\p{space}with(?:out)?\p{space}time\p{space}zone\b)?|\b(timestamp)(?:(s|tz))?\b(?:\((\p{Nd}+)\))?(\p{space}(with|without)\p{space}time\p{space}zone\b)?/dgiv},{match:/\b((?:primary|foreign)\p{space}+key|references|on\p{space}delete(\p{space}+cascade)?|nocheck|check|constraint|collate|default)\b/dgiv,name:"storage.modifier.sql"},{match:/\b\p{Nd}+\b/dgv,name:"constant.numeric.sql"},{match:/\b(select(\p{space}+(all|distinct))?|insert\p{space}+(ignore\p{space}+)?into|update|delete|from|set|where|group\p{space}+by|or|like|and|union(\p{space}+all)?|having|order\p{space}+by|limit|cross\p{space}+join|join|straight_join|(inner|(left|right|full)(\p{space}+outer)?)\p{space}+join|natural(\p{space}+(inner|(left|right|full)(\p{space}+outer)?))?\p{space}+join)\b/dgiv,name:"keyword.other.DML.sql"},{match:/\b(on|off|((is\p{space}+)?not\p{space}+)?null)\b/dgiv,name:"keyword.other.DDL.create.II.sql"},{match:/\bvalues\b/dgiv,name:"keyword.other.DML.II.sql"},{match:/\b(begin(\p{space}+work)?|start\p{space}+transaction|commit(\p{space}+work)?|rollback(\p{space}+work)?)\b/dgiv,name:"keyword.other.LUW.sql"},{match:/\b(grant(\p{space}with\p{space}grant\p{space}option)?|revoke)\b/dgiv,name:"keyword.other.authorization.sql"},{match:/\bin\b/dgiv,name:"keyword.other.data-integrity.sql"},{match:/(?<=^|\n(?!$))\p{space}*(comment\p{space}+on\p{space}+(table|column|aggregate|constraint|database|domain|function|index|operator|rule|schema|sequence|trigger|type|view))\p{space}+[^\n]*?\p{space}+(is)\p{space}+/dgiv,name:"keyword.other.object-comments.sql"},{match:/\bAS\b/dgiv,name:"keyword.other.alias.sql"},{match:/\b(DESC|ASC)\b/dgiv,name:"keyword.other.order.sql"},{match:/\*/dgv,name:"keyword.operator.star.sql"},{match:/[\!\<\>]?=|<>|<|>/dgv,name:"keyword.operator.comparison.sql"},{match:/-|\+|\//dgv,name:"keyword.operator.math.sql"},{match:/\|\|/dgv,name:"keyword.operator.concatenator.sql"},{captures:{"1":{name:"support.function.aggregate.sql"}},match:/\b(approx_count_distinct|approx_percentile_cont|approx_percentile_disc|avg|checksum_agg|count|count_big|group|grouping|grouping_id|max|min|sum|stdev|stdevp|var|varp)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.analytic.sql"}},match:/\b(cume_dist|first_value|lag|last_value|lead|percent_rank|percentile_cont|percentile_disc)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.bitmanipulation.sql"}},match:/\b(bit_count|get_bit|left_shift|right_shift|set_bit)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.conversion.sql"}},match:/\b(cast|convert|parse|try_cast|try_convert|try_parse)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.collation.sql"}},match:/\b(collationproperty|tertiary_weights)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.cryptographic.sql"}},match:/\b(asymkey_id|asymkeyproperty|certproperty|cert_id|crypt_gen_random|decryptbyasymkey|decryptbycert|decryptbykey|decryptbykeyautoasymkey|decryptbykeyautocert|decryptbypassphrase|encryptbyasymkey|encryptbycert|encryptbykey|encryptbypassphrase|hashbytes|is_objectsigned|key_guid|key_id|key_name|signbyasymkey|signbycert|symkeyproperty|verifysignedbycert|verifysignedbyasymkey)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.cursor.sql"}},match:/\b(cursor_status)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.datetime.sql"}},match:/\b(sysdatetime|sysdatetimeoffset|sysutcdatetime|current_time(stamp)?|getdate|getutcdate|datename|datepart|day|month|year|datefromparts|datetime2fromparts|datetimefromparts|datetimeoffsetfromparts|smalldatetimefromparts|timefromparts|datediff|dateadd|datetrunc|eomonth|switchoffset|todatetimeoffset|isdate|date_bucket)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.datatype.sql"}},match:/\b(datalength|ident_current|ident_incr|ident_seed|identity|sql_variant_property)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.expression.sql"}},match:/\b(coalesce|nullif)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.globalvar.sql"}},match:/(?<!@)@@\b(cursor_rows|connections|cpu_busy|datefirst|dbts|error|fetch_status|identity|idle|io_busy|langid|language|lock_timeout|max_connections|max_precision|nestlevel|options|packet_errors|pack_received|pack_sent|procid|remserver|rowcount|servername|servicename|spid|textsize|timeticks|total_errors|total_read|total_write|trancount|version)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.json.sql"}},match:/\b(json|isjson|json_object|json_array|json_value|json_query|json_modify|json_path_exists)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.logical.sql"}},match:/\b(choose|iif|greatest|least)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.mathematical.sql"}},match:/\b(abs|acos|asin|atan|atn2|ceiling|cos|cot|degrees|exp|floor|log|log10|pi|power|radians|rand|round|sign|sin|sqrt|square|tan)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.metadata.sql"}},match:/\b(app_name|applock_mode|applock_test|assemblyproperty|col_length|col_name|columnproperty|database_principal_id|databasepropertyex|db_id|db_name|file_id|file_idex|file_name|filegroup_id|filegroup_name|filegroupproperty|fileproperty|fulltextcatalogproperty|fulltextserviceproperty|index_col|indexkey_property|indexproperty|object_definition|object_id|object_name|object_schema_name|objectproperty|objectpropertyex|original_db_name|parsename|schema_id|schema_name|scope_identity|serverproperty|stats_date|type_id|type_name|typeproperty)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.ranking.sql"}},match:/\b(rank|dense_rank|ntile|row_number)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.rowset.sql"}},match:/\b(generate_series|opendatasource|openjson|openrowset|openquery|openxml|predict|string_split)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.security.sql"}},match:/\b(certencoded|certprivatekey|current_user|database_principal_id|has_perms_by_name|is_member|is_rolemember|is_srvrolemember|original_login|permissions|pwdcompare|pwdencrypt|schema_id|schema_name|session_user|suser_id|suser_sid|suser_sname|system_user|suser_name|user_id|user_name)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.string.sql"}},match:/\b(ascii|char|charindex|concat|difference|format|left|len|lower|ltrim|nchar|nodes|patindex|quotename|replace|replicate|reverse|right|rtrim|soundex|space|str|string_agg|string_escape|string_split|stuff|substring|translate|trim|unicode|upper)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.system.sql"}},match:/\b(binary_checksum|checksum|compress|connectionproperty|context_info|current_request_id|current_transaction_id|decompress|error_line|error_message|error_number|error_procedure|error_severity|error_state|formatmessage|get_filestream_transaction_context|getansinull|host_id|host_name|isnull|isnumeric|min_active_rowversion|newid|newsequentialid|rowcount_big|session_context|session_id|xact_state)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.textimage.sql"}},match:/\b(patindex|textptr|textvalid)\b\p{space}*\(/dgiv},{captures:{"1":{name:"constant.other.database-name.sql"},"2":{name:"constant.other.table-name.sql"}},match:/([\p{L}\p{M}\p{N}\p{Pc}]+?)\.([\p{L}\p{M}\p{N}\p{Pc}]+)/dgv},{include:"#strings"},{include:"#regexps"},{match:/\b(abort|abort_after_wait|absent|absolute|accent_sensitivity|acceptable_cursopt|acp|action|activation|add|address|admin|aes_128|aes_192|aes_256|affinity|after|aggregate|algorithm|all_constraints|all_errormsgs|all_indexes|all_levels|all_results|allow_connections|allow_dup_row|allow_encrypted_value_modifications|allow_page_locks|allow_row_locks|allow_snapshot_isolation|alter|altercolumn|always|anonymous|ansi_defaults|ansi_null_default|ansi_null_dflt_off|ansi_null_dflt_on|ansi_nulls|ansi_padding|ansi_warnings|appdomain|append|application|apply|arithabort|arithignore|array|assembly|asymmetric|asynchronous_commit|at|atan2|atomic|attach|attach_force_rebuild_log|attach_rebuild_log|audit|auth_realm|authentication|auto|auto_cleanup|auto_close|auto_create_statistics|auto_drop|auto_shrink|auto_update_statistics|auto_update_statistics_async|automated_backup_preference|automatic|autopilot|availability|availability_mode|backup|backup_priority|base64|basic|batches|batchsize|before|between|bigint|binary|binding|bit|block|blockers|blocksize|bmk|both|break|broker|broker_instance|bucket_count|buffer|buffercount|bulk_logged|by|call|caller|card|case|catalog|catch|cert|certificate|change_retention|change_tracking|change_tracking_context|changes|char|character|character_set|check_expiration|check_policy|checkconstraints|checkindex|checkpoint|checksum|cleanup_policy|clear|clear_port|close|clustered|codepage|collection|column_encryption_key|column_master_key|columnstore|columnstore_archive|colv_80_to_100|colv_100_to_80|commit_differential_base|committed|compatibility_level|compress_all_row_groups|compression|compression_delay|concat_null_yields_null|concatenate|configuration|connect|connection|containment|continue|continue_after_error|contract|contract_name|control|conversation|conversation_group_id|conversation_handle|copy|copy_only|count_rows|counter|create(\\s+or\\s+alter)?|credential|cross|cryptographic|cryptographic_provider|cube|cursor|cursor_close_on_commit|cursor_default|data|data_compression|data_flush_interval_seconds|data_mirroring|data_purity|data_source|database|database_name|database_snapshot|datafiletype|date_correlation_optimization|date|datefirst|dateformat|date_format|datetime|datetime2|datetimeoffset|day(s)?|db_chaining|dbid|dbidexec|dbo_only|deadlock_priority|deallocate|dec|decimal|declare|decrypt|decrypt_a|decryption|default_database|default_fulltext_language|default_language|default_logon_domain|default_schema|definition|delay|delayed_durability|delimitedtext|density_vector|dependent|des|description|desired_state|desx|differential|digest|disable|disable_broker|disable_def_cnst_chk|disabled|disk|distinct|distributed|distribution|drop|drop_existing|dts_buffers|dump|durability|dynamic|edition|elements|else|emergency|empty|enable|enable_broker|enabled|encoding|encrypted|encrypted_value|encryption|encryption_type|end|endpoint|endpoint_url|enhancedintegrity|entry|error_broker_conversations|errorfile|estimateonly|event|except|exec|executable|execute|exists|expand|expiredate|expiry_date|explicit|external|external_access|failover|failover_mode|failure_condition_level|fast|fast_forward|fastfirstrow|federated_service_account|fetch|field_terminator|fieldterminator|file|filelistonly|filegroup|filegrowth|filename|filestream|filestream_log|filestream_on|filetable|file_format|filter|first_row|fips_flagger|fire_triggers|first|firstrow|float|flush_interval_seconds|fmtonly|following|for|force|force_failover_allow_data_loss|force_service_allow_data_loss|forced|forceplan|formatfile|format_options|format_type|formsof|forward_only|free_cursors|free_exec_context|fullscan|fulltext|fulltextall|fulltextkey|function|generated|get|geography|geometry|global|go|goto|governor|guid|hadoop|hardening|hash|hashed|header_limit|headeronly|health_check_timeout|hidden|hierarchyid|histogram|histogram_steps|hits_cursors|hits_exec_context|hour(s)?|http|identity|identity_value|if|ifnull|ignore|ignore_constraints|ignore_dup_key|ignore_dup_row|ignore_triggers|image|immediate|implicit_transactions|include|include_null_values|incremental|index|inflectional|init|initiator|insensitive|insert|instead|int|integer|integrated|intersect|intermediate|interval_length_minutes|into|inuse_cursors|inuse_exec_context|io|is|isabout|iso_week|isolation|job_tracker_location|json|keep|keep_nulls|keep_replication|keepdefaults|keepfixed|keepidentity|keepnulls|kerberos|key|key_path|key_source|key_store_provider_name|keyset|kill|kilobytes_per_batch|labelonly|langid|language|last|lastrow|leading|legacy_cardinality_estimation|length|level|lifetime|lineage_80_to_100|lineage_100_to_80|listener_ip|listener_port|load|loadhistory|lob_compaction|local|local_service_name|locate|location|lock_escalation|lock_timeout|lockres|log|login|login_type|loop|manual|mark_in_use_for_removal|masked|master|match|matched|max_queue_readers|max_duration|max_outstanding_io_per_volume|maxdop|maxerrors|maxlength|maxtransfersize|max_plans_per_query|max_storage_size_mb|mediadescription|medianame|mediapassword|memogroup|memory_optimized|merge|message|message_forward_size|message_forwarding|microsecond|millisecond|minute(s)?|mirror_address|misses_cursors|misses_exec_context|mixed|modify|money|month|move|multi_user|must_change|name|namespace|nanosecond|native|native_compilation|nchar|ncharacter|nested_triggers|never|new_account|new_broker|newname|next|no|no_browsetable|no_checksum|no_compression|no_infomsgs|no_triggers|no_truncate|nocount|noexec|noexpand|noformat|noinit|nolock|nonatomic|nonclustered|nondurable|none|norecompute|norecovery|noreset|norewind|noskip|not|notification|nounload|now|nowait|ntext|ntlm|nulls|numeric|numeric_roundabort|nvarchar|object|objid|oem|offline|old_account|online|operation_mode|open|openjson|optimistic|option|orc|out|outer|output|over|override|owner|ownership|pad_index|page|page_checksum|page_verify|pagecount|paglock|param|parameter_sniffing|parameter_type_expansion|parameterization|parquet|parseonly|partial|partition|partner|password|path|pause|percentage|permission_set|persisted|period|physical_only|plan_forcing_mode|policy|pool|population|ports|preceding|precision|predicate|presume_abort|primary|primary_role|print|prior|priority |priority_level|private|proc(edure)?|procedure_name|profile|provider|quarter|query_capture_mode|query_governor_cost_limit|query_optimizer_hotfixes|query_store|queue|quoted_identifier|raiserror|range|raw|rcfile|rc2|rc4|rc4_128|rdbms|read_committed_snapshot|read|read_only|read_write|readcommitted|readcommittedlock|readonly|readpast|readuncommitted|readwrite|real|rebuild|receive|recmodel_70backcomp|recompile|reconfigure|recovery|recursive|recursive_triggers|redo_queue|reject_sample_value|reject_type|reject_value|relative|remote|remote_data_archive|remote_proc_transactions|remote_service_name|remove|removed_cursors|removed_exec_context|reorganize|repeat|repeatable|repeatableread|replace|replica|replicated|replnick_100_to_80|replnickarray_80_to_100|replnickarray_100_to_80|required|required_cursopt|resample|reset|resource|resource_manager_location|respect|restart|restore|restricted_user|resume|retaindays|retention|return|revert|rewind|rewindonly|returns|robust|role|rollup|root|round_robin|route|row|rowdump|rowguidcol|rowlock|row_terminator|rows|rows_per_batch|rowsets_only|rowterminator|rowversion|rsa_1024|rsa_2048|rsa_3072|rsa_4096|rsa_512|safe|safety|sample|save|scalar|schema|schemabinding|scoped|scroll|scroll_locks|sddl|second|secexpr|seconds|secondary|secondary_only|secondary_role|secret|security|securityaudit|selective|self|send|sent|sequence|serde_method|serializable|server|service|service_broker|service_name|service_objective|session_timeout|session|sessions|seterror|setopts|sets|shard_map_manager|shard_map_name|sharded|shared_memory|shortest_path|show_statistics|showplan_all|showplan_text|showplan_xml|showplan_xml_with_recompile|shrinkdb|shutdown|sid|signature|simple|single_blob|single_clob|single_nclob|single_user|singleton|site|size|size_based_cleanup_mode|skip|smalldatetime|smallint|smallmoney|snapshot|snapshot_import|snapshotrestorephase|soap|softnuma|sort_in_tempdb|sorted_data|sorted_data_reorg|spatial|sql|sql_bigint|sql_binary|sql_bit|sql_char|sql_date|sql_decimal|sql_double|sql_float|sql_guid|sql_handle|sql_longvarbinary|sql_longvarchar|sql_numeric|sql_real|sql_smallint|sql_time|sql_timestamp|sql_tinyint|sql_tsi_day|sql_tsi_frac_second|sql_tsi_hour|sql_tsi_minute|sql_tsi_month|sql_tsi_quarter|sql_tsi_second|sql_tsi_week|sql_tsi_year|sql_type_date|sql_type_time|sql_type_timestamp|sql_varbinary|sql_varchar|sql_variant|sql_wchar|sql_wlongvarchar|ssl|ssl_port|standard|standby|start|start_date|started|stat_header|state|statement|static|statistics|statistics_incremental|statistics_norecompute|statistics_only|statman|stats|stats_stream|status|stop|stop_on_error|stopat|stopatmark|stopbeforemark|stoplist|stopped|string_delimiter|subject|supplemental_logging|supported|suspend|symmetric|synchronous_commit|synonym|sysname|system|system_time|system_versioning|table|tableresults|tablock|tablockx|take|tape|target|target_index|target_partition|target_recovery_time|tcp|temporal_history_retention|text|textimage_on|then|thesaurus|throw|time|timeout|timestamp|tinyint|to|top|torn_page_detection|track_columns_updated|trailing|tran|transaction|transfer|transform_noise_words|triple_des|triple_des_3key|truncate|trustworthy|try|tsql|two_digit_year_cutoff|type|type_desc|type_warning|tzoffset|uid|unbounded|uncommitted|unique|uniqueidentifier|unlimited|unload|unlock|unsafe|updlock|url|use|useplan|useroptions|use_type_default|using|utcdatetime|valid_xml|validation|value|values|varbinary|varchar|verbose|verifyonly|version|view_metadata|virtual_device|visiblity|wait_at_low_priority|waitfor|webmethod|week|weekday|weight|well_formed_xml|when|while|widechar|widechar_ansi|widenative|window|windows|with|within|within group|witness|without|without_array_wrapper|workload|wsdl|xact_abort|xlock|xml|xmlschema|xquery|xsinil|year|zone)\b/dgiv,name:"keyword.other.sql"},{captures:{"1":{name:"punctuation.section.scope.begin.sql"},"2":{name:"punctuation.section.scope.end.sql"}},comment:"Allow for special ↩ behavior",match:/(\()(\))/dgv,name:"meta.block.sql"}],repository:{"comment-block":{begin:/\/\*/dgv,captures:{"0":{name:"punctuation.definition.comment.sql"}},end:/\*\//dgv,name:"comment.block",patterns:[{include:"#comment-block"}]},comments:{patterns:[{begin:/((?<=^|\n(?!$))[ \t]+)?(?=--)/dgv,beginCaptures:{"1":{name:"punctuation.whitespace.comment.leading.sql"}},end:new EmulatedRegExp("","dgv",{"strategy":"not_search_start"}),patterns:[{begin:/--/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.sql"}},end:/\n/dgv,name:"comment.line.double-dash.sql"}]},{begin:/((?<=^|\n(?!$))[ \t]+)?(?=#)/dgv,beginCaptures:{"1":{name:"punctuation.whitespace.comment.leading.sql"}},end:new EmulatedRegExp("","dgv",{"strategy":"not_search_start"}),patterns:[]},{include:"#comment-block"}]},regexps:{patterns:[{begin:/\/(?=\P{space}[^\n]*\/)/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.sql"}},end:/\//dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.sql"}},name:"string.regexp.sql",patterns:[{include:"#string_interpolation"},{match:/\\\//dgv,name:"constant.character.escape.slash.sql"}]},{begin:/%r\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.sql"}},comment:"We should probably handle nested bracket pairs!?! -- Allan",end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.sql"}},name:"string.regexp.modr.sql",patterns:[{include:"#string_interpolation"}]}]},string_escape:{match:/\\[^\n]/dgv,name:"constant.character.escape.sql"},string_interpolation:{captures:{"1":{name:"punctuation.definition.string.begin.sql"},"3":{name:"punctuation.definition.string.end.sql"}},match:/(#\{)([^\}]*)(\})/dgv,name:"string.interpolated.sql"},strings:{patterns:[{captures:{"2":{name:"punctuation.definition.string.begin.sql"},"3":{name:"punctuation.definition.string.end.sql"}},comment:"this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.",match:/(N)?(')[^']*(')/dgv,name:"string.quoted.single.sql"},{begin:/'/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.sql"}},end:/'/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.sql"}},name:"string.quoted.single.sql",patterns:[{include:"#string_escape"}]},{captures:{"1":{name:"punctuation.definition.string.begin.sql"},"2":{name:"punctuation.definition.string.end.sql"}},comment:"this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.",match:/(`)[^\`\\]*(`)/dgv,name:"string.quoted.other.backtick.sql"},{begin:/`/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.sql"}},end:/`/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.sql"}},name:"string.quoted.other.backtick.sql",patterns:[{include:"#string_escape"}]},{captures:{"1":{name:"punctuation.definition.string.begin.sql"},"2":{name:"punctuation.definition.string.end.sql"}},comment:"this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.",match:/(")[^"\#]*(")/dgv,name:"string.quoted.double.sql"},{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.sql"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.sql"}},name:"string.quoted.double.sql",patterns:[{include:"#string_interpolation"}]},{begin:/%\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.sql"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.sql"}},name:"string.other.quoted.brackets.sql",patterns:[{include:"#string_interpolation"}]}]}},scopeName:"source.sql",embeddedLangs:undefined,aliases:undefined})
|
|
3
|
+
const lang = Object.freeze({displayName:"SQL",name:"sql",patterns:[{match:/((?<!@)@)\b([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,name:"text.variable"},{match:/(\[)[^\]]*(\])/dgv,name:"text.bracketed"},{include:"#comments"},{captures:{"1":{name:"keyword.other.create.sql"},"2":{name:"keyword.other.sql"},"5":{name:"entity.name.function.sql"}},match:/(?<=^|\n(?!$))\p{space}*([Cc][Rr][Ee][Aa][Tt][Ee](?:\p{space}+[Oo][Rr]\p{space}+[Rr][Ee][Pp][Ll][Aa][Cc][Ee])?)\p{space}+([Aa][Gg][Gg][Rr][Ee][Gg][Aa][Tt][Ee]|[Cc][Oo][Nn][Vv][Ee][Rr][Ssſ][Ii][Oo][Nn]|[Dd][Aa][Tt][Aa][Bb][Aa][Ssſ][Ee]|[Dd][Oo][Mm][Aa][Ii][Nn]|[Ff][Uu][Nn][Cc][Tt][Ii][Oo][Nn]|[Gg][Rr][Oo][Uu][Pp]|([Uu][Nn][Ii][Qq][Uu][Ee]\p{space}+)?[Ii][Nn][Dd][Ee][Xx]|[Ll][Aa][Nn][Gg][Uu][Aa][Gg][Ee]|[Oo][Pp][Ee][Rr][Aa][Tt][Oo][Rr] [Cc][Ll][Aa][Ssſ][Ssſ]|[Oo][Pp][Ee][Rr][Aa][Tt][Oo][Rr]|[Rr][Uu][Ll][Ee]|[Ssſ][Cc][Hh][Ee][Mm][Aa]|[Ssſ][Ee][Qq][Uu][Ee][Nn][Cc][Ee]|[Tt][Aa][Bb][Ll][Ee]|[Tt][Aa][Bb][Ll][Ee][Ssſ][Pp][Aa][Cc][Ee]|[Tt][Rr][Ii][Gg][Gg][Ee][Rr]|[Tt][Yy][Pp][Ee]|[Uu][Ssſ][Ee][Rr]|[Vv][Ii][Ee][Ww])\p{space}+(['"\`]?)([\p{L}\p{M}\p{N}\p{Pc}]+)\4/dgv,name:"meta.create.sql"},{captures:{"1":{name:"keyword.other.create.sql"},"2":{name:"keyword.other.sql"}},match:/(?<=^|\n(?!$))\p{space}*(drop)\p{space}+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view)/dgiv,name:"meta.drop.sql"},{captures:{"1":{name:"keyword.other.create.sql"},"2":{name:"keyword.other.table.sql"},"3":{name:"entity.name.function.sql"},"4":{name:"keyword.other.cascade.sql"}},match:/\p{space}*(drop)\p{space}+(table)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}]+)(\p{space}+cascade)?\b/dgiv,name:"meta.drop.sql"},{captures:{"1":{name:"keyword.other.create.sql"},"2":{name:"keyword.other.table.sql"}},match:/(?<=^|\n(?!$))\p{space}*(alter)\p{space}+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|proc(edure)?|rule|schema|sequence|table|tablespace|trigger|type|user|view)\p{space}+/dgiv,name:"meta.alter.sql"},{captures:{"1":{name:"storage.type.sql"},"2":{name:"storage.type.sql"},"3":{name:"constant.numeric.sql"},"4":{name:"storage.type.sql"},"5":{name:"constant.numeric.sql"},"6":{name:"storage.type.sql"},"7":{name:"constant.numeric.sql"},"8":{name:"constant.numeric.sql"},"9":{name:"storage.type.sql"},"10":{name:"constant.numeric.sql"},"11":{name:"storage.type.sql"},"12":{name:"storage.type.sql"},"13":{name:"storage.type.sql"},"14":{name:"constant.numeric.sql"},"15":{name:"storage.type.sql"}},match:/\b(bigint|bigserial|bit|boolean|box|bytea|cidr|circle|date|double\p{space}precision|inet|int|integer|line|lseg|macaddr|money|oid|path|point|polygon|real|serial|smallint|sysdate|text)\b|\b(bit\p{space}varying|character\p{space}(?:varying)?|tinyint|var\p{space}char|float|interval)\((\p{Nd}+)\)|\b(char|number|varchar\p{Nd}?)\b(?:\((\p{Nd}+)\))?|\b(numeric|decimal)\b(?:\((\p{Nd}+),(\p{Nd}+)\))?|\b(times?)\b(?:\((\p{Nd}+)\))?(\p{space}with(?:out)?\p{space}time\p{space}zone\b)?|\b(timestamp)(?:(s|tz))?\b(?:\((\p{Nd}+)\))?(\p{space}(with|without)\p{space}time\p{space}zone\b)?/dgiv},{match:/\b((?:primary|foreign)\p{space}+key|references|on\p{space}delete(\p{space}+cascade)?|nocheck|check|constraint|collate|default)\b/dgiv,name:"storage.modifier.sql"},{match:/\b\p{Nd}+\b/dgv,name:"constant.numeric.sql"},{match:/\b(select(\p{space}+(all|distinct))?|insert\p{space}+(ignore\p{space}+)?into|update|delete|from|set|where|group\p{space}+by|or|like|and|union(\p{space}+all)?|having|order\p{space}+by|limit|cross\p{space}+join|join|straight_join|(inner|(left|right|full)(\p{space}+outer)?)\p{space}+join|natural(\p{space}+(inner|(left|right|full)(\p{space}+outer)?))?\p{space}+join)\b/dgiv,name:"keyword.other.DML.sql"},{match:/\b(on|off|((is\p{space}+)?not\p{space}+)?null)\b/dgiv,name:"keyword.other.DDL.create.II.sql"},{match:/\bvalues\b/dgiv,name:"keyword.other.DML.II.sql"},{match:/\b(begin(\p{space}+work)?|start\p{space}+transaction|commit(\p{space}+work)?|rollback(\p{space}+work)?)\b/dgiv,name:"keyword.other.LUW.sql"},{match:/\b(grant(\p{space}with\p{space}grant\p{space}option)?|revoke)\b/dgiv,name:"keyword.other.authorization.sql"},{match:/\bin\b/dgiv,name:"keyword.other.data-integrity.sql"},{match:/(?<=^|\n(?!$))\p{space}*(comment\p{space}+on\p{space}+(table|column|aggregate|constraint|database|domain|function|index|operator|rule|schema|sequence|trigger|type|view))\p{space}+[^\n]*?\p{space}+(is)\p{space}+/dgiv,name:"keyword.other.object-comments.sql"},{match:/\bAS\b/dgiv,name:"keyword.other.alias.sql"},{match:/\b(DESC|ASC)\b/dgiv,name:"keyword.other.order.sql"},{match:/\*/dgv,name:"keyword.operator.star.sql"},{match:/[\!\<\>]?=|<>|<|>/dgv,name:"keyword.operator.comparison.sql"},{match:/-|\+|\//dgv,name:"keyword.operator.math.sql"},{match:/\|\|/dgv,name:"keyword.operator.concatenator.sql"},{captures:{"1":{name:"support.function.aggregate.sql"}},match:/\b(approx_count_distinct|approx_percentile_cont|approx_percentile_disc|avg|checksum_agg|count|count_big|group|grouping|grouping_id|max|min|sum|stdev|stdevp|var|varp)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.analytic.sql"}},match:/\b(cume_dist|first_value|lag|last_value|lead|percent_rank|percentile_cont|percentile_disc)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.bitmanipulation.sql"}},match:/\b(bit_count|get_bit|left_shift|right_shift|set_bit)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.conversion.sql"}},match:/\b(cast|convert|parse|try_cast|try_convert|try_parse)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.collation.sql"}},match:/\b(collationproperty|tertiary_weights)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.cryptographic.sql"}},match:/\b(asymkey_id|asymkeyproperty|certproperty|cert_id|crypt_gen_random|decryptbyasymkey|decryptbycert|decryptbykey|decryptbykeyautoasymkey|decryptbykeyautocert|decryptbypassphrase|encryptbyasymkey|encryptbycert|encryptbykey|encryptbypassphrase|hashbytes|is_objectsigned|key_guid|key_id|key_name|signbyasymkey|signbycert|symkeyproperty|verifysignedbycert|verifysignedbyasymkey)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.cursor.sql"}},match:/\b(cursor_status)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.datetime.sql"}},match:/\b(sysdatetime|sysdatetimeoffset|sysutcdatetime|current_time(stamp)?|getdate|getutcdate|datename|datepart|day|month|year|datefromparts|datetime2fromparts|datetimefromparts|datetimeoffsetfromparts|smalldatetimefromparts|timefromparts|datediff|dateadd|datetrunc|eomonth|switchoffset|todatetimeoffset|isdate|date_bucket)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.datatype.sql"}},match:/\b(datalength|ident_current|ident_incr|ident_seed|identity|sql_variant_property)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.expression.sql"}},match:/\b(coalesce|nullif)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.globalvar.sql"}},match:/(?<!@)@@\b(cursor_rows|connections|cpu_busy|datefirst|dbts|error|fetch_status|identity|idle|io_busy|langid|language|lock_timeout|max_connections|max_precision|nestlevel|options|packet_errors|pack_received|pack_sent|procid|remserver|rowcount|servername|servicename|spid|textsize|timeticks|total_errors|total_read|total_write|trancount|version)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.json.sql"}},match:/\b(json|isjson|json_object|json_array|json_value|json_query|json_modify|json_path_exists)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.logical.sql"}},match:/\b(choose|iif|greatest|least)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.mathematical.sql"}},match:/\b(abs|acos|asin|atan|atn2|ceiling|cos|cot|degrees|exp|floor|log|log10|pi|power|radians|rand|round|sign|sin|sqrt|square|tan)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.metadata.sql"}},match:/\b(app_name|applock_mode|applock_test|assemblyproperty|col_length|col_name|columnproperty|database_principal_id|databasepropertyex|db_id|db_name|file_id|file_idex|file_name|filegroup_id|filegroup_name|filegroupproperty|fileproperty|fulltextcatalogproperty|fulltextserviceproperty|index_col|indexkey_property|indexproperty|object_definition|object_id|object_name|object_schema_name|objectproperty|objectpropertyex|original_db_name|parsename|schema_id|schema_name|scope_identity|serverproperty|stats_date|type_id|type_name|typeproperty)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.ranking.sql"}},match:/\b(rank|dense_rank|ntile|row_number)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.rowset.sql"}},match:/\b(generate_series|opendatasource|openjson|openrowset|openquery|openxml|predict|string_split)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.security.sql"}},match:/\b(certencoded|certprivatekey|current_user|database_principal_id|has_perms_by_name|is_member|is_rolemember|is_srvrolemember|original_login|permissions|pwdcompare|pwdencrypt|schema_id|schema_name|session_user|suser_id|suser_sid|suser_sname|system_user|suser_name|user_id|user_name)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.string.sql"}},match:/\b(ascii|char|charindex|concat|difference|format|left|len|lower|ltrim|nchar|nodes|patindex|quotename|replace|replicate|reverse|right|rtrim|soundex|space|str|string_agg|string_escape|string_split|stuff|substring|translate|trim|unicode|upper)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.system.sql"}},match:/\b(binary_checksum|checksum|compress|connectionproperty|context_info|current_request_id|current_transaction_id|decompress|error_line|error_message|error_number|error_procedure|error_severity|error_state|formatmessage|get_filestream_transaction_context|getansinull|host_id|host_name|isnull|isnumeric|min_active_rowversion|newid|newsequentialid|rowcount_big|session_context|session_id|xact_state)\b\p{space}*\(/dgiv},{captures:{"1":{name:"support.function.textimage.sql"}},match:/\b(patindex|textptr|textvalid)\b\p{space}*\(/dgiv},{captures:{"1":{name:"constant.other.database-name.sql"},"2":{name:"constant.other.table-name.sql"}},match:/([\p{L}\p{M}\p{N}\p{Pc}]+?)\.([\p{L}\p{M}\p{N}\p{Pc}]+)/dgv},{include:"#strings"},{include:"#regexps"},{match:/\b(abort|abort_after_wait|absent|absolute|accent_sensitivity|acceptable_cursopt|acp|action|activation|add|address|admin|aes_128|aes_192|aes_256|affinity|after|aggregate|algorithm|all_constraints|all_errormsgs|all_indexes|all_levels|all_results|allow_connections|allow_dup_row|allow_encrypted_value_modifications|allow_page_locks|allow_row_locks|allow_snapshot_isolation|alter|altercolumn|always|anonymous|ansi_defaults|ansi_null_default|ansi_null_dflt_off|ansi_null_dflt_on|ansi_nulls|ansi_padding|ansi_warnings|appdomain|append|application|apply|arithabort|arithignore|array|assembly|asymmetric|asynchronous_commit|at|atan2|atomic|attach|attach_force_rebuild_log|attach_rebuild_log|audit|auth_realm|authentication|auto|auto_cleanup|auto_close|auto_create_statistics|auto_drop|auto_shrink|auto_update_statistics|auto_update_statistics_async|automated_backup_preference|automatic|autopilot|availability|availability_mode|backup|backup_priority|base64|basic|batches|batchsize|before|between|bigint|binary|binding|bit|block|blockers|blocksize|bmk|both|break|broker|broker_instance|bucket_count|buffer|buffercount|bulk_logged|by|call|caller|card|case|catalog|catch|cert|certificate|change_retention|change_tracking|change_tracking_context|changes|char|character|character_set|check_expiration|check_policy|checkconstraints|checkindex|checkpoint|checksum|cleanup_policy|clear|clear_port|close|clustered|codepage|collection|column_encryption_key|column_master_key|columnstore|columnstore_archive|colv_80_to_100|colv_100_to_80|commit_differential_base|committed|compatibility_level|compress_all_row_groups|compression|compression_delay|concat_null_yields_null|concatenate|configuration|connect|connection|containment|continue|continue_after_error|contract|contract_name|control|conversation|conversation_group_id|conversation_handle|copy|copy_only|count_rows|counter|create(\\s+or\\s+alter)?|credential|cross|cryptographic|cryptographic_provider|cube|cursor|cursor_close_on_commit|cursor_default|data|data_compression|data_flush_interval_seconds|data_mirroring|data_purity|data_source|database|database_name|database_snapshot|datafiletype|date_correlation_optimization|date|datefirst|dateformat|date_format|datetime|datetime2|datetimeoffset|day(s)?|db_chaining|dbid|dbidexec|dbo_only|deadlock_priority|deallocate|dec|decimal|declare|decrypt|decrypt_a|decryption|default_database|default_fulltext_language|default_language|default_logon_domain|default_schema|definition|delay|delayed_durability|delimitedtext|density_vector|dependent|des|description|desired_state|desx|differential|digest|disable|disable_broker|disable_def_cnst_chk|disabled|disk|distinct|distributed|distribution|drop|drop_existing|dts_buffers|dump|durability|dynamic|edition|elements|else|emergency|empty|enable|enable_broker|enabled|encoding|encrypted|encrypted_value|encryption|encryption_type|end|endpoint|endpoint_url|enhancedintegrity|entry|error_broker_conversations|errorfile|estimateonly|event|except|exec|executable|execute|exists|expand|expiredate|expiry_date|explicit|external|external_access|failover|failover_mode|failure_condition_level|fast|fast_forward|fastfirstrow|federated_service_account|fetch|field_terminator|fieldterminator|file|filelistonly|filegroup|filegrowth|filename|filestream|filestream_log|filestream_on|filetable|file_format|filter|first_row|fips_flagger|fire_triggers|first|firstrow|float|flush_interval_seconds|fmtonly|following|for|force|force_failover_allow_data_loss|force_service_allow_data_loss|forced|forceplan|formatfile|format_options|format_type|formsof|forward_only|free_cursors|free_exec_context|fullscan|fulltext|fulltextall|fulltextkey|function|generated|get|geography|geometry|global|go|goto|governor|guid|hadoop|hardening|hash|hashed|header_limit|headeronly|health_check_timeout|hidden|hierarchyid|histogram|histogram_steps|hits_cursors|hits_exec_context|hour(s)?|http|identity|identity_value|if|ifnull|ignore|ignore_constraints|ignore_dup_key|ignore_dup_row|ignore_triggers|image|immediate|implicit_transactions|include|include_null_values|incremental|index|inflectional|init|initiator|insensitive|insert|instead|int|integer|integrated|intersect|intermediate|interval_length_minutes|into|inuse_cursors|inuse_exec_context|io|is|isabout|iso_week|isolation|job_tracker_location|json|keep|keep_nulls|keep_replication|keepdefaults|keepfixed|keepidentity|keepnulls|kerberos|key|key_path|key_source|key_store_provider_name|keyset|kill|kilobytes_per_batch|labelonly|langid|language|last|lastrow|leading|legacy_cardinality_estimation|length|level|lifetime|lineage_80_to_100|lineage_100_to_80|listener_ip|listener_port|load|loadhistory|lob_compaction|local|local_service_name|locate|location|lock_escalation|lock_timeout|lockres|log|login|login_type|loop|manual|mark_in_use_for_removal|masked|master|match|matched|max_queue_readers|max_duration|max_outstanding_io_per_volume|maxdop|maxerrors|maxlength|maxtransfersize|max_plans_per_query|max_storage_size_mb|mediadescription|medianame|mediapassword|memogroup|memory_optimized|merge|message|message_forward_size|message_forwarding|microsecond|millisecond|minute(s)?|mirror_address|misses_cursors|misses_exec_context|mixed|modify|money|month|move|multi_user|must_change|name|namespace|nanosecond|native|native_compilation|nchar|ncharacter|nested_triggers|never|new_account|new_broker|newname|next|no|no_browsetable|no_checksum|no_compression|no_infomsgs|no_triggers|no_truncate|nocount|noexec|noexpand|noformat|noinit|nolock|nonatomic|nonclustered|nondurable|none|norecompute|norecovery|noreset|norewind|noskip|not|notification|nounload|now|nowait|ntext|ntlm|nulls|numeric|numeric_roundabort|nvarchar|object|objid|oem|offline|old_account|online|operation_mode|open|openjson|optimistic|option|orc|out|outer|output|over|override|owner|ownership|pad_index|page|page_checksum|page_verify|pagecount|paglock|param|parameter_sniffing|parameter_type_expansion|parameterization|parquet|parseonly|partial|partition|partner|password|path|pause|percentage|permission_set|persisted|period|physical_only|plan_forcing_mode|policy|pool|population|ports|preceding|precision|predicate|presume_abort|primary|primary_role|print|prior|priority |priority_level|private|proc(edure)?|procedure_name|profile|provider|quarter|query_capture_mode|query_governor_cost_limit|query_optimizer_hotfixes|query_store|queue|quoted_identifier|raiserror|range|raw|rcfile|rc2|rc4|rc4_128|rdbms|read_committed_snapshot|read|read_only|read_write|readcommitted|readcommittedlock|readonly|readpast|readuncommitted|readwrite|real|rebuild|receive|recmodel_70backcomp|recompile|reconfigure|recovery|recursive|recursive_triggers|redo_queue|reject_sample_value|reject_type|reject_value|relative|remote|remote_data_archive|remote_proc_transactions|remote_service_name|remove|removed_cursors|removed_exec_context|reorganize|repeat|repeatable|repeatableread|replace|replica|replicated|replnick_100_to_80|replnickarray_80_to_100|replnickarray_100_to_80|required|required_cursopt|resample|reset|resource|resource_manager_location|respect|restart|restore|restricted_user|resume|retaindays|retention|return|revert|rewind|rewindonly|returns|robust|role|rollup|root|round_robin|route|row|rowdump|rowguidcol|rowlock|row_terminator|rows|rows_per_batch|rowsets_only|rowterminator|rowversion|rsa_1024|rsa_2048|rsa_3072|rsa_4096|rsa_512|safe|safety|sample|save|scalar|schema|schemabinding|scoped|scroll|scroll_locks|sddl|second|secexpr|seconds|secondary|secondary_only|secondary_role|secret|security|securityaudit|selective|self|send|sent|sequence|serde_method|serializable|server|service|service_broker|service_name|service_objective|session_timeout|session|sessions|seterror|setopts|sets|shard_map_manager|shard_map_name|sharded|shared_memory|shortest_path|show_statistics|showplan_all|showplan_text|showplan_xml|showplan_xml_with_recompile|shrinkdb|shutdown|sid|signature|simple|single_blob|single_clob|single_nclob|single_user|singleton|site|size|size_based_cleanup_mode|skip|smalldatetime|smallint|smallmoney|snapshot|snapshot_import|snapshotrestorephase|soap|softnuma|sort_in_tempdb|sorted_data|sorted_data_reorg|spatial|sql|sql_bigint|sql_binary|sql_bit|sql_char|sql_date|sql_decimal|sql_double|sql_float|sql_guid|sql_handle|sql_longvarbinary|sql_longvarchar|sql_numeric|sql_real|sql_smallint|sql_time|sql_timestamp|sql_tinyint|sql_tsi_day|sql_tsi_frac_second|sql_tsi_hour|sql_tsi_minute|sql_tsi_month|sql_tsi_quarter|sql_tsi_second|sql_tsi_week|sql_tsi_year|sql_type_date|sql_type_time|sql_type_timestamp|sql_varbinary|sql_varchar|sql_variant|sql_wchar|sql_wlongvarchar|ssl|ssl_port|standard|standby|start|start_date|started|stat_header|state|statement|static|statistics|statistics_incremental|statistics_norecompute|statistics_only|statman|stats|stats_stream|status|stop|stop_on_error|stopat|stopatmark|stopbeforemark|stoplist|stopped|string_delimiter|subject|supplemental_logging|supported|suspend|symmetric|synchronous_commit|synonym|sysname|system|system_time|system_versioning|table|tableresults|tablock|tablockx|take|tape|target|target_index|target_partition|target_recovery_time|tcp|temporal_history_retention|text|textimage_on|then|thesaurus|throw|time|timeout|timestamp|tinyint|to|top|torn_page_detection|track_columns_updated|trailing|tran|transaction|transfer|transform_noise_words|triple_des|triple_des_3key|truncate|trustworthy|try|tsql|two_digit_year_cutoff|type|type_desc|type_warning|tzoffset|uid|unbounded|uncommitted|unique|uniqueidentifier|unlimited|unload|unlock|unsafe|updlock|url|use|useplan|useroptions|use_type_default|using|utcdatetime|valid_xml|validation|value|values|varbinary|varchar|verbose|verifyonly|version|view_metadata|virtual_device|visiblity|wait_at_low_priority|waitfor|webmethod|week|weekday|weight|well_formed_xml|when|while|widechar|widechar_ansi|widenative|window|windows|with|within|within group|witness|without|without_array_wrapper|workload|wsdl|xact_abort|xlock|xml|xmlschema|xquery|xsinil|year|zone)\b/dgiv,name:"keyword.other.sql"},{captures:{"1":{name:"punctuation.section.scope.begin.sql"},"2":{name:"punctuation.section.scope.end.sql"}},comment:"Allow for special ↩ behavior",match:/(\()(\))/dgv,name:"meta.block.sql"}],repository:{"comment-block":{begin:/\/\*/dgv,captures:{"0":{name:"punctuation.definition.comment.sql"}},end:/\*\//dgv,name:"comment.block",patterns:[{include:"#comment-block"}]},comments:{patterns:[{begin:/((?<=^|\n(?!$))[ \t]+)?(?=--)/dgv,beginCaptures:{"1":{name:"punctuation.whitespace.comment.leading.sql"}},end:/*@__PURE__*/ new EmulatedRegExp("(?!^)","dgv",{"strategy":"search_start_clip"}),patterns:[{begin:/--/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.sql"}},end:/\n/dgv,name:"comment.line.double-dash.sql"}]},{begin:/((?<=^|\n(?!$))[ \t]+)?(?=#)/dgv,beginCaptures:{"1":{name:"punctuation.whitespace.comment.leading.sql"}},end:/*@__PURE__*/ new EmulatedRegExp("(?!^)","dgv",{"strategy":"search_start_clip"}),patterns:[]},{include:"#comment-block"}]},regexps:{patterns:[{begin:/\/(?=\P{space}[^\n]*\/)/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.sql"}},end:/\//dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.sql"}},name:"string.regexp.sql",patterns:[{include:"#string_interpolation"},{match:/\\\//dgv,name:"constant.character.escape.slash.sql"}]},{begin:/%r\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.sql"}},comment:"We should probably handle nested bracket pairs!?! -- Allan",end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.sql"}},name:"string.regexp.modr.sql",patterns:[{include:"#string_interpolation"}]}]},string_escape:{match:/\\[^\n]/dgv,name:"constant.character.escape.sql"},string_interpolation:{captures:{"1":{name:"punctuation.definition.string.begin.sql"},"3":{name:"punctuation.definition.string.end.sql"}},match:/(#\{)([^\}]*)(\})/dgv,name:"string.interpolated.sql"},strings:{patterns:[{captures:{"2":{name:"punctuation.definition.string.begin.sql"},"3":{name:"punctuation.definition.string.end.sql"}},comment:"this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.",match:/(N)?(')[^']*(')/dgv,name:"string.quoted.single.sql"},{begin:/'/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.sql"}},end:/'/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.sql"}},name:"string.quoted.single.sql",patterns:[{include:"#string_escape"}]},{captures:{"1":{name:"punctuation.definition.string.begin.sql"},"2":{name:"punctuation.definition.string.end.sql"}},comment:"this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.",match:/(`)[^\`\\]*(`)/dgv,name:"string.quoted.other.backtick.sql"},{begin:/`/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.sql"}},end:/`/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.sql"}},name:"string.quoted.other.backtick.sql",patterns:[{include:"#string_escape"}]},{captures:{"1":{name:"punctuation.definition.string.begin.sql"},"2":{name:"punctuation.definition.string.end.sql"}},comment:"this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.",match:/(")[^"\#]*(")/dgv,name:"string.quoted.double.sql"},{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.sql"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.sql"}},name:"string.quoted.double.sql",patterns:[{include:"#string_interpolation"}]},{begin:/%\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.sql"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.sql"}},name:"string.other.quoted.brackets.sql",patterns:[{include:"#string_interpolation"}]}]}},scopeName:"source.sql",embeddedLangs:undefined,aliases:undefined})
|
|
4
4
|
|
|
5
5
|
export default [
|
|
6
6
|
lang
|