@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/po.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EmulatedRegExp } from 'oniguruma-to-es'
|
|
2
2
|
|
|
3
|
-
const lang = Object.freeze({displayName:"Gettext PO",fileTypes:["po","pot","potx"],name:"po",patterns:[{begin:/(?<=^|\n(?!$))(?=(msgid(_plural)?|msgctxt)\p{space}*"[^"])|(?<=^|\n(?!$))\p{space}*(?=$|\n)/dgv,comment:"Start of body of document, after header",end:/$/dgv,patterns:[{include:"#body"}]},{include:"#comments"},{match:/(?<=^|\n(?!$))msg(id|str)\p{space}+""\p{space}*(?=$|\n)\n?/dgv,name:"comment.line.number-sign.po"},{captures:{"1":{name:"constant.language.po"},"2":{name:"punctuation.separator.key-value.po"},"3":{name:"string.other.po"}},match:/(?<=^|\n(?!$))"(?:([^\p{space}\:]+)(:)\p{space}+)?([^"]*)"\p{space}*(?=$|\n)\n?/dgv,name:"meta.header.po"}],repository:{body:{patterns:[{begin:/(?<=^|\n(?!$))(msgid(_plural)?)\p{space}+/dgv,beginCaptures:{"1":{name:"keyword.control.msgid.po"}},end:/(?<=^|\n(?!$))(?!")/dgv,name:"meta.scope.msgid.po",patterns:[{begin
|
|
3
|
+
const lang = Object.freeze({displayName:"Gettext PO",fileTypes:["po","pot","potx"],name:"po",patterns:[{begin:/(?<=^|\n(?!$))(?=(msgid(_plural)?|msgctxt)\p{space}*"[^"])|(?<=^|\n(?!$))\p{space}*(?=$|\n)/dgv,comment:"Start of body of document, after header",end:/$/dgv,patterns:[{include:"#body"}]},{include:"#comments"},{match:/(?<=^|\n(?!$))msg(id|str)\p{space}+""\p{space}*(?=$|\n)\n?/dgv,name:"comment.line.number-sign.po"},{captures:{"1":{name:"constant.language.po"},"2":{name:"punctuation.separator.key-value.po"},"3":{name:"string.other.po"}},match:/(?<=^|\n(?!$))"(?:([^\p{space}\:]+)(:)\p{space}+)?([^"]*)"\p{space}*(?=$|\n)\n?/dgv,name:"meta.header.po"}],repository:{body:{patterns:[{begin:/(?<=^|\n(?!$))(msgid(_plural)?)\p{space}+/dgv,beginCaptures:{"1":{name:"keyword.control.msgid.po"}},end:/(?<=^|\n(?!$))(?!")/dgv,name:"meta.scope.msgid.po",patterns:[{begin:/*@__PURE__*/ new EmulatedRegExp("(^|(?<=^|\\n(?!$)))\"","dgv",{"strategy":"search_start_clip"}),end:/"/dgv,name:"string.quoted.double.po",patterns:[{match:/\\[\\"]/dgv,name:"constant.character.escape.po"}]}]},{begin:/(?<=^|\n(?!$))(msgstr)(?:(\[)(\p{Nd}+)(\]))?\p{space}+/dgv,beginCaptures:{"1":{name:"keyword.control.msgstr.po"},"2":{name:"keyword.control.msgstr.po"},"3":{name:"constant.numeric.po"},"4":{name:"keyword.control.msgstr.po"}},end:/(?<=^|\n(?!$))(?!")/dgv,name:"meta.scope.msgstr.po",patterns:[{begin:/*@__PURE__*/ new EmulatedRegExp("(^|(?<=^|\\n(?!$)))\"","dgv",{"strategy":"search_start_clip"}),end:/"/dgv,name:"string.quoted.double.po",patterns:[{match:/\\[\\"]/dgv,name:"constant.character.escape.po"}]}]},{begin:/(?<=^|\n(?!$))(msgctxt)(?:(\[)(\p{Nd}+)(\]))?\p{space}+/dgv,beginCaptures:{"1":{name:"keyword.control.msgctxt.po"},"2":{name:"keyword.control.msgctxt.po"},"3":{name:"constant.numeric.po"},"4":{name:"keyword.control.msgctxt.po"}},end:/(?<=^|\n(?!$))(?!")/dgv,name:"meta.scope.msgctxt.po",patterns:[{begin:/*@__PURE__*/ new EmulatedRegExp("(^|(?<=^|\\n(?!$)))\"","dgv",{"strategy":"search_start_clip"}),end:/"/dgv,name:"string.quoted.double.po",patterns:[{match:/\\[\\"]/dgv,name:"constant.character.escape.po"}]}]},{captures:{"1":{name:"punctuation.definition.comment.po"}},match:/(?<=^|\n(?!$))(#~)[^\n]*(?=$|\n)\n?/dgv,name:"comment.line.number-sign.obsolete.po"},{include:"#comments"},{comment:"a line that does not begin with # or \". Could improve this regexp",match:/(?<=^|\n(?!$))(?!\p{space}*(?=$|\n))[^\#"][^\n]*(?=$|\n)\n?/dgv,name:"invalid.illegal.po"}]},comments:{patterns:[{begin:/(?<=^|\n(?!$))(?=#)/dgv,end:/*@__PURE__*/ new EmulatedRegExp("(?!^)","dgv",{"strategy":"search_start_clip"}),patterns:[{begin:/(#,)\p{space}+/dgv,beginCaptures:{"1":{name:"punctuation.definition.comment.po"}},end:/\n/dgv,name:"comment.line.number-sign.flag.po",patterns:[{captures:{"1":{name:"entity.name.type.flag.po"}},match:/*@__PURE__*/ new EmulatedRegExp("(?:^|,\\p{space}*)(fuzzy|(?:no-)?(?:c|objc|sh|lisp|elisp|librep|scheme|smalltalk|java|csharp|awk|object-pascal|ycp|tcl|perl|perl-brace|php|gcc-internal|qt|boost)-format)","dgv",{"strategy":"search_start_clip"})}]},{begin:/#\./dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.po"}},end:/\n/dgv,name:"comment.line.number-sign.extracted.po"},{begin:/(#:)[ \t]*/dgv,beginCaptures:{"1":{name:"punctuation.definition.comment.po"}},end:/\n/dgv,name:"comment.line.number-sign.reference.po",patterns:[{match:/(\P{space}+:)([\p{Nd}\;]*)/dgv,name:"storage.type.class.po"}]},{begin:/#\|/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.po"}},end:/\n/dgv,name:"comment.line.number-sign.previous.po"},{begin:/#/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.po"}},end:/\n/dgv,name:"comment.line.number-sign.po"}]}]}},scopeName:"source.po",embeddedLangs:undefined,aliases:["pot","potx"]})
|
|
4
4
|
|
|
5
5
|
export default [
|
|
6
6
|
lang
|
package/dist/polar.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EmulatedRegExp } from 'oniguruma-to-es'
|
|
2
2
|
|
|
3
|
-
const lang = Object.freeze({displayName:"Polar",name:"polar",patterns:[{include:"#comment"},{include:"#rule"},{include:"#rule-type"},{include:"#inline-query"},{include:"#resource-block"},{include:"#test-block"},{include:"#fixture"}],repository:{boolean:{match:/\b(true|false)\b/dgv,name:"constant.language.boolean"},comment:{match:/#[^\n]*/dgv,name:"comment.line.number-sign"},fixture:{patterns:[{match:/\bfixture\b/dgv,name:"keyword.control"},{begin:/\btest\b/dgv,beginCaptures:{"0":{name:"keyword.control"}},end:/\bfixture\b/dgv,endCaptures:{"0":{name:"keyword.control"}}}]},"inline-query":{begin:/\?=/dgv,beginCaptures:{"0":{name:"keyword.control"}},end:/;/dgv,name:"meta.inline-query",patterns:[{include:"#term"}]},keyword:{patterns:[{match:/\b(cut|or|debug|print|in|forall|if|and|of|not|matches|type|on|global)\b/dgv,name:"constant.character"}]},number:{patterns:[{match:/\b[\+\-]?\p{Nd}+(?:(\.)\p{Nd}+(?:e[\+\-]?\p{Nd}+)?|e[\+\-]?\p{Nd}+)\b/dgv,name:"constant.numeric.float"},{match:/\b(\+|-)[\p{Nd}]+\b/dgv,name:"constant.numeric.integer"},{match:/\b[\p{Nd}]+\b/dgv,name:"constant.numeric.natural"}]},"object-literal":{begin:/([a-zA-Z_][a-zA-Z0-9_]*(?:::[a-zA-Z0-9_]+)*)\p{space}*\{/dgv,beginCaptures:{"1":{name:"entity.name.type.resource"}},end:/\}/dgv,name:"constant.other.object-literal",patterns:[{include:"#string"},{include:"#number"},{include:"#boolean"}]},operator:{captures:{"1":{name:"keyword.control"}},match:/(\+|-|\*|\/|<|>|=|!)/dgv},"resource-block":{begin
|
|
3
|
+
const lang = Object.freeze({displayName:"Polar",name:"polar",patterns:[{include:"#comment"},{include:"#rule"},{include:"#rule-type"},{include:"#inline-query"},{include:"#resource-block"},{include:"#test-block"},{include:"#fixture"}],repository:{boolean:{match:/\b(true|false)\b/dgv,name:"constant.language.boolean"},comment:{match:/#[^\n]*/dgv,name:"comment.line.number-sign"},fixture:{patterns:[{match:/\bfixture\b/dgv,name:"keyword.control"},{begin:/\btest\b/dgv,beginCaptures:{"0":{name:"keyword.control"}},end:/\bfixture\b/dgv,endCaptures:{"0":{name:"keyword.control"}}}]},"inline-query":{begin:/\?=/dgv,beginCaptures:{"0":{name:"keyword.control"}},end:/;/dgv,name:"meta.inline-query",patterns:[{include:"#term"}]},keyword:{patterns:[{match:/\b(cut|or|debug|print|in|forall|if|and|of|not|matches|type|on|global)\b/dgv,name:"constant.character"}]},number:{patterns:[{match:/\b[\+\-]?\p{Nd}+(?:(\.)\p{Nd}+(?:e[\+\-]?\p{Nd}+)?|e[\+\-]?\p{Nd}+)\b/dgv,name:"constant.numeric.float"},{match:/\b(\+|-)[\p{Nd}]+\b/dgv,name:"constant.numeric.integer"},{match:/\b[\p{Nd}]+\b/dgv,name:"constant.numeric.natural"}]},"object-literal":{begin:/([a-zA-Z_][a-zA-Z0-9_]*(?:::[a-zA-Z0-9_]+)*)\p{space}*\{/dgv,beginCaptures:{"1":{name:"entity.name.type.resource"}},end:/\}/dgv,name:"constant.other.object-literal",patterns:[{include:"#string"},{include:"#number"},{include:"#boolean"}]},operator:{captures:{"1":{name:"keyword.control"}},match:/(\+|-|\*|\/|<|>|=|!)/dgv},"resource-block":{begin:/*@__PURE__*/ new EmulatedRegExp("(?<resourceType>[a-zA-Z_][a-zA-Z0-9_]*(?:::[a-zA-Z0-9_]+)*){0}((resource|actor)\\p{space}+(($1$E$[a-zA-Z_][a-zA-Z0-9_]*(?:::[a-zA-Z0-9_]+)*))(?:\\p{space}+(extends)\\p{space}+(($1$E$[a-zA-Z_][a-zA-Z0-9_]*(?:::[a-zA-Z0-9_]+)*)(?:\\p{space}*,\\p{space}*($1$E$[a-zA-Z_][a-zA-Z0-9_]*(?:::[a-zA-Z0-9_]+)*))*)\\p{space}*,?\\p{space}*)?|(global))\\p{space}*\\{","dgv",{"useEmulationGroups":true}),beginCaptures:{"3":{comment:"actor|resource",name:"keyword.control"},"4":{comment:"declared resource type",name:"entity.name.type"},"5":{comment:"extends",name:"keyword.control"},"6":{comment:"list of extended resources",patterns:[{match:/([a-zA-Z_][a-zA-Z0-9_]*(?:::[a-zA-Z0-9_]+)*)/dgv,name:"entity.name.type"}]},"7":{comment:"global",name:"keyword.control"}},end:/\}/dgv,name:"meta.resource-block",patterns:[{match:/;/dgv,name:"punctuation.separator.sequence.declarations"},{begin:/\{/dgv,end:/\}/dgv,name:"meta.relation-declaration",patterns:[{include:"#specializer"},{include:"#comment"},{match:/,/dgv,name:"punctuation.separator.sequence.dict"}]},{include:"#term"}]},rule:{name:"meta.rule",patterns:[{include:"#rule-functor"},{begin:/\bif\b/dgv,beginCaptures:{"0":{name:"keyword.control.if"}},end:/;/dgv,patterns:[{include:"#term"}]},{match:/;/dgv}]},"rule-functor":{begin:/([a-zA-Z_][a-zA-Z0-9_]*(?:::[a-zA-Z0-9_]+)*)\p{space}*\(/dgv,beginCaptures:{"1":{name:"support.function.rule"}},end:/\)/dgv,patterns:[{include:"#specializer"},{match:/,/dgv,name:"punctuation.separator.sequence.list"},{include:"#term"}]},"rule-type":{begin:/\btype\b/dgv,beginCaptures:{"0":{name:"keyword.other.type-decl"}},end:/;/dgv,name:"meta.rule-type",patterns:[{include:"#rule-functor"}]},specializer:{captures:{"1":{name:"entity.name.type.resource"}},match:/[a-zA-Z_][a-zA-Z0-9_]*(?:::[a-zA-Z0-9_]+)*\p{space}*:\p{space}*([a-zA-Z_][a-zA-Z0-9_]*(?:::[a-zA-Z0-9_]+)*)/dgv},string:{begin:/"/dgv,end:/"/dgv,name:"string.quoted.double",patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape"}]},term:{patterns:[{include:"#comment"},{include:"#string"},{include:"#number"},{include:"#keyword"},{include:"#operator"},{include:"#boolean"},{include:"#object-literal"},{begin:/\[/dgv,end:/\]/dgv,name:"meta.bracket.list",patterns:[{include:"#term"},{match:/,/dgv,name:"punctuation.separator.sequence.list"}]},{begin:/\{/dgv,end:/\}/dgv,name:"meta.bracket.dict",patterns:[{include:"#term"},{match:/,/dgv,name:"punctuation.separator.sequence.dict"}]},{begin:/\(/dgv,end:/\)/dgv,name:"meta.parens",patterns:[{include:"#term"}]}]},"test-block":{begin:/(test)\p{space}+("[^"]*")\p{space}*\{/dgv,beginCaptures:{"1":{name:"keyword.control"},"2":{name:"string.quoted.double"}},end:/\}/dgv,name:"meta.test-block",patterns:[{begin:/(setup)\p{space}*\{/dgv,beginCaptures:{"1":{name:"keyword.control"}},end:/\}/dgv,name:"meta.test-setup",patterns:[{include:"#rule"},{include:"#comment"},{include:"#fixture"}]},{include:"#rule"},{match:/\b(assert|assert_not)\b/dgv,name:"keyword.other"},{include:"#comment"}]}},scopeName:"source.polar",embeddedLangs:undefined,aliases:undefined})
|
|
4
4
|
|
|
5
5
|
export default [
|
|
6
6
|
lang
|
package/dist/powershell.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EmulatedRegExp } from 'oniguruma-to-es'
|
|
2
2
|
|
|
3
|
-
const lang = Object.freeze({displayName:"PowerShell",name:"powershell",patterns:[{begin:/<#/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.block.begin.powershell"}},end:/#>/dgv,endCaptures:{"0":{name:"punctuation.definition.comment.block.end.powershell"}},name:"comment.block.powershell",patterns:[{include:"#commentEmbeddedDocs"}]},{match:/[2-6]>&1|>>|>|<<|<|>|>\||[1-6]>|[1-6]>>/dgv,name:"keyword.operator.redirection.powershell"},{include:"#commands"},{include:"#commentLine"},{include:"#variable"},{include:"#subexpression"},{include:"#function"},{include:"#attribute"},{include:"#UsingDirective"},{include:"#type"},{include:"#hashtable"},{include:"#doubleQuotedString"},{include:"#scriptblock"},{comment:"Needed to parse stuff correctly in 'argument mode'. (See about_parsing.)",include:"#doubleQuotedStringEscapes"},{applyEndPatternLast:true,begin:/['‘-‛]/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.powershell"}},end:/['‘-‛]/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.powershell"}},name:"string.quoted.single.powershell",patterns:[{match:/['‘-‛]{2}/dgv,name:"constant.character.escape.powershell"}]},{begin:/(@["“-„])\p{space}*(?=$|\n)/dgv,beginCaptures:{"1":{name:"punctuation.definition.string.begin.powershell"}},end:/(?<=^|\n(?!$))["“-„]@/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.powershell"}},name:"string.quoted.double.heredoc.powershell",patterns:[{include:"#variableNoProperty"},{include:"#doubleQuotedStringEscapes"},{include:"#interpolation"}]},{begin:/(@['‘-‛])\p{space}*(?=$|\n)/dgv,beginCaptures:{"1":{name:"punctuation.definition.string.begin.powershell"}},end:/(?<=^|\n(?!$))['‘-‛]@/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.powershell"}},name:"string.quoted.single.heredoc.powershell"},{include:"#numericConstant"},{begin:/(@)(\()/dgv,beginCaptures:{"1":{name:"keyword.other.array.begin.powershell"},"2":{name:"punctuation.section.group.begin.powershell"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.group.end.powershell"}},name:"meta.group.array-expression.powershell",patterns:[{include:"$self"}]},{begin:/((\$))(\()/dgv,beginCaptures:{"1":{name:"keyword.other.substatement.powershell"},"2":{name:"punctuation.definition.subexpression.powershell"},"3":{name:"punctuation.section.group.begin.powershell"}},comment:"TODO: move to repo; make recursive.",end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.group.end.powershell"}},name:"meta.group.complex.subexpression.powershell",patterns:[{include:"$self"}]},{match:/(\b(([A-Za-z0-9\-_\.]+)\.(?:[Ee][Xx][Ee]|[Cc][Oo][Mm]|[Cc][Mm][Dd]|[Bb][Aa][Tt]))\b)/dgv,name:"support.function.powershell"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}]|-|\.)((?:begin|break|catch|clean|continue|data|default|define|do|dynamicparam|else|elseif|end|exit|finally|for|from|if|in|inlinescript|parallel|param|process|return|sequence|switch|throw|trap|try|until|var|while)|%|\?)(?![\p{L}\p{M}\p{N}\p{Pc}])/dgiv,name:"keyword.control.powershell"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}]|-|[^\)]\.)((foreach|where)(?!-object)|%|\?)(?![\p{L}\p{M}\p{N}\p{Pc}])/dgiv,name:"keyword.control.powershell"},{begin:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(--%)(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,beginCaptures:{"1":{name:"keyword.control.powershell"}},comment:"This should be moved to the repository at some point.",end:/(?=$|\n)/dgv,patterns:[{match:/[^\n]+/dgv,name:"string.unquoted.powershell"}]},{comment:"This should only be relevant inside a class but will require a rework of how classes are matched. This is a temp fix.",match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])((?:hidden|static))(?![\p{L}\p{M}\p{N}\p{Pc}])/dgiv,name:"storage.modifier.powershell"},{captures:{"1":{name:"storage.type.powershell"},"2":{name:"entity.name.function"}},comment:"capture should be entity.name.type, but it doesn't provide a good color in the default schema.",match:/(?<![\p{L}\p{M}\p{N}\p{Pc}]|-)(class|%|\?)(?:\p{space})+((?:\p{L}|\p{Nd}|_|-|)+)\b/dgiv},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])-(?:is(?:not)?|as)\b/dgiv,name:"keyword.operator.comparison.powershell"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])-[ic]?(?:eq|ne|[gl][te]|(?:not)?(?:like|match|contains|in)|replace)(?!\p{L})/dgiv,name:"keyword.operator.comparison.powershell"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])-(?:join|split)(?!\p{L})|!/dgiv,name:"keyword.operator.unary.powershell"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])-(?:and|or|not|xor)(?!\p{L})|!/dgiv,name:"keyword.operator.logical.powershell"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])-(?:band|bor|bnot|bxor|shl|shr)(?!\p{L})/dgiv,name:"keyword.operator.bitwise.powershell"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])-f(?!\p{L})/dgiv,name:"keyword.operator.string-format.powershell"},{match:/[\+\%\*\/\-]?=|[\+\/\*\%\-]/dgv,name:"keyword.operator.assignment.powershell"},{match:/\|{2}|&{2}|;/dgv,name:"punctuation.terminator.statement.powershell"},{match:/&|(?<![\p{L}\p{M}\p{N}\p{Pc}])\.(?= )|`|,|\|/dgv,name:"keyword.operator.other.powershell"},{comment:"This is very imprecise, is there a syntax for 'must come after...' ",match:/(?<!\p{space}|(?<=^|\n(?!$)))\.\.(?=-?\p{Nd}|\(|\$)/dgv,name:"keyword.operator.range.powershell"}],repository:{RequiresDirective:{begin:/(?<=#)(requires)\p{space}/dgiv,beginCaptures:{"0":{name:"keyword.control.requires.powershell"}},end:/(?=$|\n)/dgv,name:"meta.requires.powershell",patterns:[{match:/-(?:Modules|PSSnapin|RunAsAdministrator|ShellId|Version|Assembly|PSEdition)/dgiv,name:"keyword.other.powershell"},{match:/(?<!-)\b\p{L}+|\p{Nd}+(?:\.\p{Nd}+)*/dgv,name:"variable.parameter.powershell"},{include:"#hashtable"}]},UsingDirective:{captures:{"1":{name:"keyword.control.using.powershell"},"2":{name:"keyword.other.powershell"},"3":{name:"variable.parameter.powershell"}},match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(using)\p{space}+(namespace|module)\p{space}+((?:[\p{L}\p{M}\p{N}\p{Pc}]+(?:\.)?)+)/dgiv},attribute:{begin:/(\[)\p{space}*\b(cmdletbinding|alias|outputtype|parameter|validatenotnull|validatenotnullorempty|validatecount|validateset|allownull|allowemptycollection|allowemptystring|validatescript|validaterange|validatepattern|validatelength|supportswildcards)\b/dgiv,beginCaptures:{"1":{name:"punctuation.section.bracket.begin.powershell"},"2":{name:"support.function.attribute.powershell"}},end:/(\])/dgv,endCaptures:{"1":{name:"punctuation.section.bracket.end.powershell"}},name:"meta.attribute.powershell",patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.section.group.begin.powershell"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.group.end.powershell"}},patterns:[{include:"$self"},{captures:{"1":{name:"variable.parameter.attribute.powershell"},"2":{name:"keyword.operator.assignment.powershell"}},match:/\b(mandatory|valuefrompipeline|valuefrompipelinebypropertyname|valuefromremainingarguments|position|parametersetname|defaultparametersetname|supportsshouldprocess|supportspaging|positionalbinding|helpuri|confirmimpact|helpmessage)\b(?:\p{space}+)?(=)?/dgiv}]}]},commands:{patterns:[{comment:"Verb-Noun pattern:",match:/(?:(\p{L}|\p{Nd}|_|-|\\|:)*\\)?\b(?:Add|Approve|Assert|Backup|Block|Build|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Deploy|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Mount|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Write)-[^\n]+?(?:\.(?:exe|cmd|bat|ps1))?\b/dgiv,name:"support.function.powershell"},{comment:"Builtin cmdlets with reserved verbs",match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])foreach-object(?![\p{L}\p{M}\p{N}\p{Pc}])/dgiv,name:"support.function.powershell"},{comment:"Builtin cmdlets with reserved verbs",match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])where-object(?![\p{L}\p{M}\p{N}\p{Pc}])/dgiv,name:"support.function.powershell"},{comment:"Builtin cmdlets with reserved verbs",match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])sort-object(?![\p{L}\p{M}\p{N}\p{Pc}])/dgiv,name:"support.function.powershell"},{comment:"Builtin cmdlets with reserved verbs",match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])tee-object(?![\p{L}\p{M}\p{N}\p{Pc}])/dgiv,name:"support.function.powershell"}]},commentEmbeddedDocs:{patterns:[{captures:{"1":{name:"constant.string.documentation.powershell"},"2":{name:"keyword.operator.documentation.powershell"}},comment:"these embedded doc keywords do not support arguments, must be the only thing on the line",match:new EmulatedRegExp("(?<=^|\\n(?!$))\\p{space}*(\\.)(COMPONENT|DESCRIPTION|EXAMPLE|FUNCTIONALITY|INPUTS|LINK|NOTES|OUTPUTS|ROLE|SYNOPSIS)\\p{space}*(?=$|\\n)","dgiv",{"strategy":"line_or_search_start"}),name:"comment.documentation.embedded.powershell"},{captures:{"1":{name:"constant.string.documentation.powershell"},"2":{name:"keyword.operator.documentation.powershell"},"3":{name:"keyword.operator.documentation.powershell"}},comment:"these embedded doc keywords require arguments though the type required may be inconsistent, they may not all be able to use the same argument match",match:new EmulatedRegExp("(?<=^|\\n(?!$))\\p{space}*(\\.)(EXTERNALHELP|FORWARDHELP(?:CATEGORY|TARGETNAME)|PARAMETER|REMOTEHELPRUNSPACE)\\p{space}+([^\\n]+?)\\p{space}*(?=$|\\n)","dgiv",{"strategy":"line_or_search_start"}),name:"comment.documentation.embedded.powershell"}]},commentLine:{begin:/(?<![\`\\\-])(#)#*/dgv,captures:{"1":{name:"punctuation.definition.comment.powershell"}},end:/(?=$|\n)\n?/dgv,name:"comment.line.powershell",patterns:[{include:"#commentEmbeddedDocs"},{include:"#RequiresDirective"}]},doubleQuotedString:{applyEndPatternLast:true,begin:/["“-„]/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.powershell"}},end:/["“-„]/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.powershell"}},name:"string.quoted.double.powershell",patterns:[{match:/\b[A-Z0-9\._\%\+\-]+@[A-Z0-9\.\-]+\.[A-Z]{2,64}\b/dgiv},{include:"#variableNoProperty"},{include:"#doubleQuotedStringEscapes"},{match:/["“-„]{2}/dgv,name:"constant.character.escape.powershell"},{include:"#interpolation"},{match:/`\p{space}*(?=$|\n)/dgv,name:"keyword.other.powershell"}]},doubleQuotedStringEscapes:{patterns:[{match:/`[\`0abefnrtv'"‘-„\$]/dgv,name:"constant.character.escape.powershell"},{include:"#unicodeEscape"}]},function:{begin:new EmulatedRegExp("(?<=^|\\n(?!$))(?:(?=($E$\\p{space}*))\\1)(function|filter|configuration|workflow)\\p{space}+(?:(global|local|script|private):)?((?:\\p{L}|\\p{Nd}|_|-|\\.)+)","dgiv",{"useEmulationGroups":true}),beginCaptures:{"0":{name:"meta.function.powershell"},"1":{name:"storage.type.powershell"},"2":{name:"storage.modifier.scope.powershell"},"3":{name:"entity.name.function.powershell"}},end:/(?=\{|\()/dgv,patterns:[{include:"#commentLine"}]},hashtable:{begin:/(@)(\{)/dgv,beginCaptures:{"1":{name:"keyword.other.hashtable.begin.powershell"},"2":{name:"punctuation.section.braces.begin.powershell"}},end:/(\})/dgv,endCaptures:{"1":{name:"punctuation.section.braces.end.powershell"}},name:"meta.hashtable.powershell",patterns:[{captures:{"1":{name:"punctuation.definition.string.begin.powershell"},"2":{name:"variable.other.readwrite.powershell"},"3":{name:"punctuation.definition.string.end.powershell"},"4":{name:"keyword.operator.assignment.powershell"}},match:/\b((?:'|")?)([\p{L}\p{M}\p{N}\p{Pc}]+)((?:'|")?)(?:\p{space}+)?(=)(?:\p{space}+)?/dgv,name:"meta.hashtable.assignment.powershell"},{include:"#scriptblock"},{include:"$self"}]},interpolation:{begin:/(((\$)))((\())/dgv,beginCaptures:{"1":{name:"keyword.other.substatement.powershell"},"2":{name:"punctuation.definition.substatement.powershell"},"3":{name:"punctuation.section.embedded.substatement.begin.powershell"},"4":{name:"punctuation.section.group.begin.powershell"},"5":{name:"punctuation.section.embedded.substatement.begin.powershell"}},contentName:"interpolated.complex.source.powershell",end:/(\))/dgv,endCaptures:{"0":{name:"punctuation.section.group.end.powershell"},"1":{name:"punctuation.section.embedded.substatement.end.powershell"}},name:"meta.embedded.substatement.powershell",patterns:[{include:"$self"}]},numericConstant:{patterns:[{captures:{"1":{name:"constant.numeric.hex.powershell"},"2":{name:"keyword.other.powershell"}},match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])([\-\+]?0(?:x|X)[0-9a-fA-F_]+(?:U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?)((?:[KKkMmGgTtPp][Bb])?)\b/dgv},{captures:{"1":{name:"constant.numeric.integer.powershell"},"2":{name:"keyword.other.powershell"}},match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])([\-\+]?(?:[0-9_]+)?\.[0-9_]+(?:(?:e|E)[0-9]+)?(?:F|f|D|d|M|m)?)((?:[KKkMmGgTtPp][Bb])?)\b/dgv},{captures:{"1":{name:"constant.numeric.octal.powershell"},"2":{name:"keyword.other.powershell"}},match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])([\-\+]?0(?:b|B)[01_]+(?:U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?)((?:[KKkMmGgTtPp][Bb])?)\b/dgv},{captures:{"1":{name:"constant.numeric.integer.powershell"},"2":{name:"keyword.other.powershell"}},match:new EmulatedRegExp("(?<![\\p{L}\\p{M}\\p{N}\\p{Pc}])([\\-\\+]?[0-9_]+(?:e|E)(?:(?=($E$(?:[0-9_])?))\\2)(?:F|f|D|d|M|m)?)((?:[KKkMmGgTtPp][Bb])?)\\b","dgv",{"useEmulationGroups":true})},{captures:{"1":{name:"constant.numeric.integer.powershell"},"2":{name:"keyword.other.powershell"}},match:new EmulatedRegExp("(?<![\\p{L}\\p{M}\\p{N}\\p{Pc}])([\\-\\+]?[0-9_]+\\.(?:e|E)(?:(?=($E$(?:[0-9_])?))\\2)(?:F|f|D|d|M|m)?)((?:[KKkMmGgTtPp][Bb])?)\\b","dgv",{"useEmulationGroups":true})},{captures:{"1":{name:"constant.numeric.integer.powershell"},"2":{name:"keyword.other.powershell"}},match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])([\-\+]?[0-9_]+[\.]?(?:F|f|D|d|M|m))((?:[KKkMmGgTtPp][Bb])?)\b/dgv},{captures:{"1":{name:"constant.numeric.integer.powershell"},"2":{name:"keyword.other.powershell"}},match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])([\-\+]?[0-9_]+[\.]?(?:U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?)((?:[KKkMmGgTtPp][Bb])?)\b/dgv}]},scriptblock:{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.section.braces.begin.powershell"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.section.braces.end.powershell"}},name:"meta.scriptblock.powershell",patterns:[{include:"$self"}]},subexpression:{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.section.group.begin.powershell"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.group.end.powershell"}},name:"meta.group.simple.subexpression.powershell",patterns:[{include:"$self"}]},type:{begin:/\[/dgv,beginCaptures:{"0":{name:"punctuation.section.bracket.begin.powershell"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.section.bracket.end.powershell"}},patterns:[{match:/(?!\p{Nd}+|\.)(?:\p{L}|\p{N}|\.)+/dgv,name:"storage.type.powershell"},{include:"$self"}]},unicodeEscape:{comment:"`u{xxxx} added in PowerShell 6.0",patterns:[{match:new EmulatedRegExp("`u\\{(?:(?:10)?([0-9a-fA-F]){1,4}|0?($1$E$[0-9a-fA-F]){1,5})\\}","dgv",{"useEmulationGroups":true}),name:"constant.character.escape.powershell"},{match:/`u(?:\{[0-9a-fA-F]{0,6}[^\n])?/dgv,name:"invalid.character.escape.powershell"}]},variable:{patterns:[{captures:{"0":{name:"constant.language.powershell"},"1":{name:"punctuation.definition.variable.powershell"}},comment:"These are special constants.",match:/(\$)(False|Null|True)\b/dgiv},{captures:{"0":{name:"support.constant.variable.powershell"},"1":{name:"punctuation.definition.variable.powershell"},"3":{name:"variable.other.member.powershell"}},comment:"These are the other built-in constants.",match:/(\$)(Error|ExecutionContext|Host|Home|PID|PsHome|PsVersionTable|ShellID)((?:\.(?:\p{L}|\p{Nd}|_)+)*\b)?\b/dgiv},{captures:{"0":{name:"support.variable.automatic.powershell"},"1":{name:"punctuation.definition.variable.powershell"},"3":{name:"variable.other.member.powershell"}},comment:"Automatic variables are not constants, but they are read-only. In monokai (default) color schema support.variable doesn't have color, so we use constant.",match:/(\$)([\$\^\?]|(?:_|Args|ConsoleFileName|Event|EventArgs|EventSubscriber|ForEach|Input|LastExitCode|Matches|MyInvocation|NestedPromptLevel|Profile|PSBoundParameters|PsCmdlet|PsCulture|PSDebugContext|PSItem|PSCommandPath|PSScriptRoot|PsUICulture|Pwd|Sender|SourceArgs|SourceEventArgs|StackTrace|Switch|This)\b)((?:\.(?:\p{L}|\p{Nd}|_)+)*\b)?/dgiv},{captures:{"0":{name:"variable.language.powershell"},"1":{name:"punctuation.definition.variable.powershell"},"3":{name:"variable.other.member.powershell"}},comment:"Style preference variables as language variables so that they stand out.",match:/(\$)(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|InformationPreference|LogCommandHealthEvent|LogCommandLifecycleEvent|LogEngineHealthEvent|LogEngineLifecycleEvent|LogProviderHealthEvent|LogProviderLifecycleEvent|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|PSCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoLoadingPreference|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|ProgressPreference|VerbosePreference|WarningPreference|WhatIfPreference)((?:\.(?:\p{L}|\p{Nd}|_)+)*\b)?\b/dgiv},{captures:{"0":{name:"variable.other.readwrite.powershell"},"1":{name:"punctuation.definition.variable.powershell"},"2":{name:"storage.modifier.scope.powershell"},"4":{name:"variable.other.member.powershell"}},match:/(\$|@)(global|local|private|script|using|workflow):((?:\p{L}|\p{Nd}|_)+)((?:\.(?:\p{L}|\p{Nd}|_)+)*\b)?/dgiv},{captures:{"0":{name:"variable.other.readwrite.powershell"},"1":{name:"punctuation.definition.variable.powershell"},"2":{name:"punctuation.section.braces.begin.powershell"},"3":{name:"storage.modifier.scope.powershell"},"5":{name:"punctuation.section.braces.end.powershell"},"6":{name:"variable.other.member.powershell"}},match:/(\$)(\{)(global|local|private|script|using|workflow):([^\}]*[^\}\`])(\})((?:\.(?:\p{L}|\p{Nd}|_)+)*\b)?/dgiv},{captures:{"0":{name:"variable.other.readwrite.powershell"},"1":{name:"punctuation.definition.variable.powershell"},"2":{name:"support.variable.drive.powershell"},"4":{name:"variable.other.member.powershell"}},match:/(\$|@)((?:\p{L}|\p{Nd}|_)+:)?((?:\p{L}|\p{Nd}|_)+)((?:\.(?:\p{L}|\p{Nd}|_)+)*\b)?/dgv},{captures:{"0":{name:"variable.other.readwrite.powershell"},"1":{name:"punctuation.definition.variable.powershell"},"2":{name:"punctuation.section.braces.begin.powershell"},"3":{name:"support.variable.drive.powershell"},"5":{name:"punctuation.section.braces.end.powershell"},"6":{name:"variable.other.member.powershell"}},match:/(\$)(\{)((?:\p{L}|\p{Nd}|_)+:)?([^\}]*[^\}\`])(\})((?:\.(?:\p{L}|\p{Nd}|_)+)*\b)?/dgv}]},variableNoProperty:{patterns:[{captures:{"0":{name:"constant.language.powershell"},"1":{name:"punctuation.definition.variable.powershell"}},comment:"These are special constants.",match:/(\$)(False|Null|True)\b/dgiv},{captures:{"0":{name:"support.constant.variable.powershell"},"1":{name:"punctuation.definition.variable.powershell"},"3":{name:"variable.other.member.powershell"}},comment:"These are the other built-in constants.",match:/(\$)(Error|ExecutionContext|Host|Home|PID|PsHome|PsVersionTable|ShellID)\b/dgiv},{captures:{"0":{name:"support.variable.automatic.powershell"},"1":{name:"punctuation.definition.variable.powershell"},"3":{name:"variable.other.member.powershell"}},comment:"Automatic variables are not constants, but they are read-only...",match:/(\$)([\$\^\?]|(?:_|Args|ConsoleFileName|Event|EventArgs|EventSubscriber|ForEach|Input|LastExitCode|Matches|MyInvocation|NestedPromptLevel|Profile|PSBoundParameters|PsCmdlet|PsCulture|PSDebugContext|PSItem|PSCommandPath|PSScriptRoot|PsUICulture|Pwd|Sender|SourceArgs|SourceEventArgs|StackTrace|Switch|This)\b)/dgiv},{captures:{"0":{name:"variable.language.powershell"},"1":{name:"punctuation.definition.variable.powershell"},"3":{name:"variable.other.member.powershell"}},comment:"Style preference variables as language variables so that they stand out.",match:/(\$)(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|InformationPreference|LogCommandHealthEvent|LogCommandLifecycleEvent|LogEngineHealthEvent|LogEngineLifecycleEvent|LogProviderHealthEvent|LogProviderLifecycleEvent|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|PSCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoLoadingPreference|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|ProgressPreference|VerbosePreference|WarningPreference|WhatIfPreference)\b/dgiv},{captures:{"0":{name:"variable.other.readwrite.powershell"},"1":{name:"punctuation.definition.variable.powershell"},"2":{name:"storage.modifier.scope.powershell"},"4":{name:"variable.other.member.powershell"}},match:/(\$)(global|local|private|script|using|workflow):((?:\p{L}|\p{Nd}|_)+)/dgiv},{captures:{"0":{name:"variable.other.readwrite.powershell"},"1":{name:"punctuation.definition.variable.powershell"},"2":{name:"storage.modifier.scope.powershell"},"4":{name:"keyword.other.powershell"},"5":{name:"variable.other.member.powershell"}},match:/(\$)(\{)(global|local|private|script|using|workflow):([^\}]*[^\}\`])(\})/dgiv},{captures:{"0":{name:"variable.other.readwrite.powershell"},"1":{name:"punctuation.definition.variable.powershell"},"2":{name:"support.variable.drive.powershell"},"4":{name:"variable.other.member.powershell"}},match:/(\$)((?:\p{L}|\p{Nd}|_)+:)?((?:\p{L}|\p{Nd}|_)+)/dgv},{captures:{"0":{name:"variable.other.readwrite.powershell"},"1":{name:"punctuation.definition.variable.powershell"},"2":{name:"punctuation.section.braces.begin"},"3":{name:"support.variable.drive.powershell"},"5":{name:"punctuation.section.braces.end"}},match:/(\$)(\{)((?:\p{L}|\p{Nd}|_)+:)?([^\}]*[^\}\`])(\})/dgv}]}},scopeName:"source.powershell",embeddedLangs:undefined,aliases:["ps","ps1"]})
|
|
3
|
+
const lang = Object.freeze({displayName:"PowerShell",name:"powershell",patterns:[{begin:/<#/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.block.begin.powershell"}},end:/#>/dgv,endCaptures:{"0":{name:"punctuation.definition.comment.block.end.powershell"}},name:"comment.block.powershell",patterns:[{include:"#commentEmbeddedDocs"}]},{match:/[2-6]>&1|>>|>|<<|<|>|>\||[1-6]>|[1-6]>>/dgv,name:"keyword.operator.redirection.powershell"},{include:"#commands"},{include:"#commentLine"},{include:"#variable"},{include:"#subexpression"},{include:"#function"},{include:"#attribute"},{include:"#UsingDirective"},{include:"#type"},{include:"#hashtable"},{include:"#doubleQuotedString"},{include:"#scriptblock"},{comment:"Needed to parse stuff correctly in 'argument mode'. (See about_parsing.)",include:"#doubleQuotedStringEscapes"},{applyEndPatternLast:true,begin:/['‘-‛]/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.powershell"}},end:/['‘-‛]/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.powershell"}},name:"string.quoted.single.powershell",patterns:[{match:/['‘-‛]{2}/dgv,name:"constant.character.escape.powershell"}]},{begin:/(@["“-„])\p{space}*(?=$|\n)/dgv,beginCaptures:{"1":{name:"punctuation.definition.string.begin.powershell"}},end:/(?<=^|\n(?!$))["“-„]@/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.powershell"}},name:"string.quoted.double.heredoc.powershell",patterns:[{include:"#variableNoProperty"},{include:"#doubleQuotedStringEscapes"},{include:"#interpolation"}]},{begin:/(@['‘-‛])\p{space}*(?=$|\n)/dgv,beginCaptures:{"1":{name:"punctuation.definition.string.begin.powershell"}},end:/(?<=^|\n(?!$))['‘-‛]@/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.powershell"}},name:"string.quoted.single.heredoc.powershell"},{include:"#numericConstant"},{begin:/(@)(\()/dgv,beginCaptures:{"1":{name:"keyword.other.array.begin.powershell"},"2":{name:"punctuation.section.group.begin.powershell"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.group.end.powershell"}},name:"meta.group.array-expression.powershell",patterns:[{include:"$self"}]},{begin:/((\$))(\()/dgv,beginCaptures:{"1":{name:"keyword.other.substatement.powershell"},"2":{name:"punctuation.definition.subexpression.powershell"},"3":{name:"punctuation.section.group.begin.powershell"}},comment:"TODO: move to repo; make recursive.",end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.group.end.powershell"}},name:"meta.group.complex.subexpression.powershell",patterns:[{include:"$self"}]},{match:/(\b(([A-Za-z0-9\-_\.]+)\.(?:[Ee][Xx][Ee]|[Cc][Oo][Mm]|[Cc][Mm][Dd]|[Bb][Aa][Tt]))\b)/dgv,name:"support.function.powershell"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}]|-|\.)((?:begin|break|catch|clean|continue|data|default|define|do|dynamicparam|else|elseif|end|exit|finally|for|from|if|in|inlinescript|parallel|param|process|return|sequence|switch|throw|trap|try|until|var|while)|%|\?)(?![\p{L}\p{M}\p{N}\p{Pc}])/dgiv,name:"keyword.control.powershell"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}]|-|[^\)]\.)((foreach|where)(?!-object)|%|\?)(?![\p{L}\p{M}\p{N}\p{Pc}])/dgiv,name:"keyword.control.powershell"},{begin:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(--%)(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,beginCaptures:{"1":{name:"keyword.control.powershell"}},comment:"This should be moved to the repository at some point.",end:/(?=$|\n)/dgv,patterns:[{match:/[^\n]+/dgv,name:"string.unquoted.powershell"}]},{comment:"This should only be relevant inside a class but will require a rework of how classes are matched. This is a temp fix.",match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])((?:hidden|static))(?![\p{L}\p{M}\p{N}\p{Pc}])/dgiv,name:"storage.modifier.powershell"},{captures:{"1":{name:"storage.type.powershell"},"2":{name:"entity.name.function"}},comment:"capture should be entity.name.type, but it doesn't provide a good color in the default schema.",match:/(?<![\p{L}\p{M}\p{N}\p{Pc}]|-)(class|%|\?)(?:\p{space})+((?:\p{L}|\p{Nd}|_|-|)+)\b/dgiv},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])-(?:is(?:not)?|as)\b/dgiv,name:"keyword.operator.comparison.powershell"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])-[ic]?(?:eq|ne|[gl][te]|(?:not)?(?:like|match|contains|in)|replace)(?!\p{L})/dgiv,name:"keyword.operator.comparison.powershell"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])-(?:join|split)(?!\p{L})|!/dgiv,name:"keyword.operator.unary.powershell"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])-(?:and|or|not|xor)(?!\p{L})|!/dgiv,name:"keyword.operator.logical.powershell"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])-(?:band|bor|bnot|bxor|shl|shr)(?!\p{L})/dgiv,name:"keyword.operator.bitwise.powershell"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])-f(?!\p{L})/dgiv,name:"keyword.operator.string-format.powershell"},{match:/[\+\%\*\/\-]?=|[\+\/\*\%\-]/dgv,name:"keyword.operator.assignment.powershell"},{match:/\|{2}|&{2}|;/dgv,name:"punctuation.terminator.statement.powershell"},{match:/&|(?<![\p{L}\p{M}\p{N}\p{Pc}])\.(?= )|`|,|\|/dgv,name:"keyword.operator.other.powershell"},{comment:"This is very imprecise, is there a syntax for 'must come after...' ",match:/(?<!\p{space}|(?<=^|\n(?!$)))\.\.(?=-?\p{Nd}|\(|\$)/dgv,name:"keyword.operator.range.powershell"}],repository:{RequiresDirective:{begin:/(?<=#)(requires)\p{space}/dgiv,beginCaptures:{"0":{name:"keyword.control.requires.powershell"}},end:/(?=$|\n)/dgv,name:"meta.requires.powershell",patterns:[{match:/-(?:Modules|PSSnapin|RunAsAdministrator|ShellId|Version|Assembly|PSEdition)/dgiv,name:"keyword.other.powershell"},{match:/(?<!-)\b\p{L}+|\p{Nd}+(?:\.\p{Nd}+)*/dgv,name:"variable.parameter.powershell"},{include:"#hashtable"}]},UsingDirective:{captures:{"1":{name:"keyword.control.using.powershell"},"2":{name:"keyword.other.powershell"},"3":{name:"variable.parameter.powershell"}},match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(using)\p{space}+(namespace|module)\p{space}+((?:[\p{L}\p{M}\p{N}\p{Pc}]+(?:\.)?)+)/dgiv},attribute:{begin:/(\[)\p{space}*\b(cmdletbinding|alias|outputtype|parameter|validatenotnull|validatenotnullorempty|validatecount|validateset|allownull|allowemptycollection|allowemptystring|validatescript|validaterange|validatepattern|validatelength|supportswildcards)\b/dgiv,beginCaptures:{"1":{name:"punctuation.section.bracket.begin.powershell"},"2":{name:"support.function.attribute.powershell"}},end:/(\])/dgv,endCaptures:{"1":{name:"punctuation.section.bracket.end.powershell"}},name:"meta.attribute.powershell",patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.section.group.begin.powershell"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.group.end.powershell"}},patterns:[{include:"$self"},{captures:{"1":{name:"variable.parameter.attribute.powershell"},"2":{name:"keyword.operator.assignment.powershell"}},match:/\b(mandatory|valuefrompipeline|valuefrompipelinebypropertyname|valuefromremainingarguments|position|parametersetname|defaultparametersetname|supportsshouldprocess|supportspaging|positionalbinding|helpuri|confirmimpact|helpmessage)\b(?:\p{space}+)?(=)?/dgiv}]}]},commands:{patterns:[{comment:"Verb-Noun pattern:",match:/(?:(\p{L}|\p{Nd}|_|-|\\|:)*\\)?\b(?:Add|Approve|Assert|Backup|Block|Build|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Deploy|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Mount|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Write)-[^\n]+?(?:\.(?:exe|cmd|bat|ps1))?\b/dgiv,name:"support.function.powershell"},{comment:"Builtin cmdlets with reserved verbs",match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])foreach-object(?![\p{L}\p{M}\p{N}\p{Pc}])/dgiv,name:"support.function.powershell"},{comment:"Builtin cmdlets with reserved verbs",match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])where-object(?![\p{L}\p{M}\p{N}\p{Pc}])/dgiv,name:"support.function.powershell"},{comment:"Builtin cmdlets with reserved verbs",match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])sort-object(?![\p{L}\p{M}\p{N}\p{Pc}])/dgiv,name:"support.function.powershell"},{comment:"Builtin cmdlets with reserved verbs",match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])tee-object(?![\p{L}\p{M}\p{N}\p{Pc}])/dgiv,name:"support.function.powershell"}]},commentEmbeddedDocs:{patterns:[{captures:{"1":{name:"constant.string.documentation.powershell"},"2":{name:"keyword.operator.documentation.powershell"}},comment:"these embedded doc keywords do not support arguments, must be the only thing on the line",match:/*@__PURE__*/ new EmulatedRegExp("(?:(?<=^|\\n(?!$))|^)\\p{space}*(\\.)(COMPONENT|DESCRIPTION|EXAMPLE|FUNCTIONALITY|INPUTS|LINK|NOTES|OUTPUTS|ROLE|SYNOPSIS)\\p{space}*(?=$|\\n)","dgiv",{"strategy":"search_start_clip"}),name:"comment.documentation.embedded.powershell"},{captures:{"1":{name:"constant.string.documentation.powershell"},"2":{name:"keyword.operator.documentation.powershell"},"3":{name:"keyword.operator.documentation.powershell"}},comment:"these embedded doc keywords require arguments though the type required may be inconsistent, they may not all be able to use the same argument match",match:/*@__PURE__*/ new EmulatedRegExp("(?:(?<=^|\\n(?!$))|^)\\p{space}*(\\.)(EXTERNALHELP|FORWARDHELP(?:CATEGORY|TARGETNAME)|PARAMETER|REMOTEHELPRUNSPACE)\\p{space}+([^\\n]+?)\\p{space}*(?=$|\\n)","dgiv",{"strategy":"search_start_clip"}),name:"comment.documentation.embedded.powershell"}]},commentLine:{begin:/(?<![\`\\\-])(#)#*/dgv,captures:{"1":{name:"punctuation.definition.comment.powershell"}},end:/(?=$|\n)\n?/dgv,name:"comment.line.powershell",patterns:[{include:"#commentEmbeddedDocs"},{include:"#RequiresDirective"}]},doubleQuotedString:{applyEndPatternLast:true,begin:/["“-„]/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.powershell"}},end:/["“-„]/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.powershell"}},name:"string.quoted.double.powershell",patterns:[{match:/\b[A-Z0-9\._\%\+\-]+@[A-Z0-9\.\-]+\.[A-Z]{2,64}\b/dgiv},{include:"#variableNoProperty"},{include:"#doubleQuotedStringEscapes"},{match:/["“-„]{2}/dgv,name:"constant.character.escape.powershell"},{include:"#interpolation"},{match:/`\p{space}*(?=$|\n)/dgv,name:"keyword.other.powershell"}]},doubleQuotedStringEscapes:{patterns:[{match:/`[\`0abefnrtv'"‘-„\$]/dgv,name:"constant.character.escape.powershell"},{include:"#unicodeEscape"}]},function:{begin:/*@__PURE__*/ new EmulatedRegExp("(?<=^|\\n(?!$))(?:(?=($E$\\p{space}*))\\1)(function|filter|configuration|workflow)\\p{space}+(?:(global|local|script|private):)?((?:\\p{L}|\\p{Nd}|_|-|\\.)+)","dgiv",{"useEmulationGroups":true}),beginCaptures:{"0":{name:"meta.function.powershell"},"1":{name:"storage.type.powershell"},"2":{name:"storage.modifier.scope.powershell"},"3":{name:"entity.name.function.powershell"}},end:/(?=\{|\()/dgv,patterns:[{include:"#commentLine"}]},hashtable:{begin:/(@)(\{)/dgv,beginCaptures:{"1":{name:"keyword.other.hashtable.begin.powershell"},"2":{name:"punctuation.section.braces.begin.powershell"}},end:/(\})/dgv,endCaptures:{"1":{name:"punctuation.section.braces.end.powershell"}},name:"meta.hashtable.powershell",patterns:[{captures:{"1":{name:"punctuation.definition.string.begin.powershell"},"2":{name:"variable.other.readwrite.powershell"},"3":{name:"punctuation.definition.string.end.powershell"},"4":{name:"keyword.operator.assignment.powershell"}},match:/\b((?:'|")?)([\p{L}\p{M}\p{N}\p{Pc}]+)((?:'|")?)(?:\p{space}+)?(=)(?:\p{space}+)?/dgv,name:"meta.hashtable.assignment.powershell"},{include:"#scriptblock"},{include:"$self"}]},interpolation:{begin:/(((\$)))((\())/dgv,beginCaptures:{"1":{name:"keyword.other.substatement.powershell"},"2":{name:"punctuation.definition.substatement.powershell"},"3":{name:"punctuation.section.embedded.substatement.begin.powershell"},"4":{name:"punctuation.section.group.begin.powershell"},"5":{name:"punctuation.section.embedded.substatement.begin.powershell"}},contentName:"interpolated.complex.source.powershell",end:/(\))/dgv,endCaptures:{"0":{name:"punctuation.section.group.end.powershell"},"1":{name:"punctuation.section.embedded.substatement.end.powershell"}},name:"meta.embedded.substatement.powershell",patterns:[{include:"$self"}]},numericConstant:{patterns:[{captures:{"1":{name:"constant.numeric.hex.powershell"},"2":{name:"keyword.other.powershell"}},match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])([\-\+]?0(?:x|X)[0-9a-fA-F_]+(?:U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?)((?:[KKkMmGgTtPp][Bb])?)\b/dgv},{captures:{"1":{name:"constant.numeric.integer.powershell"},"2":{name:"keyword.other.powershell"}},match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])([\-\+]?(?:[0-9_]+)?\.[0-9_]+(?:(?:e|E)[0-9]+)?(?:F|f|D|d|M|m)?)((?:[KKkMmGgTtPp][Bb])?)\b/dgv},{captures:{"1":{name:"constant.numeric.octal.powershell"},"2":{name:"keyword.other.powershell"}},match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])([\-\+]?0(?:b|B)[01_]+(?:U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?)((?:[KKkMmGgTtPp][Bb])?)\b/dgv},{captures:{"1":{name:"constant.numeric.integer.powershell"},"2":{name:"keyword.other.powershell"}},match:/*@__PURE__*/ new EmulatedRegExp("(?<![\\p{L}\\p{M}\\p{N}\\p{Pc}])([\\-\\+]?[0-9_]+(?:e|E)(?:(?=($E$(?:[0-9_])?))\\2)(?:F|f|D|d|M|m)?)((?:[KKkMmGgTtPp][Bb])?)\\b","dgv",{"useEmulationGroups":true})},{captures:{"1":{name:"constant.numeric.integer.powershell"},"2":{name:"keyword.other.powershell"}},match:/*@__PURE__*/ new EmulatedRegExp("(?<![\\p{L}\\p{M}\\p{N}\\p{Pc}])([\\-\\+]?[0-9_]+\\.(?:e|E)(?:(?=($E$(?:[0-9_])?))\\2)(?:F|f|D|d|M|m)?)((?:[KKkMmGgTtPp][Bb])?)\\b","dgv",{"useEmulationGroups":true})},{captures:{"1":{name:"constant.numeric.integer.powershell"},"2":{name:"keyword.other.powershell"}},match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])([\-\+]?[0-9_]+[\.]?(?:F|f|D|d|M|m))((?:[KKkMmGgTtPp][Bb])?)\b/dgv},{captures:{"1":{name:"constant.numeric.integer.powershell"},"2":{name:"keyword.other.powershell"}},match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])([\-\+]?[0-9_]+[\.]?(?:U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?)((?:[KKkMmGgTtPp][Bb])?)\b/dgv}]},scriptblock:{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.section.braces.begin.powershell"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.section.braces.end.powershell"}},name:"meta.scriptblock.powershell",patterns:[{include:"$self"}]},subexpression:{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.section.group.begin.powershell"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.group.end.powershell"}},name:"meta.group.simple.subexpression.powershell",patterns:[{include:"$self"}]},type:{begin:/\[/dgv,beginCaptures:{"0":{name:"punctuation.section.bracket.begin.powershell"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.section.bracket.end.powershell"}},patterns:[{match:/(?!\p{Nd}+|\.)(?:\p{L}|\p{N}|\.)+/dgv,name:"storage.type.powershell"},{include:"$self"}]},unicodeEscape:{comment:"`u{xxxx} added in PowerShell 6.0",patterns:[{match:/*@__PURE__*/ new EmulatedRegExp("`u\\{(?:(?:10)?([0-9a-fA-F]){1,4}|0?($1$E$[0-9a-fA-F]){1,5})\\}","dgv",{"useEmulationGroups":true}),name:"constant.character.escape.powershell"},{match:/`u(?:\{[0-9a-fA-F]{0,6}[^\n])?/dgv,name:"invalid.character.escape.powershell"}]},variable:{patterns:[{captures:{"0":{name:"constant.language.powershell"},"1":{name:"punctuation.definition.variable.powershell"}},comment:"These are special constants.",match:/(\$)(False|Null|True)\b/dgiv},{captures:{"0":{name:"support.constant.variable.powershell"},"1":{name:"punctuation.definition.variable.powershell"},"3":{name:"variable.other.member.powershell"}},comment:"These are the other built-in constants.",match:/(\$)(Error|ExecutionContext|Host|Home|PID|PsHome|PsVersionTable|ShellID)((?:\.(?:\p{L}|\p{Nd}|_)+)*\b)?\b/dgiv},{captures:{"0":{name:"support.variable.automatic.powershell"},"1":{name:"punctuation.definition.variable.powershell"},"3":{name:"variable.other.member.powershell"}},comment:"Automatic variables are not constants, but they are read-only. In monokai (default) color schema support.variable doesn't have color, so we use constant.",match:/(\$)([\$\^\?]|(?:_|Args|ConsoleFileName|Event|EventArgs|EventSubscriber|ForEach|Input|LastExitCode|Matches|MyInvocation|NestedPromptLevel|Profile|PSBoundParameters|PsCmdlet|PsCulture|PSDebugContext|PSItem|PSCommandPath|PSScriptRoot|PsUICulture|Pwd|Sender|SourceArgs|SourceEventArgs|StackTrace|Switch|This)\b)((?:\.(?:\p{L}|\p{Nd}|_)+)*\b)?/dgiv},{captures:{"0":{name:"variable.language.powershell"},"1":{name:"punctuation.definition.variable.powershell"},"3":{name:"variable.other.member.powershell"}},comment:"Style preference variables as language variables so that they stand out.",match:/(\$)(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|InformationPreference|LogCommandHealthEvent|LogCommandLifecycleEvent|LogEngineHealthEvent|LogEngineLifecycleEvent|LogProviderHealthEvent|LogProviderLifecycleEvent|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|PSCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoLoadingPreference|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|ProgressPreference|VerbosePreference|WarningPreference|WhatIfPreference)((?:\.(?:\p{L}|\p{Nd}|_)+)*\b)?\b/dgiv},{captures:{"0":{name:"variable.other.readwrite.powershell"},"1":{name:"punctuation.definition.variable.powershell"},"2":{name:"storage.modifier.scope.powershell"},"4":{name:"variable.other.member.powershell"}},match:/(\$|@)(global|local|private|script|using|workflow):((?:\p{L}|\p{Nd}|_)+)((?:\.(?:\p{L}|\p{Nd}|_)+)*\b)?/dgiv},{captures:{"0":{name:"variable.other.readwrite.powershell"},"1":{name:"punctuation.definition.variable.powershell"},"2":{name:"punctuation.section.braces.begin.powershell"},"3":{name:"storage.modifier.scope.powershell"},"5":{name:"punctuation.section.braces.end.powershell"},"6":{name:"variable.other.member.powershell"}},match:/(\$)(\{)(global|local|private|script|using|workflow):([^\}]*[^\}\`])(\})((?:\.(?:\p{L}|\p{Nd}|_)+)*\b)?/dgiv},{captures:{"0":{name:"variable.other.readwrite.powershell"},"1":{name:"punctuation.definition.variable.powershell"},"2":{name:"support.variable.drive.powershell"},"4":{name:"variable.other.member.powershell"}},match:/(\$|@)((?:\p{L}|\p{Nd}|_)+:)?((?:\p{L}|\p{Nd}|_)+)((?:\.(?:\p{L}|\p{Nd}|_)+)*\b)?/dgv},{captures:{"0":{name:"variable.other.readwrite.powershell"},"1":{name:"punctuation.definition.variable.powershell"},"2":{name:"punctuation.section.braces.begin.powershell"},"3":{name:"support.variable.drive.powershell"},"5":{name:"punctuation.section.braces.end.powershell"},"6":{name:"variable.other.member.powershell"}},match:/(\$)(\{)((?:\p{L}|\p{Nd}|_)+:)?([^\}]*[^\}\`])(\})((?:\.(?:\p{L}|\p{Nd}|_)+)*\b)?/dgv}]},variableNoProperty:{patterns:[{captures:{"0":{name:"constant.language.powershell"},"1":{name:"punctuation.definition.variable.powershell"}},comment:"These are special constants.",match:/(\$)(False|Null|True)\b/dgiv},{captures:{"0":{name:"support.constant.variable.powershell"},"1":{name:"punctuation.definition.variable.powershell"},"3":{name:"variable.other.member.powershell"}},comment:"These are the other built-in constants.",match:/(\$)(Error|ExecutionContext|Host|Home|PID|PsHome|PsVersionTable|ShellID)\b/dgiv},{captures:{"0":{name:"support.variable.automatic.powershell"},"1":{name:"punctuation.definition.variable.powershell"},"3":{name:"variable.other.member.powershell"}},comment:"Automatic variables are not constants, but they are read-only...",match:/(\$)([\$\^\?]|(?:_|Args|ConsoleFileName|Event|EventArgs|EventSubscriber|ForEach|Input|LastExitCode|Matches|MyInvocation|NestedPromptLevel|Profile|PSBoundParameters|PsCmdlet|PsCulture|PSDebugContext|PSItem|PSCommandPath|PSScriptRoot|PsUICulture|Pwd|Sender|SourceArgs|SourceEventArgs|StackTrace|Switch|This)\b)/dgiv},{captures:{"0":{name:"variable.language.powershell"},"1":{name:"punctuation.definition.variable.powershell"},"3":{name:"variable.other.member.powershell"}},comment:"Style preference variables as language variables so that they stand out.",match:/(\$)(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|InformationPreference|LogCommandHealthEvent|LogCommandLifecycleEvent|LogEngineHealthEvent|LogEngineLifecycleEvent|LogProviderHealthEvent|LogProviderLifecycleEvent|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|PSCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoLoadingPreference|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|ProgressPreference|VerbosePreference|WarningPreference|WhatIfPreference)\b/dgiv},{captures:{"0":{name:"variable.other.readwrite.powershell"},"1":{name:"punctuation.definition.variable.powershell"},"2":{name:"storage.modifier.scope.powershell"},"4":{name:"variable.other.member.powershell"}},match:/(\$)(global|local|private|script|using|workflow):((?:\p{L}|\p{Nd}|_)+)/dgiv},{captures:{"0":{name:"variable.other.readwrite.powershell"},"1":{name:"punctuation.definition.variable.powershell"},"2":{name:"storage.modifier.scope.powershell"},"4":{name:"keyword.other.powershell"},"5":{name:"variable.other.member.powershell"}},match:/(\$)(\{)(global|local|private|script|using|workflow):([^\}]*[^\}\`])(\})/dgiv},{captures:{"0":{name:"variable.other.readwrite.powershell"},"1":{name:"punctuation.definition.variable.powershell"},"2":{name:"support.variable.drive.powershell"},"4":{name:"variable.other.member.powershell"}},match:/(\$)((?:\p{L}|\p{Nd}|_)+:)?((?:\p{L}|\p{Nd}|_)+)/dgv},{captures:{"0":{name:"variable.other.readwrite.powershell"},"1":{name:"punctuation.definition.variable.powershell"},"2":{name:"punctuation.section.braces.begin"},"3":{name:"support.variable.drive.powershell"},"5":{name:"punctuation.section.braces.end"}},match:/(\$)(\{)((?:\p{L}|\p{Nd}|_)+:)?([^\}]*[^\}\`])(\})/dgv}]}},scopeName:"source.powershell",embeddedLangs:undefined,aliases:["ps","ps1"]})
|
|
4
4
|
|
|
5
5
|
export default [
|
|
6
6
|
lang
|
package/dist/pug.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { EmulatedRegExp } from 'oniguruma-to-es'
|
|
1
2
|
import javascript from './javascript.mjs'
|
|
2
3
|
import css from './css.mjs'
|
|
3
4
|
import html from './html.mjs'
|
|
4
5
|
|
|
5
|
-
const lang = Object.freeze({displayName:"Pug",name:"pug",patterns:[{comment:"Doctype declaration.",match:/(?<=^|\n(?!$))(!!!|doctype)(\p{space}*[a-zA-Z0-9\-_]+)?/dgv,name:"meta.tag.sgml.doctype.html"},{begin:/(?<=^|\n(?!$))(\p{space}*)\/\/-/dgv,comment:"Unbuffered (pug-only) comments.",end:/(?<=^|\n(?!$))(?!((?!)\p{space})|\p{space}*(?=$|\n))/dgv,name:"comment.unbuffered.block.pug"},{begin:/(?<=^|\n(?!$))(\p{space}*)\/\//dgv,comment:"Buffered (html) comments.",end:/(?<=^|\n(?!$))(?!((?!)\p{space})|\p{space}*(?=$|\n))/dgv,name:"string.comment.buffered.block.pug",patterns:[{captures:{"1":{name:"invalid.illegal.comment.comment.block.pug"}},comment:"Buffered comments inside buffered comments will generate invalid html.",match:/(?<=^|\n(?!$))\p{space}*(\/\/)(?!-)/dgv,name:"string.comment.buffered.block.pug"}]},{begin:/<!--/dgv,end:/--\p{space}*>/dgv,name:"comment.unbuffered.block.pug",patterns:[{match:/--/dgv,name:"invalid.illegal.comment.comment.block.pug"}]},{begin:/(?<=^|\n(?!$))(\p{space}*)-(?=$|\n)/dgv,comment:"Unbuffered code block.",end:/(?<=^|\n(?!$))(?!((?!)\p{space})|\p{space}*(?=$|\n))/dgv,name:"source.js",patterns:[{include:"source.js"}]},{begin:/(?<=^|\n(?!$))(\p{space}*)(script)((\.(?=$|\n))|(?=[^\n]*((text|application)\/javascript|module)[^\n]*\.(?=$|\n)))/dgv,beginCaptures:{"2":{name:"entity.name.tag.pug"}},comment:"Script tag with JavaScript code.",end:/(?<=^|\n(?!$))(?!((?!)\p{space})|\p{space}*(?=$|\n))/dgv,name:"meta.tag.other",patterns:[{begin:/(?=\()/dgvy,end:/(?=$|\n)/dgv,patterns:[{include:"#tag_attributes"}]},{begin:/(?=[\.\#])/dgvy,end:/(?=$|\n)/dgv,patterns:[{include:"#complete_tag"}]},{include:"source.js"}]},{begin:/(?<=^|\n(?!$))(\p{space}*)(style)((\.(?=$|\n))|(?=[\.\#\(][^\n]*\.(?=$|\n)))/dgv,beginCaptures:{"2":{name:"entity.name.tag.pug"}},comment:"Style tag with CSS code.",end:/(?<=^|\n(?!$))(?!((?!)\p{space})|\p{space}*(?=$|\n))/dgv,name:"meta.tag.other",patterns:[{begin:/(?=\()/dgvy,end:/(?=$|\n)/dgv,patterns:[{include:"#tag_attributes"}]},{begin:/(?=[\.\#])/dgvy,end:/(?=$|\n)/dgv,patterns:[{include:"#complete_tag"}]},{include:"source.css"}]},{begin:/(?<=^|\n(?!$))(\p{space}*):(sass)(?=\(|(?=$|\n))/dgv,beginCaptures:{"2":{name:"constant.language.name.sass.filter.pug"}},end:/(?<=^|\n(?!$))(?!((?!)\p{space})|\p{space}*(?=$|\n))/dgv,name:"source.sass.filter.pug",patterns:[{include:"#tag_attributes"},{include:"source.sass"}]},{begin:/(?<=^|\n(?!$))(\p{space}*):(scss)(?=\(|(?=$|\n))/dgv,beginCaptures:{"2":{name:"constant.language.name.scss.filter.pug"}},end:/(?<=^|\n(?!$))(?!((?!)\p{space})|\p{space}*(?=$|\n))/dgv,name:"source.css.scss.filter.pug",patterns:[{include:"#tag_attributes"},{include:"source.css.scss"}]},{begin:/(?<=^|\n(?!$))(\p{space}*):(less)(?=\(|(?=$|\n))/dgv,beginCaptures:{"2":{name:"constant.language.name.less.filter.pug"}},end:/(?<=^|\n(?!$))(?!((?!)\p{space})|\p{space}*(?=$|\n))/dgv,name:"source.less.filter.pug",patterns:[{include:"#tag_attributes"},{include:"source.less"}]},{begin:/(?<=^|\n(?!$))(\p{space}*):(stylus)(?=\(|(?=$|\n))/dgv,beginCaptures:{"2":{name:"constant.language.name.stylus.filter.pug"}},end:/(?<=^|\n(?!$))(?!((?!)\p{space})|\p{space}*(?=$|\n))/dgv,patterns:[{include:"#tag_attributes"},{include:"source.stylus"}]},{begin:/(?<=^|\n(?!$))(\p{space}*):(coffee(-?script)?)(?=\(|(?=$|\n))/dgv,beginCaptures:{"2":{name:"constant.language.name.coffeescript.filter.pug"}},end:/(?<=^|\n(?!$))(?!((?!)\p{space})|\p{space}*(?=$|\n))/dgv,name:"source.coffeescript.filter.pug",patterns:[{include:"#tag_attributes"},{include:"source.coffee"}]},{begin:/(?<=^|\n(?!$))(\p{space}*):(uglify-js)(?=\(|(?=$|\n))/dgv,beginCaptures:{"2":{name:"constant.language.name.js.filter.pug"}},end:/(?<=^|\n(?!$))(?!((?!)\p{space})|\p{space}*(?=$|\n))/dgv,name:"source.js.filter.pug",patterns:[{include:"#tag_attributes"},{include:"source.js"}]},{begin:/(?<=^|\n(?!$))(\p{space}*)((:(?=[^\n]))|(:(?=$|\n)))/dgv,beginCaptures:{"4":{name:"invalid.illegal.empty.generic.filter.pug"}},comment:"Generic Pug filter.",end:/(?<=^|\n(?!$))(?!((?!)\p{space})|\p{space}*(?=$|\n))/dgv,patterns:[{begin:/(?<=:)(?=[^\n])/dgvy,end:/(?=$|\n)/dgv,name:"name.generic.filter.pug",patterns:[{match:/\(/dgvy,name:"invalid.illegal.name.generic.filter.pug"},{match:/[\p{L}\p{M}\p{N}\p{Pc}\-]/dgv,name:"constant.language.name.generic.filter.pug"},{include:"#tag_attributes"},{match:/[^\p{L}\p{M}\p{N}\p{Pc}]/dgv,name:"invalid.illegal.name.generic.filter.pug"}]}]},{begin:/(?<=^|\n(?!$))(\p{space}*)(?:(?=\.(?=$|\n))|(?=[\p{L}\p{M}\p{N}\p{Pc}\.\#][^\n]*?\.(?=$|\n))(?=(?:(?:#[\p{L}\p{M}\p{N}\p{Pc}\-]+|\.[\p{L}\p{M}\p{N}\p{Pc}\-]+)|(?:[\#\!]\{[^\}]*\}|[\p{L}\p{M}\p{N}\p{Pc}](?:[\p{L}\p{M}\p{N}\p{Pc}\:\-]+[\p{L}\p{M}\p{N}\p{Pc}\-]|[\p{L}\p{M}\p{N}\p{Pc}\-]*)))(?:#[\p{L}\p{M}\p{N}\p{Pc}\-]+|\.[\p{L}\p{M}\p{N}\p{Pc}\-]+|(?:\((?:[^\(\)'"]*(?:'(?:[^']|(?<!\\)\\')*'|"(?:[^"]|(?<!\\)\\")*"))*[^\(\)]*\))*)*(?:(?::\p{space}+|(?<=\)))(?:(?:#[\p{L}\p{M}\p{N}\p{Pc}\-]+|\.[\p{L}\p{M}\p{N}\p{Pc}\-]+)|(?:[\#\!]\{[^\}]*\}|[\p{L}\p{M}\p{N}\p{Pc}](?:[\p{L}\p{M}\p{N}\p{Pc}\:\-]+[\p{L}\p{M}\p{N}\p{Pc}\-]|[\p{L}\p{M}\p{N}\p{Pc}\-]*)))(?:#[\p{L}\p{M}\p{N}\p{Pc}\-]+|\.[\p{L}\p{M}\p{N}\p{Pc}\-]+|(?:\((?:[^\(\)'"]*(?:'(?:[^']|(?<!\\)\\')*'|"(?:[^"]|(?<!\\)\\")*"))*[^\(\)]*\))*)*)*\.(?=$|\n))(?:(?:(#[\p{L}\p{M}\p{N}\p{Pc}\-]+)|(\.[\p{L}\p{M}\p{N}\p{Pc}\-]+))|([\#\!]\{[^\}]*\}|[\p{L}\p{M}\p{N}\p{Pc}](?:[\p{L}\p{M}\p{N}\p{Pc}\:\-]+[\p{L}\p{M}\p{N}\p{Pc}\-]|[\p{L}\p{M}\p{N}\p{Pc}\-]*))))/dgv,beginCaptures:{"2":{name:"meta.selector.css entity.other.attribute-name.id.css.pug"},"3":{name:"meta.selector.css entity.other.attribute-name.class.css.pug"},"4":{name:"meta.tag.other entity.name.tag.pug"}},comment:"Generated from dot_block_tag.py",end:/(?<=^|\n(?!$))(?!((?!)\p{space})|\p{space}*(?=$|\n))/dgv,patterns:[{match:/\.(?=$|\n)/dgv,name:"storage.type.function.pug.dot-block-dot"},{include:"#tag_attributes"},{include:"#complete_tag"},{begin:/(?<=^|\n(?!$))(?=[^\n])/dgv,end:/(?=$|\n)/dgv,name:"text.block.pug",patterns:[{include:"#inline_pug"},{include:"#embedded_html"},{include:"#html_entity"},{include:"#interpolated_value"},{include:"#interpolated_error"}]}]},{begin:/(?<=^|\n(?!$))\p{space}*/dgv,comment:"All constructs that generally span a single line starting with any number of white-spaces.",end:/(?=$|\n)/dgv,patterns:[{include:"#inline_pug"},{include:"#blocks_and_includes"},{include:"#unbuffered_code"},{include:"#mixin_definition"},{include:"#mixin_call"},{include:"#flow_control"},{include:"#flow_control_each"},{include:"#case_conds"},{begin:/\|/dgv,comment:"Tag pipe text line.",end:/(?=$|\n)/dgv,name:"text.block.pipe.pug",patterns:[{include:"#inline_pug"},{include:"#embedded_html"},{include:"#html_entity"},{include:"#interpolated_value"},{include:"#interpolated_error"}]},{include:"#printed_expression"},{begin:/(?=(#[^\{\p{L}\p{M}\p{N}\p{Pc}\-])|[^\p{L}\p{M}\p{N}\p{Pc}\.\#])/dgvy,comment:"Line starting with characters incompatible with tag name/id/class is standalone text.",end:/(?=$|\n)/dgv,patterns:[{begin:/<\/?(?=[\!\#])/dgv,end:/>|(?=$|\n)/dgv,patterns:[{include:"#inline_pug"},{include:"#interpolated_value"},{include:"#interpolated_error"}]},{include:"#inline_pug"},{include:"#embedded_html"},{include:"#html_entity"},{include:"#interpolated_value"},{include:"#interpolated_error"}]},{include:"#complete_tag"}]}],repository:{babel_parens:{begin:/\(/dgv,end:/\)|((\{\p{space}*)?(?=$|\n))/dgv,patterns:[{include:"#babel_parens"},{include:"source.js"}]},blocks_and_includes:{captures:{"1":{name:"storage.type.import.include.pug"},"4":{name:"variable.control.import.include.pug"}},comment:"Template blocks and includes.",match:/(extends|include|yield|append|prepend|block( (append|prepend))?)\p{space}+([^\n]*)(?=$|\n)/dgv,name:"meta.first-class.pug"},case_conds:{begin:/(default|when)((\p{space}+|(?=:))|(?=$|\n))/dgv,captures:{"1":{name:"storage.type.function.pug"}},comment:"Pug case conditionals.",end:/(?=$|\n)/dgv,name:"meta.control.flow.pug",patterns:[{begin:/(?!:)/dgvy,end:/(?=:\p{space}+)|(?=$|\n)/dgv,name:"js.embedded.control.flow.pug",patterns:[{include:"#case_when_paren"},{include:"source.js"}]},{begin:/:\p{space}+/dgv,end:/(?=$|\n)/dgv,name:"tag.case.control.flow.pug",patterns:[{include:"#complete_tag"}]}]},case_when_paren:{begin:/\(/dgv,end:/\)/dgv,name:"js.when.control.flow.pug",patterns:[{include:"#case_when_paren"},{match:/:/dgv,name:"invalid.illegal.name.tag.pug"},{include:"source.js"}]},complete_tag:{begin:/(?=[\p{L}\p{M}\p{N}\p{Pc}\.\#])|(:\p{space}*)/dgv,end:/(\.?(?=$|\n))|(?=:[^\n])/dgv,endCaptures:{"1":{name:"storage.type.function.pug.dot-block-dot"}},patterns:[{include:"#blocks_and_includes"},{include:"#unbuffered_code"},{include:"#mixin_call"},{include:"#flow_control"},{include:"#flow_control_each"},{match:/(?<=:)[\p{L}\p{M}\p{N}\p{Pc}][^\n]*(?=$|\n)/dgv,name:"invalid.illegal.name.tag.pug"},{include:"#tag_name"},{include:"#tag_id"},{include:"#tag_classes"},{include:"#tag_attributes"},{include:"#tag_mixin_attributes"},{captures:{"2":{name:"invalid.illegal.end.tag.pug"},"4":{name:"invalid.illegal.end.tag.pug"}},match:/((\.)\p{space}+(?=$|\n))|((:)\p{space}*(?=$|\n))/dgv},{include:"#printed_expression"},{include:"#tag_text"}]},embedded_html:{begin:/(?=<[^\>]*>)/dgv,end:/(?=$|\n)|(?=>)/dgv,name:"html",patterns:[{include:"text.html.basic"},{include:"#interpolated_value"},{include:"#interpolated_error"}]},flow_control:{begin:/(for|if|else if|else|until|while|unless|case)(\p{space}+|(?=$|\n))/dgv,captures:{"1":{name:"storage.type.function.pug"}},comment:"Pug control flow.",end:/(?=$|\n)/dgv,name:"meta.control.flow.pug",patterns:[{begin:"",end:/(?=$|\n)/dgv,name:"js.embedded.control.flow.pug",patterns:[{include:"source.js"}]}]},flow_control_each:{begin:/(each)(\p{space}+|(?=$|\n))/dgv,captures:{"1":{name:"storage.type.function.pug"}},end:/(?=$|\n)/dgv,name:"meta.control.flow.pug.each",patterns:[{match:/([\p{L}\p{M}\p{N}\p{Pc}\$_]+)(?:\p{space}*,\p{space}*([\p{L}\p{M}\p{N}\p{Pc}\$_]+))?/dgv,name:"variable.other.pug.each-var"},{begin:"",end:/(?=$|\n)/dgv,name:"js.embedded.control.flow.pug",patterns:[{include:"source.js"}]}]},html_entity:{patterns:[{match:/(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)/dgv,name:"constant.character.entity.html.text.pug"},{match:/[\<\>\&]/dgv,name:"invalid.illegal.html_entity.text.pug"}]},inline_pug:{begin:/(?<!\\)(#\[)/dgv,captures:{"1":{name:"entity.name.function.pug"},"2":{name:"entity.name.function.pug"}},end:/(\])/dgv,name:"inline.pug",patterns:[{include:"#inline_pug"},{include:"#mixin_call"},{begin:/(?<!\])(?=[\p{L}\p{M}\p{N}\p{Pc}\.\#])|(:\p{space}*)/dgv,end:/(?=\]|(:[^\n])|=|\p{space})/dgv,name:"tag.inline.pug",patterns:[{include:"#tag_name"},{include:"#tag_id"},{include:"#tag_classes"},{include:"#tag_attributes"},{include:"#tag_mixin_attributes"},{include:"#inline_pug"},{match:/\[/dgv,name:"invalid.illegal.tag.pug"}]},{include:"#unbuffered_code"},{include:"#printed_expression"},{match:/\[/dgv,name:"invalid.illegal.tag.pug"},{include:"#inline_pug_text"}]},inline_pug_text:{begin:"",end:/(?=\])/dgv,patterns:[{begin:/\[/dgv,end:/\]/dgv,patterns:[{include:"#inline_pug_text"}]},{include:"#inline_pug"},{include:"#embedded_html"},{include:"#html_entity"},{include:"#interpolated_value"},{include:"#interpolated_error"}]},interpolated_error:{match:/(?<!\\)[\#\!]\{(?=[^\}]*(?=$|\n))/dgv,name:"invalid.illegal.tag.pug"},interpolated_value:{begin:/(?<!\\)[\#\!]\{(?=[^\n]*?\})/dgv,end:/\}/dgv,name:"string.interpolated.pug",patterns:[{match:/\{/dgv,name:"invalid.illegal.tag.pug"},{include:"source.js"}]},js_braces:{begin:/\{/dgv,end:/\}/dgv,patterns:[{include:"#js_braces"},{include:"source.js"}]},js_brackets:{begin:/\[/dgv,end:/\]/dgv,patterns:[{include:"#js_brackets"},{include:"source.js"}]},js_parens:{begin:/\(/dgv,end:/\)/dgv,patterns:[{include:"#js_parens"},{include:"source.js"}]},mixin_call:{begin:/(mixin\p{space}+|\+)([\p{L}\p{M}\p{N}\p{Pc}\-]+)/dgv,beginCaptures:{"1":{name:"storage.type.function.pug"},"2":{name:"meta.tag.other entity.name.function.pug"}},end:/(?!\()|(?=$|\n)/dgv,patterns:[{begin:/(?<!\))\(/dgv,end:/\)/dgv,name:"args.mixin.pug",patterns:[{include:"#js_parens"},{captures:{"1":{name:"meta.tag.other entity.other.attribute-name.tag.pug"}},match:/([^\p{space}\(\)\,\=\/]+)\p{space}*=\p{space}*/dgv},{include:"source.js"}]},{include:"#tag_attributes"}]},mixin_definition:{captures:{"1":{name:"storage.type.function.pug"},"2":{name:"meta.tag.other entity.name.function.pug"},"3":{name:"punctuation.definition.parameters.begin.js"},"4":{name:"variable.parameter.function.js"},"5":{name:"punctuation.definition.parameters.begin.js"}},match:/(mixin\p{space}+)([\p{L}\p{M}\p{N}\p{Pc}\-]+)(?:(\()\p{space}*([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*\p{space}*(?:,\p{space}*[a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*\p{space}*)*)(\)))?(?=$|\n)/dgv},printed_expression:{begin:/(!?=)\p{space}*/dgv,captures:{"1":{name:"constant"}},end:/(?=\])|(?=$|\n)/dgv,name:"source.js",patterns:[{include:"#js_brackets"},{include:"source.js"}]},tag_attribute_name:{captures:{"1":{name:"entity.other.attribute-name.tag.pug"}},match:/([^\p{space}\(\)\,\=\/\!]+)\p{space}*/dgv},tag_attribute_name_paren:{begin:/\(\p{space}*/dgv,end:/\)/dgv,name:"entity.other.attribute-name.tag.pug",patterns:[{include:"#tag_attribute_name_paren"},{include:"#tag_attribute_name"}]},tag_attributes:{begin:/(\(\p{space}*)/dgv,captures:{"1":{name:"constant.name.attribute.tag.pug"}},end:/(\))/dgv,name:"meta.tag.other",patterns:[{include:"#tag_attribute_name_paren"},{include:"#tag_attribute_name"},{match:/!(?!=)/dgv,name:"invalid.illegal.tag.pug"},{begin:/=\p{space}*/dgv,end:/(?=$|\n)|(?=,|\p{space}+[^\!\%\&\*\-\+\~\|\<\>\?\/]|\))/dgv,name:"attribute_value",patterns:[{include:"#js_parens"},{include:"#js_brackets"},{include:"#js_braces"},{include:"source.js"}]},{begin:/(?<=[\%\&\*\-\+\~\|\<\>\:\?\/])\p{space}+/dgv,end:/(?=$|\n)|(?=,|\p{space}+[^\!\%\&\*\-\+\~\|\<\>\?\/]|\))/dgv,name:"attribute_value2",patterns:[{include:"#js_parens"},{include:"#js_brackets"},{include:"#js_braces"},{include:"source.js"}]}]},tag_classes:{captures:{"1":{name:"invalid.illegal.tag.pug"}},match:/\.([^\p{L}\p{M}\p{N}\p{Pc}\-])?[\p{L}\p{M}\p{N}\p{Pc}\-]*/dgv,name:"meta.selector.css entity.other.attribute-name.class.css.pug"},tag_id:{match:/#[\p{L}\p{M}\p{N}\p{Pc}\-]+/dgv,name:"meta.selector.css entity.other.attribute-name.id.css.pug"},tag_mixin_attributes:{begin:/(&attributes\()/dgv,captures:{"1":{name:"entity.name.function.pug"}},end:/(\))/dgv,name:"meta.tag.other",patterns:[{match:/attributes(?=\))/dgv,name:"storage.type.keyword.pug"},{include:"source.js"}]},tag_name:{begin:/([\#\!]\{(?=[^\n]*?\}))|([\p{L}\p{M}\p{N}\p{Pc}](([\p{L}\p{M}\p{N}\p{Pc}\:\-]+[\p{L}\p{M}\p{N}\p{Pc}\-])|([\p{L}\p{M}\p{N}\p{Pc}\-]*)))/dgv,end:/((?<!\5[^\p{L}\p{M}\p{N}\p{Pc}\-]))|\}|(?=$|\n)()()()()/dgv,name:"meta.tag.other entity.name.tag.pug",patterns:[{begin:/(?<=\{)/dgvy,end:/(?=\})/dgv,name:"meta.tag.other entity.name.tag.pug",patterns:[{match:/\{/dgv,name:"invalid.illegal.tag.pug"},{include:"source.js"}]}]},tag_text:{begin:/(?=[^\n])/dgv,end:/(?=$|\n)/dgv,patterns:[{include:"#inline_pug"},{include:"#embedded_html"},{include:"#html_entity"},{include:"#interpolated_value"},{include:"#interpolated_error"}]},unbuffered_code:{begin:/(-|(([a-zA-Z0-9_]+)\p{space}+=))/dgv,beginCaptures:{"3":{name:"variable.parameter.javascript.embedded.pug"}},comment:"name = function() {}",end:/(?=\])|((\{\p{space}*)?(?=$|\n))/dgv,name:"source.js",patterns:[{include:"#js_brackets"},{include:"#babel_parens"},{include:"source.js"}]}},scopeName:"text.pug",embeddedLangs:["javascript","css","html"],aliases:["jade"],embeddedLangsLazy:["sass","scss","stylus","coffee"]})
|
|
6
|
+
const lang = Object.freeze({displayName:"Pug",name:"pug",patterns:[{comment:"Doctype declaration.",match:/(?<=^|\n(?!$))(!!!|doctype)(\p{space}*[a-zA-Z0-9\-_]+)?/dgv,name:"meta.tag.sgml.doctype.html"},{begin:/(?<=^|\n(?!$))(\p{space}*)\/\/-/dgv,comment:"Unbuffered (pug-only) comments.",end:/(?<=^|\n(?!$))(?!((?!)\p{space})|\p{space}*(?=$|\n))/dgv,name:"comment.unbuffered.block.pug"},{begin:/(?<=^|\n(?!$))(\p{space}*)\/\//dgv,comment:"Buffered (html) comments.",end:/(?<=^|\n(?!$))(?!((?!)\p{space})|\p{space}*(?=$|\n))/dgv,name:"string.comment.buffered.block.pug",patterns:[{captures:{"1":{name:"invalid.illegal.comment.comment.block.pug"}},comment:"Buffered comments inside buffered comments will generate invalid html.",match:/(?<=^|\n(?!$))\p{space}*(\/\/)(?!-)/dgv,name:"string.comment.buffered.block.pug"}]},{begin:/<!--/dgv,end:/--\p{space}*>/dgv,name:"comment.unbuffered.block.pug",patterns:[{match:/--/dgv,name:"invalid.illegal.comment.comment.block.pug"}]},{begin:/(?<=^|\n(?!$))(\p{space}*)-(?=$|\n)/dgv,comment:"Unbuffered code block.",end:/(?<=^|\n(?!$))(?!((?!)\p{space})|\p{space}*(?=$|\n))/dgv,name:"source.js",patterns:[{include:"source.js"}]},{begin:/(?<=^|\n(?!$))(\p{space}*)(script)((\.(?=$|\n))|(?=[^\n]*((text|application)\/javascript|module)[^\n]*\.(?=$|\n)))/dgv,beginCaptures:{"2":{name:"entity.name.tag.pug"}},comment:"Script tag with JavaScript code.",end:/(?<=^|\n(?!$))(?!((?!)\p{space})|\p{space}*(?=$|\n))/dgv,name:"meta.tag.other",patterns:[{begin:/(?=\()/dgvy,end:/(?=$|\n)/dgv,patterns:[{include:"#tag_attributes"}]},{begin:/(?=[\.\#])/dgvy,end:/(?=$|\n)/dgv,patterns:[{include:"#complete_tag"}]},{include:"source.js"}]},{begin:/(?<=^|\n(?!$))(\p{space}*)(style)((\.(?=$|\n))|(?=[\.\#\(][^\n]*\.(?=$|\n)))/dgv,beginCaptures:{"2":{name:"entity.name.tag.pug"}},comment:"Style tag with CSS code.",end:/(?<=^|\n(?!$))(?!((?!)\p{space})|\p{space}*(?=$|\n))/dgv,name:"meta.tag.other",patterns:[{begin:/(?=\()/dgvy,end:/(?=$|\n)/dgv,patterns:[{include:"#tag_attributes"}]},{begin:/(?=[\.\#])/dgvy,end:/(?=$|\n)/dgv,patterns:[{include:"#complete_tag"}]},{include:"source.css"}]},{begin:/(?<=^|\n(?!$))(\p{space}*):(sass)(?=\(|(?=$|\n))/dgv,beginCaptures:{"2":{name:"constant.language.name.sass.filter.pug"}},end:/(?<=^|\n(?!$))(?!((?!)\p{space})|\p{space}*(?=$|\n))/dgv,name:"source.sass.filter.pug",patterns:[{include:"#tag_attributes"},{include:"source.sass"}]},{begin:/(?<=^|\n(?!$))(\p{space}*):(scss)(?=\(|(?=$|\n))/dgv,beginCaptures:{"2":{name:"constant.language.name.scss.filter.pug"}},end:/(?<=^|\n(?!$))(?!((?!)\p{space})|\p{space}*(?=$|\n))/dgv,name:"source.css.scss.filter.pug",patterns:[{include:"#tag_attributes"},{include:"source.css.scss"}]},{begin:/(?<=^|\n(?!$))(\p{space}*):(less)(?=\(|(?=$|\n))/dgv,beginCaptures:{"2":{name:"constant.language.name.less.filter.pug"}},end:/(?<=^|\n(?!$))(?!((?!)\p{space})|\p{space}*(?=$|\n))/dgv,name:"source.less.filter.pug",patterns:[{include:"#tag_attributes"},{include:"source.less"}]},{begin:/(?<=^|\n(?!$))(\p{space}*):(stylus)(?=\(|(?=$|\n))/dgv,beginCaptures:{"2":{name:"constant.language.name.stylus.filter.pug"}},end:/(?<=^|\n(?!$))(?!((?!)\p{space})|\p{space}*(?=$|\n))/dgv,patterns:[{include:"#tag_attributes"},{include:"source.stylus"}]},{begin:/(?<=^|\n(?!$))(\p{space}*):(coffee(-?script)?)(?=\(|(?=$|\n))/dgv,beginCaptures:{"2":{name:"constant.language.name.coffeescript.filter.pug"}},end:/(?<=^|\n(?!$))(?!((?!)\p{space})|\p{space}*(?=$|\n))/dgv,name:"source.coffeescript.filter.pug",patterns:[{include:"#tag_attributes"},{include:"source.coffee"}]},{begin:/(?<=^|\n(?!$))(\p{space}*):(uglify-js)(?=\(|(?=$|\n))/dgv,beginCaptures:{"2":{name:"constant.language.name.js.filter.pug"}},end:/(?<=^|\n(?!$))(?!((?!)\p{space})|\p{space}*(?=$|\n))/dgv,name:"source.js.filter.pug",patterns:[{include:"#tag_attributes"},{include:"source.js"}]},{begin:/(?<=^|\n(?!$))(\p{space}*)((:(?=[^\n]))|(:(?=$|\n)))/dgv,beginCaptures:{"4":{name:"invalid.illegal.empty.generic.filter.pug"}},comment:"Generic Pug filter.",end:/(?<=^|\n(?!$))(?!((?!)\p{space})|\p{space}*(?=$|\n))/dgv,patterns:[{begin:/(?<=:)(?=[^\n])/dgvy,end:/(?=$|\n)/dgv,name:"name.generic.filter.pug",patterns:[{match:/\(/dgvy,name:"invalid.illegal.name.generic.filter.pug"},{match:/[\p{L}\p{M}\p{N}\p{Pc}\-]/dgv,name:"constant.language.name.generic.filter.pug"},{include:"#tag_attributes"},{match:/[^\p{L}\p{M}\p{N}\p{Pc}]/dgv,name:"invalid.illegal.name.generic.filter.pug"}]}]},{begin:/(?<=^|\n(?!$))(\p{space}*)(?:(?=\.(?=$|\n))|(?=[\p{L}\p{M}\p{N}\p{Pc}\.\#][^\n]*?\.(?=$|\n))(?=(?:(?:#[\p{L}\p{M}\p{N}\p{Pc}\-]+|\.[\p{L}\p{M}\p{N}\p{Pc}\-]+)|(?:[\#\!]\{[^\}]*\}|[\p{L}\p{M}\p{N}\p{Pc}](?:[\p{L}\p{M}\p{N}\p{Pc}\:\-]+[\p{L}\p{M}\p{N}\p{Pc}\-]|[\p{L}\p{M}\p{N}\p{Pc}\-]*)))(?:#[\p{L}\p{M}\p{N}\p{Pc}\-]+|\.[\p{L}\p{M}\p{N}\p{Pc}\-]+|(?:\((?:[^\(\)'"]*(?:'(?:[^']|(?<!\\)\\')*'|"(?:[^"]|(?<!\\)\\")*"))*[^\(\)]*\))*)*(?:(?::\p{space}+|(?<=\)))(?:(?:#[\p{L}\p{M}\p{N}\p{Pc}\-]+|\.[\p{L}\p{M}\p{N}\p{Pc}\-]+)|(?:[\#\!]\{[^\}]*\}|[\p{L}\p{M}\p{N}\p{Pc}](?:[\p{L}\p{M}\p{N}\p{Pc}\:\-]+[\p{L}\p{M}\p{N}\p{Pc}\-]|[\p{L}\p{M}\p{N}\p{Pc}\-]*)))(?:#[\p{L}\p{M}\p{N}\p{Pc}\-]+|\.[\p{L}\p{M}\p{N}\p{Pc}\-]+|(?:\((?:[^\(\)'"]*(?:'(?:[^']|(?<!\\)\\')*'|"(?:[^"]|(?<!\\)\\")*"))*[^\(\)]*\))*)*)*\.(?=$|\n))(?:(?:(#[\p{L}\p{M}\p{N}\p{Pc}\-]+)|(\.[\p{L}\p{M}\p{N}\p{Pc}\-]+))|([\#\!]\{[^\}]*\}|[\p{L}\p{M}\p{N}\p{Pc}](?:[\p{L}\p{M}\p{N}\p{Pc}\:\-]+[\p{L}\p{M}\p{N}\p{Pc}\-]|[\p{L}\p{M}\p{N}\p{Pc}\-]*))))/dgv,beginCaptures:{"2":{name:"meta.selector.css entity.other.attribute-name.id.css.pug"},"3":{name:"meta.selector.css entity.other.attribute-name.class.css.pug"},"4":{name:"meta.tag.other entity.name.tag.pug"}},comment:"Generated from dot_block_tag.py",end:/(?<=^|\n(?!$))(?!((?!)\p{space})|\p{space}*(?=$|\n))/dgv,patterns:[{match:/\.(?=$|\n)/dgv,name:"storage.type.function.pug.dot-block-dot"},{include:"#tag_attributes"},{include:"#complete_tag"},{begin:/(?<=^|\n(?!$))(?=[^\n])/dgv,end:/(?=$|\n)/dgv,name:"text.block.pug",patterns:[{include:"#inline_pug"},{include:"#embedded_html"},{include:"#html_entity"},{include:"#interpolated_value"},{include:"#interpolated_error"}]}]},{begin:/(?<=^|\n(?!$))\p{space}*/dgv,comment:"All constructs that generally span a single line starting with any number of white-spaces.",end:/(?=$|\n)/dgv,patterns:[{include:"#inline_pug"},{include:"#blocks_and_includes"},{include:"#unbuffered_code"},{include:"#mixin_definition"},{include:"#mixin_call"},{include:"#flow_control"},{include:"#flow_control_each"},{include:"#case_conds"},{begin:/\|/dgv,comment:"Tag pipe text line.",end:/(?=$|\n)/dgv,name:"text.block.pipe.pug",patterns:[{include:"#inline_pug"},{include:"#embedded_html"},{include:"#html_entity"},{include:"#interpolated_value"},{include:"#interpolated_error"}]},{include:"#printed_expression"},{begin:/(?=(#[^\{\p{L}\p{M}\p{N}\p{Pc}\-])|[^\p{L}\p{M}\p{N}\p{Pc}\.\#])/dgvy,comment:"Line starting with characters incompatible with tag name/id/class is standalone text.",end:/(?=$|\n)/dgv,patterns:[{begin:/<\/?(?=[\!\#])/dgv,end:/>|(?=$|\n)/dgv,patterns:[{include:"#inline_pug"},{include:"#interpolated_value"},{include:"#interpolated_error"}]},{include:"#inline_pug"},{include:"#embedded_html"},{include:"#html_entity"},{include:"#interpolated_value"},{include:"#interpolated_error"}]},{include:"#complete_tag"}]}],repository:{babel_parens:{begin:/\(/dgv,end:/\)|((\{\p{space}*)?(?=$|\n))/dgv,patterns:[{include:"#babel_parens"},{include:"source.js"}]},blocks_and_includes:{captures:{"1":{name:"storage.type.import.include.pug"},"4":{name:"variable.control.import.include.pug"}},comment:"Template blocks and includes.",match:/(extends|include|yield|append|prepend|block( (append|prepend))?)\p{space}+([^\n]*)(?=$|\n)/dgv,name:"meta.first-class.pug"},case_conds:{begin:/(default|when)((\p{space}+|(?=:))|(?=$|\n))/dgv,captures:{"1":{name:"storage.type.function.pug"}},comment:"Pug case conditionals.",end:/(?=$|\n)/dgv,name:"meta.control.flow.pug",patterns:[{begin:/(?!:)/dgvy,end:/(?=:\p{space}+)|(?=$|\n)/dgv,name:"js.embedded.control.flow.pug",patterns:[{include:"#case_when_paren"},{include:"source.js"}]},{begin:/:\p{space}+/dgv,end:/(?=$|\n)/dgv,name:"tag.case.control.flow.pug",patterns:[{include:"#complete_tag"}]}]},case_when_paren:{begin:/\(/dgv,end:/\)/dgv,name:"js.when.control.flow.pug",patterns:[{include:"#case_when_paren"},{match:/:/dgv,name:"invalid.illegal.name.tag.pug"},{include:"source.js"}]},complete_tag:{begin:/(?=[\p{L}\p{M}\p{N}\p{Pc}\.\#])|(:\p{space}*)/dgv,end:/(\.?(?=$|\n))|(?=:[^\n])/dgv,endCaptures:{"1":{name:"storage.type.function.pug.dot-block-dot"}},patterns:[{include:"#blocks_and_includes"},{include:"#unbuffered_code"},{include:"#mixin_call"},{include:"#flow_control"},{include:"#flow_control_each"},{match:/(?<=:)[\p{L}\p{M}\p{N}\p{Pc}][^\n]*(?=$|\n)/dgv,name:"invalid.illegal.name.tag.pug"},{include:"#tag_name"},{include:"#tag_id"},{include:"#tag_classes"},{include:"#tag_attributes"},{include:"#tag_mixin_attributes"},{captures:{"2":{name:"invalid.illegal.end.tag.pug"},"4":{name:"invalid.illegal.end.tag.pug"}},match:/((\.)\p{space}+(?=$|\n))|((:)\p{space}*(?=$|\n))/dgv},{include:"#printed_expression"},{include:"#tag_text"}]},embedded_html:{begin:/(?=<[^\>]*>)/dgv,end:/(?=$|\n)|(?=>)/dgv,name:"html",patterns:[{include:"text.html.basic"},{include:"#interpolated_value"},{include:"#interpolated_error"}]},flow_control:{begin:/(for|if|else if|else|until|while|unless|case)(\p{space}+|(?=$|\n))/dgv,captures:{"1":{name:"storage.type.function.pug"}},comment:"Pug control flow.",end:/(?=$|\n)/dgv,name:"meta.control.flow.pug",patterns:[{begin:"",end:/(?=$|\n)/dgv,name:"js.embedded.control.flow.pug",patterns:[{include:"source.js"}]}]},flow_control_each:{begin:/(each)(\p{space}+|(?=$|\n))/dgv,captures:{"1":{name:"storage.type.function.pug"}},end:/(?=$|\n)/dgv,name:"meta.control.flow.pug.each",patterns:[{match:/([\p{L}\p{M}\p{N}\p{Pc}\$_]+)(?:\p{space}*,\p{space}*([\p{L}\p{M}\p{N}\p{Pc}\$_]+))?/dgv,name:"variable.other.pug.each-var"},{begin:"",end:/(?=$|\n)/dgv,name:"js.embedded.control.flow.pug",patterns:[{include:"source.js"}]}]},html_entity:{patterns:[{match:/(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)/dgv,name:"constant.character.entity.html.text.pug"},{match:/[\<\>\&]/dgv,name:"invalid.illegal.html_entity.text.pug"}]},inline_pug:{begin:/(?<!\\)(#\[)/dgv,captures:{"1":{name:"entity.name.function.pug"},"2":{name:"entity.name.function.pug"}},end:/(\])/dgv,name:"inline.pug",patterns:[{include:"#inline_pug"},{include:"#mixin_call"},{begin:/(?<!\])(?=[\p{L}\p{M}\p{N}\p{Pc}\.\#])|(:\p{space}*)/dgv,end:/(?=\]|(:[^\n])|=|\p{space})/dgv,name:"tag.inline.pug",patterns:[{include:"#tag_name"},{include:"#tag_id"},{include:"#tag_classes"},{include:"#tag_attributes"},{include:"#tag_mixin_attributes"},{include:"#inline_pug"},{match:/\[/dgv,name:"invalid.illegal.tag.pug"}]},{include:"#unbuffered_code"},{include:"#printed_expression"},{match:/\[/dgv,name:"invalid.illegal.tag.pug"},{include:"#inline_pug_text"}]},inline_pug_text:{begin:"",end:/(?=\])/dgv,patterns:[{begin:/\[/dgv,end:/\]/dgv,patterns:[{include:"#inline_pug_text"}]},{include:"#inline_pug"},{include:"#embedded_html"},{include:"#html_entity"},{include:"#interpolated_value"},{include:"#interpolated_error"}]},interpolated_error:{match:/(?<!\\)[\#\!]\{(?=[^\}]*(?=$|\n))/dgv,name:"invalid.illegal.tag.pug"},interpolated_value:{begin:/(?<!\\)[\#\!]\{(?=[^\n]*?\})/dgv,end:/\}/dgv,name:"string.interpolated.pug",patterns:[{match:/\{/dgv,name:"invalid.illegal.tag.pug"},{include:"source.js"}]},js_braces:{begin:/\{/dgv,end:/\}/dgv,patterns:[{include:"#js_braces"},{include:"source.js"}]},js_brackets:{begin:/\[/dgv,end:/\]/dgv,patterns:[{include:"#js_brackets"},{include:"source.js"}]},js_parens:{begin:/\(/dgv,end:/\)/dgv,patterns:[{include:"#js_parens"},{include:"source.js"}]},mixin_call:{begin:/(mixin\p{space}+|\+)([\p{L}\p{M}\p{N}\p{Pc}\-]+)/dgv,beginCaptures:{"1":{name:"storage.type.function.pug"},"2":{name:"meta.tag.other entity.name.function.pug"}},end:/(?!\()|(?=$|\n)/dgv,patterns:[{begin:/(?<!\))\(/dgv,end:/\)/dgv,name:"args.mixin.pug",patterns:[{include:"#js_parens"},{captures:{"1":{name:"meta.tag.other entity.other.attribute-name.tag.pug"}},match:/([^\p{space}\(\)\,\=\/]+)\p{space}*=\p{space}*/dgv},{include:"source.js"}]},{include:"#tag_attributes"}]},mixin_definition:{captures:{"1":{name:"storage.type.function.pug"},"2":{name:"meta.tag.other entity.name.function.pug"},"3":{name:"punctuation.definition.parameters.begin.js"},"4":{name:"variable.parameter.function.js"},"5":{name:"punctuation.definition.parameters.begin.js"}},match:/(mixin\p{space}+)([\p{L}\p{M}\p{N}\p{Pc}\-]+)(?:(\()\p{space}*([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*\p{space}*(?:,\p{space}*[a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*\p{space}*)*)(\)))?(?=$|\n)/dgv},printed_expression:{begin:/(!?=)\p{space}*/dgv,captures:{"1":{name:"constant"}},end:/(?=\])|(?=$|\n)/dgv,name:"source.js",patterns:[{include:"#js_brackets"},{include:"source.js"}]},tag_attribute_name:{captures:{"1":{name:"entity.other.attribute-name.tag.pug"}},match:/([^\p{space}\(\)\,\=\/\!]+)\p{space}*/dgv},tag_attribute_name_paren:{begin:/\(\p{space}*/dgv,end:/\)/dgv,name:"entity.other.attribute-name.tag.pug",patterns:[{include:"#tag_attribute_name_paren"},{include:"#tag_attribute_name"}]},tag_attributes:{begin:/(\(\p{space}*)/dgv,captures:{"1":{name:"constant.name.attribute.tag.pug"}},end:/(\))/dgv,name:"meta.tag.other",patterns:[{include:"#tag_attribute_name_paren"},{include:"#tag_attribute_name"},{match:/!(?!=)/dgv,name:"invalid.illegal.tag.pug"},{begin:/=\p{space}*/dgv,end:/(?=$|\n)|(?=,|\p{space}+[^\!\%\&\*\-\+\~\|\<\>\?\/]|\))/dgv,name:"attribute_value",patterns:[{include:"#js_parens"},{include:"#js_brackets"},{include:"#js_braces"},{include:"source.js"}]},{begin:/(?<=[\%\&\*\-\+\~\|\<\>\:\?\/])\p{space}+/dgv,end:/(?=$|\n)|(?=,|\p{space}+[^\!\%\&\*\-\+\~\|\<\>\?\/]|\))/dgv,name:"attribute_value2",patterns:[{include:"#js_parens"},{include:"#js_brackets"},{include:"#js_braces"},{include:"source.js"}]}]},tag_classes:{captures:{"1":{name:"invalid.illegal.tag.pug"}},match:/\.([^\p{L}\p{M}\p{N}\p{Pc}\-])?[\p{L}\p{M}\p{N}\p{Pc}\-]*/dgv,name:"meta.selector.css entity.other.attribute-name.class.css.pug"},tag_id:{match:/#[\p{L}\p{M}\p{N}\p{Pc}\-]+/dgv,name:"meta.selector.css entity.other.attribute-name.id.css.pug"},tag_mixin_attributes:{begin:/(&attributes\()/dgv,captures:{"1":{name:"entity.name.function.pug"}},end:/(\))/dgv,name:"meta.tag.other",patterns:[{match:/attributes(?=\))/dgv,name:"storage.type.keyword.pug"},{include:"source.js"}]},tag_name:{begin:/([\#\!]\{(?=[^\n]*?\}))|([\p{L}\p{M}\p{N}\p{Pc}](([\p{L}\p{M}\p{N}\p{Pc}\:\-]+[\p{L}\p{M}\p{N}\p{Pc}\-])|([\p{L}\p{M}\p{N}\p{Pc}\-]*)))/dgv,end:/*@__PURE__*/ new EmulatedRegExp("(^(?<!\\5[^\\p{L}\\p{M}\\p{N}\\p{Pc}\\-]))|\\}|(?=$|\\n)()()()()","dgv",{"strategy":"search_start_clip"}),name:"meta.tag.other entity.name.tag.pug",patterns:[{begin:/(?<=\{)/dgvy,end:/(?=\})/dgv,name:"meta.tag.other entity.name.tag.pug",patterns:[{match:/\{/dgv,name:"invalid.illegal.tag.pug"},{include:"source.js"}]}]},tag_text:{begin:/(?=[^\n])/dgv,end:/(?=$|\n)/dgv,patterns:[{include:"#inline_pug"},{include:"#embedded_html"},{include:"#html_entity"},{include:"#interpolated_value"},{include:"#interpolated_error"}]},unbuffered_code:{begin:/(-|(([a-zA-Z0-9_]+)\p{space}+=))/dgv,beginCaptures:{"3":{name:"variable.parameter.javascript.embedded.pug"}},comment:"name = function() {}",end:/(?=\])|((\{\p{space}*)?(?=$|\n))/dgv,name:"source.js",patterns:[{include:"#js_brackets"},{include:"#babel_parens"},{include:"source.js"}]}},scopeName:"text.pug",embeddedLangs:["javascript","css","html"],aliases:["jade"],embeddedLangsLazy:["sass","scss","stylus","coffee"]})
|
|
6
7
|
|
|
7
8
|
export default [
|
|
8
9
|
...javascript,
|