@shikijs/langs-precompiled 2.1.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/abap.mjs +3 -1
- 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/ballerina.mjs +3 -1
- package/dist/blade.mjs +1 -1
- package/dist/bsl.mjs +2 -1
- package/dist/c.mjs +1 -1
- package/dist/cadence.mjs +1 -1
- package/dist/cobol.mjs +2 -1
- package/dist/codeql.mjs +6 -2
- package/dist/coffee.mjs +2 -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/dax.mjs +3 -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 +1 -1
- package/dist/gherkin.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 +1 -1
- package/dist/less.mjs +3 -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 +1 -1
- package/dist/nim.mjs +1 -1
- package/dist/nix.mjs +1 -1
- package/dist/nushell.mjs +1 -1
- package/dist/objective-c.mjs +1 -1
- package/dist/objective-cpp.mjs +1 -1
- package/dist/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/prolog.mjs +3 -1
- package/dist/pug.mjs +1 -1
- package/dist/python.mjs +1 -1
- package/dist/r.mjs +1 -1
- package/dist/racket.mjs +3 -1
- package/dist/raku.mjs +1 -1
- package/dist/razor.mjs +1 -1
- package/dist/riscv.mjs +1 -1
- package/dist/ruby.mjs +1 -1
- package/dist/sas.mjs +2 -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/stata.mjs +2 -1
- package/dist/stylus.mjs +1 -1
- package/dist/svelte.mjs +1 -1
- package/dist/systemd.mjs +1 -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/viml.mjs +3 -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/dream-maker.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EmulatedRegExp } from 'oniguruma-to-es'
|
|
2
2
|
|
|
3
|
-
const lang = Object.freeze({displayName:"Dream Maker",fileTypes:["dm","dme"],foldingStartMarker:/\/\*\*(?!\*)|^(?![^\{]*?\/\/|[^\{]*?\/\*(?![^\n]*?\*\/[^\n]*?\{))[^\n]*?\{\p{space}*((?=\n?$)|\/\/|\/\*(?![^\n]*?\*\/[^\n]*\P{space}))/dgv,foldingStopMarker:/(?<!\*)\*\*\/|^\p{space}*\}/dgv,name:"dream-maker",patterns:[{include:"#preprocessor-rule-enabled"},{include:"#preprocessor-rule-disabled"},{include:"#preprocessor-rule-other"},{include:"#comments"},{captures:{"1":{name:"storage.type.dm"},"2":{name:"storage.modifier.dm"},"3":{name:"storage.type.dm"},"5":{name:"variable.other.dm"}},match:/(var)[\/ ](?:(static|global|tmp|const)\/)?(?:(datum|atom(?:\/movable)?|obj|mob|turf|area|savefile|list|client|sound|image|database|matrix|regex|exception)\/)?(?:([a-zA-Z0-9_\-\$]*)\/)*([A-Za-z0-9_\$]*)\b/dgv,name:"meta.initialization.dm"},{match:/\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)\b/dgv,name:"constant.numeric.dm"},{match:/\b(sleep|spawn|break|continue|do|else|for|goto|if|return|switch|while)\b/dgv,name:"keyword.control.dm"},{match:/\b(del|new)\b/dgv,name:"keyword.other.dm"},{match:/\b(proc|verb|datum|atom(\/movable)?|obj|mob|turf|area|savefile|list|client|sound|image|database|matrix|regex|exception)\b/dgv,name:"storage.type.dm"},{match:/\b(as|const|global|set|static|tmp)\b/dgv,name:"storage.modifier.dm"},{match:/\b(usr|world|src|args)\b/dgv,name:"variable.language.dm"},{match:/(\?|(>|<)(=)?|\.|:|\/(=)?|~|\+(\+|=)?|-(-|=)?|\*(\*|=)?|%|>>|<<|=(=)?|!(=)?|<>|&|&&|\^|\||\|\||\bto\b|\bin\b|\bstep\b)/dgv,name:"keyword.operator.dm"},{match:/\b([A-Z_][A-Z_0-9]*)\b/dgv,name:"constant.language.dm"},{match:/\bnull\b/dgv,name:"constant.language.dm"},{begin:/\{"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.dm"}},end:/"\}/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.dm"}},name:"string.quoted.triple.dm",patterns:[{include:"#string_escaped_char"},{include:"#string_embedded_expression"}]},{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.dm"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.dm"}},name:"string.quoted.double.dm",patterns:[{include:"#string_escaped_char"},{include:"#string_embedded_expression"}]},{begin:/'/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.dm"}},end:/'/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.dm"}},name:"string.quoted.single.dm",patterns:[{include:"#string_escaped_char"}]},{begin:/*@__PURE__*/ new EmulatedRegExp("^\\p{space}*((#)\\p{space}*define)\\p{space}+((?<id>[a-zA-Z_][a-zA-Z0-9_]*))(\\()(\\p{space}*($4$E$[a-zA-Z_][a-zA-Z0-9_]*)\\p{space}*((,)\\p{space}*($4$E$[a-zA-Z_][a-zA-Z0-9_]*)\\p{space}*)*(?:\\.\\.\\.)?)(\\))","dgv",{"useEmulationGroups":true}),beginCaptures:{"1":{name:"keyword.control.directive.define.dm"},"2":{name:"punctuation.definition.directive.dm"},"3":{name:"entity.name.function.preprocessor.dm"},"5":{name:"punctuation.definition.parameters.begin.dm"},"6":{name:"variable.parameter.preprocessor.dm"},"8":{name:"punctuation.separator.parameters.dm"},"9":{name:"punctuation.definition.parameters.end.dm"}},end:/(?=(?:\/\/|\/\*))|(?<!\\)(?=\n)/dgv,name:"meta.preprocessor.macro.dm",patterns:[{include:"$base"}]},{begin:/^\p{space}*((#)\p{space}*define)\p{space}+((?<id>[a-zA-Z_][a-zA-Z0-9_]*))/dgv,beginCaptures:{"1":{name:"keyword.control.directive.define.dm"},"2":{name:"punctuation.definition.directive.dm"},"3":{name:"variable.other.preprocessor.dm"}},end:/(?=(?:\/\/|\/\*))|(?<!\\)(?=\n)/dgv,name:"meta.preprocessor.macro.dm",patterns:[{include:"$base"}]},{begin:/^\p{space}*(#\p{space}*(error|warn))\b/dgv,captures:{"1":{name:"keyword.control.import.error.dm"}},end:/(?=\n?$)/dgv,name:"meta.preprocessor.diagnostic.dm",patterns:[{match:/*@__PURE__*/ new EmulatedRegExp("(?:(?=($E$\\\\\\p{space}*\\n))\\1)","dgv",{"useEmulationGroups":true}),name:"punctuation.separator.continuation.dm"}]},{begin:/^\p{space}*(?:((#)\p{space}*(?:elif|else|if|ifdef|ifndef))|((#)\p{space}*(undef|include)))\b/dgv,beginCaptures:{"1":{name:"keyword.control.directive.conditional.dm"},"2":{name:"punctuation.definition.directive.dm"},"3":{name:"keyword.control.directive.$5.dm"},"4":{name:"punctuation.definition.directive.dm"}},end:/(?=(?:\/\/|\/\*))|(?<!\\)(?=\n)/dgv,name:"meta.preprocessor.dm",patterns:[{match:/*@__PURE__*/ new EmulatedRegExp("(?:(?=($E$\\\\\\p{space}*\\n))\\1)","dgv",{"useEmulationGroups":true}),name:"punctuation.separator.continuation.dm"}]},{include:"#block"},{begin:/*@__PURE__*/ new EmulatedRegExp("(?:^|(?:(?=\\p{space})(?<!else|new|return)(?<=[\\p{L}\\p{M}\\p{N}\\p{Pc}])|(?=\\p{space}*[A-Za-z_])(?<!&&)(?<=[\\*\\&\\>])))(\\p{space}*)(?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\\p{space}*\\()((?:(?=($E$(?:[A-Za-z_](?:(?=($E$[A-Za-z0-9_]*))\\5)|::)+))\\4)|(?<=operator)(?:[\\-\\*\\&\\<\\>\\=\\+\\!]+|\\(\\)|\\[\\]))\\p{space}*(?=\\()","dgv",{"useEmulationGroups":true}),beginCaptures:{"1":{name:"punctuation.whitespace.function.leading.dm"},"3":{name:"entity.name.function.dm"},"4":{name:"punctuation.definition.parameters.dm"}},end:/(?<=\})|(?=#)|(;)?/dgv,name:"meta.function.dm",patterns:[{include:"#comments"},{include:"#parens"},{match:/\bconst\b/dgv,name:"storage.modifier.dm"},{include:"#block"}]}],repository:{access:{match:/\.[a-zA-Z_][a-zA-Z_0-9]*\b(?!\p{space}*\()/dgv,name:"variable.other.dot-access.dm"},block:{begin:/\{/dgv,end:/\}/dgv,name:"meta.block.dm",patterns:[{include:"#block_innards"}]},block_innards:{patterns:[{include:"#preprocessor-rule-enabled-block"},{include:"#preprocessor-rule-disabled-block"},{include:"#preprocessor-rule-other-block"},{include:"#access"},{captures:{"1":{name:"punctuation.whitespace.function-call.leading.dm"},"2":{name:"support.function.any-method.dm"},"3":{name:"punctuation.definition.parameters.dm"}},match:/*@__PURE__*/ new EmulatedRegExp("(?:(?=\\p{space})(?:(?<=else|new|return)|(?<![\\p{L}\\p{M}\\p{N}\\p{Pc}]))(\\p{space}+))?(\\b(?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\\p{space}*\\()(?:(?=($E$(?:(?!NS)[A-Za-z_](?:(?=($E$[A-Za-z0-9_]*))\\5)\\b|::)+))\\4))\\p{space}*(\\()","dgv",{"useEmulationGroups":true}),name:"meta.function-call.dm"},{include:"#block"},{include:"$base"}]},comments:{patterns:[{captures:{"1":{name:"meta.toc-list.banner.block.dm"}},match:/^\/\* =(\p{space}*[^\n]*?)\p{space}*= \*\/(?=\n?$)\n?/dgv,name:"comment.block.dm"},{begin:/\/\*/dgv,captures:{"0":{name:"punctuation.definition.comment.dm"}},end:/\*\//dgv,name:"comment.block.dm",patterns:[{include:"#comments"}]},{match:/\*\/[^\n]*\n/dgv,name:"invalid.illegal.stray-comment-end.dm"},{captures:{"1":{name:"meta.toc-list.banner.line.dm"}},match:/^\/\/ =(\p{space}*[^\n]*?)\p{space}*=\p{space}*(?=\n?$)\n?/dgv,name:"comment.line.banner.dm"},{begin:/\/\//dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.dm"}},end:/(?=\n?$)\n?/dgv,name:"comment.line.double-slash.dm",patterns:[{match:/*@__PURE__*/ new EmulatedRegExp("(?:(?=($E$\\\\\\p{space}*\\n))\\1)","dgv",{"useEmulationGroups":true}),name:"punctuation.separator.continuation.dm"}]}]},disabled:{begin:/^\p{space}*#\p{space}*if(n?def)?\b[^\n]*(?=\n?$)/dgv,comment:"eat nested preprocessor if(def)s",end:/^\p{space}*#\p{space}*endif\b[^\n]*(?=\n?$)/dgv,patterns:[{include:"#disabled"}]},parens:{begin:/\(/dgv,end:/\)/dgv,name:"meta.parens.dm",patterns:[{include:"$base"}]},"preprocessor-rule-disabled":{begin:/^\p{space}*(#(if)\p{space}+(0)\b)[^\n]*/dgv,captures:{"1":{name:"meta.preprocessor.dm"},"2":{name:"keyword.control.import.if.dm"},"3":{name:"constant.numeric.preprocessor.dm"}},end:/^\p{space}*(#\p{space}*(endif)\b)/dgv,patterns:[{begin:/^\p{space}*(#\p{space}*(else)\b)/dgv,captures:{"1":{name:"meta.preprocessor.dm"},"2":{name:"keyword.control.import.else.dm"}},end:/(?=^\p{space}*#\p{space}*endif\b[^\n]*(?=\n?$))/dgv,patterns:[{include:"$base"}]},{begin:"",end:/(?=^\p{space}*#\p{space}*(else|endif)\b[^\n]*(?=\n?$))/dgv,name:"comment.block.preprocessor.if-branch",patterns:[{include:"#disabled"}]}]},"preprocessor-rule-disabled-block":{begin:/^\p{space}*(#(if)\p{space}+(0)\b)[^\n]*/dgv,captures:{"1":{name:"meta.preprocessor.dm"},"2":{name:"keyword.control.import.if.dm"},"3":{name:"constant.numeric.preprocessor.dm"}},end:/^\p{space}*(#\p{space}*(endif)\b)/dgv,patterns:[{begin:/^\p{space}*(#\p{space}*(else)\b)/dgv,captures:{"1":{name:"meta.preprocessor.dm"},"2":{name:"keyword.control.import.else.dm"}},end:/(?=^\p{space}*#\p{space}*endif\b[^\n]*(?=\n?$))/dgv,patterns:[{include:"#block_innards"}]},{begin:"",end:/(?=^\p{space}*#\p{space}*(else|endif)\b[^\n]*(?=\n?$))/dgv,name:"comment.block.preprocessor.if-branch.in-block",patterns:[{include:"#disabled"}]}]},"preprocessor-rule-enabled":{begin:/^\p{space}*(#(if)\p{space}+(0*1)\b)/dgv,captures:{"1":{name:"meta.preprocessor.dm"},"2":{name:"keyword.control.import.if.dm"},"3":{name:"constant.numeric.preprocessor.dm"}},end:/^\p{space}*(#\p{space}*(endif)\b)/dgv,patterns:[{begin:/^\p{space}*(#\p{space}*(else)\b)[^\n]*/dgv,captures:{"1":{name:"meta.preprocessor.dm"},"2":{name:"keyword.control.import.else.dm"}},contentName:"comment.block.preprocessor.else-branch",end:/(?=^\p{space}*#\p{space}*endif\b[^\n]*(?=\n?$))/dgv,patterns:[{include:"#disabled"}]},{begin:"",end:/(?=^\p{space}*#\p{space}*(else|endif)\b[^\n]*(?=\n?$))/dgv,patterns:[{include:"$base"}]}]},"preprocessor-rule-enabled-block":{begin:/^\p{space}*(#(if)\p{space}+(0*1)\b)/dgv,captures:{"1":{name:"meta.preprocessor.dm"},"2":{name:"keyword.control.import.if.dm"},"3":{name:"constant.numeric.preprocessor.dm"}},end:/^\p{space}*(#\p{space}*(endif)\b)/dgv,patterns:[{begin:/^\p{space}*(#\p{space}*(else)\b)[^\n]*/dgv,captures:{"1":{name:"meta.preprocessor.dm"},"2":{name:"keyword.control.import.else.dm"}},contentName:"comment.block.preprocessor.else-branch.in-block",end:/(?=^\p{space}*#\p{space}*endif\b[^\n]*(?=\n?$))/dgv,patterns:[{include:"#disabled"}]},{begin:"",end:/(?=^\p{space}*#\p{space}*(else|endif)\b[^\n]*(?=\n?$))/dgv,patterns:[{include:"#block_innards"}]}]},"preprocessor-rule-other":{begin:/^\p{space}*((#\p{space}*(if(n?def)?))\b[^\n]*?(?:(?=(?:\/\/|\/\*))|(?=\n?$)))/dgv,captures:{"1":{name:"meta.preprocessor.dm"},"2":{name:"keyword.control.import.dm"}},end:/^\p{space}*((#\p{space}*(endif))\b)[^\n]*(?=\n?$)/dgv,patterns:[{include:"$base"}]},"preprocessor-rule-other-block":{begin:/^\p{space}*(#\p{space}*(if(n?def)?)\b[^\n]*?(?:(?=(?:\/\/|\/\*))|(?=\n?$)))/dgv,captures:{"1":{name:"meta.preprocessor.dm"},"2":{name:"keyword.control.import.dm"}},end:/^\p{space}*(#\p{space}*(endif)\b)[^\n]*(?=\n?$)/dgv,patterns:[{include:"#block_innards"}]},string_embedded_expression:{patterns:[{begin:/(?<!\\)\[/dgv,end:/\]/dgv,name:"string.interpolated.dm",patterns:[{include:"$self"}]}]},string_escaped_char:{patterns:[{match:/\\(h(?:(?:er|im)self|ers|im)|([tTsS]?he)|He|[Hh]is|[aA]n?|(?:im)?proper|\.\.\.|(?:icon|ref|[Rr]oman)(?=\[)|[s\<\>"n\n \[])/dgv,name:"constant.character.escape.dm"},{match:/\\[^\n]/dgv,name:"invalid.illegal.unknown-escape.dm"}]}},scopeName:"source.dm",embeddedLangs:undefined,aliases:undefined})
|
|
3
|
+
const lang = Object.freeze({displayName:"Dream Maker",fileTypes:["dm","dme"],foldingStartMarker:/\/\*\*(?!\*)|^(?![^\{]*?\/\/|[^\{]*?\/\*(?![^\n]*?\*\/[^\n]*?\{))[^\n]*?\{\p{space}*((?=\n?$)|\/\/|\/\*(?![^\n]*?\*\/[^\n]*\P{space}))/dgv,foldingStopMarker:/(?<!\*)\*\*\/|^\p{space}*\}/dgv,name:"dream-maker",patterns:[{include:"#preprocessor-rule-enabled"},{include:"#preprocessor-rule-disabled"},{include:"#preprocessor-rule-other"},{include:"#comments"},{captures:{"1":{name:"storage.type.dm"},"2":{name:"storage.modifier.dm"},"3":{name:"storage.type.dm"},"5":{name:"variable.other.dm"}},match:/(var)[\/ ](?:(static|global|tmp|const)\/)?(?:(datum|atom(?:\/movable)?|obj|mob|turf|area|savefile|list|client|sound|image|database|matrix|regex|exception)\/)?(?:([a-zA-Z0-9_\-\$]*)\/)*([A-Za-z0-9_\$]*)\b/dgv,name:"meta.initialization.dm"},{match:/\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)\b/dgv,name:"constant.numeric.dm"},{match:/\b(sleep|spawn|break|continue|do|else|for|goto|if|return|switch|while)\b/dgv,name:"keyword.control.dm"},{match:/\b(del|new)\b/dgv,name:"keyword.other.dm"},{match:/\b(proc|verb|datum|atom(\/movable)?|obj|mob|turf|area|savefile|list|client|sound|image|database|matrix|regex|exception)\b/dgv,name:"storage.type.dm"},{match:/\b(as|const|global|set|static|tmp)\b/dgv,name:"storage.modifier.dm"},{match:/\b(usr|world|src|args)\b/dgv,name:"variable.language.dm"},{match:/(\?|(>|<)(=)?|\.|:|\/(=)?|~|\+(\+|=)?|-(-|=)?|\*(\*|=)?|%|>>|<<|=(=)?|!(=)?|<>|&|&&|\^|\||\|\||\bto\b|\bin\b|\bstep\b)/dgv,name:"keyword.operator.dm"},{match:/\b([A-Z_][A-Z_0-9]*)\b/dgv,name:"constant.language.dm"},{match:/\bnull\b/dgv,name:"constant.language.dm"},{begin:/\{"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.dm"}},end:/"\}/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.dm"}},name:"string.quoted.triple.dm",patterns:[{include:"#string_escaped_char"},{include:"#string_embedded_expression"}]},{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.dm"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.dm"}},name:"string.quoted.double.dm",patterns:[{include:"#string_escaped_char"},{include:"#string_embedded_expression"}]},{begin:/'/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.dm"}},end:/'/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.dm"}},name:"string.quoted.single.dm",patterns:[{include:"#string_escaped_char"}]},{begin:/*@__PURE__*/ new EmulatedRegExp("^\\p{space}*((#)\\p{space}*define)\\p{space}+((?<id>[a-zA-Z_][a-zA-Z0-9_]*))(\\()(\\p{space}*([a-zA-Z_][a-zA-Z0-9_]*)\\p{space}*((,)\\p{space}*([a-zA-Z_][a-zA-Z0-9_]*)\\p{space}*)*(?:\\.\\.\\.)?)(\\))","dgv",{"hiddenCaptures":[7,10],"transfers":[[4,[7,10]]]}),beginCaptures:{"1":{name:"keyword.control.directive.define.dm"},"2":{name:"punctuation.definition.directive.dm"},"3":{name:"entity.name.function.preprocessor.dm"},"5":{name:"punctuation.definition.parameters.begin.dm"},"6":{name:"variable.parameter.preprocessor.dm"},"8":{name:"punctuation.separator.parameters.dm"},"9":{name:"punctuation.definition.parameters.end.dm"}},end:/(?=(?:\/\/|\/\*))|(?<!\\)(?=\n)/dgv,name:"meta.preprocessor.macro.dm",patterns:[{include:"$base"}]},{begin:/^\p{space}*((#)\p{space}*define)\p{space}+((?<id>[a-zA-Z_][a-zA-Z0-9_]*))/dgv,beginCaptures:{"1":{name:"keyword.control.directive.define.dm"},"2":{name:"punctuation.definition.directive.dm"},"3":{name:"variable.other.preprocessor.dm"}},end:/(?=(?:\/\/|\/\*))|(?<!\\)(?=\n)/dgv,name:"meta.preprocessor.macro.dm",patterns:[{include:"$base"}]},{begin:/^\p{space}*(#\p{space}*(error|warn))\b/dgv,captures:{"1":{name:"keyword.control.import.error.dm"}},end:/(?=\n?$)/dgv,name:"meta.preprocessor.diagnostic.dm",patterns:[{match:/*@__PURE__*/ new EmulatedRegExp("(?:(?=(\\\\\\p{space}*\\n))\\1)","dgv",{"hiddenCaptures":[1]}),name:"punctuation.separator.continuation.dm"}]},{begin:/^\p{space}*(?:((#)\p{space}*(?:elif|else|if|ifdef|ifndef))|((#)\p{space}*(undef|include)))\b/dgv,beginCaptures:{"1":{name:"keyword.control.directive.conditional.dm"},"2":{name:"punctuation.definition.directive.dm"},"3":{name:"keyword.control.directive.$5.dm"},"4":{name:"punctuation.definition.directive.dm"}},end:/(?=(?:\/\/|\/\*))|(?<!\\)(?=\n)/dgv,name:"meta.preprocessor.dm",patterns:[{match:/*@__PURE__*/ new EmulatedRegExp("(?:(?=(\\\\\\p{space}*\\n))\\1)","dgv",{"hiddenCaptures":[1]}),name:"punctuation.separator.continuation.dm"}]},{include:"#block"},{begin:/*@__PURE__*/ new EmulatedRegExp("(?:^|(?:(?=\\p{space})(?<!else|new|return)(?<=[\\p{L}\\p{M}\\p{N}\\p{Pc}])|(?=\\p{space}*[A-Za-z_])(?<!&&)(?<=[\\*\\&\\>])))(\\p{space}*)(?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\\p{space}*\\()((?:(?=((?:[A-Za-z_](?:(?=([A-Za-z0-9_]*))\\5)|::)+))\\4)|(?<=operator)(?:[\\-\\*\\&\\<\\>\\=\\+\\!]+|\\(\\)|\\[\\]))\\p{space}*(?=\\()","dgv",{"hiddenCaptures":[4,5]}),beginCaptures:{"1":{name:"punctuation.whitespace.function.leading.dm"},"3":{name:"entity.name.function.dm"},"4":{name:"punctuation.definition.parameters.dm"}},end:/(?<=\})|(?=#)|(;)?/dgv,name:"meta.function.dm",patterns:[{include:"#comments"},{include:"#parens"},{match:/\bconst\b/dgv,name:"storage.modifier.dm"},{include:"#block"}]}],repository:{access:{match:/\.[a-zA-Z_][a-zA-Z_0-9]*\b(?!\p{space}*\()/dgv,name:"variable.other.dot-access.dm"},block:{begin:/\{/dgv,end:/\}/dgv,name:"meta.block.dm",patterns:[{include:"#block_innards"}]},block_innards:{patterns:[{include:"#preprocessor-rule-enabled-block"},{include:"#preprocessor-rule-disabled-block"},{include:"#preprocessor-rule-other-block"},{include:"#access"},{captures:{"1":{name:"punctuation.whitespace.function-call.leading.dm"},"2":{name:"support.function.any-method.dm"},"3":{name:"punctuation.definition.parameters.dm"}},match:/*@__PURE__*/ new EmulatedRegExp("(?:(?=\\p{space})(?:(?<=else|new|return)|(?<![\\p{L}\\p{M}\\p{N}\\p{Pc}]))(\\p{space}+))?(\\b(?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\\p{space}*\\()(?:(?=((?:(?!NS)[A-Za-z_](?:(?=([A-Za-z0-9_]*))\\5)\\b|::)+))\\4))\\p{space}*(\\()","dgv",{"hiddenCaptures":[4,5]}),name:"meta.function-call.dm"},{include:"#block"},{include:"$base"}]},comments:{patterns:[{captures:{"1":{name:"meta.toc-list.banner.block.dm"}},match:/^\/\* =(\p{space}*[^\n]*?)\p{space}*= \*\/(?=\n?$)\n?/dgv,name:"comment.block.dm"},{begin:/\/\*/dgv,captures:{"0":{name:"punctuation.definition.comment.dm"}},end:/\*\//dgv,name:"comment.block.dm",patterns:[{include:"#comments"}]},{match:/\*\/[^\n]*\n/dgv,name:"invalid.illegal.stray-comment-end.dm"},{captures:{"1":{name:"meta.toc-list.banner.line.dm"}},match:/^\/\/ =(\p{space}*[^\n]*?)\p{space}*=\p{space}*(?=\n?$)\n?/dgv,name:"comment.line.banner.dm"},{begin:/\/\//dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.dm"}},end:/(?=\n?$)\n?/dgv,name:"comment.line.double-slash.dm",patterns:[{match:/*@__PURE__*/ new EmulatedRegExp("(?:(?=(\\\\\\p{space}*\\n))\\1)","dgv",{"hiddenCaptures":[1]}),name:"punctuation.separator.continuation.dm"}]}]},disabled:{begin:/^\p{space}*#\p{space}*if(n?def)?\b[^\n]*(?=\n?$)/dgv,comment:"eat nested preprocessor if(def)s",end:/^\p{space}*#\p{space}*endif\b[^\n]*(?=\n?$)/dgv,patterns:[{include:"#disabled"}]},parens:{begin:/\(/dgv,end:/\)/dgv,name:"meta.parens.dm",patterns:[{include:"$base"}]},"preprocessor-rule-disabled":{begin:/^\p{space}*(#(if)\p{space}+(0)\b)[^\n]*/dgv,captures:{"1":{name:"meta.preprocessor.dm"},"2":{name:"keyword.control.import.if.dm"},"3":{name:"constant.numeric.preprocessor.dm"}},end:/^\p{space}*(#\p{space}*(endif)\b)/dgv,patterns:[{begin:/^\p{space}*(#\p{space}*(else)\b)/dgv,captures:{"1":{name:"meta.preprocessor.dm"},"2":{name:"keyword.control.import.else.dm"}},end:/(?=^\p{space}*#\p{space}*endif\b[^\n]*(?=\n?$))/dgv,patterns:[{include:"$base"}]},{begin:"",end:/(?=^\p{space}*#\p{space}*(else|endif)\b[^\n]*(?=\n?$))/dgv,name:"comment.block.preprocessor.if-branch",patterns:[{include:"#disabled"}]}]},"preprocessor-rule-disabled-block":{begin:/^\p{space}*(#(if)\p{space}+(0)\b)[^\n]*/dgv,captures:{"1":{name:"meta.preprocessor.dm"},"2":{name:"keyword.control.import.if.dm"},"3":{name:"constant.numeric.preprocessor.dm"}},end:/^\p{space}*(#\p{space}*(endif)\b)/dgv,patterns:[{begin:/^\p{space}*(#\p{space}*(else)\b)/dgv,captures:{"1":{name:"meta.preprocessor.dm"},"2":{name:"keyword.control.import.else.dm"}},end:/(?=^\p{space}*#\p{space}*endif\b[^\n]*(?=\n?$))/dgv,patterns:[{include:"#block_innards"}]},{begin:"",end:/(?=^\p{space}*#\p{space}*(else|endif)\b[^\n]*(?=\n?$))/dgv,name:"comment.block.preprocessor.if-branch.in-block",patterns:[{include:"#disabled"}]}]},"preprocessor-rule-enabled":{begin:/^\p{space}*(#(if)\p{space}+(0*1)\b)/dgv,captures:{"1":{name:"meta.preprocessor.dm"},"2":{name:"keyword.control.import.if.dm"},"3":{name:"constant.numeric.preprocessor.dm"}},end:/^\p{space}*(#\p{space}*(endif)\b)/dgv,patterns:[{begin:/^\p{space}*(#\p{space}*(else)\b)[^\n]*/dgv,captures:{"1":{name:"meta.preprocessor.dm"},"2":{name:"keyword.control.import.else.dm"}},contentName:"comment.block.preprocessor.else-branch",end:/(?=^\p{space}*#\p{space}*endif\b[^\n]*(?=\n?$))/dgv,patterns:[{include:"#disabled"}]},{begin:"",end:/(?=^\p{space}*#\p{space}*(else|endif)\b[^\n]*(?=\n?$))/dgv,patterns:[{include:"$base"}]}]},"preprocessor-rule-enabled-block":{begin:/^\p{space}*(#(if)\p{space}+(0*1)\b)/dgv,captures:{"1":{name:"meta.preprocessor.dm"},"2":{name:"keyword.control.import.if.dm"},"3":{name:"constant.numeric.preprocessor.dm"}},end:/^\p{space}*(#\p{space}*(endif)\b)/dgv,patterns:[{begin:/^\p{space}*(#\p{space}*(else)\b)[^\n]*/dgv,captures:{"1":{name:"meta.preprocessor.dm"},"2":{name:"keyword.control.import.else.dm"}},contentName:"comment.block.preprocessor.else-branch.in-block",end:/(?=^\p{space}*#\p{space}*endif\b[^\n]*(?=\n?$))/dgv,patterns:[{include:"#disabled"}]},{begin:"",end:/(?=^\p{space}*#\p{space}*(else|endif)\b[^\n]*(?=\n?$))/dgv,patterns:[{include:"#block_innards"}]}]},"preprocessor-rule-other":{begin:/^\p{space}*((#\p{space}*(if(n?def)?))\b[^\n]*?(?:(?=(?:\/\/|\/\*))|(?=\n?$)))/dgv,captures:{"1":{name:"meta.preprocessor.dm"},"2":{name:"keyword.control.import.dm"}},end:/^\p{space}*((#\p{space}*(endif))\b)[^\n]*(?=\n?$)/dgv,patterns:[{include:"$base"}]},"preprocessor-rule-other-block":{begin:/^\p{space}*(#\p{space}*(if(n?def)?)\b[^\n]*?(?:(?=(?:\/\/|\/\*))|(?=\n?$)))/dgv,captures:{"1":{name:"meta.preprocessor.dm"},"2":{name:"keyword.control.import.dm"}},end:/^\p{space}*(#\p{space}*(endif)\b)[^\n]*(?=\n?$)/dgv,patterns:[{include:"#block_innards"}]},string_embedded_expression:{patterns:[{begin:/(?<!\\)\[/dgv,end:/\]/dgv,name:"string.interpolated.dm",patterns:[{include:"$self"}]}]},string_escaped_char:{patterns:[{match:/\\(h(?:(?:er|im)self|ers|im)|([tTsS]?he)|He|[Hh]is|[aA]n?|(?:im)?proper|\.\.\.|(?:icon|ref|[Rr]oman)(?=\[)|[s\<\>"n\n \[])/dgv,name:"constant.character.escape.dm"},{match:/\\[^\n]/dgv,name:"invalid.illegal.unknown-escape.dm"}]}},scopeName:"source.dm",embeddedLangs:undefined,aliases:undefined})
|
|
4
4
|
|
|
5
5
|
export default [
|
|
6
6
|
lang
|
package/dist/elixir.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EmulatedRegExp } from 'oniguruma-to-es'
|
|
2
2
|
import html from './html.mjs'
|
|
3
3
|
|
|
4
|
-
const lang = Object.freeze({displayName:"Elixir",fileTypes:["ex","exs"],firstLineMatch:/^#!\/[^\n]*\belixir/dgv,foldingStartMarker:/(after|else|catch|rescue|->|\{|\[|do)\p{space}*(?=\n?$)/dgv,foldingStopMarker:/^\p{space}*((\}|\]|after|else|catch|rescue)\p{space}*(?=\n?$)|end\b)/dgv,name:"elixir",patterns:[{begin:/\b(fn)\b(?![^\n]*->)/dgv,beginCaptures:{"1":{name:"keyword.control.elixir"}},end:/(?=\n?$)/dgv,patterns:[{include:"#core_syntax"}]},{captures:{"1":{name:"entity.name.type.class.elixir"},"2":{name:"punctuation.separator.method.elixir"},"3":{name:"entity.name.function.elixir"}},match:/([A-Z][\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*(\.)\p{space}*([a-z_][\p{L}\p{M}\p{N}\p{Pc}]*[\!\?]?)/dgv},{captures:{"1":{name:"constant.other.symbol.elixir"},"2":{name:"punctuation.separator.method.elixir"},"3":{name:"entity.name.function.elixir"}},match:/(:[\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*(\.)\p{space}*([_]?[\p{L}\p{M}\p{N}\p{Pc}]*[\!\?]?)/dgv},{captures:{"1":{name:"keyword.operator.other.elixir"},"2":{name:"entity.name.function.elixir"}},match:/(\|>)\p{space}*([a-z_][\p{L}\p{M}\p{N}\p{Pc}]*[\!\?]?)/dgv},{match:/\b[a-z_][\p{L}\p{M}\p{N}\p{Pc}]*[\!\?]?(?=\p{space}*\.?\p{space}*\()/dgv,name:"entity.name.function.elixir"},{begin:/\b(fn)\b(?=[^\n]*->)/dgv,beginCaptures:{"1":{name:"keyword.control.elixir"}},end:/*@__PURE__*/ new EmulatedRegExp("(?:(?=($E$(->)|(when)|(\\))))\\1)","dgv",{"useEmulationGroups":true}),endCaptures:{"1":{name:"keyword.operator.other.elixir"},"2":{name:"keyword.control.elixir"},"3":{name:"punctuation.section.function.elixir"}},patterns:[{include:"#core_syntax"}]},{include:"#core_syntax"},{begin:/^(?=[^\n]*->)((?![^"']*("|')[^"']*->)|(?=[^\n]*->[^"']*("|')[^"']*->))((?![^\n]*\([^\)]*->)|(?=[^\(\)]*->)|(?=\p{space}*\([^\n]*\)[^\n]*->))((?![^\n]*\b(fn)\b)|(?=[^\n]*->[^\n]*\bfn\b))/dgv,beginCaptures:{"1":{name:"keyword.control.elixir"}},end:/*@__PURE__*/ new EmulatedRegExp("(?:(?=($E$(->)|(when)|(\\))))\\1)","dgv",{"useEmulationGroups":true}),endCaptures:{"1":{name:"keyword.operator.other.elixir"},"2":{name:"keyword.control.elixir"},"3":{name:"punctuation.section.function.elixir"}},patterns:[{include:"#core_syntax"}]}],repository:{core_syntax:{patterns:[{begin:/^\p{space}*(defmodule)\b/dgv,beginCaptures:{"1":{name:"keyword.control.module.elixir"}},end:/\b(do)\b/dgv,endCaptures:{"1":{name:"keyword.control.module.elixir"}},name:"meta.module.elixir",patterns:[{match:/\b[A-Z][\p{L}\p{M}\p{N}\p{Pc}]*(?=\.)/dgv,name:"entity.other.inherited-class.elixir"},{match:/\b[A-Z][\p{L}\p{M}\p{N}\p{Pc}]*\b/dgv,name:"entity.name.type.class.elixir"}]},{begin:/^\p{space}*(defprotocol)\b/dgv,beginCaptures:{"1":{name:"keyword.control.protocol.elixir"}},end:/\b(do)\b/dgv,endCaptures:{"1":{name:"keyword.control.protocol.elixir"}},name:"meta.protocol_declaration.elixir",patterns:[{match:/\b[A-Z][\p{L}\p{M}\p{N}\p{Pc}]*\b/dgv,name:"entity.name.type.protocol.elixir"}]},{begin:/^\p{space}*(defimpl)\b/dgv,beginCaptures:{"1":{name:"keyword.control.protocol.elixir"}},end:/\b(do)\b/dgv,endCaptures:{"1":{name:"keyword.control.protocol.elixir"}},name:"meta.protocol_implementation.elixir",patterns:[{match:/\b[A-Z][\p{L}\p{M}\p{N}\p{Pc}]*\b/dgv,name:"entity.name.type.protocol.elixir"}]},{begin:/*@__PURE__*/ new EmulatedRegExp("^\\p{space}*(def|defmacro|defdelegate|defguard)\\p{space}+((?:(?=($E$[a-zA-Z_][\\p{L}\\p{M}\\p{N}\\p{Pc}]*(?:(?=($E$\\.|::))\\4)))\\3)?(?:(?=($E$[a-zA-Z_][\\p{L}\\p{M}\\p{N}\\p{Pc}]*(?:(?=($E$[\\?\\!]|=(?!>)))\\6)?|===?|>[\\>\\=]?|<=>|<[\\<\\=]?|[\\%\\&\\`\\/\\|]|\\*\\*?|=?~|[\\-\\+]@?|\\[\\]=?))\\5))((\\()|\\p{space}*)","dgv",{"useEmulationGroups":true}),beginCaptures:{"1":{name:"keyword.control.module.elixir"},"2":{name:"entity.name.function.public.elixir"},"4":{name:"punctuation.section.function.elixir"}},end:/(\bdo:)|(\bdo\b)|(?=\p{space}+(def|defn|defmacro|defdelegate|defguard)\b)/dgv,endCaptures:{"1":{name:"constant.other.keywords.elixir"},"2":{name:"keyword.control.module.elixir"}},name:"meta.function.public.elixir",patterns:[{include:"$self"},{begin:/\p{space}(\\\\)/dgv,beginCaptures:{"1":{name:"keyword.operator.other.elixir"}},end:/,|\)|(?=\n?$)/dgv,patterns:[{include:"$self"}]},{match:/\b(is_atom|is_binary|is_bitstring|is_boolean|is_float|is_function|is_integer|is_list|is_map|is_nil|is_number|is_pid|is_port|is_record|is_reference|is_tuple|is_exception|abs|bit_size|byte_size|div|elem|hd|length|map_size|node|rem|round|tl|trunc|tuple_size)\b/dgv,name:"keyword.control.elixir"}]},{begin:/*@__PURE__*/ new EmulatedRegExp("^\\p{space}*(defp|defnp|defmacrop|defguardp)\\p{space}+((?:(?=($E$[a-zA-Z_][\\p{L}\\p{M}\\p{N}\\p{Pc}]*(?:(?=($E$\\.|::))\\4)))\\3)?(?:(?=($E$[a-zA-Z_][\\p{L}\\p{M}\\p{N}\\p{Pc}]*(?:(?=($E$[\\?\\!]|=(?!>)))\\6)?|===?|>[\\>\\=]?|<=>|<[\\<\\=]?|[\\%\\&\\`\\/\\|]|\\*\\*?|=?~|[\\-\\+]@?|\\[\\]=?))\\5))((\\()|\\p{space}*)","dgv",{"useEmulationGroups":true}),beginCaptures:{"1":{name:"keyword.control.module.elixir"},"2":{name:"entity.name.function.private.elixir"},"4":{name:"punctuation.section.function.elixir"}},end:/(\bdo:)|(\bdo\b)|(?=\p{space}+(defp|defmacrop|defguardp)\b)/dgv,endCaptures:{"1":{name:"constant.other.keywords.elixir"},"2":{name:"keyword.control.module.elixir"}},name:"meta.function.private.elixir",patterns:[{include:"$self"},{begin:/\p{space}(\\\\)/dgv,beginCaptures:{"1":{name:"keyword.operator.other.elixir"}},end:/,|\)|(?=\n?$)/dgv,patterns:[{include:"$self"}]},{match:/\b(is_atom|is_binary|is_bitstring|is_boolean|is_float|is_function|is_integer|is_list|is_map|is_nil|is_number|is_pid|is_port|is_record|is_reference|is_tuple|is_exception|abs|bit_size|byte_size|div|elem|hd|length|map_size|node|rem|round|tl|trunc|tuple_size)\b/dgv,name:"keyword.control.elixir"}]},{begin:/\p{space}*~L"""/dgv,comment:"Leex Sigil",end:/\p{space}*"""/dgv,name:"sigil.leex",patterns:[{include:"text.elixir"},{include:"text.html.basic"}]},{begin:/\p{space}*~H"""/dgv,comment:"HEEx Sigil",end:/\p{space}*"""/dgv,name:"sigil.heex",patterns:[{include:"text.elixir"},{include:"text.html.basic"}]},{begin:/@(module|type)?doc (~[a-z])?"""/dgv,comment:"@doc with heredocs is treated as documentation",end:/\p{space}*"""/dgv,name:"comment.block.documentation.heredoc",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{begin:/@(module|type)?doc ~[A-Z]"""/dgv,comment:"@doc with heredocs is treated as documentation",end:/\p{space}*"""/dgv,name:"comment.block.documentation.heredoc"},{begin:/@(module|type)?doc (~[a-z])?'''/dgv,comment:"@doc with heredocs is treated as documentation",end:/\p{space}*'''/dgv,name:"comment.block.documentation.heredoc",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{begin:/@(module|type)?doc ~[A-Z]'''/dgv,comment:"@doc with heredocs is treated as documentation",end:/\p{space}*'''/dgv,name:"comment.block.documentation.heredoc"},{comment:"@doc false is treated as documentation",match:/@(module|type)?doc false/dgv,name:"comment.block.documentation.false"},{begin:/@(module|type)?doc "/dgv,comment:"@doc with string is treated as documentation",end:/"/dgv,name:"comment.block.documentation.string",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{match:/(?<!\.)\b(do|end|case|bc|lc|for|if|cond|unless|try|receive|fn|defmodule|defp?|defprotocol|defimpl|defrecord|defstruct|defnp?|defmacrop?|defguardp?|defdelegate|defexception|defoverridable|exit|after|rescue|catch|else|raise|reraise|throw|import|require|alias|use|quote|unquote|super|with)\b(?![\?\!\:])/dgv,name:"keyword.control.elixir"},{comment:" as above, just doesn't need a 'end' and does a logic operation",match:/(?<!\.)\b(and|not|or|when|xor|in)\b/dgv,name:"keyword.operator.elixir"},{match:/\b[A-Z][\p{L}\p{M}\p{N}\p{Pc}]*\b/dgv,name:"entity.name.type.class.elixir"},{match:/\b(nil|true|false)\b(?![\?\!])/dgv,name:"constant.language.elixir"},{match:/\b(__(CALLER|ENV|MODULE|DIR|STACKTRACE)__)\b(?![\?\!])/dgv,name:"variable.language.elixir"},{captures:{"1":{name:"punctuation.definition.variable.elixir"}},match:/(@)[a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*/dgv,name:"variable.other.readwrite.module.elixir"},{captures:{"1":{name:"punctuation.definition.variable.elixir"}},match:/(&)\p{Nd}+/dgv,name:"variable.other.anonymous.elixir"},{match:/&(?![\&])/dgv,name:"variable.other.anonymous.elixir"},{captures:{"1":{name:"punctuation.definition.variable.elixir"}},match:/\^[a-z_][\p{L}\p{M}\p{N}\p{Pc}]*/dgv,name:"variable.other.capture.elixir"},{match:/*@__PURE__*/ new EmulatedRegExp("\\b0x[0-9A-Fa-f](?:(?=($E$_?[0-9A-Fa-f]))\\1)*\\b","dgv",{"useEmulationGroups":true}),name:"constant.numeric.hex.elixir"},{match:/*@__PURE__*/ new EmulatedRegExp("\\b\\p{Nd}(?:(?=($E$_?\\p{Nd}))\\1)*(\\.(?![^\\p{space}\\p{Nd}])(?:(?=($E$_?\\p{Nd}))\\3)+)([eE][\\-\\+]?\\p{Nd}(?:(?=($E$_?\\p{Nd}))\\5)*)?\\b","dgv",{"useEmulationGroups":true}),name:"constant.numeric.float.elixir"},{match:/*@__PURE__*/ new EmulatedRegExp("\\b\\p{Nd}(?:(?=($E$_?\\p{Nd}))\\1)*\\b","dgv",{"useEmulationGroups":true}),name:"constant.numeric.integer.elixir"},{match:/*@__PURE__*/ new EmulatedRegExp("\\b0b[01](?:(?=($E$_?[01]))\\1)*\\b","dgv",{"useEmulationGroups":true}),name:"constant.numeric.binary.elixir"},{match:/*@__PURE__*/ new EmulatedRegExp("\\b0o[0-7](?:(?=($E$_?[0-7]))\\1)*\\b","dgv",{"useEmulationGroups":true}),name:"constant.numeric.octal.elixir"},{begin:/:'/dgv,captures:{"0":{name:"punctuation.definition.constant.elixir"}},end:/'/dgv,name:"constant.other.symbol.single-quoted.elixir",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{begin:/:"/dgv,captures:{"0":{name:"punctuation.definition.constant.elixir"}},end:/"/dgv,name:"constant.other.symbol.double-quoted.elixir",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{begin:/*@__PURE__*/ new EmulatedRegExp("(?:(?=($E$'''))\\1)","dgv",{"useEmulationGroups":true}),beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"Single-quoted heredocs",end:/^\p{space}*'''/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.single.heredoc.elixir",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{begin:/'/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"single quoted string (allows for interpolation)",end:/'/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.single.elixir",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{begin:/*@__PURE__*/ new EmulatedRegExp("(?:(?=($E$\"\"\"))\\1)","dgv",{"useEmulationGroups":true}),beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"Double-quoted heredocs",end:/^\p{space}*"""/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.double.heredoc.elixir",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"double quoted string (allows for interpolation)",end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.double.elixir",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{begin:/*@__PURE__*/ new EmulatedRegExp("~[a-z](?:(?=($E$\"\"\"))\\1)","dgv",{"useEmulationGroups":true}),beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"Double-quoted heredocs sigils",end:/^\p{space}*"""/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.other.sigil.heredoc.elixir",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{begin:/~[a-z]\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"sigil (allow for interpolation)",end:/\}[a-z]*/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.other.sigil.elixir",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{begin:/~[a-z]\[/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"sigil (allow for interpolation)",end:/\][a-z]*/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.other.sigil.elixir",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{begin:/~[a-z]</dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"sigil (allow for interpolation)",end:/>[a-z]*/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.other.sigil.elixir",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{begin:/~[a-z]\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"sigil (allow for interpolation)",end:/\)[a-z]*/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.other.sigil.elixir",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{begin:/~[a-z]([^\p{L}\p{M}\p{N}\p{Pc}])/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"sigil (allow for interpolation)",end:/\1[a-z]*()/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.other.sigil.elixir",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{begin:/*@__PURE__*/ new EmulatedRegExp("~[A-Z](?:(?=($E$\"\"\"))\\1)","dgv",{"useEmulationGroups":true}),beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"Double-quoted heredocs sigils",end:/^\p{space}*"""/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.other.sigil.heredoc.literal.elixir"},{begin:/~[A-Z]\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"sigil (without interpolation)",end:/\}[a-z]*/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.other.sigil.literal.elixir"},{begin:/~[A-Z]\[/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"sigil (without interpolation)",end:/\][a-z]*/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.other.sigil.literal.elixir"},{begin:/~[A-Z]</dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"sigil (without interpolation)",end:/>[a-z]*/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.other.sigil.literal.elixir"},{begin:/~[A-Z]\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"sigil (without interpolation)",end:/\)[a-z]*/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.other.sigil.literal.elixir"},{begin:/~[A-Z]([^\p{L}\p{M}\p{N}\p{Pc}])/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"sigil (without interpolation)",end:/\1[a-z]*()/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.other.sigil.literal.elixir"},{captures:{"1":{name:"punctuation.definition.constant.elixir"}},comment:"symbols",match:/*@__PURE__*/ new EmulatedRegExp("(?<!:)(:)(?:(?=($E$[a-zA-Z_][\\p{L}\\p{M}\\p{N}\\p{Pc}\\@]*(?:(?=($E$[\\?\\!]|=(?![\\>\\=])))\\3)?|<>|===?|!==?|<<>>|<<<|>>>|~~~|::|<-|\\|>|=>|=~|=|/|\\\\\\\\|\\*\\*?|\\.\\.?\\.?|\\.\\.//|>=?|<=?|&&?&?|\\+\\+?|--?|\\|\\|?\\|?|!|@|%?\\{\\}|%|\\[\\]|\\^(\\^\\^)?))\\2)","dgv",{"useEmulationGroups":true}),name:"constant.other.symbol.elixir"},{captures:{"1":{name:"punctuation.definition.constant.elixir"}},comment:"symbols",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.keywords.elixir"},{begin:/(^[ \t]+)?(?=##)/dgv,beginCaptures:{"1":{name:"punctuation.whitespace.comment.leading.elixir"}},end:/(?!#)/dgv,patterns:[{begin:/##/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.elixir"}},end:/\n/dgv,name:"comment.line.section.elixir"}]},{begin:/(^[ \t]+)?(?=#)/dgv,beginCaptures:{"1":{name:"punctuation.whitespace.comment.leading.elixir"}},end:/(?!#)/dgv,patterns:[{begin:/#/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.elixir"}},end:/\n/dgv,name:"comment.line.number-sign.elixir"}]},{match:/\b_([^_][\p{L}\p{M}\p{N}\p{Pc}]+[\?\!]?)/dgv,name:"comment.unused.elixir"},{match:/\b_\b/dgv,name:"comment.wildcard.elixir"},{comment:"\n\t\t\tmatches questionmark-letters.\n\n\t\t\texamples (1st alternation = hex):\n\t\t\t?\\x1 ?\\x61\n\n\t\t\texamples (2rd alternation = escaped):\n\t\t\t?\\n ?\\b\n\n\t\t\texamples (3rd alternation = normal):\n\t\t\t?a ?A ?0\n\t\t\t?* ?\" ?(\n\t\t\t?. ?#\n\n\t\t\tthe negative lookbehind prevents against matching\n\t\t\tp(42.tainted?)\n\t\t\t",match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])\?(\\(x[0-9A-Fa-f]{1,2}(?![0-9A-Fa-f])\b|[^xMC])|[^\p{space}\\])/dgv,name:"constant.numeric.elixir"},{match:/\+\+|--|<\|>/dgv,name:"keyword.operator.concatenation.elixir"},{match:/\|>|<~>|<>|<<<|>>>|~>>|<<~|~>|<~|<\|>/dgv,name:"keyword.operator.sigils_1.elixir"},{match:/&&&|&&/dgv,name:"keyword.operator.sigils_2.elixir"},{match:/<-|\\\\/dgv,name:"keyword.operator.sigils_3.elixir"},{match:/===?|!==?|<=?|>=?/dgv,name:"keyword.operator.comparison.elixir"},{match:/(\|\|\||&&&|\^\^\^|<<<|>>>|~~~)/dgv,name:"keyword.operator.bitwise.elixir"},{match:/(?<=[ \t])!+|\bnot\b|&&|\band\b|\|\||\bor\b|\bxor\b/dgv,name:"keyword.operator.logical.elixir"},{match:/(\*|\+|-|\/)/dgv,name:"keyword.operator.arithmetic.elixir"},{match:/\||\+\+|--|\*\*|\\\\|<-|<>|<<|>>|::|\.\.|\/\/|\|>|~|=>|&/dgv,name:"keyword.operator.other.elixir"},{match:/=/dgv,name:"keyword.operator.assignment.elixir"},{match:/:/dgv,name:"punctuation.separator.other.elixir"},{match:/;/dgv,name:"punctuation.separator.statement.elixir"},{match:/,/dgv,name:"punctuation.separator.object.elixir"},{match:/\./dgv,name:"punctuation.separator.method.elixir"},{match:/\{|\}/dgv,name:"punctuation.section.scope.elixir"},{match:/\[|\]/dgv,name:"punctuation.section.array.elixir"},{match:/\(|\)/dgv,name:"punctuation.section.function.elixir"}]},escaped_char:{match:/\\(x[\p{Nd}a-fA-F]{1,2}|[^\n])/dgv,name:"constant.character.escaped.elixir"},interpolated_elixir:{begin:/#\{/dgv,beginCaptures:{"0":{name:"punctuation.section.embedded.begin.elixir"}},contentName:"source.elixir",end:/\}/dgv,endCaptures:{"0":{name:"punctuation.section.embedded.end.elixir"}},name:"meta.embedded.line.elixir",patterns:[{include:"#nest_curly_and_self"},{include:"$self"}]},nest_curly_and_self:{patterns:[{begin:/\{/dgv,captures:{"0":{name:"punctuation.section.scope.elixir"}},end:/\}/dgv,patterns:[{include:"#nest_curly_and_self"}]},{include:"$self"}]}},scopeName:"source.elixir",embeddedLangs:["html"],aliases:undefined})
|
|
4
|
+
const lang = Object.freeze({displayName:"Elixir",fileTypes:["ex","exs"],firstLineMatch:/^#!\/[^\n]*\belixir/dgv,foldingStartMarker:/(after|else|catch|rescue|->|\{|\[|do)\p{space}*(?=\n?$)/dgv,foldingStopMarker:/^\p{space}*((\}|\]|after|else|catch|rescue)\p{space}*(?=\n?$)|end\b)/dgv,name:"elixir",patterns:[{begin:/\b(fn)\b(?![^\n]*->)/dgv,beginCaptures:{"1":{name:"keyword.control.elixir"}},end:/(?=\n?$)/dgv,patterns:[{include:"#core_syntax"}]},{captures:{"1":{name:"entity.name.type.class.elixir"},"2":{name:"punctuation.separator.method.elixir"},"3":{name:"entity.name.function.elixir"}},match:/([A-Z][\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*(\.)\p{space}*([a-z_][\p{L}\p{M}\p{N}\p{Pc}]*[\!\?]?)/dgv},{captures:{"1":{name:"constant.other.symbol.elixir"},"2":{name:"punctuation.separator.method.elixir"},"3":{name:"entity.name.function.elixir"}},match:/(:[\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*(\.)\p{space}*([_]?[\p{L}\p{M}\p{N}\p{Pc}]*[\!\?]?)/dgv},{captures:{"1":{name:"keyword.operator.other.elixir"},"2":{name:"entity.name.function.elixir"}},match:/(\|>)\p{space}*([a-z_][\p{L}\p{M}\p{N}\p{Pc}]*[\!\?]?)/dgv},{match:/\b[a-z_][\p{L}\p{M}\p{N}\p{Pc}]*[\!\?]?(?=\p{space}*\.?\p{space}*\()/dgv,name:"entity.name.function.elixir"},{begin:/\b(fn)\b(?=[^\n]*->)/dgv,beginCaptures:{"1":{name:"keyword.control.elixir"}},end:/*@__PURE__*/ new EmulatedRegExp("(?:(?=((->)|(when)|(\\))))\\1)","dgv",{"hiddenCaptures":[1]}),endCaptures:{"1":{name:"keyword.operator.other.elixir"},"2":{name:"keyword.control.elixir"},"3":{name:"punctuation.section.function.elixir"}},patterns:[{include:"#core_syntax"}]},{include:"#core_syntax"},{begin:/^(?=[^\n]*->)((?![^"']*("|')[^"']*->)|(?=[^\n]*->[^"']*("|')[^"']*->))((?![^\n]*\([^\)]*->)|(?=[^\(\)]*->)|(?=\p{space}*\([^\n]*\)[^\n]*->))((?![^\n]*\b(fn)\b)|(?=[^\n]*->[^\n]*\bfn\b))/dgv,beginCaptures:{"1":{name:"keyword.control.elixir"}},end:/*@__PURE__*/ new EmulatedRegExp("(?:(?=((->)|(when)|(\\))))\\1)","dgv",{"hiddenCaptures":[1]}),endCaptures:{"1":{name:"keyword.operator.other.elixir"},"2":{name:"keyword.control.elixir"},"3":{name:"punctuation.section.function.elixir"}},patterns:[{include:"#core_syntax"}]}],repository:{core_syntax:{patterns:[{begin:/^\p{space}*(defmodule)\b/dgv,beginCaptures:{"1":{name:"keyword.control.module.elixir"}},end:/\b(do)\b/dgv,endCaptures:{"1":{name:"keyword.control.module.elixir"}},name:"meta.module.elixir",patterns:[{match:/\b[A-Z][\p{L}\p{M}\p{N}\p{Pc}]*(?=\.)/dgv,name:"entity.other.inherited-class.elixir"},{match:/\b[A-Z][\p{L}\p{M}\p{N}\p{Pc}]*\b/dgv,name:"entity.name.type.class.elixir"}]},{begin:/^\p{space}*(defprotocol)\b/dgv,beginCaptures:{"1":{name:"keyword.control.protocol.elixir"}},end:/\b(do)\b/dgv,endCaptures:{"1":{name:"keyword.control.protocol.elixir"}},name:"meta.protocol_declaration.elixir",patterns:[{match:/\b[A-Z][\p{L}\p{M}\p{N}\p{Pc}]*\b/dgv,name:"entity.name.type.protocol.elixir"}]},{begin:/^\p{space}*(defimpl)\b/dgv,beginCaptures:{"1":{name:"keyword.control.protocol.elixir"}},end:/\b(do)\b/dgv,endCaptures:{"1":{name:"keyword.control.protocol.elixir"}},name:"meta.protocol_implementation.elixir",patterns:[{match:/\b[A-Z][\p{L}\p{M}\p{N}\p{Pc}]*\b/dgv,name:"entity.name.type.protocol.elixir"}]},{begin:/*@__PURE__*/ new EmulatedRegExp("^\\p{space}*(def|defmacro|defdelegate|defguard)\\p{space}+((?:(?=([a-zA-Z_][\\p{L}\\p{M}\\p{N}\\p{Pc}]*(?:(?=(\\.|::))\\4)))\\3)?(?:(?=([a-zA-Z_][\\p{L}\\p{M}\\p{N}\\p{Pc}]*(?:(?=([\\?\\!]|=(?!>)))\\6)?|===?|>[\\>\\=]?|<=>|<[\\<\\=]?|[\\%\\&\\`\\/\\|]|\\*\\*?|=?~|[\\-\\+]@?|\\[\\]=?))\\5))((\\()|\\p{space}*)","dgv",{"hiddenCaptures":[3,4,5,6]}),beginCaptures:{"1":{name:"keyword.control.module.elixir"},"2":{name:"entity.name.function.public.elixir"},"4":{name:"punctuation.section.function.elixir"}},end:/(\bdo:)|(\bdo\b)|(?=\p{space}+(def|defn|defmacro|defdelegate|defguard)\b)/dgv,endCaptures:{"1":{name:"constant.other.keywords.elixir"},"2":{name:"keyword.control.module.elixir"}},name:"meta.function.public.elixir",patterns:[{include:"$self"},{begin:/\p{space}(\\\\)/dgv,beginCaptures:{"1":{name:"keyword.operator.other.elixir"}},end:/,|\)|(?=\n?$)/dgv,patterns:[{include:"$self"}]},{match:/\b(is_atom|is_binary|is_bitstring|is_boolean|is_float|is_function|is_integer|is_list|is_map|is_nil|is_number|is_pid|is_port|is_record|is_reference|is_tuple|is_exception|abs|bit_size|byte_size|div|elem|hd|length|map_size|node|rem|round|tl|trunc|tuple_size)\b/dgv,name:"keyword.control.elixir"}]},{begin:/*@__PURE__*/ new EmulatedRegExp("^\\p{space}*(defp|defnp|defmacrop|defguardp)\\p{space}+((?:(?=([a-zA-Z_][\\p{L}\\p{M}\\p{N}\\p{Pc}]*(?:(?=(\\.|::))\\4)))\\3)?(?:(?=([a-zA-Z_][\\p{L}\\p{M}\\p{N}\\p{Pc}]*(?:(?=([\\?\\!]|=(?!>)))\\6)?|===?|>[\\>\\=]?|<=>|<[\\<\\=]?|[\\%\\&\\`\\/\\|]|\\*\\*?|=?~|[\\-\\+]@?|\\[\\]=?))\\5))((\\()|\\p{space}*)","dgv",{"hiddenCaptures":[3,4,5,6]}),beginCaptures:{"1":{name:"keyword.control.module.elixir"},"2":{name:"entity.name.function.private.elixir"},"4":{name:"punctuation.section.function.elixir"}},end:/(\bdo:)|(\bdo\b)|(?=\p{space}+(defp|defmacrop|defguardp)\b)/dgv,endCaptures:{"1":{name:"constant.other.keywords.elixir"},"2":{name:"keyword.control.module.elixir"}},name:"meta.function.private.elixir",patterns:[{include:"$self"},{begin:/\p{space}(\\\\)/dgv,beginCaptures:{"1":{name:"keyword.operator.other.elixir"}},end:/,|\)|(?=\n?$)/dgv,patterns:[{include:"$self"}]},{match:/\b(is_atom|is_binary|is_bitstring|is_boolean|is_float|is_function|is_integer|is_list|is_map|is_nil|is_number|is_pid|is_port|is_record|is_reference|is_tuple|is_exception|abs|bit_size|byte_size|div|elem|hd|length|map_size|node|rem|round|tl|trunc|tuple_size)\b/dgv,name:"keyword.control.elixir"}]},{begin:/\p{space}*~L"""/dgv,comment:"Leex Sigil",end:/\p{space}*"""/dgv,name:"sigil.leex",patterns:[{include:"text.elixir"},{include:"text.html.basic"}]},{begin:/\p{space}*~H"""/dgv,comment:"HEEx Sigil",end:/\p{space}*"""/dgv,name:"sigil.heex",patterns:[{include:"text.elixir"},{include:"text.html.basic"}]},{begin:/@(module|type)?doc (~[a-z])?"""/dgv,comment:"@doc with heredocs is treated as documentation",end:/\p{space}*"""/dgv,name:"comment.block.documentation.heredoc",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{begin:/@(module|type)?doc ~[A-Z]"""/dgv,comment:"@doc with heredocs is treated as documentation",end:/\p{space}*"""/dgv,name:"comment.block.documentation.heredoc"},{begin:/@(module|type)?doc (~[a-z])?'''/dgv,comment:"@doc with heredocs is treated as documentation",end:/\p{space}*'''/dgv,name:"comment.block.documentation.heredoc",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{begin:/@(module|type)?doc ~[A-Z]'''/dgv,comment:"@doc with heredocs is treated as documentation",end:/\p{space}*'''/dgv,name:"comment.block.documentation.heredoc"},{comment:"@doc false is treated as documentation",match:/@(module|type)?doc false/dgv,name:"comment.block.documentation.false"},{begin:/@(module|type)?doc "/dgv,comment:"@doc with string is treated as documentation",end:/"/dgv,name:"comment.block.documentation.string",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{match:/(?<!\.)\b(do|end|case|bc|lc|for|if|cond|unless|try|receive|fn|defmodule|defp?|defprotocol|defimpl|defrecord|defstruct|defnp?|defmacrop?|defguardp?|defdelegate|defexception|defoverridable|exit|after|rescue|catch|else|raise|reraise|throw|import|require|alias|use|quote|unquote|super|with)\b(?![\?\!\:])/dgv,name:"keyword.control.elixir"},{comment:" as above, just doesn't need a 'end' and does a logic operation",match:/(?<!\.)\b(and|not|or|when|xor|in)\b/dgv,name:"keyword.operator.elixir"},{match:/\b[A-Z][\p{L}\p{M}\p{N}\p{Pc}]*\b/dgv,name:"entity.name.type.class.elixir"},{match:/\b(nil|true|false)\b(?![\?\!])/dgv,name:"constant.language.elixir"},{match:/\b(__(CALLER|ENV|MODULE|DIR|STACKTRACE)__)\b(?![\?\!])/dgv,name:"variable.language.elixir"},{captures:{"1":{name:"punctuation.definition.variable.elixir"}},match:/(@)[a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*/dgv,name:"variable.other.readwrite.module.elixir"},{captures:{"1":{name:"punctuation.definition.variable.elixir"}},match:/(&)\p{Nd}+/dgv,name:"variable.other.anonymous.elixir"},{match:/&(?![\&])/dgv,name:"variable.other.anonymous.elixir"},{captures:{"1":{name:"punctuation.definition.variable.elixir"}},match:/\^[a-z_][\p{L}\p{M}\p{N}\p{Pc}]*/dgv,name:"variable.other.capture.elixir"},{match:/*@__PURE__*/ new EmulatedRegExp("\\b0x[0-9A-Fa-f](?:(?=(_?[0-9A-Fa-f]))\\1)*\\b","dgv",{"hiddenCaptures":[1]}),name:"constant.numeric.hex.elixir"},{match:/*@__PURE__*/ new EmulatedRegExp("\\b\\p{Nd}(?:(?=(_?\\p{Nd}))\\1)*(\\.(?![^\\p{space}\\p{Nd}])(?:(?=(_?\\p{Nd}))\\3)+)([eE][\\-\\+]?\\p{Nd}(?:(?=(_?\\p{Nd}))\\5)*)?\\b","dgv",{"hiddenCaptures":[1,3,5]}),name:"constant.numeric.float.elixir"},{match:/*@__PURE__*/ new EmulatedRegExp("\\b\\p{Nd}(?:(?=(_?\\p{Nd}))\\1)*\\b","dgv",{"hiddenCaptures":[1]}),name:"constant.numeric.integer.elixir"},{match:/*@__PURE__*/ new EmulatedRegExp("\\b0b[01](?:(?=(_?[01]))\\1)*\\b","dgv",{"hiddenCaptures":[1]}),name:"constant.numeric.binary.elixir"},{match:/*@__PURE__*/ new EmulatedRegExp("\\b0o[0-7](?:(?=(_?[0-7]))\\1)*\\b","dgv",{"hiddenCaptures":[1]}),name:"constant.numeric.octal.elixir"},{begin:/:'/dgv,captures:{"0":{name:"punctuation.definition.constant.elixir"}},end:/'/dgv,name:"constant.other.symbol.single-quoted.elixir",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{begin:/:"/dgv,captures:{"0":{name:"punctuation.definition.constant.elixir"}},end:/"/dgv,name:"constant.other.symbol.double-quoted.elixir",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{begin:/*@__PURE__*/ new EmulatedRegExp("(?:(?=('''))\\1)","dgv",{"hiddenCaptures":[1]}),beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"Single-quoted heredocs",end:/^\p{space}*'''/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.single.heredoc.elixir",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{begin:/'/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"single quoted string (allows for interpolation)",end:/'/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.single.elixir",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{begin:/*@__PURE__*/ new EmulatedRegExp("(?:(?=(\"\"\"))\\1)","dgv",{"hiddenCaptures":[1]}),beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"Double-quoted heredocs",end:/^\p{space}*"""/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.double.heredoc.elixir",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"double quoted string (allows for interpolation)",end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.double.elixir",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{begin:/*@__PURE__*/ new EmulatedRegExp("~[a-z](?:(?=(\"\"\"))\\1)","dgv",{"hiddenCaptures":[1]}),beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"Double-quoted heredocs sigils",end:/^\p{space}*"""/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.other.sigil.heredoc.elixir",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{begin:/~[a-z]\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"sigil (allow for interpolation)",end:/\}[a-z]*/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.other.sigil.elixir",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{begin:/~[a-z]\[/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"sigil (allow for interpolation)",end:/\][a-z]*/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.other.sigil.elixir",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{begin:/~[a-z]</dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"sigil (allow for interpolation)",end:/>[a-z]*/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.other.sigil.elixir",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{begin:/~[a-z]\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"sigil (allow for interpolation)",end:/\)[a-z]*/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.other.sigil.elixir",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{begin:/~[a-z]([^\p{L}\p{M}\p{N}\p{Pc}])/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"sigil (allow for interpolation)",end:/\1[a-z]*()/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.other.sigil.elixir",patterns:[{include:"#interpolated_elixir"},{include:"#escaped_char"}]},{begin:/*@__PURE__*/ new EmulatedRegExp("~[A-Z](?:(?=(\"\"\"))\\1)","dgv",{"hiddenCaptures":[1]}),beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"Double-quoted heredocs sigils",end:/^\p{space}*"""/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.other.sigil.heredoc.literal.elixir"},{begin:/~[A-Z]\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"sigil (without interpolation)",end:/\}[a-z]*/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.other.sigil.literal.elixir"},{begin:/~[A-Z]\[/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"sigil (without interpolation)",end:/\][a-z]*/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.other.sigil.literal.elixir"},{begin:/~[A-Z]</dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"sigil (without interpolation)",end:/>[a-z]*/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.other.sigil.literal.elixir"},{begin:/~[A-Z]\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"sigil (without interpolation)",end:/\)[a-z]*/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.other.sigil.literal.elixir"},{begin:/~[A-Z]([^\p{L}\p{M}\p{N}\p{Pc}])/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.elixir"}},comment:"sigil (without interpolation)",end:/\1[a-z]*()/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.elixir"}},name:"string.quoted.other.sigil.literal.elixir"},{captures:{"1":{name:"punctuation.definition.constant.elixir"}},comment:"symbols",match:/*@__PURE__*/ new EmulatedRegExp("(?<!:)(:)(?:(?=([a-zA-Z_][\\p{L}\\p{M}\\p{N}\\p{Pc}\\@]*(?:(?=([\\?\\!]|=(?![\\>\\=])))\\3)?|<>|===?|!==?|<<>>|<<<|>>>|~~~|::|<-|\\|>|=>|=~|=|/|\\\\\\\\|\\*\\*?|\\.\\.?\\.?|\\.\\.//|>=?|<=?|&&?&?|\\+\\+?|--?|\\|\\|?\\|?|!|@|%?\\{\\}|%|\\[\\]|\\^(\\^\\^)?))\\2)","dgv",{"hiddenCaptures":[2,3]}),name:"constant.other.symbol.elixir"},{captures:{"1":{name:"punctuation.definition.constant.elixir"}},comment:"symbols",match:/*@__PURE__*/ new EmulatedRegExp("(?:(?=([a-zA-Z_][\\p{L}\\p{M}\\p{N}\\p{Pc}\\@]*(?:(?=([\\?\\!]))\\2)?))\\1)(:)(?!:)","dgv",{"hiddenCaptures":[1,2]}),name:"constant.other.keywords.elixir"},{begin:/(^[ \t]+)?(?=##)/dgv,beginCaptures:{"1":{name:"punctuation.whitespace.comment.leading.elixir"}},end:/(?!#)/dgv,patterns:[{begin:/##/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.elixir"}},end:/\n/dgv,name:"comment.line.section.elixir"}]},{begin:/(^[ \t]+)?(?=#)/dgv,beginCaptures:{"1":{name:"punctuation.whitespace.comment.leading.elixir"}},end:/(?!#)/dgv,patterns:[{begin:/#/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.elixir"}},end:/\n/dgv,name:"comment.line.number-sign.elixir"}]},{match:/\b_([^_][\p{L}\p{M}\p{N}\p{Pc}]+[\?\!]?)/dgv,name:"comment.unused.elixir"},{match:/\b_\b/dgv,name:"comment.wildcard.elixir"},{comment:"\n\t\t\tmatches questionmark-letters.\n\n\t\t\texamples (1st alternation = hex):\n\t\t\t?\\x1 ?\\x61\n\n\t\t\texamples (2rd alternation = escaped):\n\t\t\t?\\n ?\\b\n\n\t\t\texamples (3rd alternation = normal):\n\t\t\t?a ?A ?0\n\t\t\t?* ?\" ?(\n\t\t\t?. ?#\n\n\t\t\tthe negative lookbehind prevents against matching\n\t\t\tp(42.tainted?)\n\t\t\t",match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])\?(\\(x[0-9A-Fa-f]{1,2}(?![0-9A-Fa-f])\b|[^xMC])|[^\p{space}\\])/dgv,name:"constant.numeric.elixir"},{match:/\+\+|--|<\|>/dgv,name:"keyword.operator.concatenation.elixir"},{match:/\|>|<~>|<>|<<<|>>>|~>>|<<~|~>|<~|<\|>/dgv,name:"keyword.operator.sigils_1.elixir"},{match:/&&&|&&/dgv,name:"keyword.operator.sigils_2.elixir"},{match:/<-|\\\\/dgv,name:"keyword.operator.sigils_3.elixir"},{match:/===?|!==?|<=?|>=?/dgv,name:"keyword.operator.comparison.elixir"},{match:/(\|\|\||&&&|\^\^\^|<<<|>>>|~~~)/dgv,name:"keyword.operator.bitwise.elixir"},{match:/(?<=[ \t])!+|\bnot\b|&&|\band\b|\|\||\bor\b|\bxor\b/dgv,name:"keyword.operator.logical.elixir"},{match:/(\*|\+|-|\/)/dgv,name:"keyword.operator.arithmetic.elixir"},{match:/\||\+\+|--|\*\*|\\\\|<-|<>|<<|>>|::|\.\.|\/\/|\|>|~|=>|&/dgv,name:"keyword.operator.other.elixir"},{match:/=/dgv,name:"keyword.operator.assignment.elixir"},{match:/:/dgv,name:"punctuation.separator.other.elixir"},{match:/;/dgv,name:"punctuation.separator.statement.elixir"},{match:/,/dgv,name:"punctuation.separator.object.elixir"},{match:/\./dgv,name:"punctuation.separator.method.elixir"},{match:/\{|\}/dgv,name:"punctuation.section.scope.elixir"},{match:/\[|\]/dgv,name:"punctuation.section.array.elixir"},{match:/\(|\)/dgv,name:"punctuation.section.function.elixir"}]},escaped_char:{match:/\\(x[\p{Nd}a-fA-F]{1,2}|[^\n])/dgv,name:"constant.character.escaped.elixir"},interpolated_elixir:{begin:/#\{/dgv,beginCaptures:{"0":{name:"punctuation.section.embedded.begin.elixir"}},contentName:"source.elixir",end:/\}/dgv,endCaptures:{"0":{name:"punctuation.section.embedded.end.elixir"}},name:"meta.embedded.line.elixir",patterns:[{include:"#nest_curly_and_self"},{include:"$self"}]},nest_curly_and_self:{patterns:[{begin:/\{/dgv,captures:{"0":{name:"punctuation.section.scope.elixir"}},end:/\}/dgv,patterns:[{include:"#nest_curly_and_self"}]},{include:"$self"}]}},scopeName:"source.elixir",embeddedLangs:["html"],aliases:undefined})
|
|
5
5
|
|
|
6
6
|
export default [
|
|
7
7
|
...html,
|