@shikijs/langs-precompiled 2.3.1 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actionscript-3.mjs +1 -1
- package/dist/applescript.mjs +1 -1
- package/dist/ara.mjs +1 -1
- package/dist/asciidoc.mjs +1 -1
- package/dist/beancount.mjs +1 -1
- package/dist/bsl.mjs +1 -1
- package/dist/cadence.mjs +1 -1
- package/dist/clarity.mjs +1 -1
- package/dist/cmake.mjs +1 -1
- package/dist/cobol.mjs +1 -1
- package/dist/coq.mjs +1 -1
- package/dist/crystal.mjs +1 -1
- package/dist/cypher.mjs +1 -1
- package/dist/dax.mjs +1 -1
- package/dist/diff.mjs +1 -1
- package/dist/docker.mjs +1 -1
- package/dist/dotenv.mjs +1 -1
- package/dist/dream-maker.mjs +1 -1
- package/dist/elixir.mjs +1 -1
- package/dist/elm.mjs +1 -1
- package/dist/erlang.mjs +1 -1
- package/dist/fish.mjs +1 -1
- package/dist/fortran-free-form.mjs +1 -1
- package/dist/fsharp.mjs +1 -1
- package/dist/gdresource.mjs +1 -1
- package/dist/gdscript.mjs +1 -1
- package/dist/git-commit.mjs +1 -1
- package/dist/go.mjs +1 -1
- package/dist/graphql.mjs +1 -1
- package/dist/groovy.mjs +1 -1
- package/dist/hack.mjs +1 -1
- package/dist/haml.mjs +1 -1
- package/dist/haskell.mjs +1 -1
- package/dist/hcl.mjs +1 -1
- package/dist/html.mjs +1 -1
- package/dist/json.mjs +1 -1
- package/dist/json5.mjs +1 -1
- package/dist/jsonc.mjs +1 -1
- package/dist/jsonl.mjs +1 -1
- package/dist/jssm.mjs +1 -1
- package/dist/julia.mjs +1 -1
- package/dist/kusto.mjs +1 -1
- package/dist/latex.mjs +1 -1
- package/dist/less.mjs +1 -1
- package/dist/markdown.mjs +1 -1
- package/dist/marko.mjs +1 -1
- package/dist/matlab.mjs +1 -1
- package/dist/mermaid.mjs +1 -1
- package/dist/mipsasm.mjs +1 -1
- package/dist/mojo.mjs +1 -1
- package/dist/move.mjs +1 -1
- package/dist/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/perl.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 +1 -1
- package/dist/puppet.mjs +1 -1
- package/dist/python.mjs +1 -1
- package/dist/regexp.mjs +1 -1
- package/dist/riscv.mjs +1 -1
- package/dist/ruby.mjs +1 -1
- package/dist/rust.mjs +1 -1
- package/dist/sas.mjs +1 -1
- package/dist/scala.mjs +1 -1
- package/dist/scheme.mjs +1 -1
- package/dist/sdbl.mjs +1 -1
- package/dist/shellscript.mjs +1 -1
- package/dist/smalltalk.mjs +1 -1
- package/dist/splunk.mjs +1 -1
- package/dist/sql.mjs +1 -1
- package/dist/stata.mjs +1 -1
- package/dist/stylus.mjs +1 -1
- package/dist/tcl.mjs +1 -1
- package/dist/terraform.mjs +1 -1
- package/dist/toml.mjs +1 -1
- package/dist/twig.mjs +1 -1
- package/dist/typst.mjs +1 -1
- package/dist/vue.mjs +1 -1
- package/dist/vyper.mjs +1 -1
- package/dist/wasm.mjs +1 -1
- package/dist/wgsl.mjs +1 -1
- package/dist/zenscript.mjs +1 -1
- package/dist/zig.mjs +1 -1
- package/package.json +3 -3
package/dist/matlab.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EmulatedRegExp } from 'oniguruma-to-es'
|
|
2
2
|
|
|
3
|
-
const lang = Object.freeze({displayName:"MATLAB",fileTypes:["m"],name:"matlab",patterns:[{comment:"This and #all_after_command_dual are split out so #command_dual can be excluded in things like (), {}, []",include:"#all_before_command_dual"},{include:"#command_dual"},{include:"#all_after_command_dual"}],repository:{all_after_command_dual:{patterns:[{include:"#string"},{include:"#line_continuation"},{include:"#comments"},{include:"#conjugate_transpose"},{include:"#transpose"},{include:"#constants"},{include:"#variables"},{include:"#numbers"},{include:"#operators"}]},all_before_command_dual:{patterns:[{include:"#classdef"},{include:"#function"},{include:"#blocks"},{include:"#control_statements"},{include:"#global_persistent"},{include:"#parens"},{include:"#square_brackets"},{include:"#indexing_curly_brackets"},{include:"#curly_brackets"}]},blocks:{patterns:[{begin:/\p{space}*(?:^|[\p{space}\,\;])(for)\b/dgv,beginCaptures:{"1":{name:"keyword.control.for.matlab"}},end:/\p{space}*(?:^|[\p{space}\,\;])(end)\b/dgv,endCaptures:{"1":{name:"keyword.control.end.for.matlab"}},name:"meta.for.matlab",patterns:[{include:"$self"}]},{begin:/\p{space}*(?:^|[\p{space}\,\;])(if)\b/dgv,beginCaptures:{"1":{name:"keyword.control.if.matlab"}},end:/\p{space}*(?:^|[\p{space}\,\;])(end)\b/dgv,endCaptures:{"1":{name:"keyword.control.end.if.matlab"},"2":{patterns:[{include:"$self"}]}},name:"meta.if.matlab",patterns:[{captures:{"2":{name:"keyword.control.elseif.matlab"},"3":{patterns:[{include:"$self"}]}},end:/^/dgv,match:/(\p{space}*)(?:^|[\p{space}\,\;])(elseif)\b([^\n]*)(?=\n?$)\n?/dgv,name:"meta.elseif.matlab"},{captures:{"2":{name:"keyword.control.else.matlab"},"3":{patterns:[{include:"$self"}]}},end:/^/dgv,match:/(\p{space}*)(?:^|[\p{space}\,\;])(else)\b([^\n]*)?(?=\n?$)\n?/dgv,name:"meta.else.matlab"},{include:"$self"}]},{begin:/\p{space}*(?:^|[\p{space}\,\;])(parfor)\b/dgv,beginCaptures:{"1":{name:"keyword.control.for.matlab"}},end:/\p{space}*(?:^|[\p{space}\,\;])(end)\b/dgv,endCaptures:{"1":{name:"keyword.control.end.for.matlab"}},name:"meta.parfor.matlab",patterns:[{begin:/(?!(?=\n?$))/dgvy,end:/(?=\n?$)\n?/dgv,name:"meta.parfor-quantity.matlab",patterns:[{include:"$self"}]},{include:"$self"}]},{begin:/\p{space}*(?:^|[\p{space}\,\;])(spmd)\b/dgv,beginCaptures:{"1":{name:"keyword.control.spmd.matlab"}},end:/\p{space}*(?:^|[\p{space}\,\;])(end)\b/dgv,endCaptures:{"1":{name:"keyword.control.end.spmd.matlab"}},name:"meta.spmd.matlab",patterns:[{begin:/(?!(?=\n?$))/dgvy,end:/(?=\n?$)\n?/dgv,name:"meta.spmd-statement.matlab",patterns:[{include:"$self"}]},{include:"$self"}]},{begin:/\p{space}*(?:^|[\p{space}\,\;])(switch)\b/dgv,beginCaptures:{"1":{name:"keyword.control.switch.matlab"}},end:/\p{space}*(?:^|[\p{space}\,\;])(end)\b/dgv,endCaptures:{"1":{name:"keyword.control.end.switch.matlab"}},name:"meta.switch.matlab",patterns:[{captures:{"2":{name:"keyword.control.case.matlab"},"3":{patterns:[{include:"$self"}]}},end:/^/dgv,match:/(\p{space}*)(?:^|[\p{space}\,\;])(case)\b([^\n]*)(?=\n?$)\n?/dgv,name:"meta.case.matlab"},{captures:{"2":{name:"keyword.control.otherwise.matlab"},"3":{patterns:[{include:"$self"}]}},end:/^/dgv,match:/(\p{space}*)(?:^|[\p{space}\,\;])(otherwise)\b([^\n]*)?(?=\n?$)\n?/dgv,name:"meta.otherwise.matlab"},{include:"$self"}]},{begin:/\p{space}*(?:^|[\p{space}\,\;])(try)\b/dgv,beginCaptures:{"1":{name:"keyword.control.try.matlab"}},end:/\p{space}*(?:^|[\p{space}\,\;])(end)\b/dgv,endCaptures:{"1":{name:"keyword.control.end.try.matlab"}},name:"meta.try.matlab",patterns:[{captures:{"2":{name:"keyword.control.catch.matlab"},"3":{patterns:[{include:"$self"}]}},end:/^/dgv,match:/(\p{space}*)(?:^|[\p{space}\,\;])(catch)\b([^\n]*)?(?=\n?$)\n?/dgv,name:"meta.catch.matlab"},{include:"$self"}]},{begin:/\p{space}*(?:^|[\p{space}\,\;])(while)\b/dgv,beginCaptures:{"1":{name:"keyword.control.while.matlab"}},end:/\p{space}*(?:^|[\p{space}\,\;])(end)\b/dgv,endCaptures:{"1":{name:"keyword.control.end.while.matlab"}},name:"meta.while.matlab",patterns:[{include:"$self"}]}]},braced_validator_list:{begin:/\p{space}*(\{)\p{space}*/dgv,beginCaptures:{"1":{name:"storage.type.matlab"}},comment:"Validator functions. Treated as a recursive group to permit nested brackets, quotes, etc.",end:/(\})/dgv,endCaptures:{"1":{name:"storage.type.matlab"}},patterns:[{include:"#braced_validator_list"},{include:"#validator_strings"},{include:"#line_continuation"},{captures:{"1":{name:"storage.type.matlab"}},match:/([^\{\}\}'"\.]+)/dgv},{match:/\./dgv,name:"storage.type.matlab"}]},classdef:{patterns:[{begin:/(^\p{space}*)(classdef)\b\p{space}*([^\n]*)/dgv,beginCaptures:{"2":{name:"storage.type.class.matlab"},"3":{patterns:[{captures:{"1":{patterns:[{match:/[a-zA-Z][a-zA-Z0-9_]*/dgv,name:"variable.parameter.class.matlab"},{begin:/=\p{space}*/dgv,end:/,|(?=\))/dgv,patterns:[{match:/true|false/dgv,name:"constant.language.boolean.matlab"},{include:"#string"}]}]},"2":{name:"meta.class-declaration.matlab"},"3":{name:"entity.name.section.class.matlab"},"4":{name:"keyword.operator.other.matlab"},"5":{patterns:[{match:/[a-zA-Z][a-zA-Z0-9_]*(\.[a-zA-Z][a-zA-Z0-9_]*)*/dgv,name:"entity.other.inherited-class.matlab"},{match:/&/dgv,name:"keyword.operator.other.matlab"}]},"6":{patterns:[{include:"$self"}]}},match:/(\([^\)]*\))?\p{space}*(([a-zA-Z][a-zA-Z0-9_]*)(?:\p{space}*(<)\p{space}*([^\%]*))?)\p{space}*((?=\n?$)|(?=(%|[^\n][^\n][^\n]))[^\n]*)/dgv}]}},end:/\p{space}*(?:^|[\p{space}\,\;])(end)\b/dgv,endCaptures:{"1":{name:"keyword.control.end.class.matlab"}},name:"meta.class.matlab",patterns:[{begin:/(^\p{space}*)(properties)\b([^\%]*)\p{space}*(\([^\)]*\))?\p{space}*((?=\n?$)|(?=%))/dgv,beginCaptures:{"2":{name:"keyword.control.properties.matlab"},"3":{patterns:[{match:/[a-zA-Z][a-zA-Z0-9_]*/dgv,name:"variable.parameter.properties.matlab"},{begin:/=\p{space}*/dgv,end:/,|(?=\))/dgv,patterns:[{match:/true|false/dgv,name:"constant.language.boolean.matlab"},{match:/public|protected|private/dgv,name:"constant.language.access.matlab"}]}]}},end:/\p{space}*(?:^|[\p{space}\,\;])(end)\b/dgv,endCaptures:{"1":{name:"keyword.control.end.properties.matlab"}},name:"meta.properties.matlab",patterns:[{include:"#validators"},{include:"$self"}]},{begin:/(^\p{space}*)(methods)\b([^\%]*)\p{space}*(\([^\)]*\))?\p{space}*((?=\n?$)|(?=%))/dgv,beginCaptures:{"2":{name:"keyword.control.methods.matlab"},"3":{patterns:[{match:/[a-zA-Z][a-zA-Z0-9_]*/dgv,name:"variable.parameter.methods.matlab"},{begin:/=\p{space}*/dgv,end:/,|(?=\))/dgv,patterns:[{match:/true|false/dgv,name:"constant.language.boolean.matlab"},{match:/public|protected|private/dgv,name:"constant.language.access.matlab"}]}]}},end:/\p{space}*(?:^|[\p{space}\,\;])(end)\b/dgv,endCaptures:{"1":{name:"keyword.control.end.methods.matlab"}},name:"meta.methods.matlab",patterns:[{include:"$self"}]},{begin:/(^\p{space}*)(events)\b([^\%]*)\p{space}*(\([^\)]*\))?\p{space}*((?=\n?$)|(?=%))/dgv,beginCaptures:{"2":{name:"keyword.control.events.matlab"},"3":{patterns:[{match:/[a-zA-Z][a-zA-Z0-9_]*/dgv,name:"variable.parameter.events.matlab"},{begin:/=\p{space}*/dgv,end:/,|(?=\))/dgv,patterns:[{match:/true|false/dgv,name:"constant.language.boolean.matlab"},{match:/public|protected|private/dgv,name:"constant.language.access.matlab"}]}]}},end:/\p{space}*(?:^|[\p{space}\,\;])(end)\b/dgv,endCaptures:{"1":{name:"keyword.control.end.events.matlab"}},name:"meta.events.matlab",patterns:[{include:"$self"}]},{begin:/(^\p{space}*)(enumeration)\b([^\%]*)\p{space}*((?=\n?$)|(?=%))/dgv,beginCaptures:{"2":{name:"keyword.control.enumeration.matlab"}},end:/\p{space}*(?:^|[\p{space}\,\;])(end)\b/dgv,endCaptures:{"1":{name:"keyword.control.end.enumeration.matlab"}},name:"meta.enumeration.matlab",patterns:[{include:"$self"}]},{include:"$self"}]}]},command_dual:{captures:{"1":{name:"string.interpolated.matlab"},"2":{name:"variable.other.command.matlab"},"28":{name:"comment.line.percentage.matlab"}},comment:" 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1516 17 18 19 20 21 22 23 24 25 26 27 28",match:/^\p{space}*(([b-df-hk-moq-zA-HJ-MO-Z][\p{L}\p{M}\p{N}\p{Pc}]*|a|an|a([A-Za-mo-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|n[A-Za-rt-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|ns[\p{L}\p{M}\p{N}\p{Pc}]+)|e|ep|e([A-Za-oq-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|p[A-Za-rt-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|ps[\p{L}\p{M}\p{N}\p{Pc}]+)|in|i([A-Za-mo-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|n[A-Za-eg-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|nf[\p{L}\p{M}\p{N}\p{Pc}]+)|I|In|I([A-Za-mo-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|n[A-Za-eg-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|nf[\p{L}\p{M}\p{N}\p{Pc}]+)|j[\p{L}\p{M}\p{N}\p{Pc}]+|N|Na|N([A-Zb-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|a[A-MO-Za-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|aN[\p{L}\p{M}\p{N}\p{Pc}]+)|n|na|nar|narg|nargi|nargo|nargou|n([A-Zb-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|a([A-Za-mo-qs-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|n[\p{L}\p{M}\p{N}\p{Pc}]+|r([A-Za-fh-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|g([A-Za-hj-nq-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|i([A-Za-mo-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|n[\p{L}\p{M}\p{N}\p{Pc}]+)|o([A-Za-tv-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|u([A-Za-su-z][\p{L}\p{M}\p{N}\p{Pc}]*|t[\p{L}\p{M}\p{N}\p{Pc}]+))))))|p|p[A-Za-hj-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|pi[\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}+((([^\p{space}\;\,\%\(\)\=\.\{\&\|\~\<\>\:\+\-\*\/\\\@\^'"]|(?=')|(?="))|(\.\^|\.\*|\.\/|\.\\|\.'|\.\(|&&|==|\|\||&(?=[^\&])|\|(?=[^\|])|~=|<=|>=|~(?!=)|<(?!=)|>(?!=)|:|\+|-|\*|\/|\\|@|\^)([^\p{space}]|\p{space}*(?=%)|\p{space}+(?=\n?$)|\p{space}+(,|;|\)|\}|\]|&|\||<|>|=|:|\*|\/|\\|\^|@|(\.[^\p{Nd}\.]|\.\.[^\.])))|(\.[^\^\*\/\\'\(\p{space}A-Za-z]))([^\%]|'[^']*'|"[^"]*")*|(\.(?=\p{space})|\.[A-Za-z]|(?=\{))([^\(\='"\%]|==|'[^']*'|"[^"]*"|\(|\([^\)\%]*\)|\[|\[[^\]\%]*\]|\{|\{[^\}\%]*\})*(\.\.\.[^\%]*)?((?=%)|(?=\n?$))))(%[^\n]*)?(?=\n?$)/dgv},comment_block:{begin:/*@__PURE__*/ new EmulatedRegExp("(^[\\p{space}]*)%\\{(?:(?=([^\\n\\P{space}]*))\\2)\\n","dgv",{"hiddenCaptures":[2]}),beginCaptures:{"1":{name:"punctuation.definition.comment.matlab"}},end:/*@__PURE__*/ new EmulatedRegExp("^[\\p{space}]*%\\}(?:(?=([^\\n\\P{space}]*))\\1)(?:\\n|(?=\\n?$))","dgv",{"hiddenCaptures":[1]}),name:"comment.block.percentage.matlab",patterns:[{include:"#comment_block"},{match:/^[^\n]*\n/dgv}]},comments:{patterns:[{begin:/(^[ \t]+)?(?=%%\p{space})/dgv,beginCaptures:{"1":{name:"punctuation.whitespace.comment.leading.matlab"}},end:/*@__PURE__*/ new EmulatedRegExp("(?!^)","dgv",{"strategy":"clip_search"}),patterns:[{begin:/%%/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.matlab"}},end:/\n/dgv,name:"comment.line.double-percentage.matlab",patterns:[{begin:/[^\P{space}\n]*(?![\n\p{space}])/dgvy,contentName:"meta.cell.matlab",end:/(?=\n)/dgv}]}]},{include:"#comment_block"},{begin:/(^[ \t]+)?(?=%)/dgv,beginCaptures:{"1":{name:"punctuation.whitespace.comment.leading.matlab"}},end:/*@__PURE__*/ new EmulatedRegExp("(?!^)","dgv",{"strategy":"clip_search"}),patterns:[{begin:/%/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.matlab"}},end:/\n/dgv,name:"comment.line.percentage.matlab"}]}]},conjugate_transpose:{match:/((?<=[^\p{space}])|(?<=\])|(?<=\))|(?<=\}))'/dgv,name:"keyword.operator.transpose.matlab"},constants:{comment:"MATLAB Constants",match:/(?<!\.)\b(eps|false|Inf|inf|intmax|intmin|namelengthmax|NaN|nan|on|off|realmax|realmin|true|pi)\b/dgv,name:"constant.language.matlab"},control_statements:{captures:{"1":{name:"keyword.control.matlab"}},match:/\p{space}*(?:^|[\p{space}\,\;])(break|continue|return)\b/dgv,name:"meta.control.matlab"},curly_brackets:{begin:/\{/dgv,comment:"We don't include $self here to avoid matching command syntax inside (), [], {}",end:/\}/dgv,patterns:[{include:"#end_in_parens"},{include:"#all_before_command_dual"},{include:"#all_after_command_dual"},{include:"#end_in_parens"},{comment:"These block keywords pick up any such missed keywords when the block matching for things like (), if-end, etc. don't work. Useful for when someone has partially written",include:"#block_keywords"}]},end_in_parens:{comment:"end as operator symbol",match:/\bend\b/dgv,name:"keyword.operator.symbols.matlab"},function:{patterns:[{begin:/(^\p{space}*)(function)\p{space}+(?:(?:(\[)([^\]]*)(\])|([a-zA-Z][a-zA-Z0-9_]*))\p{space}*=\p{space}*)?([a-zA-Z][a-zA-Z0-9_]*(\.[a-zA-Z][a-zA-Z0-9_]*)*)\p{space}*/dgv,beginCaptures:{"2":{name:"storage.type.function.matlab"},"3":{name:"punctuation.definition.arguments.begin.matlab"},"4":{patterns:[{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.parameter.output.matlab"}]},"5":{name:"punctuation.definition.arguments.end.matlab"},"6":{name:"variable.parameter.output.function.matlab"},"7":{name:"entity.name.function.matlab"}},end:/\p{space}*(?:^|[\p{space}\,\;])(end)\b(\p{space}*\n)?/dgv,endCaptures:{"1":{name:"keyword.control.end.function.matlab"}},name:"meta.function.matlab",patterns:[{begin:/\(/dgvy,end:/\)/dgv,name:"meta.arguments.function.matlab",patterns:[{include:"#line_continuation"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.parameter.input.matlab"}]},{begin:/(^\p{space}*)(arguments)\b([^\%]*)\p{space}*(\([^\)]*\))?\p{space}*((?=\n?$)|(?=%))/dgv,beginCaptures:{"2":{name:"keyword.control.arguments.matlab"},"3":{patterns:[{match:/[a-zA-Z][a-zA-Z0-9_]*/dgv,name:"variable.parameter.arguments.matlab"}]}},end:/\p{space}*(?:^|[\p{space}\,\;])(end)\b/dgv,endCaptures:{"1":{name:"keyword.control.end.arguments.matlab"}},name:"meta.arguments.matlab",patterns:[{include:"#validators"},{include:"$self"}]},{include:"$self"}]}]},global_persistent:{captures:{"1":{name:"keyword.control.globalpersistent.matlab"}},match:/^\p{space}*(global|persistent)\b/dgv,name:"meta.globalpersistent.matlab"},indexing_curly_brackets:{Comment:"Match identifier{idx, idx, } and stop at newline without ... This helps with partially written code like x{idx ",begin:/([a-zA-Z][a-zA-Z0-9_\.]*\p{space}*)\{/dgv,beginCaptures:{"1":{patterns:[{include:"$self"}]}},comment:"We don't include $self here to avoid matching command syntax inside (), [], {}",end:/(\}|(?<!\.\.\.)[^\n]\n)/dgv,patterns:[{include:"#end_in_parens"},{include:"#all_before_command_dual"},{include:"#all_after_command_dual"},{include:"#end_in_parens"},{comment:"These block keywords pick up any such missed keywords when the block matching for things like (), if-end, etc. don't work. Useful for when someone has partially written",include:"#block_keywords"}]},line_continuation:{captures:{"1":{name:"keyword.operator.symbols.matlab"},"2":{name:"comment.line.continuation.matlab"}},comment:"Line continuations",match:/(\.\.\.)([^\n]*)(?=\n?$)/dgv,name:"meta.linecontinuation.matlab"},numbers:{comment:"Valid numbers: 1, .1, 1.1, .1e1, 1.1e1, 1e1, 1i, 1j, 1e2j",match:/(?<=[\p{space}\-\+\*\/\\\=\:\[\(\{\,]|^)\p{Nd}*\.?\p{Nd}+([eE][\+\-]?\p{Nd})?([[0-9]&&[^\.]])*(i|j)?\b/dgv,name:"constant.numeric.matlab"},operators:{comment:"Operator symbols",match:/(?<=\p{space})(==|~=|>|>=|<|<=|&|&&|:|\||\|\||\+|-|\*|\.\*|\/|\.\/|\\|\.\\|\^|\.\^)(?=\p{space})/dgv,name:"keyword.operator.symbols.matlab"},parens:{begin:/\(/dgv,comment:"We don't include $self here to avoid matching command syntax inside (), [], {}",end:/(\)|(?<!\.\.\.)[^\n]\n)/dgv,patterns:[{include:"#end_in_parens"},{include:"#all_before_command_dual"},{include:"#all_after_command_dual"},{comment:"These block keywords pick up any such missed keywords when the block matching for things like (), if-end, etc. don't work. Useful for when someone has partially written",include:"#block_keywords"}]},square_brackets:{begin:/\[/dgv,comment:"We don't include $self here to avoid matching command syntax inside (), [], {}",end:/\]/dgv,patterns:[{include:"#all_before_command_dual"},{include:"#all_after_command_dual"},{comment:"These block keywords pick up any such missed keywords when the block matching for things like (), if-end, etc. don't work. Useful for when someone has partially written",include:"#block_keywords"}]},string:{patterns:[{captures:{"1":{name:"string.interpolated.matlab"},"2":{name:"punctuation.definition.string.begin.matlab"}},comment:"Shell command",match:/^\p{space}*((!)[^\n]*(?=\n?$)\n?)/dgv},{begin:/((?<=(\[|\(|\{|=|\p{space}|;|:|,|~|<|>|&|\||-|\+|\*|\/|\\|\.|\^))|^)'/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.matlab"}},comment:"Character vector literal (single-quoted)",end:/'(?=(\[|\(|\{|\]|\)|\}|=|~|<|>|&|\||-|\+|\*|\/|\\|\.|\^|\p{space}|;|:|,))/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.matlab"}},name:"string.quoted.single.matlab",patterns:[{match:/''/dgv,name:"constant.character.escape.matlab"},{match:/'(?=[^\n])/dgv,name:"invalid.illegal.unescaped-quote.matlab"},{comment:"Operator symbols",match:/((%([\+\-0]?\p{Nd}{0,3}(\.\p{Nd}{1,3})?)(c|d|e|E|f|g|G|s|((b|t)?(o|u|x|X))))|%%|\\(b|f|n|r|t|\\))/dgv,name:"constant.character.escape.matlab"}]},{begin:/((?<=(\[|\(|\{|=|\p{space}|;|:|,|~|<|>|&|\||-|\+|\*|\/|\\|\.|\^))|^)"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.matlab"}},comment:"String literal (double-quoted)",end:/"(?=(\[|\(|\{|\]|\)|\}|=|~|<|>|&|\||-|\+|\*|\/|\\|\.|\^|\||\p{space}|;|:|,))/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.matlab"}},name:"string.quoted.double.matlab",patterns:[{match:/""/dgv,name:"constant.character.escape.matlab"},{match:/"(?=[^\n])/dgv,name:"invalid.illegal.unescaped-quote.matlab"}]}]},transpose:{match:/\.'/dgv,name:"keyword.operator.transpose.matlab"},validator_strings:{comment:"Simplified string patterns nested inside validator functions which don't change scopes of matches.",patterns:[{patterns:[{begin:/((?<=(\[|\(|\{|=|\p{space}|;|:|,|~|<|>|&|\||-|\+|\*|\/|\\|\.|\^))|^)'/dgv,comment:"Character vector literal (single-quoted)",end:/'(?=(\[|\(|\{|\]|\)|\}|=|~|<|>|&|\||-|\+|\*|\/|\\|\.|\^|\p{space}|;|:|,))/dgv,name:"storage.type.matlab",patterns:[{match:/''/dgv},{match:/'(?=[^\n])/dgv},{match:/([^']+)/dgv}]},{begin:/((?<=(\[|\(|\{|=|\p{space}|;|:|,|~|<|>|&|\||-|\+|\*|\/|\\|\.|\^))|^)"/dgv,comment:"String literal (double-quoted)",end:/"(?=(\[|\(|\{|\]|\)|\}|=|~|<|>|&|\||-|\+|\*|\/|\\|\.|\^|\||\p{space}|;|:|,))/dgv,name:"storage.type.matlab",patterns:[{match:/""/dgv},{match:/"(?=[^\n])/dgv},{match:/[^"]+/dgv}]}]}]},validators:{begin:/\p{space}*[\;]?\p{space}*([a-zA-Z][a-zA-Z0-9_\.\?]*)/dgv,comment:"Property and argument validation. Match an identifier allowing . and ?.",end:/([\;\n\%\=][^\n]*)/dgv,endCaptures:{"1":{patterns:[{captures:{"1":{patterns:[{include:"$self"}]}},comment:"Match comments",match:/([\%][^\n]*)/dgv},{captures:{"1":{patterns:[{include:"$self"}]}},comment:"Handle things like arg = val; nextArg",match:/(=[^\;]*)/dgv},{captures:{"1":{patterns:[{include:"#validators"}]}},comment:"End of property/argument patterns which start a new property/argument. Look for beginning of identifier after semicolon. Otherwise treat as regular code.",match:/([\n\;]\p{space}*[a-zA-Z][^\n]*)/dgv},{include:"$self"}]}},patterns:[{include:"#line_continuation"},{comment:"Size declaration",match:/\p{space}*(\([^\)]*\))/dgv,name:"storage.type.matlab"},{comment:"Type declaration",match:/([a-zA-Z][a-zA-Z0-9_\.]*)/dgv,name:"storage.type.matlab"},{include:"#braced_validator_list"}]},variables:{comment:"MATLAB variables",match:/(?<!\.)\b(nargin|nargout|varargin|varargout)\b/dgv,name:"variable.other.function.matlab"}},scopeName:"source.matlab",embeddedLangs:undefined,aliases:undefined})
|
|
3
|
+
const lang = Object.freeze({displayName:"MATLAB",fileTypes:["m"],name:"matlab",patterns:[{include:"#all_before_command_dual"},{include:"#command_dual"},{include:"#all_after_command_dual"}],repository:{all_after_command_dual:{patterns:[{include:"#string"},{include:"#line_continuation"},{include:"#comments"},{include:"#conjugate_transpose"},{include:"#transpose"},{include:"#constants"},{include:"#variables"},{include:"#numbers"},{include:"#operators"}]},all_before_command_dual:{patterns:[{include:"#classdef"},{include:"#function"},{include:"#blocks"},{include:"#control_statements"},{include:"#global_persistent"},{include:"#parens"},{include:"#square_brackets"},{include:"#indexing_curly_brackets"},{include:"#curly_brackets"}]},blocks:{patterns:[{begin:/\p{space}*(?:^|[\p{space}\,\;])(for)\b/dgv,beginCaptures:{"1":{name:"keyword.control.for.matlab"}},end:/\p{space}*(?:^|[\p{space}\,\;])(end)\b/dgv,endCaptures:{"1":{name:"keyword.control.end.for.matlab"}},name:"meta.for.matlab",patterns:[{include:"$self"}]},{begin:/\p{space}*(?:^|[\p{space}\,\;])(if)\b/dgv,beginCaptures:{"1":{name:"keyword.control.if.matlab"}},end:/\p{space}*(?:^|[\p{space}\,\;])(end)\b/dgv,endCaptures:{"1":{name:"keyword.control.end.if.matlab"},"2":{patterns:[{include:"$self"}]}},name:"meta.if.matlab",patterns:[{captures:{"2":{name:"keyword.control.elseif.matlab"},"3":{patterns:[{include:"$self"}]}},end:/^/dgv,match:/(\p{space}*)(?:^|[\p{space}\,\;])(elseif)\b([^\n]*)(?=\n?$)\n?/dgv,name:"meta.elseif.matlab"},{captures:{"2":{name:"keyword.control.else.matlab"},"3":{patterns:[{include:"$self"}]}},end:/^/dgv,match:/(\p{space}*)(?:^|[\p{space}\,\;])(else)\b([^\n]*)?(?=\n?$)\n?/dgv,name:"meta.else.matlab"},{include:"$self"}]},{begin:/\p{space}*(?:^|[\p{space}\,\;])(parfor)\b/dgv,beginCaptures:{"1":{name:"keyword.control.for.matlab"}},end:/\p{space}*(?:^|[\p{space}\,\;])(end)\b/dgv,endCaptures:{"1":{name:"keyword.control.end.for.matlab"}},name:"meta.parfor.matlab",patterns:[{begin:/(?!(?=\n?$))/dgvy,end:/(?=\n?$)\n?/dgv,name:"meta.parfor-quantity.matlab",patterns:[{include:"$self"}]},{include:"$self"}]},{begin:/\p{space}*(?:^|[\p{space}\,\;])(spmd)\b/dgv,beginCaptures:{"1":{name:"keyword.control.spmd.matlab"}},end:/\p{space}*(?:^|[\p{space}\,\;])(end)\b/dgv,endCaptures:{"1":{name:"keyword.control.end.spmd.matlab"}},name:"meta.spmd.matlab",patterns:[{begin:/(?!(?=\n?$))/dgvy,end:/(?=\n?$)\n?/dgv,name:"meta.spmd-statement.matlab",patterns:[{include:"$self"}]},{include:"$self"}]},{begin:/\p{space}*(?:^|[\p{space}\,\;])(switch)\b/dgv,beginCaptures:{"1":{name:"keyword.control.switch.matlab"}},end:/\p{space}*(?:^|[\p{space}\,\;])(end)\b/dgv,endCaptures:{"1":{name:"keyword.control.end.switch.matlab"}},name:"meta.switch.matlab",patterns:[{captures:{"2":{name:"keyword.control.case.matlab"},"3":{patterns:[{include:"$self"}]}},end:/^/dgv,match:/(\p{space}*)(?:^|[\p{space}\,\;])(case)\b([^\n]*)(?=\n?$)\n?/dgv,name:"meta.case.matlab"},{captures:{"2":{name:"keyword.control.otherwise.matlab"},"3":{patterns:[{include:"$self"}]}},end:/^/dgv,match:/(\p{space}*)(?:^|[\p{space}\,\;])(otherwise)\b([^\n]*)?(?=\n?$)\n?/dgv,name:"meta.otherwise.matlab"},{include:"$self"}]},{begin:/\p{space}*(?:^|[\p{space}\,\;])(try)\b/dgv,beginCaptures:{"1":{name:"keyword.control.try.matlab"}},end:/\p{space}*(?:^|[\p{space}\,\;])(end)\b/dgv,endCaptures:{"1":{name:"keyword.control.end.try.matlab"}},name:"meta.try.matlab",patterns:[{captures:{"2":{name:"keyword.control.catch.matlab"},"3":{patterns:[{include:"$self"}]}},end:/^/dgv,match:/(\p{space}*)(?:^|[\p{space}\,\;])(catch)\b([^\n]*)?(?=\n?$)\n?/dgv,name:"meta.catch.matlab"},{include:"$self"}]},{begin:/\p{space}*(?:^|[\p{space}\,\;])(while)\b/dgv,beginCaptures:{"1":{name:"keyword.control.while.matlab"}},end:/\p{space}*(?:^|[\p{space}\,\;])(end)\b/dgv,endCaptures:{"1":{name:"keyword.control.end.while.matlab"}},name:"meta.while.matlab",patterns:[{include:"$self"}]}]},braced_validator_list:{begin:/\p{space}*(\{)\p{space}*/dgv,beginCaptures:{"1":{name:"storage.type.matlab"}},end:/(\})/dgv,endCaptures:{"1":{name:"storage.type.matlab"}},patterns:[{include:"#braced_validator_list"},{include:"#validator_strings"},{include:"#line_continuation"},{captures:{"1":{name:"storage.type.matlab"}},match:/([^\{\}\}'"\.]+)/dgv},{match:/\./dgv,name:"storage.type.matlab"}]},classdef:{patterns:[{begin:/(^\p{space}*)(classdef)\b\p{space}*([^\n]*)/dgv,beginCaptures:{"2":{name:"storage.type.class.matlab"},"3":{patterns:[{captures:{"1":{patterns:[{match:/[a-zA-Z][a-zA-Z0-9_]*/dgv,name:"variable.parameter.class.matlab"},{begin:/=\p{space}*/dgv,end:/,|(?=\))/dgv,patterns:[{match:/true|false/dgv,name:"constant.language.boolean.matlab"},{include:"#string"}]}]},"2":{name:"meta.class-declaration.matlab"},"3":{name:"entity.name.section.class.matlab"},"4":{name:"keyword.operator.other.matlab"},"5":{patterns:[{match:/[a-zA-Z][a-zA-Z0-9_]*(\.[a-zA-Z][a-zA-Z0-9_]*)*/dgv,name:"entity.other.inherited-class.matlab"},{match:/&/dgv,name:"keyword.operator.other.matlab"}]},"6":{patterns:[{include:"$self"}]}},match:/(\([^\)]*\))?\p{space}*(([a-zA-Z][a-zA-Z0-9_]*)(?:\p{space}*(<)\p{space}*([^\%]*))?)\p{space}*((?=\n?$)|(?=(%|[^\n][^\n][^\n]))[^\n]*)/dgv}]}},end:/\p{space}*(?:^|[\p{space}\,\;])(end)\b/dgv,endCaptures:{"1":{name:"keyword.control.end.class.matlab"}},name:"meta.class.matlab",patterns:[{begin:/(^\p{space}*)(properties)\b([^\%]*)\p{space}*(\([^\)]*\))?\p{space}*((?=\n?$)|(?=%))/dgv,beginCaptures:{"2":{name:"keyword.control.properties.matlab"},"3":{patterns:[{match:/[a-zA-Z][a-zA-Z0-9_]*/dgv,name:"variable.parameter.properties.matlab"},{begin:/=\p{space}*/dgv,end:/,|(?=\))/dgv,patterns:[{match:/true|false/dgv,name:"constant.language.boolean.matlab"},{match:/public|protected|private/dgv,name:"constant.language.access.matlab"}]}]}},end:/\p{space}*(?:^|[\p{space}\,\;])(end)\b/dgv,endCaptures:{"1":{name:"keyword.control.end.properties.matlab"}},name:"meta.properties.matlab",patterns:[{include:"#validators"},{include:"$self"}]},{begin:/(^\p{space}*)(methods)\b([^\%]*)\p{space}*(\([^\)]*\))?\p{space}*((?=\n?$)|(?=%))/dgv,beginCaptures:{"2":{name:"keyword.control.methods.matlab"},"3":{patterns:[{match:/[a-zA-Z][a-zA-Z0-9_]*/dgv,name:"variable.parameter.methods.matlab"},{begin:/=\p{space}*/dgv,end:/,|(?=\))/dgv,patterns:[{match:/true|false/dgv,name:"constant.language.boolean.matlab"},{match:/public|protected|private/dgv,name:"constant.language.access.matlab"}]}]}},end:/\p{space}*(?:^|[\p{space}\,\;])(end)\b/dgv,endCaptures:{"1":{name:"keyword.control.end.methods.matlab"}},name:"meta.methods.matlab",patterns:[{include:"$self"}]},{begin:/(^\p{space}*)(events)\b([^\%]*)\p{space}*(\([^\)]*\))?\p{space}*((?=\n?$)|(?=%))/dgv,beginCaptures:{"2":{name:"keyword.control.events.matlab"},"3":{patterns:[{match:/[a-zA-Z][a-zA-Z0-9_]*/dgv,name:"variable.parameter.events.matlab"},{begin:/=\p{space}*/dgv,end:/,|(?=\))/dgv,patterns:[{match:/true|false/dgv,name:"constant.language.boolean.matlab"},{match:/public|protected|private/dgv,name:"constant.language.access.matlab"}]}]}},end:/\p{space}*(?:^|[\p{space}\,\;])(end)\b/dgv,endCaptures:{"1":{name:"keyword.control.end.events.matlab"}},name:"meta.events.matlab",patterns:[{include:"$self"}]},{begin:/(^\p{space}*)(enumeration)\b([^\%]*)\p{space}*((?=\n?$)|(?=%))/dgv,beginCaptures:{"2":{name:"keyword.control.enumeration.matlab"}},end:/\p{space}*(?:^|[\p{space}\,\;])(end)\b/dgv,endCaptures:{"1":{name:"keyword.control.end.enumeration.matlab"}},name:"meta.enumeration.matlab",patterns:[{include:"$self"}]},{include:"$self"}]}]},command_dual:{captures:{"1":{name:"string.interpolated.matlab"},"2":{name:"variable.other.command.matlab"},"28":{name:"comment.line.percentage.matlab"}},match:/^\p{space}*(([b-df-hk-moq-zA-HJ-MO-Z][\p{L}\p{M}\p{N}\p{Pc}]*|a|an|a([A-Za-mo-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|n[A-Za-rt-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|ns[\p{L}\p{M}\p{N}\p{Pc}]+)|e|ep|e([A-Za-oq-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|p[A-Za-rt-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|ps[\p{L}\p{M}\p{N}\p{Pc}]+)|in|i([A-Za-mo-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|n[A-Za-eg-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|nf[\p{L}\p{M}\p{N}\p{Pc}]+)|I|In|I([A-Za-mo-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|n[A-Za-eg-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|nf[\p{L}\p{M}\p{N}\p{Pc}]+)|j[\p{L}\p{M}\p{N}\p{Pc}]+|N|Na|N([A-Zb-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|a[A-MO-Za-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|aN[\p{L}\p{M}\p{N}\p{Pc}]+)|n|na|nar|narg|nargi|nargo|nargou|n([A-Zb-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|a([A-Za-mo-qs-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|n[\p{L}\p{M}\p{N}\p{Pc}]+|r([A-Za-fh-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|g([A-Za-hj-nq-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|i([A-Za-mo-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|n[\p{L}\p{M}\p{N}\p{Pc}]+)|o([A-Za-tv-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|u([A-Za-su-z][\p{L}\p{M}\p{N}\p{Pc}]*|t[\p{L}\p{M}\p{N}\p{Pc}]+))))))|p|p[A-Za-hj-z0-9_][\p{L}\p{M}\p{N}\p{Pc}]*|pi[\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}+((([^\p{space}\;\,\%\(\)\=\.\{\&\|\~\<\>\:\+\-\*\/\\\@\^'"]|(?=')|(?="))|(\.\^|\.\*|\.\/|\.\\|\.'|\.\(|&&|==|\|\||&(?=[^\&])|\|(?=[^\|])|~=|<=|>=|~(?!=)|<(?!=)|>(?!=)|:|\+|-|\*|\/|\\|@|\^)([^\p{space}]|\p{space}*(?=%)|\p{space}+(?=\n?$)|\p{space}+(,|;|\)|\}|\]|&|\||<|>|=|:|\*|\/|\\|\^|@|(\.[^\p{Nd}\.]|\.\.[^\.])))|(\.[^\^\*\/\\'\(\p{space}A-Za-z]))([^\%]|'[^']*'|"[^"]*")*|(\.(?=\p{space})|\.[A-Za-z]|(?=\{))([^\(\='"\%]|==|'[^']*'|"[^"]*"|\(|\([^\)\%]*\)|\[|\[[^\]\%]*\]|\{|\{[^\}\%]*\})*(\.\.\.[^\%]*)?((?=%)|(?=\n?$))))(%[^\n]*)?(?=\n?$)/dgv},comment_block:{begin:/*@__PURE__*/ new EmulatedRegExp("(^[\\p{space}]*)%\\{(?:(?=([^\\n\\P{space}]*))\\2)\\n","dgv",{"hiddenCaptures":[2]}),beginCaptures:{"1":{name:"punctuation.definition.comment.matlab"}},end:/*@__PURE__*/ new EmulatedRegExp("^[\\p{space}]*%\\}(?:(?=([^\\n\\P{space}]*))\\1)(?:\\n|(?=\\n?$))","dgv",{"hiddenCaptures":[1]}),name:"comment.block.percentage.matlab",patterns:[{include:"#comment_block"},{match:/^[^\n]*\n/dgv}]},comments:{patterns:[{begin:/(^[ \t]+)?(?=%%\p{space})/dgv,beginCaptures:{"1":{name:"punctuation.whitespace.comment.leading.matlab"}},end:/*@__PURE__*/ new EmulatedRegExp("(?!^)","dgv",{"strategy":"clip_search"}),patterns:[{begin:/%%/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.matlab"}},end:/\n/dgv,name:"comment.line.double-percentage.matlab",patterns:[{begin:/[^\P{space}\n]*(?![\n\p{space}])/dgvy,contentName:"meta.cell.matlab",end:/(?=\n)/dgv}]}]},{include:"#comment_block"},{begin:/(^[ \t]+)?(?=%)/dgv,beginCaptures:{"1":{name:"punctuation.whitespace.comment.leading.matlab"}},end:/*@__PURE__*/ new EmulatedRegExp("(?!^)","dgv",{"strategy":"clip_search"}),patterns:[{begin:/%/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.matlab"}},end:/\n/dgv,name:"comment.line.percentage.matlab"}]}]},conjugate_transpose:{match:/((?<=[^\p{space}])|(?<=\])|(?<=\))|(?<=\}))'/dgv,name:"keyword.operator.transpose.matlab"},constants:{match:/(?<!\.)\b(eps|false|Inf|inf|intmax|intmin|namelengthmax|NaN|nan|on|off|realmax|realmin|true|pi)\b/dgv,name:"constant.language.matlab"},control_statements:{captures:{"1":{name:"keyword.control.matlab"}},match:/\p{space}*(?:^|[\p{space}\,\;])(break|continue|return)\b/dgv,name:"meta.control.matlab"},curly_brackets:{begin:/\{/dgv,end:/\}/dgv,patterns:[{include:"#end_in_parens"},{include:"#all_before_command_dual"},{include:"#all_after_command_dual"},{include:"#end_in_parens"},{include:"#block_keywords"}]},end_in_parens:{match:/\bend\b/dgv,name:"keyword.operator.symbols.matlab"},function:{patterns:[{begin:/(^\p{space}*)(function)\p{space}+(?:(?:(\[)([^\]]*)(\])|([a-zA-Z][a-zA-Z0-9_]*))\p{space}*=\p{space}*)?([a-zA-Z][a-zA-Z0-9_]*(\.[a-zA-Z][a-zA-Z0-9_]*)*)\p{space}*/dgv,beginCaptures:{"2":{name:"storage.type.function.matlab"},"3":{name:"punctuation.definition.arguments.begin.matlab"},"4":{patterns:[{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.parameter.output.matlab"}]},"5":{name:"punctuation.definition.arguments.end.matlab"},"6":{name:"variable.parameter.output.function.matlab"},"7":{name:"entity.name.function.matlab"}},end:/\p{space}*(?:^|[\p{space}\,\;])(end)\b(\p{space}*\n)?/dgv,endCaptures:{"1":{name:"keyword.control.end.function.matlab"}},name:"meta.function.matlab",patterns:[{begin:/\(/dgvy,end:/\)/dgv,name:"meta.arguments.function.matlab",patterns:[{include:"#line_continuation"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.parameter.input.matlab"}]},{begin:/(^\p{space}*)(arguments)\b([^\%]*)\p{space}*(\([^\)]*\))?\p{space}*((?=\n?$)|(?=%))/dgv,beginCaptures:{"2":{name:"keyword.control.arguments.matlab"},"3":{patterns:[{match:/[a-zA-Z][a-zA-Z0-9_]*/dgv,name:"variable.parameter.arguments.matlab"}]}},end:/\p{space}*(?:^|[\p{space}\,\;])(end)\b/dgv,endCaptures:{"1":{name:"keyword.control.end.arguments.matlab"}},name:"meta.arguments.matlab",patterns:[{include:"#validators"},{include:"$self"}]},{include:"$self"}]}]},global_persistent:{captures:{"1":{name:"keyword.control.globalpersistent.matlab"}},match:/^\p{space}*(global|persistent)\b/dgv,name:"meta.globalpersistent.matlab"},indexing_curly_brackets:{Comment:"Match identifier{idx, idx, } and stop at newline without ... This helps with partially written code like x{idx ",begin:/([a-zA-Z][a-zA-Z0-9_\.]*\p{space}*)\{/dgv,beginCaptures:{"1":{patterns:[{include:"$self"}]}},end:/(\}|(?<!\.\.\.)[^\n]\n)/dgv,patterns:[{include:"#end_in_parens"},{include:"#all_before_command_dual"},{include:"#all_after_command_dual"},{include:"#end_in_parens"},{include:"#block_keywords"}]},line_continuation:{captures:{"1":{name:"keyword.operator.symbols.matlab"},"2":{name:"comment.line.continuation.matlab"}},match:/(\.\.\.)([^\n]*)(?=\n?$)/dgv,name:"meta.linecontinuation.matlab"},numbers:{match:/(?<=[\p{space}\-\+\*\/\\\=\:\[\(\{\,]|^)\p{Nd}*\.?\p{Nd}+([eE][\+\-]?\p{Nd})?([[0-9]&&[^\.]])*(i|j)?\b/dgv,name:"constant.numeric.matlab"},operators:{match:/(?<=\p{space})(==|~=|>|>=|<|<=|&|&&|:|\||\|\||\+|-|\*|\.\*|\/|\.\/|\\|\.\\|\^|\.\^)(?=\p{space})/dgv,name:"keyword.operator.symbols.matlab"},parens:{begin:/\(/dgv,end:/(\)|(?<!\.\.\.)[^\n]\n)/dgv,patterns:[{include:"#end_in_parens"},{include:"#all_before_command_dual"},{include:"#all_after_command_dual"},{include:"#block_keywords"}]},square_brackets:{begin:/\[/dgv,end:/\]/dgv,patterns:[{include:"#all_before_command_dual"},{include:"#all_after_command_dual"},{include:"#block_keywords"}]},string:{patterns:[{captures:{"1":{name:"string.interpolated.matlab"},"2":{name:"punctuation.definition.string.begin.matlab"}},match:/^\p{space}*((!)[^\n]*(?=\n?$)\n?)/dgv},{begin:/((?<=(\[|\(|\{|=|\p{space}|;|:|,|~|<|>|&|\||-|\+|\*|\/|\\|\.|\^))|^)'/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.matlab"}},end:/'(?=(\[|\(|\{|\]|\)|\}|=|~|<|>|&|\||-|\+|\*|\/|\\|\.|\^|\p{space}|;|:|,))/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.matlab"}},name:"string.quoted.single.matlab",patterns:[{match:/''/dgv,name:"constant.character.escape.matlab"},{match:/'(?=[^\n])/dgv,name:"invalid.illegal.unescaped-quote.matlab"},{match:/((%([\+\-0]?\p{Nd}{0,3}(\.\p{Nd}{1,3})?)(c|d|e|E|f|g|G|s|((b|t)?(o|u|x|X))))|%%|\\(b|f|n|r|t|\\))/dgv,name:"constant.character.escape.matlab"}]},{begin:/((?<=(\[|\(|\{|=|\p{space}|;|:|,|~|<|>|&|\||-|\+|\*|\/|\\|\.|\^))|^)"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.matlab"}},end:/"(?=(\[|\(|\{|\]|\)|\}|=|~|<|>|&|\||-|\+|\*|\/|\\|\.|\^|\||\p{space}|;|:|,))/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.matlab"}},name:"string.quoted.double.matlab",patterns:[{match:/""/dgv,name:"constant.character.escape.matlab"},{match:/"(?=[^\n])/dgv,name:"invalid.illegal.unescaped-quote.matlab"}]}]},transpose:{match:/\.'/dgv,name:"keyword.operator.transpose.matlab"},validator_strings:{patterns:[{patterns:[{begin:/((?<=(\[|\(|\{|=|\p{space}|;|:|,|~|<|>|&|\||-|\+|\*|\/|\\|\.|\^))|^)'/dgv,end:/'(?=(\[|\(|\{|\]|\)|\}|=|~|<|>|&|\||-|\+|\*|\/|\\|\.|\^|\p{space}|;|:|,))/dgv,name:"storage.type.matlab",patterns:[{match:/''/dgv},{match:/'(?=[^\n])/dgv},{match:/([^']+)/dgv}]},{begin:/((?<=(\[|\(|\{|=|\p{space}|;|:|,|~|<|>|&|\||-|\+|\*|\/|\\|\.|\^))|^)"/dgv,end:/"(?=(\[|\(|\{|\]|\)|\}|=|~|<|>|&|\||-|\+|\*|\/|\\|\.|\^|\||\p{space}|;|:|,))/dgv,name:"storage.type.matlab",patterns:[{match:/""/dgv},{match:/"(?=[^\n])/dgv},{match:/[^"]+/dgv}]}]}]},validators:{begin:/\p{space}*[\;]?\p{space}*([a-zA-Z][a-zA-Z0-9_\.\?]*)/dgv,end:/([\;\n\%\=][^\n]*)/dgv,endCaptures:{"1":{patterns:[{captures:{"1":{patterns:[{include:"$self"}]}},match:/([\%][^\n]*)/dgv},{captures:{"1":{patterns:[{include:"$self"}]}},match:/(=[^\;]*)/dgv},{captures:{"1":{patterns:[{include:"#validators"}]}},match:/([\n\;]\p{space}*[a-zA-Z][^\n]*)/dgv},{include:"$self"}]}},patterns:[{include:"#line_continuation"},{match:/\p{space}*(\([^\)]*\))/dgv,name:"storage.type.matlab"},{match:/([a-zA-Z][a-zA-Z0-9_\.]*)/dgv,name:"storage.type.matlab"},{include:"#braced_validator_list"}]},variables:{match:/(?<!\.)\b(nargin|nargout|varargin|varargout)\b/dgv,name:"variable.other.function.matlab"}},scopeName:"source.matlab",embeddedLangs:undefined,aliases:undefined})
|
|
4
4
|
|
|
5
5
|
export default [
|
|
6
6
|
lang
|
package/dist/mermaid.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EmulatedRegExp } from 'oniguruma-to-es'
|
|
2
2
|
|
|
3
|
-
const lang = Object.freeze({displayName:"Mermaid",fileTypes:[],injectionSelector:"L:text.html.markdown",name:"mermaid",patterns:[{include:"#mermaid-code-block"},{include:"#mermaid-code-block-with-attributes"},{include:"#mermaid-ado-code-block"}],repository:{mermaid:{patterns:[{begin:/^\p{space}*(architecture-beta)/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},comment:"Architecture Diagram",end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\:\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{match:/%%[^\n]*/dgv,name:"comment"},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"},"3":{name:"punctuation.definition.typeparameters.begin.mermaid"},"4":{name:"string"},"5":{name:"keyword.control.mermaid"},"6":{name:"string"},"7":{name:"punctuation.definition.typeparameters.end.mermaid"},"8":{name:"punctuation.definition.typeparameters.begin.mermaid"},"9":{name:"string"},"10":{name:"punctuation.definition.typeparameters.end.mermaid"},"11":{name:"keyword.control.mermaid"},"12":{name:"variable"}},comment:"(group|service)(group id)(icon name)?(title)(in)?(parent)?",match:/\p{space}*(group|service)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*(\()?([\p{L}\p{M}\p{N}\p{Pc}\p{space}\-]+)?(:)?([\p{L}\p{M}\p{N}\p{Pc}\p{space}\-]+)?(\))?\p{space}*(\[)?([\p{L}\p{M}\p{N}\p{Pc}\p{space}\-]+)?\p{space}*(\])?\p{space}*(in)?\p{space}*([\p{L}\p{M}\p{N}\p{Pc}\-]+)?/dgiv},{captures:{"1":{name:"variable"},"2":{name:"punctuation.definition.typeparameters.begin.mermaid"},"3":{name:"variable"},"4":{name:"punctuation.definition.typeparameters.end.mermaid"},"5":{name:"keyword.control.mermaid"},"6":{name:"entity.name.function.mermaid"},"7":{name:"keyword.control.mermaid"},"8":{name:"entity.name.function.mermaid"},"9":{name:"keyword.control.mermaid"},"10":{name:"variable"},"11":{name:"punctuation.definition.typeparameters.begin.mermaid"},"12":{name:"variable"},"13":{name:"punctuation.definition.typeparameters.end.mermaid"}},comment:"(service id)(group id)?:(T|B|L|R) <?-->? (T|B|L|R):(service id)(group id)?",match:/\p{space}*([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*(\{)?\p{space}*(group)?(\})?\p{space}*(:)\p{space}*(T|B|L|R)\p{space}+(<?-->?)\p{space}+(T|B|L|R)\p{space}*(:)\p{space}*([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*(\{)?\p{space}*(group)?(\})?/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"},"3":{name:"keyword.control.mermaid"},"4":{name:"variable"}},comment:"(junction)(junction id)(in)?(group)",match:/\p{space}*(junction)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*(in)?\p{space}*([\p{L}\p{M}\p{N}\p{Pc}\-]+)?/dgiv}]},{begin:/^\p{space}*(classDiagram)/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},comment:"Class Diagram",end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\:\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{match:/%%[^\n]*/dgv,name:"comment"},{captures:{"1":{name:"entity.name.type.class.mermaid"},"2":{name:"keyword.control.mermaid"},"3":{name:"keyword.control.mermaid"},"4":{name:"keyword.control.mermaid"},"5":{name:"entity.name.type.class.mermaid"},"6":{name:"keyword.control.mermaid"},"7":{name:"string"}},comment:"(class name) (\"multiplicity relationship\")? (relationship) (\"multiplicity relationship\")? (class name) :? (labelText)?",match:/([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}("(?:\p{Nd}+|\*|0[^\n][^\n]\p{Nd}+|1[^\n][^\n]\p{Nd}+|1[^\n][^\n]\*)")?\p{space}?(--o|--\*|<--|-->|<\.\.|\.\.>|<\|\.\.|\.\.\|>|<\|--|--\|>|--\*|--|\.\.|\*--|o--)\p{space}("(?:\p{Nd}+|\*|0[^\n][^\n]\p{Nd}+|1[^\n][^\n]\p{Nd}+|1[^\n][^\n]\*)")?\p{space}?([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}?(:)?\p{space}([^\n]*)(?=\n?$)/dgiv},{captures:{"1":{name:"entity.name.type.class.mermaid"},"2":{name:"keyword.control.mermaid"},"3":{name:"keyword.control.mermaid"},"4":{name:"entity.name.function.mermaid"},"5":{name:"punctuation.parenthesis.open.mermaid"},"6":{name:"storage.type.mermaid"},"7":{name:"punctuation.definition.typeparameters.begin.mermaid"},"8":{name:"storage.type.mermaid"},"9":{name:"punctuation.definition.typeparameters.end.mermaid"},"10":{name:"entity.name.variable.parameter.mermaid"},"11":{name:"punctuation.parenthesis.closed.mermaid"},"12":{name:"keyword.control.mermaid"},"13":{name:"storage.type.mermaid"},"14":{name:"punctuation.definition.typeparameters.begin.mermaid"},"15":{name:"storage.type.mermaid"},"16":{name:"punctuation.definition.typeparameters.end.mermaid"}},comment:"(class name) : (visibility)?(function)( (function param/generic param)? )(classifier)? (return/generic return)?$",match:/([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}?(:)\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{space}?([\p{L}\p{M}\p{N}\p{Pc}\-]+)?(\))([\*\$]{0,2})\p{space}?([\p{L}\p{M}\p{N}\p{Pc}\-]+)?(~)?([\p{L}\p{M}\p{N}\p{Pc}\-]+)?(~)?(?=\n?$)/dgv},{captures:{"1":{name:"entity.name.type.class.mermaid"},"2":{name:"keyword.control.mermaid"},"3":{name:"keyword.control.mermaid"},"4":{name:"storage.type.mermaid"},"5":{name:"punctuation.definition.typeparameters.begin.mermaid"},"6":{name:"storage.type.mermaid"},"7":{name:"punctuation.definition.typeparameters.end.mermaid"},"8":{name:"entity.name.variable.field.mermaid"}},comment:"(class name) : (visibility)?(datatype/generic data type) (attribute name)$",match:/([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}?(:)\p{space}([\+\~\#\-])?([\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}\-]+)?(?=\n?$)/dgv},{captures:{"1":{name:"punctuation.definition.typeparameters.begin.mermaid"},"2":{name:"storage.type.mermaid"},"3":{name:"punctuation.definition.typeparameters.end.mermaid"},"4":{name:"entity.name.type.class.mermaid"}},comment:"<<(Annotation)>> (class name)",match:/(<<)([\p{L}\p{M}\p{N}\p{Pc}\-]+)(>>)\p{space}?([\p{L}\p{M}\p{N}\p{Pc}\-]+)?/dgv},{begin:/(class)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-]+)(~)?([\p{L}\p{M}\p{N}\p{Pc}\-]+)?(~)?\p{space}?(\{)/dgiv,beginCaptures:{"1":{name:"keyword.control.mermaid"},"2":{name:"entity.name.type.class.mermaid"},"3":{name:"punctuation.definition.typeparameters.begin.mermaid"},"4":{name:"storage.type.mermaid"},"5":{name:"punctuation.definition.typeparameters.end.mermaid"},"6":{name:"keyword.control.mermaid"}},comment:"class (class name) ~?(generic type)?~? ({)",end:/(\})/dgv,endCaptures:{"1":{name:"keyword.control.mermaid"}},patterns:[{match:/%%[^\n]*/dgv,name:"comment"},{begin:/\p{space}([\+\~\#\-])?([\p{L}\p{M}\p{N}\p{Pc}\-]+)(\()/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"},"2":{name:"entity.name.function.mermaid"},"3":{name:"punctuation.parenthesis.open.mermaid"}},comment:"(visibility)?(function)( (function param/generic param)? )(classifier)? (return/generic return)?$",end:/(\))([\*\$]{0,2})\p{space}?([\p{L}\p{M}\p{N}\p{Pc}\-]+)?(~)?([\p{L}\p{M}\p{N}\p{Pc}\-]+)?(~)?(?=\n?$)/dgv,endCaptures:{"1":{name:"punctuation.parenthesis.closed.mermaid"},"2":{name:"keyword.control.mermaid"},"3":{name:"storage.type.mermaid"},"4":{name:"punctuation.definition.typeparameters.begin.mermaid"},"5":{name:"storage.type.mermaid"},"6":{name:"punctuation.definition.typeparameters.end.mermaid"}},patterns:[{captures:{"1":{name:"storage.type.mermaid"},"2":{name:"punctuation.definition.typeparameters.begin.mermaid"},"3":{name:"storage.type.mermaid"},"4":{name:"punctuation.definition.typeparameters.end.mermaid"},"5":{name:"entity.name.variable.parameter.mermaid"}},comment:"(TBD)",match:/\p{space}*,?\p{space}*([\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}\-]+)?/dgv}]},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"storage.type.mermaid"},"3":{name:"punctuation.definition.typeparameters.begin.mermaid"},"4":{name:"storage.type.mermaid"},"5":{name:"punctuation.definition.typeparameters.end.mermaid"},"6":{name:"entity.name.variable.field.mermaid"}},comment:"(visibility)?(datatype/generic data type) (attribute name)$",match:/\p{space}([\+\~\#\-])?([\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}\-]+)?(?=\n?$)/dgv},{captures:{"1":{name:"punctuation.definition.typeparameters.begin.mermaid"},"2":{name:"storage.type.mermaid"},"3":{name:"punctuation.definition.typeparameters.end.mermaid"},"4":{name:"entity.name.type.class.mermaid"}},comment:"<<(Annotation)>> (class name)",match:/(<<)([\p{L}\p{M}\p{N}\p{Pc}\-]+)(>>)\p{space}?([\p{L}\p{M}\p{N}\p{Pc}\-]+)?/dgv}]},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"entity.name.type.class.mermaid"},"3":{name:"punctuation.definition.typeparameters.begin.mermaid"},"4":{name:"storage.type.mermaid"},"5":{name:"punctuation.definition.typeparameters.end.mermaid"}},comment:"class (class name) ~?(generic type)?~?",match:/(class)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-]+)(~)?([\p{L}\p{M}\p{N}\p{Pc}\-]+)?(~)?/dgiv}]},{begin:/^\p{space}*(erDiagram)/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},comment:"Entity Relationship Diagram",end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\:\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{match:/%%[^\n]*/dgv,name:"comment"},{captures:{"1":{name:"variable"},"2":{name:"keyword.control.mermaid"},"3":{name:"string"},"4":{name:"keyword.control.mermaid"}},comment:"(entity)",match:/^\p{space}*([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*(\[)?\p{space}*([\p{L}\p{M}\p{N}\p{Pc}\-]+|"[\p{L}\p{M}\p{N}\p{Pc}\p{space}\-]+")?\p{space}*(\])?(?=\n?$)/dgv},{begin:/\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*(\[)?\p{space}*([\p{L}\p{M}\p{N}\p{Pc}\-]+|"[\p{L}\p{M}\p{N}\p{Pc}\p{space}\-]+")?\p{space}*(\])?\p{space}*(\{)/dgv,beginCaptures:{"1":{name:"variable"},"2":{name:"keyword.control.mermaid"},"3":{name:"string"},"4":{name:"keyword.control.mermaid"},"5":{name:"keyword.control.mermaid"}},comment:"(entity) {",end:/(\})/dgv,endCaptures:{"1":{name:"keyword.control.mermaid"}},patterns:[{captures:{"1":{name:"storage.type.mermaid"},"2":{name:"variable"},"3":{name:"keyword.control.mermaid"},"4":{name:"string"}},comment:"(type) (name) (PK|FK)? (\"comment\")?",match:/\p{space}*([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}+(PK|FK)?\p{space}*("["\(\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*")?\p{space}*/dgiv},{match:/%%[^\n]*/dgv,name:"comment"}]},{captures:{"1":{name:"variable"},"2":{name:"keyword.control.mermaid"},"3":{name:"variable"},"4":{name:"keyword.control.mermaid"},"5":{name:"string"}},comment:"(entity) (relationship) (entity) : (label)",match:/\p{space}*([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*((?:\|o|\|\||\}o|\}\||one or (?:zero|more|many)|zero or (?:one|more|many)|many\((?:0|1)\)|only one|0\+|1\+?)(?:[^\n][^\n]|--)(?:o\||\|\||o\{|\|\{|one or (?:zero|more|many)|zero or (?:one|more|many)|many\((?:0|1)\)|only one|0\+|1\+?))\p{space}*([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*(:)\p{space}*("[\p{L}\p{M}\p{N}\p{Pc}\p{space}]*"|[\p{L}\p{M}\p{N}\p{Pc}\-]+)/dgiv}]},{begin:/^\p{space}*(gantt)/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},comment:"Gantt Diagram",end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\:\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{match:/%%[^\n]*/dgv,name:"comment"},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"entity.name.function.mermaid"}},match:/^\p{space}*(dateFormat)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-\.]+)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"entity.name.function.mermaid"}},match:/^\p{space}*(axisFormat)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\%\/\\\-\.]+)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},match:/(tickInterval)\p{space}+(([1-9][0-9]*)(millisecond|second|minute|hour|day|week|month))/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},match:/^\p{space}*(title)\p{space}+(\p{space}*["\(\)\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},match:/^\p{space}*(excludes)\p{space}+((?:[\p{Nd}\-\,\p{space}]+|monday|tuesday|wednesday|thursday|friday|saturday|sunday|weekends)+)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},match:/^\p{space}+(todayMarker)\p{space}+([^\n]*)(?=\n?$)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},match:/^\p{space}*(section)\p{space}+(\p{space}*["\(\)\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*)/dgiv},{begin:/^\p{space}([^\n]*)(:)/dgv,beginCaptures:{"1":{name:"string"},"2":{name:"keyword.control.mermaid"}},end:/(?=\n?$)/dgv,patterns:[{match:/(crit|done|active|after)/dgv,name:"entity.name.function.mermaid"},{match:/%%[^\n]*/dgv,name:"comment"}]}]},{begin:/^\p{space}*(gitGraph)/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},comment:"Git Graph",end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\:\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{match:/%%[^\n]*/dgv,name:"comment"},{begin:/^\p{space}*(commit)/dgiv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},comment:"commit",end:/(?=\n?$)/dgv,patterns:[{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"keyword.control.mermaid"},"3":{name:"string"}},comment:"(id)(:) (\"id\")",match:/\p{space}*(id)(:)\p{space}?("[^"\n]*")/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"keyword.control.mermaid"},"3":{name:"entity.name.function.mermaid"}},comment:"(type)(:) (COMMIT_TYPE)",match:/\p{space}*(type)(:)\p{space}?(NORMAL|REVERSE|HIGHLIGHT)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"keyword.control.mermaid"},"3":{name:"string"}},comment:"(tag)(:) (\"tag\")",match:/\p{space}*(tag)(:)\p{space}?("[\(\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*")/dgiv}]},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"}},comment:"(checkout) (branch-name)",match:/^\p{space}*(checkout)\p{space}*([^\p{space}"]*)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"},"3":{name:"keyword.control.mermaid"},"4":{name:"keyword.control.mermaid"},"5":{name:"constant.numeric.decimal.mermaid"}},comment:"(branch) (branch-name) (order)?(:) (number)",match:/^\p{space}*(branch)\p{space}*([^\p{space}"]*)\p{space}*(?:(order)(:)\p{space}?(\p{Nd}+))?/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"},"3":{name:"keyword.control.mermaid"},"4":{name:"keyword.control.mermaid"},"5":{name:"string"}},comment:"(merge) (branch-name) (tag: \"tag-name\")?",match:/^\p{space}*(merge)\p{space}*([^\p{space}"]*)\p{space}*(?:(tag)(:)\p{space}?("[^"\n]*"))?/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"keyword.control.mermaid"},"3":{name:"keyword.control.mermaid"},"4":{name:"string"}},comment:"(cherry-pick) (id)(:)(\"commit-id\")",match:/^\p{space}*(cherry-pick)\p{space}+(id)(:)\p{space}*("[^"\n]*")/dgiv}]},{begin:/^\p{space}*(graph|flowchart)\p{space}+([\p{Letter} 0-9]+)/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"},"2":{name:"entity.name.function.mermaid"}},comment:"Graph",end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\:\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{match:/%%[^\n]*/dgv,name:"comment"},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"},"3":{name:"keyword.control.mermaid"},"4":{name:"string"},"5":{name:"keyword.control.mermaid"}},comment:"",match:/^\p{space}*(subgraph)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}]+)(\[)("?[\p{L}\p{M}\p{N}\p{Pc}\p{space}\*\+\%\=\\\/\:\.\-'\`\,\&\^\#\$\!\?\<\>]*"?)(\])/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"entity.name.function.mermaid"}},match:/^\p{space}*(subgraph)\p{space}+([\p{Letter} 0-9\<\>]+)/dgv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"entity.name.function.mermaid"}},match:/^\p{space}*(direction)\p{space}+(RB|BT|RL|TD|LR)/dgiv},{match:/\b(end)\b/dgv,name:"keyword.control.mermaid"},{begin:/(\b(?:(?!--|==)[\-\p{L}\p{M}\p{N}\p{Pc}])+\b\p{space}*)(\(\[|\[\[|\[\(|\[|\(+|>|\{|\(\()/dgv,beginCaptures:{"1":{name:"variable"},"2":{name:"keyword.control.mermaid"},"3":{name:"string"}},comment:"(Entity)(Edge/Shape)(Text)(Edge/Shape)",end:/(\]\)|\]\]|\)\]|\]|\)+|\}|\)\))/dgv,endCaptures:{"1":{name:"keyword.control.mermaid"}},patterns:[{begin:/\p{space}*(")/dgv,beginCaptures:{"1":{name:"string"}},comment:"(\"multi-line text\")",end:/(")/dgv,endCaptures:{"1":{name:"string"}},patterns:[{begin:/([^"]*)/dgv,beginCaptures:{"1":{name:"string"}},comment:"capture inner text between quotes",end:/(?=")/dgv,patterns:[{captures:{"1":{name:"comment"}},match:/([^"]*)/dgv}]}]},{captures:{"1":{name:"string"}},comment:"(single line text)",match:/\p{space}*([\$\&\%\^\/\#\.\,\?\!\;\:\*\+\<\>_'\\\p{L}\p{M}\p{N}\p{Pc}\p{space}]+)/dgv}]},{begin:/\p{space}*((?:-{2,5}|={2,5})[xo\>]?\|)/dgiv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},comment:"(Graph Link)(\"Multiline text\")(Graph Link)",end:/(\|)/dgv,endCaptures:{"1":{name:"keyword.control.mermaid"}},patterns:[{begin:/\p{space}*(")/dgv,beginCaptures:{"1":{name:"string"}},comment:"(\"multi-line text\")",end:/(")/dgv,endCaptures:{"1":{name:"string"}},patterns:[{begin:/([^"]*)/dgv,beginCaptures:{"1":{name:"string"}},comment:"capture inner text between quotes",end:/(?=")/dgv,patterns:[{captures:{"1":{name:"comment"}},match:/([^"]*)/dgv}]}]},{captures:{"1":{name:"string"}},comment:"(single line text)",match:/\p{space}*([\$\&\%\^\/\#\.\,\?\!\;\:\*\+\<\>_'\\\p{L}\p{M}\p{N}\p{Pc}\p{space}]+)/dgv}]},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"},"3":{name:"keyword.control.mermaid"}},comment:"(Graph Link Start Arrow)(Text)(Graph Link End Arrow)",match:/\p{space}*([xo\<]?(?:-{2,5}|={2,5}|-\.{1,3}|-\.))((?:(?!--|==)[\p{L}\p{M}\p{N}\p{Pc}\p{space}\*\+\%\=\\\/\:\.\-'\`\,"\&\^\#\$\!\?\<\>\[\]])*)((?:-{2,5}|={2,5}|\.{1,3}-|\.-)[xo\>]?)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"}},comment:"(Graph Link)",match:/\p{space}*([ox\<]?(?:-[^\n]{1,3}-|-{1,3}|={1,3})[ox\>]?)/dgiv},{comment:"Entity",match:/(\b(?:(?!--|==)[\-\p{L}\p{M}\p{N}\p{Pc}])+\b\p{space}*)/dgv,name:"variable"},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"},"3":{name:"string"}},comment:"(Class)(Node(s))(ClassName)",match:/\p{space}*(class)\p{space}+(\b[\-\,\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}+(\b[\p{L}\p{M}\p{N}\p{Pc}]+\b)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"},"3":{name:"string"}},comment:"(ClassDef)(ClassName)(Styles)",match:/\p{space}*(classDef)\p{space}+(\b[\p{L}\p{M}\p{N}\p{Pc}]+\b)\p{space}+(\b[\-\,\:\;\#\p{L}\p{M}\p{N}\p{Pc}]+)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"},"3":{name:"variable"},"4":{name:"string"}},comment:"(Click)(Entity)(Link)?(Tooltip)",match:/\p{space}*(click)\p{space}+(\b[\-\p{L}\p{M}\p{N}\p{Pc}]+\b\p{space}*)(\b[\p{L}\p{M}\p{N}\p{Pc}]+\b)?\p{space}("*[^\n]*")/dgiv}]},{begin:/^\p{space}*(pie)/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},comment:"Pie Chart",end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\:\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{match:/%%[^\n]*/dgv,name:"comment"},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},match:/^\p{space}*(title)\p{space}+(\p{space}*["\(\)\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*)/dgiv},{begin:/\p{space}([^\n]*)(:)/dgv,beginCaptures:{"1":{name:"string"},"2":{name:"keyword.control.mermaid"}},end:/(?=\n?$)/dgv,patterns:[{match:/%%[^\n]*/dgv,name:"comment"}]}]},{begin:/^\p{space}*(quadrantChart)/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},comment:"Quadrant Chart",end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\:\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{match:/%%[^\n]*/dgv,name:"comment"},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},match:/^\p{space}*(title)\p{space}*(["\(\)\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*)/dgiv},{begin:/^\p{space}*([xy]-axis)\p{space}+((?:(?!-->)[\$\&\%\/\#\.\,\?\!\*\+\='\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}])*)/dgiv,beginCaptures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},comment:"(x|y-axis) (text) (-->)? (text)?",end:/(?=\n?$)/dgv,patterns:[{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},comment:"(-->) (text)",match:/\p{space}*(-->)\p{space}*([\$\&\%\/\#\.\,\?\!\*\+\='\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*)/dgv}]},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},match:/^\p{space}*(quadrant-[1234])\p{space}*(["\(\)\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*)/dgiv},{captures:{"1":{name:"string"},"2":{name:"keyword.control.mermaid"},"3":{name:"keyword.control.mermaid"},"4":{name:"constant.numeric.decimal.mermaid"},"5":{name:"keyword.control.mermaid"},"6":{name:"constant.numeric.decimal.mermaid"},"7":{name:"keyword.control.mermaid"}},comment:"(text)(:) ([)(decimal)(,) (decimal)(])",match:/\p{space}*([\$\&\%\/\#\.\,\?\!\*\+\='\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*)\p{space}*(:)\p{space}*(\[)\p{space}*(\p{Nd}\.\p{Nd}+)\p{space}*(,)\p{space}*(\p{Nd}\.\p{Nd}+)\p{space}*(\])/dgv}]},{begin:/^\p{space}*(requirementDiagram)/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},comment:"Requirement Diagram",end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\:\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{match:/%%[^\n]*/dgv,name:"comment"},{begin:/^\p{space}*((?:functional|interface|performance|physical)?requirement|designConstraint)\p{space}*(["\(\)\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*)\p{space}*(\{)/dgiv,beginCaptures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"},"3":{name:"keyword.control.mermaid"}},comment:"(requirement) (name) ({)",end:/\p{space}*(\})/dgv,endCaptures:{"1":{name:"keyword.control.mermaid"}},patterns:[{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"}},comment:"(id:) (variable id)",match:/\p{space}*(id:)\p{space}*([\$\&\%\^\/\#\.\,\?\!\;\:\*\+\<\>_'\\\p{L}\p{M}\p{N}\p{Pc}\p{space}]+)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},comment:"(text:) (text string)",match:/\p{space}*(text:)\p{space}*([\$\&\%\^\/\#\.\,\?\!\;\:\*\+\<\>_'\\\p{L}\p{M}\p{N}\p{Pc}\p{space}]+)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"entity.name.function.mermaid"}},comment:"(risk:) (risk option)",match:/\p{space}*(risk:)\p{space}*(low|medium|high)\p{space}*(?=\n?$)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"entity.name.function.mermaid"}},comment:"(verifyMethod)(:) (method)",match:/\p{space}*(verifymethod:)\p{space}*(analysis|inspection|test|demonstration)\p{space}*(?=\n?$)/dgiv}]},{begin:/^\p{space}*(element)\p{space}*(["\(\)\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*)\p{space}*(\{)/dgiv,beginCaptures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"},"3":{name:"keyword.control.mermaid"}},comment:"(element) (name) ({)",end:/\p{space}*(\})/dgv,endCaptures:{"1":{name:"keyword.control.mermaid"}},patterns:[{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"}},comment:"(type:) (user type)",match:/\p{space}*(type:)\p{space}*(["\$\&\%\^\/\#\.\,\?\!\;\:\*\+\<\>_'\\\p{L}\p{M}\p{N}\p{Pc}\p{space}]+)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"}},comment:"(docref:) (user ref)",match:/\p{space}*(docref:)\p{space}*([\$\&\%\^\/\#\.\,\?\!\;\:\*\+\<\>_'\\\p{L}\p{M}\p{N}\p{Pc}\p{space}]+)/dgiv}]},{captures:{"1":{name:"variable"},"2":{name:"keyword.control.mermaid"},"3":{name:"keyword.control.mermaid"},"4":{name:"keyword.control.mermaid"},"5":{name:"variable"}},comment:"(source) (-) (type) (->) (destination)",match:/^\p{space}*([\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*(-)\p{space}*(contains|copies|derives|satisfies|verifies|refines|traces)\p{space}*(->)\p{space}*([\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*(?=\n?$)/dgiv},{captures:{"1":{name:"variable"},"2":{name:"keyword.control.mermaid"},"3":{name:"keyword.control.mermaid"},"4":{name:"keyword.control.mermaid"},"5":{name:"variable"}},comment:"(destination) (<-) (type) (-) (source)",match:/^\p{space}*([\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*(<-)\p{space}*(contains|copies|derives|satisfies|verifies|refines|traces)\p{space}*(-)\p{space}*([\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*(?=\n?$)/dgiv}]},{begin:/^\p{space}*(sequenceDiagram)/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},comment:"Sequence Diagram",end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\:\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{match:/(%%|#)[^\n]*/dgv,name:"comment"},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"keyword.control.mermaid"},"3":{name:"string"}},comment:"(title)(title text)",match:/(title)\p{space}*(:)?\p{space}+(\p{space}*["\(\)\$\&\%\^\/\#\.\,\?\!\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"},"3":{name:"keyword.control.mermaid"},"4":{name:"string"}},comment:"(participant)(Actor)(as)?(Label)?",match:/\p{space}*(participant|actor)\p{space}+((?:(?! as )["\(\)\$\&\%\^\/\#\.\?\!\*\=\<\>'\\\p{L}\p{M}\p{N}\p{Pc}\p{space}])+)\p{space}*(as)?\p{space}(["\(\)\$\&\%\^\/\#\.\,\?\!\*\=\<\>'\\\p{L}\p{M}\p{N}\p{Pc}\p{space}]+)?/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"}},comment:"(activate/deactivate)(Actor)",match:/\p{space}*((?:de)?activate)\p{space}+(\b["\(\)\$\&\%\^\/\#\.\?\!\*\=\<\>'\\\p{L}\p{M}\p{N}\p{Pc}\p{space}]+\b\)?\p{space}*)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"entity.name.function.mermaid"},"3":{name:"variable"},"4":{name:"keyword.control.mermaid"},"5":{name:"variable"},"6":{name:"keyword.control.mermaid"},"7":{name:"string"}},comment:"(Note)(direction)(Actor)(,)?(Actor)?(:)(Message)",match:/\p{space}*(Note)\p{space}+((?:left|right)\p{space}of|over)\p{space}+(\b["\(\)\$\&\%\^\/\#\.\?\!\*\=\<\>'\\\p{L}\p{M}\p{N}\p{Pc}\p{space}]+\b\)?\p{space}*)(,)?(\b["\(\)\$\&\%\^\/\#\.\?\!\*\=\<\>'\\\p{L}\p{M}\p{N}\p{Pc}\p{space}]+\b\)?\p{space}*)?(:)(?:\p{space}+([^\;\#]*))?/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},comment:"(loop)(loop text)",match:/\p{space}*(loop)(?:\p{space}+([^\;\#]*))?/dgiv},{captures:{"1":{name:"keyword.control.mermaid"}},comment:"(end)",match:/\p{space}*(end)/dgv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},comment:"(alt/else/option/par/and/autonumber/critical/opt)(text)",match:/\p{space}*(alt|else|option|par|and|rect|autonumber|critical|opt)(?:\p{space}+([^\#\;]*))?(?=\n?$)/dgiv},{captures:{"1":{name:"variable"},"2":{name:"keyword.control.mermaid"},"3":{name:"variable"},"4":{name:"keyword.control.mermaid"},"5":{name:"string"}},comment:"(Actor)(Arrow)(Actor)(:)(Message)",match:/\p{space}*(\b["\(\)\$\&\%\^\/\#\.\?\!\*\=\<\>'\\\p{L}\p{M}\p{N}\p{Pc}\p{space}]+\b\)?)\p{space}*(-?-(?:>|x|\))>?[\+\-]?)\p{space}*(["\(\)\$\&\%\^\/\#\.\?\!\*\=\<\>'\\\p{L}\p{M}\p{N}\p{Pc}\p{space}]+\b\)?)\p{space}*(:)\p{space}*([^\;\#]*)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"entity.name.function.mermaid"},"3":{name:"string"}},comment:"(box transparent text)",match:/\p{space}*(box)\p{space}+(transparent)(?:\p{space}+([^\;\#]*))?/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},comment:"(box text)",match:/\p{space}*(box)(?:\p{space}+([^\;\#]*))?/dgiv}]},{begin:/^\p{space}*(stateDiagram(?:-v2)?)/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},comment:"State Diagram",end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\:\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{match:/%%[^\n]*/dgv,name:"comment"},{captures:{"1":{name:"keyword.control.mermaid"}},comment:"}",match:/\p{space}+(\})\p{space}+/dgv},{captures:{"1":{name:"keyword.control.mermaid"}},comment:"--",match:/\p{space}+(--)\p{space}+/dgv},{comment:"(state)",match:/^\p{space}*([\p{L}\p{M}\p{N}\p{Pc}\-]+)(?=\n?$)/dgv,name:"variable"},{captures:{"1":{name:"variable"},"2":{name:"keyword.control.mermaid"},"3":{name:"string"}},comment:"(state) : (description)",match:/([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}+(:)\p{space}+(\p{space}*[\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]+\b)/dgv},{begin:/^\p{space}*(state)\p{space}+/dgiv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},comment:"state",end:/(?=\n?$)/dgv,patterns:[{captures:{"1":{name:"string"},"2":{name:"keyword.control.mermaid"},"3":{name:"variable"}},comment:"\"(description)\" as (state)",match:/\p{space}*("[\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]+\b")\p{space}+(as)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-]+)/dgiv},{captures:{"1":{name:"variable"},"2":{name:"keyword.control.mermaid"}},comment:"(state name) {",match:/\p{space}*([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}+(\{)/dgv},{captures:{"1":{name:"variable"},"2":{name:"keyword.control.mermaid"}},comment:"(state name) <<fork|join>>",match:/\p{space}*([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}+(<<(?:fork|join)>>)/dgiv}]},{begin:/([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}+(-->)/dgv,beginCaptures:{"1":{name:"variable"},"2":{name:"keyword.control.mermaid"}},comment:"(state) -->",end:/(?=\n?$)/dgv,patterns:[{captures:{"1":{name:"variable"},"2":{name:"keyword.control.mermaid"},"3":{name:"string"}},comment:"(state) (:)? (transition text)?",match:/\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*(:)?\p{space}*([^\n\:]+)?/dgv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"keyword.control.mermaid"},"3":{name:"string"}},comment:"[*] (:)? (transition text)?",match:/(\[\*\])\p{space}*(:)?\p{space}*([^\n\:]+)?/dgv}]},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"keyword.control.mermaid"},"3":{name:"variable"},"4":{name:"keyword.control.mermaid"},"5":{name:"string"}},comment:"[*] --> (state) (:)? (transition text)?",match:/(\[\*\])\p{space}+(-->)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*(:)?\p{space}*([^\n\:]+)?/dgv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"},"3":{name:"keyword.control.mermaid"},"4":{name:"string"}},comment:"note left|right of (state name)",match:/^\p{space}*(note (?:left|right) of)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}+(:)\p{space}*([^\n\:]+)/dgiv},{begin:/^\p{space}*(note (?:left|right) of)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-]+)([^\n]|\n)/dgiv,beginCaptures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"}},comment:"note left|right of (state name) (note text) end note",contentName:"string",end:/(end note)/dgiv,endCaptures:{"1":{name:"keyword.control.mermaid"}}}]},{begin:/^\p{space}*(journey)/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},comment:"User Journey",end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\:\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{match:/%%[^\n]*/dgv,name:"comment"},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},match:/^\p{space}*(title|section)\p{space}+(\p{space}*["\(\)\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*)/dgiv},{begin:/\p{space}*(["\(\)\$\&\%\^\/\.\,\?\!\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*)\p{space}*(:)\p{space}*(\p{Nd}+)\p{space}*(:)/dgv,beginCaptures:{"1":{name:"string"},"2":{name:"keyword.control.mermaid"},"3":{name:"constant.numeric.decimal.mermaid"},"4":{name:"keyword.control.mermaid"}},end:/(?=\n?$)/dgv,patterns:[{captures:{"1":{name:"variable"}},comment:"(taskName)",match:/\p{space}*,?\p{space}*([^\,\#\n]+)/dgv}]}]},{begin:/^\p{space}*(xychart(?:-beta)?(?:\p{space}+horizontal)?)/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},comment:"XY Chart",end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\:\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{match:/%%[^\n]*/dgv,name:"comment"},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},match:/^\p{space}*(title)\p{space}+(\p{space}*["\(\)\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*)/dgiv},{begin:/^\p{space}*(x-axis)/dgiv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},comment:"(x-axis)",end:/(?=\n?$)/dgv,patterns:[{captures:{"1":{name:"constant.numeric.decimal.mermaid"},"2":{name:"keyword.control.mermaid"},"3":{name:"constant.numeric.decimal.mermaid"}},comment:"(decimal) (-->) (decimal)",match:/\p{space}*([\-\+]?\p{Nd}+\.?\p{Nd}*)\p{space}*(-->)\p{space}*([\-\+]?\p{Nd}+\.?\p{Nd}*)/dgv},{captures:{"1":{name:"string"}},comment:"(\"text\")",match:/\p{space}+("[\(\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*")/dgv},{captures:{"1":{name:"string"}},comment:"(text)",match:/\p{space}+([\(\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}]*)/dgv},{begin:/\p{space}*(\[)/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},comment:"([)(text)(,)(text)*(])",end:/\p{space}*(\])/dgv,endCaptures:{"1":{name:"keyword.control.mermaid"}},patterns:[{captures:{"1":{name:"constant.numeric.decimal.mermaid"}},comment:"(decimal)",match:/\p{space}*([\-\+]?\p{Nd}+\.?\p{Nd}*)/dgv},{captures:{"1":{name:"string"}},comment:"(\"text\")",match:/\p{space}*("[\(\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*")/dgv},{captures:{"1":{name:"string"}},comment:"(text)",match:/\p{space}*([\(\$\&\%\^\/\#\.\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]+)/dgv},{captures:{"1":{name:"keyword.control.mermaid"}},comment:"(,)",match:/\p{space}*(,)/dgv}]}]},{begin:/^\p{space}*(y-axis)/dgiv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},comment:"(y-axis)",end:/(?=\n?$)/dgv,patterns:[{captures:{"1":{name:"constant.numeric.decimal.mermaid"},"2":{name:"keyword.control.mermaid"},"3":{name:"constant.numeric.decimal.mermaid"}},comment:"(decimal) (-->) (decimal)",match:/\p{space}*([\-\+]?\p{Nd}+\.?\p{Nd}*)\p{space}*(-->)\p{space}*([\-\+]?\p{Nd}+\.?\p{Nd}*)/dgv},{captures:{"1":{name:"string"}},comment:"(\"text\")",match:/\p{space}+("[\(\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*")/dgv},{captures:{"1":{name:"string"}},comment:"(text)",match:/\p{space}+([\(\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}]*)/dgv}]},{begin:/^\p{space}*(line|bar)\p{space}*(\[)/dgiv,beginCaptures:{"1":{name:"keyword.control.mermaid"},"2":{name:"keyword.control.mermaid"}},comment:"(line|bar) ([)(decimal)+(])",end:/\p{space}*(\])/dgv,endCaptures:{"1":{name:"keyword.control.mermaid"}},patterns:[{captures:{"1":{name:"constant.numeric.decimal.mermaid"}},comment:"(decimal)",match:/\p{space}*([\-\+]?\p{Nd}+\.?\p{Nd}*)/dgv},{captures:{"1":{name:"keyword.control.mermaid"}},comment:"(,)",match:/\p{space}*(,)/dgv}]}]}]},"mermaid-ado-code-block":{begin:/\p{space}*:::\p{space}*mermaid\p{space}*(?=\n?$)/dgiv,contentName:"meta.embedded.block.mermaid",end:/\p{space}*:::\p{space}*/dgv,patterns:[{include:"#mermaid"}]},"mermaid-code-block":{begin:/(?<=[\`\~])mermaid(\p{space}+[^\`\~]*)?(?=\n?$)/dgiv,contentName:"meta.embedded.block.mermaid",end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{include:"#mermaid"}]},"mermaid-code-block-with-attributes":{begin:/(?<=[\`\~])\{\p{space}*\.?mermaid(\p{space}+[^\`\~]*)?(?=\n?$)/dgiv,contentName:"meta.embedded.block.mermaid",end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{include:"#mermaid"}]}},scopeName:"markdown.mermaid.codeblock",embeddedLangs:undefined,aliases:["mmd"]})
|
|
3
|
+
const lang = Object.freeze({displayName:"Mermaid",fileTypes:[],injectionSelector:"L:text.html.markdown",name:"mermaid",patterns:[{include:"#mermaid-code-block"},{include:"#mermaid-code-block-with-attributes"},{include:"#mermaid-ado-code-block"}],repository:{mermaid:{patterns:[{begin:/^\p{space}*(architecture-beta)/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\:\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{match:/%%[^\n]*/dgv,name:"comment"},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"},"3":{name:"punctuation.definition.typeparameters.begin.mermaid"},"4":{name:"string"},"5":{name:"keyword.control.mermaid"},"6":{name:"string"},"7":{name:"punctuation.definition.typeparameters.end.mermaid"},"8":{name:"punctuation.definition.typeparameters.begin.mermaid"},"9":{name:"string"},"10":{name:"punctuation.definition.typeparameters.end.mermaid"},"11":{name:"keyword.control.mermaid"},"12":{name:"variable"}},match:/\p{space}*(group|service)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*(\()?([\p{L}\p{M}\p{N}\p{Pc}\p{space}\-]+)?(:)?([\p{L}\p{M}\p{N}\p{Pc}\p{space}\-]+)?(\))?\p{space}*(\[)?([\p{L}\p{M}\p{N}\p{Pc}\p{space}\-]+)?\p{space}*(\])?\p{space}*(in)?\p{space}*([\p{L}\p{M}\p{N}\p{Pc}\-]+)?/dgiv},{captures:{"1":{name:"variable"},"2":{name:"punctuation.definition.typeparameters.begin.mermaid"},"3":{name:"variable"},"4":{name:"punctuation.definition.typeparameters.end.mermaid"},"5":{name:"keyword.control.mermaid"},"6":{name:"entity.name.function.mermaid"},"7":{name:"keyword.control.mermaid"},"8":{name:"entity.name.function.mermaid"},"9":{name:"keyword.control.mermaid"},"10":{name:"variable"},"11":{name:"punctuation.definition.typeparameters.begin.mermaid"},"12":{name:"variable"},"13":{name:"punctuation.definition.typeparameters.end.mermaid"}},match:/\p{space}*([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*(\{)?\p{space}*(group)?(\})?\p{space}*(:)\p{space}*(T|B|L|R)\p{space}+(<?-->?)\p{space}+(T|B|L|R)\p{space}*(:)\p{space}*([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*(\{)?\p{space}*(group)?(\})?/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"},"3":{name:"keyword.control.mermaid"},"4":{name:"variable"}},match:/\p{space}*(junction)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*(in)?\p{space}*([\p{L}\p{M}\p{N}\p{Pc}\-]+)?/dgiv}]},{begin:/^\p{space}*(classDiagram)/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\:\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{match:/%%[^\n]*/dgv,name:"comment"},{captures:{"1":{name:"entity.name.type.class.mermaid"},"2":{name:"keyword.control.mermaid"},"3":{name:"keyword.control.mermaid"},"4":{name:"keyword.control.mermaid"},"5":{name:"entity.name.type.class.mermaid"},"6":{name:"keyword.control.mermaid"},"7":{name:"string"}},match:/([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}("(?:\p{Nd}+|\*|0[^\n][^\n]\p{Nd}+|1[^\n][^\n]\p{Nd}+|1[^\n][^\n]\*)")?\p{space}?(--o|--\*|<--|-->|<\.\.|\.\.>|<\|\.\.|\.\.\|>|<\|--|--\|>|--\*|--|\.\.|\*--|o--)\p{space}("(?:\p{Nd}+|\*|0[^\n][^\n]\p{Nd}+|1[^\n][^\n]\p{Nd}+|1[^\n][^\n]\*)")?\p{space}?([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}?(:)?\p{space}([^\n]*)(?=\n?$)/dgiv},{captures:{"1":{name:"entity.name.type.class.mermaid"},"2":{name:"keyword.control.mermaid"},"3":{name:"keyword.control.mermaid"},"4":{name:"entity.name.function.mermaid"},"5":{name:"punctuation.parenthesis.open.mermaid"},"6":{name:"storage.type.mermaid"},"7":{name:"punctuation.definition.typeparameters.begin.mermaid"},"8":{name:"storage.type.mermaid"},"9":{name:"punctuation.definition.typeparameters.end.mermaid"},"10":{name:"entity.name.variable.parameter.mermaid"},"11":{name:"punctuation.parenthesis.closed.mermaid"},"12":{name:"keyword.control.mermaid"},"13":{name:"storage.type.mermaid"},"14":{name:"punctuation.definition.typeparameters.begin.mermaid"},"15":{name:"storage.type.mermaid"},"16":{name:"punctuation.definition.typeparameters.end.mermaid"}},match:/([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}?(:)\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{space}?([\p{L}\p{M}\p{N}\p{Pc}\-]+)?(\))([\*\$]{0,2})\p{space}?([\p{L}\p{M}\p{N}\p{Pc}\-]+)?(~)?([\p{L}\p{M}\p{N}\p{Pc}\-]+)?(~)?(?=\n?$)/dgv},{captures:{"1":{name:"entity.name.type.class.mermaid"},"2":{name:"keyword.control.mermaid"},"3":{name:"keyword.control.mermaid"},"4":{name:"storage.type.mermaid"},"5":{name:"punctuation.definition.typeparameters.begin.mermaid"},"6":{name:"storage.type.mermaid"},"7":{name:"punctuation.definition.typeparameters.end.mermaid"},"8":{name:"entity.name.variable.field.mermaid"}},match:/([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}?(:)\p{space}([\+\~\#\-])?([\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}\-]+)?(?=\n?$)/dgv},{captures:{"1":{name:"punctuation.definition.typeparameters.begin.mermaid"},"2":{name:"storage.type.mermaid"},"3":{name:"punctuation.definition.typeparameters.end.mermaid"},"4":{name:"entity.name.type.class.mermaid"}},match:/(<<)([\p{L}\p{M}\p{N}\p{Pc}\-]+)(>>)\p{space}?([\p{L}\p{M}\p{N}\p{Pc}\-]+)?/dgv},{begin:/(class)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-]+)(~)?([\p{L}\p{M}\p{N}\p{Pc}\-]+)?(~)?\p{space}?(\{)/dgiv,beginCaptures:{"1":{name:"keyword.control.mermaid"},"2":{name:"entity.name.type.class.mermaid"},"3":{name:"punctuation.definition.typeparameters.begin.mermaid"},"4":{name:"storage.type.mermaid"},"5":{name:"punctuation.definition.typeparameters.end.mermaid"},"6":{name:"keyword.control.mermaid"}},end:/(\})/dgv,endCaptures:{"1":{name:"keyword.control.mermaid"}},patterns:[{match:/%%[^\n]*/dgv,name:"comment"},{begin:/\p{space}([\+\~\#\-])?([\p{L}\p{M}\p{N}\p{Pc}\-]+)(\()/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"},"2":{name:"entity.name.function.mermaid"},"3":{name:"punctuation.parenthesis.open.mermaid"}},end:/(\))([\*\$]{0,2})\p{space}?([\p{L}\p{M}\p{N}\p{Pc}\-]+)?(~)?([\p{L}\p{M}\p{N}\p{Pc}\-]+)?(~)?(?=\n?$)/dgv,endCaptures:{"1":{name:"punctuation.parenthesis.closed.mermaid"},"2":{name:"keyword.control.mermaid"},"3":{name:"storage.type.mermaid"},"4":{name:"punctuation.definition.typeparameters.begin.mermaid"},"5":{name:"storage.type.mermaid"},"6":{name:"punctuation.definition.typeparameters.end.mermaid"}},patterns:[{captures:{"1":{name:"storage.type.mermaid"},"2":{name:"punctuation.definition.typeparameters.begin.mermaid"},"3":{name:"storage.type.mermaid"},"4":{name:"punctuation.definition.typeparameters.end.mermaid"},"5":{name:"entity.name.variable.parameter.mermaid"}},match:/\p{space}*,?\p{space}*([\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}\-]+)?/dgv}]},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"storage.type.mermaid"},"3":{name:"punctuation.definition.typeparameters.begin.mermaid"},"4":{name:"storage.type.mermaid"},"5":{name:"punctuation.definition.typeparameters.end.mermaid"},"6":{name:"entity.name.variable.field.mermaid"}},match:/\p{space}([\+\~\#\-])?([\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}\-]+)?(?=\n?$)/dgv},{captures:{"1":{name:"punctuation.definition.typeparameters.begin.mermaid"},"2":{name:"storage.type.mermaid"},"3":{name:"punctuation.definition.typeparameters.end.mermaid"},"4":{name:"entity.name.type.class.mermaid"}},match:/(<<)([\p{L}\p{M}\p{N}\p{Pc}\-]+)(>>)\p{space}?([\p{L}\p{M}\p{N}\p{Pc}\-]+)?/dgv}]},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"entity.name.type.class.mermaid"},"3":{name:"punctuation.definition.typeparameters.begin.mermaid"},"4":{name:"storage.type.mermaid"},"5":{name:"punctuation.definition.typeparameters.end.mermaid"}},match:/(class)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-]+)(~)?([\p{L}\p{M}\p{N}\p{Pc}\-]+)?(~)?/dgiv}]},{begin:/^\p{space}*(erDiagram)/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\:\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{match:/%%[^\n]*/dgv,name:"comment"},{captures:{"1":{name:"variable"},"2":{name:"keyword.control.mermaid"},"3":{name:"string"},"4":{name:"keyword.control.mermaid"}},match:/^\p{space}*([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*(\[)?\p{space}*([\p{L}\p{M}\p{N}\p{Pc}\-]+|"[\p{L}\p{M}\p{N}\p{Pc}\p{space}\-]+")?\p{space}*(\])?(?=\n?$)/dgv},{begin:/\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*(\[)?\p{space}*([\p{L}\p{M}\p{N}\p{Pc}\-]+|"[\p{L}\p{M}\p{N}\p{Pc}\p{space}\-]+")?\p{space}*(\])?\p{space}*(\{)/dgv,beginCaptures:{"1":{name:"variable"},"2":{name:"keyword.control.mermaid"},"3":{name:"string"},"4":{name:"keyword.control.mermaid"},"5":{name:"keyword.control.mermaid"}},end:/(\})/dgv,endCaptures:{"1":{name:"keyword.control.mermaid"}},patterns:[{captures:{"1":{name:"storage.type.mermaid"},"2":{name:"variable"},"3":{name:"keyword.control.mermaid"},"4":{name:"string"}},match:/\p{space}*([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}+(PK|FK)?\p{space}*("["\(\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*")?\p{space}*/dgiv},{match:/%%[^\n]*/dgv,name:"comment"}]},{captures:{"1":{name:"variable"},"2":{name:"keyword.control.mermaid"},"3":{name:"variable"},"4":{name:"keyword.control.mermaid"},"5":{name:"string"}},match:/\p{space}*([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*((?:\|o|\|\||\}o|\}\||one or (?:zero|more|many)|zero or (?:one|more|many)|many\((?:0|1)\)|only one|0\+|1\+?)(?:[^\n][^\n]|--)(?:o\||\|\||o\{|\|\{|one or (?:zero|more|many)|zero or (?:one|more|many)|many\((?:0|1)\)|only one|0\+|1\+?))\p{space}*([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*(:)\p{space}*("[\p{L}\p{M}\p{N}\p{Pc}\p{space}]*"|[\p{L}\p{M}\p{N}\p{Pc}\-]+)/dgiv}]},{begin:/^\p{space}*(gantt)/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\:\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{match:/%%[^\n]*/dgv,name:"comment"},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"entity.name.function.mermaid"}},match:/^\p{space}*(dateFormat)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-\.]+)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"entity.name.function.mermaid"}},match:/^\p{space}*(axisFormat)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\%\/\\\-\.]+)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},match:/(tickInterval)\p{space}+(([1-9][0-9]*)(millisecond|second|minute|hour|day|week|month))/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},match:/^\p{space}*(title)\p{space}+(\p{space}*["\(\)\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},match:/^\p{space}*(excludes)\p{space}+((?:[\p{Nd}\-\,\p{space}]+|monday|tuesday|wednesday|thursday|friday|saturday|sunday|weekends)+)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},match:/^\p{space}+(todayMarker)\p{space}+([^\n]*)(?=\n?$)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},match:/^\p{space}*(section)\p{space}+(\p{space}*["\(\)\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*)/dgiv},{begin:/^\p{space}([^\n]*)(:)/dgv,beginCaptures:{"1":{name:"string"},"2":{name:"keyword.control.mermaid"}},end:/(?=\n?$)/dgv,patterns:[{match:/(crit|done|active|after)/dgv,name:"entity.name.function.mermaid"},{match:/%%[^\n]*/dgv,name:"comment"}]}]},{begin:/^\p{space}*(gitGraph)/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\:\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{match:/%%[^\n]*/dgv,name:"comment"},{begin:/^\p{space}*(commit)/dgiv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},end:/(?=\n?$)/dgv,patterns:[{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"keyword.control.mermaid"},"3":{name:"string"}},match:/\p{space}*(id)(:)\p{space}?("[^"\n]*")/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"keyword.control.mermaid"},"3":{name:"entity.name.function.mermaid"}},match:/\p{space}*(type)(:)\p{space}?(NORMAL|REVERSE|HIGHLIGHT)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"keyword.control.mermaid"},"3":{name:"string"}},match:/\p{space}*(tag)(:)\p{space}?("[\(\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*")/dgiv}]},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"}},match:/^\p{space}*(checkout)\p{space}*([^\p{space}"]*)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"},"3":{name:"keyword.control.mermaid"},"4":{name:"keyword.control.mermaid"},"5":{name:"constant.numeric.decimal.mermaid"}},match:/^\p{space}*(branch)\p{space}*([^\p{space}"]*)\p{space}*(?:(order)(:)\p{space}?(\p{Nd}+))?/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"},"3":{name:"keyword.control.mermaid"},"4":{name:"keyword.control.mermaid"},"5":{name:"string"}},match:/^\p{space}*(merge)\p{space}*([^\p{space}"]*)\p{space}*(?:(tag)(:)\p{space}?("[^"\n]*"))?/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"keyword.control.mermaid"},"3":{name:"keyword.control.mermaid"},"4":{name:"string"}},match:/^\p{space}*(cherry-pick)\p{space}+(id)(:)\p{space}*("[^"\n]*")/dgiv}]},{begin:/^\p{space}*(graph|flowchart)\p{space}+([\p{Letter} 0-9]+)/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"},"2":{name:"entity.name.function.mermaid"}},end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\:\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{match:/%%[^\n]*/dgv,name:"comment"},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"},"3":{name:"keyword.control.mermaid"},"4":{name:"string"},"5":{name:"keyword.control.mermaid"}},match:/^\p{space}*(subgraph)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}]+)(\[)("?[\p{L}\p{M}\p{N}\p{Pc}\p{space}\*\+\%\=\\\/\:\.\-'\`\,\&\^\#\$\!\?\<\>]*"?)(\])/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"entity.name.function.mermaid"}},match:/^\p{space}*(subgraph)\p{space}+([\p{Letter} 0-9\<\>]+)/dgv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"entity.name.function.mermaid"}},match:/^\p{space}*(direction)\p{space}+(RB|BT|RL|TD|LR)/dgiv},{match:/\b(end)\b/dgv,name:"keyword.control.mermaid"},{begin:/(\b(?:(?!--|==)[\-\p{L}\p{M}\p{N}\p{Pc}])+\b\p{space}*)(\(\[|\[\[|\[\(|\[|\(+|>|\{|\(\()/dgv,beginCaptures:{"1":{name:"variable"},"2":{name:"keyword.control.mermaid"},"3":{name:"string"}},end:/(\]\)|\]\]|\)\]|\]|\)+|\}|\)\))/dgv,endCaptures:{"1":{name:"keyword.control.mermaid"}},patterns:[{begin:/\p{space}*(")/dgv,beginCaptures:{"1":{name:"string"}},end:/(")/dgv,endCaptures:{"1":{name:"string"}},patterns:[{begin:/([^"]*)/dgv,beginCaptures:{"1":{name:"string"}},end:/(?=")/dgv,patterns:[{captures:{"1":{name:"comment"}},match:/([^"]*)/dgv}]}]},{captures:{"1":{name:"string"}},match:/\p{space}*([\$\&\%\^\/\#\.\,\?\!\;\:\*\+\<\>_'\\\p{L}\p{M}\p{N}\p{Pc}\p{space}]+)/dgv}]},{begin:/\p{space}*((?:-{2,5}|={2,5})[xo\>]?\|)/dgiv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},end:/(\|)/dgv,endCaptures:{"1":{name:"keyword.control.mermaid"}},patterns:[{begin:/\p{space}*(")/dgv,beginCaptures:{"1":{name:"string"}},end:/(")/dgv,endCaptures:{"1":{name:"string"}},patterns:[{begin:/([^"]*)/dgv,beginCaptures:{"1":{name:"string"}},end:/(?=")/dgv,patterns:[{captures:{"1":{name:"comment"}},match:/([^"]*)/dgv}]}]},{captures:{"1":{name:"string"}},match:/\p{space}*([\$\&\%\^\/\#\.\,\?\!\;\:\*\+\<\>_'\\\p{L}\p{M}\p{N}\p{Pc}\p{space}]+)/dgv}]},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"},"3":{name:"keyword.control.mermaid"}},match:/\p{space}*([xo\<]?(?:-{2,5}|={2,5}|-\.{1,3}|-\.))((?:(?!--|==)[\p{L}\p{M}\p{N}\p{Pc}\p{space}\*\+\%\=\\\/\:\.\-'\`\,"\&\^\#\$\!\?\<\>\[\]])*)((?:-{2,5}|={2,5}|\.{1,3}-|\.-)[xo\>]?)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"}},match:/\p{space}*([ox\<]?(?:-[^\n]{1,3}-|-{1,3}|={1,3})[ox\>]?)/dgiv},{match:/(\b(?:(?!--|==)[\-\p{L}\p{M}\p{N}\p{Pc}])+\b\p{space}*)/dgv,name:"variable"},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"},"3":{name:"string"}},match:/\p{space}*(class)\p{space}+(\b[\-\,\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}+(\b[\p{L}\p{M}\p{N}\p{Pc}]+\b)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"},"3":{name:"string"}},match:/\p{space}*(classDef)\p{space}+(\b[\p{L}\p{M}\p{N}\p{Pc}]+\b)\p{space}+(\b[\-\,\:\;\#\p{L}\p{M}\p{N}\p{Pc}]+)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"},"3":{name:"variable"},"4":{name:"string"}},match:/\p{space}*(click)\p{space}+(\b[\-\p{L}\p{M}\p{N}\p{Pc}]+\b\p{space}*)(\b[\p{L}\p{M}\p{N}\p{Pc}]+\b)?\p{space}("*[^\n]*")/dgiv}]},{begin:/^\p{space}*(pie)/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\:\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{match:/%%[^\n]*/dgv,name:"comment"},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},match:/^\p{space}*(title)\p{space}+(\p{space}*["\(\)\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*)/dgiv},{begin:/\p{space}([^\n]*)(:)/dgv,beginCaptures:{"1":{name:"string"},"2":{name:"keyword.control.mermaid"}},end:/(?=\n?$)/dgv,patterns:[{match:/%%[^\n]*/dgv,name:"comment"}]}]},{begin:/^\p{space}*(quadrantChart)/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\:\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{match:/%%[^\n]*/dgv,name:"comment"},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},match:/^\p{space}*(title)\p{space}*(["\(\)\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*)/dgiv},{begin:/^\p{space}*([xy]-axis)\p{space}+((?:(?!-->)[\$\&\%\/\#\.\,\?\!\*\+\='\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}])*)/dgiv,beginCaptures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},end:/(?=\n?$)/dgv,patterns:[{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},match:/\p{space}*(-->)\p{space}*([\$\&\%\/\#\.\,\?\!\*\+\='\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*)/dgv}]},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},match:/^\p{space}*(quadrant-[1234])\p{space}*(["\(\)\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*)/dgiv},{captures:{"1":{name:"string"},"2":{name:"keyword.control.mermaid"},"3":{name:"keyword.control.mermaid"},"4":{name:"constant.numeric.decimal.mermaid"},"5":{name:"keyword.control.mermaid"},"6":{name:"constant.numeric.decimal.mermaid"},"7":{name:"keyword.control.mermaid"}},match:/\p{space}*([\$\&\%\/\#\.\,\?\!\*\+\='\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*)\p{space}*(:)\p{space}*(\[)\p{space}*(\p{Nd}\.\p{Nd}+)\p{space}*(,)\p{space}*(\p{Nd}\.\p{Nd}+)\p{space}*(\])/dgv}]},{begin:/^\p{space}*(requirementDiagram)/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\:\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{match:/%%[^\n]*/dgv,name:"comment"},{begin:/^\p{space}*((?:functional|interface|performance|physical)?requirement|designConstraint)\p{space}*(["\(\)\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*)\p{space}*(\{)/dgiv,beginCaptures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"},"3":{name:"keyword.control.mermaid"}},end:/\p{space}*(\})/dgv,endCaptures:{"1":{name:"keyword.control.mermaid"}},patterns:[{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"}},match:/\p{space}*(id:)\p{space}*([\$\&\%\^\/\#\.\,\?\!\;\:\*\+\<\>_'\\\p{L}\p{M}\p{N}\p{Pc}\p{space}]+)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},match:/\p{space}*(text:)\p{space}*([\$\&\%\^\/\#\.\,\?\!\;\:\*\+\<\>_'\\\p{L}\p{M}\p{N}\p{Pc}\p{space}]+)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"entity.name.function.mermaid"}},match:/\p{space}*(risk:)\p{space}*(low|medium|high)\p{space}*(?=\n?$)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"entity.name.function.mermaid"}},match:/\p{space}*(verifymethod:)\p{space}*(analysis|inspection|test|demonstration)\p{space}*(?=\n?$)/dgiv}]},{begin:/^\p{space}*(element)\p{space}*(["\(\)\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*)\p{space}*(\{)/dgiv,beginCaptures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"},"3":{name:"keyword.control.mermaid"}},end:/\p{space}*(\})/dgv,endCaptures:{"1":{name:"keyword.control.mermaid"}},patterns:[{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"}},match:/\p{space}*(type:)\p{space}*(["\$\&\%\^\/\#\.\,\?\!\;\:\*\+\<\>_'\\\p{L}\p{M}\p{N}\p{Pc}\p{space}]+)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"}},match:/\p{space}*(docref:)\p{space}*([\$\&\%\^\/\#\.\,\?\!\;\:\*\+\<\>_'\\\p{L}\p{M}\p{N}\p{Pc}\p{space}]+)/dgiv}]},{captures:{"1":{name:"variable"},"2":{name:"keyword.control.mermaid"},"3":{name:"keyword.control.mermaid"},"4":{name:"keyword.control.mermaid"},"5":{name:"variable"}},match:/^\p{space}*([\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*(-)\p{space}*(contains|copies|derives|satisfies|verifies|refines|traces)\p{space}*(->)\p{space}*([\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*(?=\n?$)/dgiv},{captures:{"1":{name:"variable"},"2":{name:"keyword.control.mermaid"},"3":{name:"keyword.control.mermaid"},"4":{name:"keyword.control.mermaid"},"5":{name:"variable"}},match:/^\p{space}*([\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*(<-)\p{space}*(contains|copies|derives|satisfies|verifies|refines|traces)\p{space}*(-)\p{space}*([\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*(?=\n?$)/dgiv}]},{begin:/^\p{space}*(sequenceDiagram)/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\:\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{match:/(%%|#)[^\n]*/dgv,name:"comment"},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"keyword.control.mermaid"},"3":{name:"string"}},match:/(title)\p{space}*(:)?\p{space}+(\p{space}*["\(\)\$\&\%\^\/\#\.\,\?\!\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"},"3":{name:"keyword.control.mermaid"},"4":{name:"string"}},match:/\p{space}*(participant|actor)\p{space}+((?:(?! as )["\(\)\$\&\%\^\/\#\.\?\!\*\=\<\>'\\\p{L}\p{M}\p{N}\p{Pc}\p{space}])+)\p{space}*(as)?\p{space}(["\(\)\$\&\%\^\/\#\.\,\?\!\*\=\<\>'\\\p{L}\p{M}\p{N}\p{Pc}\p{space}]+)?/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"}},match:/\p{space}*((?:de)?activate)\p{space}+(\b["\(\)\$\&\%\^\/\#\.\?\!\*\=\<\>'\\\p{L}\p{M}\p{N}\p{Pc}\p{space}]+\b\)?\p{space}*)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"entity.name.function.mermaid"},"3":{name:"variable"},"4":{name:"keyword.control.mermaid"},"5":{name:"variable"},"6":{name:"keyword.control.mermaid"},"7":{name:"string"}},match:/\p{space}*(Note)\p{space}+((?:left|right)\p{space}of|over)\p{space}+(\b["\(\)\$\&\%\^\/\#\.\?\!\*\=\<\>'\\\p{L}\p{M}\p{N}\p{Pc}\p{space}]+\b\)?\p{space}*)(,)?(\b["\(\)\$\&\%\^\/\#\.\?\!\*\=\<\>'\\\p{L}\p{M}\p{N}\p{Pc}\p{space}]+\b\)?\p{space}*)?(:)(?:\p{space}+([^\;\#]*))?/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},match:/\p{space}*(loop)(?:\p{space}+([^\;\#]*))?/dgiv},{captures:{"1":{name:"keyword.control.mermaid"}},match:/\p{space}*(end)/dgv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},match:/\p{space}*(alt|else|option|par|and|rect|autonumber|critical|opt)(?:\p{space}+([^\#\;]*))?(?=\n?$)/dgiv},{captures:{"1":{name:"variable"},"2":{name:"keyword.control.mermaid"},"3":{name:"variable"},"4":{name:"keyword.control.mermaid"},"5":{name:"string"}},match:/\p{space}*(\b["\(\)\$\&\%\^\/\#\.\?\!\*\=\<\>'\\\p{L}\p{M}\p{N}\p{Pc}\p{space}]+\b\)?)\p{space}*(-?-(?:>|x|\))>?[\+\-]?)\p{space}*(["\(\)\$\&\%\^\/\#\.\?\!\*\=\<\>'\\\p{L}\p{M}\p{N}\p{Pc}\p{space}]+\b\)?)\p{space}*(:)\p{space}*([^\;\#]*)/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"entity.name.function.mermaid"},"3":{name:"string"}},match:/\p{space}*(box)\p{space}+(transparent)(?:\p{space}+([^\;\#]*))?/dgiv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},match:/\p{space}*(box)(?:\p{space}+([^\;\#]*))?/dgiv}]},{begin:/^\p{space}*(stateDiagram(?:-v2)?)/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\:\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{match:/%%[^\n]*/dgv,name:"comment"},{captures:{"1":{name:"keyword.control.mermaid"}},match:/\p{space}+(\})\p{space}+/dgv},{captures:{"1":{name:"keyword.control.mermaid"}},match:/\p{space}+(--)\p{space}+/dgv},{match:/^\p{space}*([\p{L}\p{M}\p{N}\p{Pc}\-]+)(?=\n?$)/dgv,name:"variable"},{captures:{"1":{name:"variable"},"2":{name:"keyword.control.mermaid"},"3":{name:"string"}},match:/([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}+(:)\p{space}+(\p{space}*[\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]+\b)/dgv},{begin:/^\p{space}*(state)\p{space}+/dgiv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},end:/(?=\n?$)/dgv,patterns:[{captures:{"1":{name:"string"},"2":{name:"keyword.control.mermaid"},"3":{name:"variable"}},match:/\p{space}*("[\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]+\b")\p{space}+(as)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-]+)/dgiv},{captures:{"1":{name:"variable"},"2":{name:"keyword.control.mermaid"}},match:/\p{space}*([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}+(\{)/dgv},{captures:{"1":{name:"variable"},"2":{name:"keyword.control.mermaid"}},match:/\p{space}*([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}+(<<(?:fork|join)>>)/dgiv}]},{begin:/([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}+(-->)/dgv,beginCaptures:{"1":{name:"variable"},"2":{name:"keyword.control.mermaid"}},end:/(?=\n?$)/dgv,patterns:[{captures:{"1":{name:"variable"},"2":{name:"keyword.control.mermaid"},"3":{name:"string"}},match:/\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*(:)?\p{space}*([^\n\:]+)?/dgv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"keyword.control.mermaid"},"3":{name:"string"}},match:/(\[\*\])\p{space}*(:)?\p{space}*([^\n\:]+)?/dgv}]},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"keyword.control.mermaid"},"3":{name:"variable"},"4":{name:"keyword.control.mermaid"},"5":{name:"string"}},match:/(\[\*\])\p{space}+(-->)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}*(:)?\p{space}*([^\n\:]+)?/dgv},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"},"3":{name:"keyword.control.mermaid"},"4":{name:"string"}},match:/^\p{space}*(note (?:left|right) of)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-]+)\p{space}+(:)\p{space}*([^\n\:]+)/dgiv},{begin:/^\p{space}*(note (?:left|right) of)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\-]+)([^\n]|\n)/dgiv,beginCaptures:{"1":{name:"keyword.control.mermaid"},"2":{name:"variable"}},contentName:"string",end:/(end note)/dgiv,endCaptures:{"1":{name:"keyword.control.mermaid"}}}]},{begin:/^\p{space}*(journey)/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\:\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{match:/%%[^\n]*/dgv,name:"comment"},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},match:/^\p{space}*(title|section)\p{space}+(\p{space}*["\(\)\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*)/dgiv},{begin:/\p{space}*(["\(\)\$\&\%\^\/\.\,\?\!\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*)\p{space}*(:)\p{space}*(\p{Nd}+)\p{space}*(:)/dgv,beginCaptures:{"1":{name:"string"},"2":{name:"keyword.control.mermaid"},"3":{name:"constant.numeric.decimal.mermaid"},"4":{name:"keyword.control.mermaid"}},end:/(?=\n?$)/dgv,patterns:[{captures:{"1":{name:"variable"}},match:/\p{space}*,?\p{space}*([^\,\#\n]+)/dgv}]}]},{begin:/^\p{space}*(xychart(?:-beta)?(?:\p{space}+horizontal)?)/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\:\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{match:/%%[^\n]*/dgv,name:"comment"},{captures:{"1":{name:"keyword.control.mermaid"},"2":{name:"string"}},match:/^\p{space}*(title)\p{space}+(\p{space}*["\(\)\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*)/dgiv},{begin:/^\p{space}*(x-axis)/dgiv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},end:/(?=\n?$)/dgv,patterns:[{captures:{"1":{name:"constant.numeric.decimal.mermaid"},"2":{name:"keyword.control.mermaid"},"3":{name:"constant.numeric.decimal.mermaid"}},match:/\p{space}*([\-\+]?\p{Nd}+\.?\p{Nd}*)\p{space}*(-->)\p{space}*([\-\+]?\p{Nd}+\.?\p{Nd}*)/dgv},{captures:{"1":{name:"string"}},match:/\p{space}+("[\(\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*")/dgv},{captures:{"1":{name:"string"}},match:/\p{space}+([\(\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}]*)/dgv},{begin:/\p{space}*(\[)/dgv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},end:/\p{space}*(\])/dgv,endCaptures:{"1":{name:"keyword.control.mermaid"}},patterns:[{captures:{"1":{name:"constant.numeric.decimal.mermaid"}},match:/\p{space}*([\-\+]?\p{Nd}+\.?\p{Nd}*)/dgv},{captures:{"1":{name:"string"}},match:/\p{space}*("[\(\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*")/dgv},{captures:{"1":{name:"string"}},match:/\p{space}*([\(\$\&\%\^\/\#\.\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]+)/dgv},{captures:{"1":{name:"keyword.control.mermaid"}},match:/\p{space}*(,)/dgv}]}]},{begin:/^\p{space}*(y-axis)/dgiv,beginCaptures:{"1":{name:"keyword.control.mermaid"}},end:/(?=\n?$)/dgv,patterns:[{captures:{"1":{name:"constant.numeric.decimal.mermaid"},"2":{name:"keyword.control.mermaid"},"3":{name:"constant.numeric.decimal.mermaid"}},match:/\p{space}*([\-\+]?\p{Nd}+\.?\p{Nd}*)\p{space}*(-->)\p{space}*([\-\+]?\p{Nd}+\.?\p{Nd}*)/dgv},{captures:{"1":{name:"string"}},match:/\p{space}+("[\(\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}\p{space}]*")/dgv},{captures:{"1":{name:"string"}},match:/\p{space}+([\(\$\&\%\^\/\#\.\,\?\!\;\:\*\+\=\<\>'\\\-\p{L}\p{M}\p{N}\p{Pc}]*)/dgv}]},{begin:/^\p{space}*(line|bar)\p{space}*(\[)/dgiv,beginCaptures:{"1":{name:"keyword.control.mermaid"},"2":{name:"keyword.control.mermaid"}},end:/\p{space}*(\])/dgv,endCaptures:{"1":{name:"keyword.control.mermaid"}},patterns:[{captures:{"1":{name:"constant.numeric.decimal.mermaid"}},match:/\p{space}*([\-\+]?\p{Nd}+\.?\p{Nd}*)/dgv},{captures:{"1":{name:"keyword.control.mermaid"}},match:/\p{space}*(,)/dgv}]}]}]},"mermaid-ado-code-block":{begin:/\p{space}*:::\p{space}*mermaid\p{space}*(?=\n?$)/dgiv,contentName:"meta.embedded.block.mermaid",end:/\p{space}*:::\p{space}*/dgv,patterns:[{include:"#mermaid"}]},"mermaid-code-block":{begin:/(?<=[\`\~])mermaid(\p{space}+[^\`\~]*)?(?=\n?$)/dgiv,contentName:"meta.embedded.block.mermaid",end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{include:"#mermaid"}]},"mermaid-code-block-with-attributes":{begin:/(?<=[\`\~])\{\p{space}*\.?mermaid(\p{space}+[^\`\~]*)?(?=\n?$)/dgiv,contentName:"meta.embedded.block.mermaid",end:/*@__PURE__*/ new EmulatedRegExp("(^|^)(?=\\p{space}*[\\`\\~]{3,}\\p{space}*(?=\\n?$))","dgv",{"strategy":"clip_search"}),patterns:[{include:"#mermaid"}]}},scopeName:"markdown.mermaid.codeblock",embeddedLangs:undefined,aliases:["mmd"]})
|
|
4
4
|
|
|
5
5
|
export default [
|
|
6
6
|
lang
|
package/dist/mipsasm.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EmulatedRegExp } from 'oniguruma-to-es'
|
|
2
2
|
|
|
3
|
-
const lang = Object.freeze({displayName:"MIPS Assembly",fileTypes:["s","mips","spim","asm"],name:"mipsasm",patterns:[{
|
|
3
|
+
const lang = Object.freeze({displayName:"MIPS Assembly",fileTypes:["s","mips","spim","asm"],name:"mipsasm",patterns:[{match:/\b(mul|abs|div|divu|mulo|mulou|neg|negu|not|rem|remu|rol|ror|li|seq|sge|sgeu|sgt|sgtu|sle|sleu|sne|b|beqz|bge|bgeu|bgt|bgtu|ble|bleu|blt|bltu|bnez|la|ld|ulh|ulhu|ulw|sd|ush|usw|move|mfc1\.d|l\.d|l\.s|s\.d|s\.s)\b/dgv,name:"support.function.pseudo.mips"},{match:/\b(abs\.d|abs\.s|add|add\.d|add\.s|addi|addiu|addu|and|andi|bc1f|bc1t|beq|bgez|bgezal|bgtz|blez|bltz|bltzal|bne|break|c\.eq\.d|c\.eq\.s|c\.le\.d|c\.le\.s|c\.lt\.d|c\.lt\.s|ceil\.w\.d|ceil\.w\.s|clo|clz|cvt\.d\.s|cvt\.d\.w|cvt\.s\.d|cvt\.s\.w|cvt\.w\.d|cvt\.w\.s|div|div\.d|div\.s|divu|eret|floor\.w\.d|floor\.w\.s|j|jal|jalr|jr|lb|lbu|lh|lhu|ll|lui|lw|lwc1|lwl|lwr|madd|maddu|mfc0|mfc1|mfhi|mflo|mov\.d|mov\.s|movf|movf\.d|movf\.s|movn|movn\.d|movn\.s|movt|movt\.d|movt\.s|movz|movz\.d|movz\.s|msub|mtc0|mtc1|mthi|mtlo|mul|mul\.d|mul\.s|mult|multu|neg\.d|neg\.s|nop|nor|or|ori|round\.w\.d|round\.w\.s|sb|sc|sdc1|sh|sll|sllv|slt|slti|sltiu|sltu|sqrt\.d|sqrt\.s|sra|srav|srl|srlv|sub|sub\.d|sub\.s|subu|sw|swc1|swl|swr|syscall|teq|teqi|tge|tgei|tgeiu|tgeu|tlt|tlti|tltiu|tltu|trunc\.w\.d|trunc\.w\.s|xor|xori)\b/dgv,name:"support.function.mips"},{match:/\.(ascii|asciiz|byte|data|double|float|half|kdata|ktext|space|text|word|set\p{space}*(noat|at))\b/dgv,name:"storage.type.mips"},{match:/\.(align|extern||globl)\b/dgv,name:"storage.modifier.mips"},{captures:{"1":{name:"entity.name.function.label.mips"}},match:/\b([A-Za-z0-9_]+):/dgv,name:"meta.function.label.mips"},{captures:{"1":{name:"punctuation.definition.variable.mips"}},match:/(\$)(0|[2-9]|1[0-9]|2[0-5]|2[89]|3[0-1])\b/dgv,name:"variable.other.register.usable.by-number.mips"},{captures:{"1":{name:"punctuation.definition.variable.mips"}},match:/(\$)(zero|v[01]|a[0-3]|t[0-9]|s[0-7]|gp|sp|fp|ra)\b/dgv,name:"variable.other.register.usable.by-name.mips"},{captures:{"1":{name:"punctuation.definition.variable.mips"}},match:/(\$)(at|k[01]|1|2[67])\b/dgv,name:"variable.other.register.reserved.mips"},{captures:{"1":{name:"punctuation.definition.variable.mips"}},match:/(\$)f([0-9]|1[0-9]|2[0-9]|3[0-1])\b/dgv,name:"variable.other.register.usable.floating-point.mips"},{match:/\b\p{Nd}+\.\p{Nd}+\b/dgv,name:"constant.numeric.float.mips"},{match:/\b(\p{Nd}+|0(x|X)[a-fA-F0-9]+)\b/dgv,name:"constant.numeric.integer.mips"},{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.mips"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.mips"}},name:"string.quoted.double.mips",patterns:[{match:/\\[rnt\\"]/dgv,name:"constant.character.escape.mips"}]},{begin:/(^[ \t]+)?(?=#)/dgv,beginCaptures:{"1":{name:"punctuation.whitespace.comment.leading.mips"}},end:/*@__PURE__*/ new EmulatedRegExp("(?!^)","dgv",{"strategy":"clip_search"}),patterns:[{begin:/#/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.mips"}},end:/\n/dgv,name:"comment.line.number-sign.mips"}]}],scopeName:"source.mips",embeddedLangs:undefined,aliases:["mips"]})
|
|
4
4
|
|
|
5
5
|
export default [
|
|
6
6
|
lang
|