@shikijs/langs-precompiled 3.21.0 → 3.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actionscript-3.mjs +1 -1
- package/dist/asciidoc.mjs +1 -1
- package/dist/bird.d.mts +3 -0
- package/dist/bird.mjs +2 -0
- package/dist/bird2.d.mts +3 -0
- package/dist/bird2.mjs +5 -0
- package/dist/c3.mjs +1 -1
- package/dist/csharp.mjs +1 -1
- package/dist/gd.d.mts +3 -0
- package/dist/gd.mjs +2 -0
- package/dist/gdresource.mjs +1 -1
- package/dist/gdscript.mjs +1 -1
- package/dist/go.mjs +1 -1
- package/dist/index.mjs +11 -0
- package/dist/just.d.mts +3 -0
- package/dist/just.mjs +18 -0
- package/dist/latex.mjs +1 -1
- package/dist/llvm.mjs +1 -1
- package/dist/lua.mjs +1 -1
- package/dist/marko.mjs +1 -1
- package/dist/mdc.mjs +1 -1
- package/dist/mojo.mjs +1 -1
- package/dist/moonbit.mjs +3 -1
- package/dist/move.mjs +1 -1
- package/dist/nextflow-groovy.d.mts +3 -0
- package/dist/nextflow-groovy.mjs +5 -0
- package/dist/nextflow.mjs +4 -1
- package/dist/nushell.mjs +1 -1
- package/dist/odin.d.mts +3 -0
- package/dist/odin.mjs +5 -0
- package/dist/php.mjs +1 -1
- package/dist/ron.d.mts +3 -0
- package/dist/ron.mjs +5 -0
- package/dist/ruby.mjs +1 -1
- package/dist/surql.d.mts +3 -0
- package/dist/surql.mjs +2 -0
- package/dist/surrealql.d.mts +3 -0
- package/dist/surrealql.mjs +8 -0
- package/dist/svelte.mjs +1 -1
- package/dist/swift.mjs +1 -1
- package/dist/tex.mjs +1 -1
- package/dist/tres.d.mts +3 -0
- package/dist/tres.mjs +2 -0
- package/dist/tscn.d.mts +3 -0
- package/dist/tscn.mjs +2 -0
- package/package.json +14 -3
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const lang = Object.freeze({foldingStartMarker:/(\{\p{space}*(?=\n?$)|^\p{space}*\/\/ \{\{\{)/dgv,foldingStopMarker:/^\p{space}*(\}|\/\/ \}\}\}(?=\n?$))/dgv,name:"nextflow-groovy",patterns:[{captures:{"1":{name:"punctuation.definition.comment.groovy"}},match:/^(#!)[^\n]+(?=\n?$)\n/dgv,name:"comment.line.hashbang.groovy"},{include:"#groovy"}],repository:{braces:{begin:/\{/dgv,end:/\}/dgv,patterns:[{include:"#groovy-code"}]},closures:{begin:/\{(?=[^\n]*?->)/dgv,end:/\}/dgv,patterns:[{begin:/(?<=\{)(?=[^\}]*?->)/dgv,end:/->/dgv,endCaptures:{"0":{name:"keyword.operator.groovy"}},patterns:[{begin:/(?!->)/dgv,end:/(?=->)/dgv,name:"meta.closure.parameters.groovy",patterns:[{begin:/(?!,|->)/dgv,end:/(?=,|->)/dgv,name:"meta.closure.parameter.groovy",patterns:[{begin:/=/dgv,beginCaptures:{"0":{name:"keyword.operator.assignment.groovy"}},end:/(?=,|->)/dgv,name:"meta.parameter.default.groovy",patterns:[{include:"#groovy-code"}]},{include:"#parameters"}]}]}]},{begin:/(?=[^\}])/dgv,end:/(?=\})/dgv,patterns:[{include:"#groovy-code"}]}]},comments:{patterns:[{captures:{"0":{name:"punctuation.definition.comment.groovy"}},match:/\/\*\*\//dgv,name:"comment.block.empty.groovy"},{include:"text.html.javadoc"},{begin:/\/\*/dgv,captures:{"0":{name:"punctuation.definition.comment.groovy"}},end:/\*\//dgv,name:"comment.block.groovy"},{captures:{"1":{name:"punctuation.definition.comment.groovy"}},match:/(\/\/)[^\n]*(?=\n?$)\n?/dgv,name:"comment.line.double-slash.groovy"}]},constants:{patterns:[{match:/\b([A-Z][0-9A-Z_]+)\b/dgv,name:"constant.other.groovy"},{match:/\b(true|false|null)\b/dgv,name:"constant.language.groovy"}]},"constructor-call":{begin:/\bnew\b/dgv,beginCaptures:{"0":{name:"keyword.control.new.groovy"}},end:/(?<=\))|(?=\n?$)/dgv,patterns:[{begin:/(?=[\p{L}\p{M}\p{N}\p{Pc}][^\n]*\(?)/dgv,end:/(?<=\))|(?=\n?$)/dgv,patterns:[{include:"#object-types"},{begin:/\(/dgv,beginCaptures:{"1":{name:"storage.type.groovy"}},end:/\)/dgv,patterns:[{include:"#groovy"}]}]}]},groovy:{patterns:[{include:"#comments"},{include:"#variables"},{include:"#groovy-code"}]},"groovy-code":{patterns:[{include:"#groovy-code-minus-map-keys"},{include:"#map-keys"}]},"groovy-code-minus-map-keys":{patterns:[{include:"#comments"},{include:"#keyword-language"},{include:"#values"},{include:"#keyword-operator"},{include:"#types"},{include:"#parens"},{include:"#closures"},{include:"#braces"}]},keyword:{patterns:[{include:"#keyword-operator"},{include:"#keyword-language"}]},"keyword-language":{patterns:[{match:/\b(try|catch|throw)\b/dgv,name:"keyword.control.exception.groovy"},{match:/\b((?<!\.)(?:return|if|else))\b/dgv,name:"keyword.control.groovy"},{begin:/\b(assert)\p{space}/dgv,beginCaptures:{"1":{name:"keyword.control.assert.groovy"}},end:/(?=\n?$)|[\;\}]/dgv,name:"meta.declaration.assertion.groovy",patterns:[{match:/:/dgv,name:"keyword.operator.assert.expression-seperator.groovy"},{include:"#groovy-code-minus-map-keys"}]}]},"keyword-operator":{patterns:[{match:/\b(as)\b/dgv,name:"keyword.operator.as.groovy"},{match:/\b(in)\b/dgv,name:"keyword.operator.in.groovy"},{match:/\?:/dgv,name:"keyword.operator.elvis.groovy"},{match:/\.\./dgv,name:"keyword.operator.range.groovy"},{match:/->/dgv,name:"keyword.operator.arrow.groovy"},{match:/<</dgv,name:"keyword.operator.leftshift.groovy"},{match:/(?<=\P{space})\.(?=\P{space})/dgv,name:"keyword.operator.navigation.groovy"},{match:/(?<=\P{space})\?\.(?=\P{space})/dgv,name:"keyword.operator.safe-navigation.groovy"},{begin:/\?/dgv,beginCaptures:{"0":{name:"keyword.operator.ternary.groovy"}},end:/(?=(?=\n?$)|[\]\)\}])/dgv,name:"meta.evaluation.ternary.groovy",patterns:[{match:/:/dgv,name:"keyword.operator.ternary.expression-seperator.groovy"},{include:"#groovy-code-minus-map-keys"}]},{match:/==~/dgv,name:"keyword.operator.match.groovy"},{match:/=~/dgv,name:"keyword.operator.find.groovy"},{match:/\b(instanceof)\b/dgv,name:"keyword.operator.instanceof.groovy"},{match:/(==|!=|<=|>=|<=>|<>|[\<\>]|<<)/dgv,name:"keyword.operator.comparison.groovy"},{match:/=/dgv,name:"keyword.operator.assignment.groovy"},{match:/(--|\+\+)/dgv,name:"keyword.operator.increment-decrement.groovy"},{match:/([\-\%\*\+\/])/dgv,name:"keyword.operator.arithmetic.groovy"},{match:/(!|&&|\|\|)/dgv,name:"keyword.operator.logical.groovy"}]},"map-keys":{patterns:[{captures:{"1":{name:"constant.other.key.groovy"},"2":{name:"punctuation.definition.seperator.key-value.groovy"}},match:/([\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*(:)/dgv}]},"method-call":{begin:/([\$\p{L}\p{M}\p{N}\p{Pc}]+)(\()/dgv,beginCaptures:{"1":{name:"meta.method.groovy"},"2":{name:"punctuation.definition.method-parameters.begin.groovy"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.method-parameters.end.groovy"}},name:"meta.method-call.groovy",patterns:[{match:/,/dgv,name:"punctuation.definition.seperator.parameter.groovy"},{include:"#groovy-code"}]},"nest-curly":{begin:/\{/dgv,captures:{"0":{name:"punctuation.section.scope.groovy"}},end:/\}/dgv,patterns:[{include:"#nest-curly"}]},numbers:{patterns:[{match:/((0([Xx])\p{AHex}*)|([\-\+])?\b(([0-9]+\.?[0-9]*)|(\.[0-9]+))(([Ee])([\-\+])?[0-9]+)?)([DFLUdfglu]|UL|ul)?\b/dgv,name:"constant.numeric.groovy"}]},"object-types":{patterns:[{begin:/\b((?:[a-z][\p{L}\p{M}\p{N}\p{Pc}]*\.)*(?:[A-Z]+[\p{L}\p{M}\p{N}\p{Pc}]*[a-z]+[\p{L}\p{M}\p{N}\p{Pc}]*|UR[IL]))</dgv,end:/[\>[^\]\,\<\?\[\p{L}\p{M}\p{N}\p{Pc}\p{space}]]/dgv,name:"storage.type.generic.groovy",patterns:[{include:"#object-types"},{begin:/</dgv,end:/[\>[^\]\,\<\[\p{L}\p{M}\p{N}\p{Pc}\p{space}]]/dgv,name:"storage.type.generic.groovy"}]},{match:/\b(?:[A-Za-z][\p{L}\p{M}\p{N}\p{Pc}]*\.)*(?:[A-Z]+[\p{L}\p{M}\p{N}\p{Pc}]*[a-z]+[\p{L}\p{M}\p{N}\p{Pc}]*|UR[IL])\b/dgv,name:"storage.type.groovy"}]},parameters:{patterns:[{include:"#types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.parameter.method.groovy"}]},parens:{begin:/\(/dgv,end:/\)/dgv,patterns:[{include:"#groovy-code"}]},"primitive-types":{patterns:[{match:/\b(?:boolean|byte|char|short|int|float|long|double)\b/dgv,name:"storage.type.primitive.groovy"}]},"string-quoted-double":{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.groovy"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.groovy"}},name:"string.quoted.double.groovy",patterns:[{include:"#string-quoted-double-contents"}]},"string-quoted-double-contents":{patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.groovy"},{applyEndPatternLast:1,begin:/\$[\p{L}\p{M}\p{N}\p{Pc}]/dgv,end:/(?=[^\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"variable.other.interpolated.groovy",patterns:[{match:/[\p{L}\p{M}\p{N}\p{Pc}]/dgv,name:"variable.other.interpolated.groovy"},{match:/\./dgv,name:"keyword.other.dereference.groovy"}]},{begin:/\$\{/dgv,captures:{"0":{name:"punctuation.section.embedded.groovy"}},end:/\}/dgv,name:"source.groovy.embedded.source",patterns:[{include:"#nest-curly"}]}]},"string-quoted-double-multiline":{begin:/"""/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.groovy"}},end:/"""/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.groovy"}},name:"string.quoted.double.multiline.groovy",patterns:[{include:"#string-quoted-double-contents"}]},"string-quoted-single":{begin:/'/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.groovy"}},end:/'/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.groovy"}},name:"string.quoted.single.groovy",patterns:[{include:"#string-quoted-single-contents"}]},"string-quoted-single-contents":{patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.groovy"}]},"string-quoted-single-multiline":{begin:/'''/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.groovy"}},end:/'''/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.groovy"}},name:"string.quoted.single.multiline.groovy",patterns:[{include:"#string-quoted-single-contents"}]},"string-slashy":{patterns:[{begin:/\/(?=[^\/]+\/([^\>]|(?=\n?$)))/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.regexp.begin.groovy"}},end:/\//dgv,endCaptures:{"0":{name:"punctuation.definition.string.regexp.end.groovy"}},name:"string.regexp.groovy",patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.groovy"}]},{begin:/~"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.regexp.begin.groovy"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.regexp.end.groovy"}},name:"string.regexp.compiled.groovy",patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.groovy"}]}]},strings:{patterns:[{include:"#string-quoted-double-multiline"},{include:"#string-quoted-single-multiline"},{include:"#string-quoted-double"},{include:"#string-quoted-single"},{include:"#string-slashy"}]},structures:{begin:/\[/dgv,beginCaptures:{"0":{name:"punctuation.definition.structure.begin.groovy"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.definition.structure.end.groovy"}},name:"meta.structure.groovy",patterns:[{include:"#groovy-code"},{match:/,/dgv,name:"punctuation.definition.separator.groovy"}]},types:{patterns:[{match:/\b(def)\b/dgv,name:"storage.type.def.groovy"},{include:"#primitive-types"},{include:"#object-types"}]},values:{patterns:[{include:"#strings"},{include:"#numbers"},{include:"#constants"},{include:"#types"},{include:"#structures"},{include:"#method-call"},{include:"#constructor-call"}]},variables:{patterns:[{applyEndPatternLast:1,begin:/(?=(?:def|(?:boolean|byte|char|short|int|float|long|double)|(?:[a-z][\p{L}\p{M}\p{N}\p{Pc}]*\.)*[A-Z]+[\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}+[\]\,\<\>\[_\p{L}\p{M}\p{N}\p{Pc}\p{Nd}\p{space}]+(?:=|(?=\n?$)))/dgv,end:/;|(?=\n?$)/dgv,name:"meta.definition.variable.groovy",patterns:[{match:/\p{space}/dgv},{captures:{"1":{name:"constant.variable.groovy"}},match:/([0-9A-Z_]+)\p{space}+(?==)/dgv},{captures:{"1":{name:"meta.definition.variable.name.groovy"}},match:/([\p{L}\p{M}\p{N}\p{Pc}][^\,\p{space}]*)\p{space}+(?==)/dgv},{captures:{"1":{name:"storage.type.groovy"}},match:/: ([\p{L}\p{M}\p{N}\p{Pc}]+)/dgv,patterns:[{include:"#types"}]},{begin:/=/dgv,beginCaptures:{"0":{name:"keyword.operator.assignment.groovy"}},end:/(?=\n?$)/dgv,patterns:[{include:"#groovy-code"}]},{captures:{"1":{name:"meta.definition.variable.name.groovy"}},match:/([\p{L}\p{M}\p{N}\p{Pc}][^\=\p{space}]*)(?=\p{space}*((?=\n?$)|;))/dgv},{include:"#groovy-code"}]}]}},scopeName:"source.nextflow-groovy",displayName:undefined,embeddedLangs:undefined,aliases:undefined})
|
|
2
|
+
|
|
3
|
+
export default [
|
|
4
|
+
lang
|
|
5
|
+
]
|
package/dist/nextflow.mjs
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import nextflow_groovy from './nextflow-groovy.mjs'
|
|
2
|
+
|
|
3
|
+
const lang = Object.freeze({displayName:"Nextflow",name:"nextflow",patterns:[{include:"#nextflow"}],repository:{"enum-def":{begin:/^\p{space}*(enum)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*\{/dgv,beginCaptures:{"1":{name:"keyword.nextflow"},"2":{name:"storage.type.groovy"}},end:/\}/dgv,patterns:[{include:"source.nextflow-groovy#groovy"},{include:"#enum-values"}]},"enum-values":{patterns:[{begin:/(?<=;|^)\p{space}*\b([0-9A-Z_]+)(?=\p{space}*(?:[\(\,\}]|(?=\n?$)))/dgv,beginCaptures:{"1":{name:"constant.enum.name.groovy"}},end:/,|(?=\})|^(?!\p{space}*[\p{L}\p{M}\p{N}\p{Pc}]+\p{space}*(?:,|(?=\n?$)))/dgv,patterns:[{begin:/\(/dgv,end:/\)/dgv,name:"meta.enum.value.groovy",patterns:[{match:/,/dgv,name:"punctuation.definition.seperator.parameter.groovy"},{include:"#groovy-code"}]}]}]},"function-body":{patterns:[{match:/\p{space}/dgv},{begin:/(?=[\<\p{L}\p{M}\p{N}\p{Pc}][^\(]*\p{space}+[\$\<\p{L}\p{M}\p{N}\p{Pc}]+\p{space}*\()/dgv,end:/(?=[\$\p{L}\p{M}\p{N}\p{Pc}]+\p{space}*\()/dgv,name:"meta.method.return-type.java",patterns:[{include:"source.nextflow-groovy#types"}]},{begin:/([\$\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*\(/dgv,beginCaptures:{"1":{name:"entity.name.function.nextflow"}},end:/\)/dgv,name:"meta.definition.method.signature.java",patterns:[{begin:/(?=[^\)])/dgv,end:/(?=\))/dgv,name:"meta.method.parameters.groovy",patterns:[{begin:/(?=[^\)\,])/dgv,end:/(?=[\)\,])/dgv,name:"meta.method.parameter.groovy",patterns:[{match:/,/dgv,name:"punctuation.definition.separator.groovy"},{begin:/=/dgv,beginCaptures:{"0":{name:"keyword.operator.assignment.groovy"}},end:/(?=[\)\,])/dgv,name:"meta.parameter.default.groovy",patterns:[{include:"source.nextflow-groovy#groovy-code"}]},{include:"source.nextflow-groovy#parameters"}]}]}]},{begin:/(?=<)/dgv,end:/(?=\p{space})/dgv,name:"meta.method.paramerised-type.groovy",patterns:[{begin:/</dgv,end:/>/dgv,name:"storage.type.parameters.groovy",patterns:[{include:"source.nextflow-groovy#types"},{match:/,/dgv,name:"punctuation.definition.seperator.groovy"}]}]},{begin:/\{/dgv,end:/(?=\})/dgv,name:"meta.method.body.java",patterns:[{include:"source.nextflow-groovy#groovy-code"}]}]},"function-def":{applyEndPatternLast:1,begin:/(?<=;|^|\{)(?=\p{space}*(?:def|(?:(?:boolean|byte|char|short|int|float|long|double)|@?(?:[A-Za-z][\p{L}\p{M}\p{N}\p{Pc}]*\.)*[A-Z]+[\p{L}\p{M}\p{N}\p{Pc}]*)[\]\[]*(?:<[^\n]*>)?n)\p{space}+([^\=]+\p{space}+)?[\p{L}\p{M}\p{N}\p{Pc}]+\p{space}*\()/dgv,end:/\}|(?=[^\{])/dgv,name:"meta.definition.method.groovy",patterns:[{include:"#function-body"}]},"include-decl":{patterns:[{match:/^\b(include)\b/dgv,name:"keyword.nextflow"},{match:/\b(from)\b/dgv,name:"keyword.nextflow"}]},nextflow:{patterns:[{include:"#record-def"},{include:"#enum-def"},{include:"#function-def"},{include:"#process-def"},{include:"#workflow-def"},{include:"#params-def"},{include:"#output-def"},{include:"#include-decl"},{include:"source.nextflow-groovy"}]},"output-def":{begin:/^\p{space}*(output)\p{space}*\{/dgv,beginCaptures:{"1":{name:"keyword.nextflow"}},end:/\}/dgv,name:"output.nextflow",patterns:[{include:"source.nextflow-groovy#groovy"}]},"params-def":{begin:/^\p{space}*(params)\p{space}*\{/dgv,beginCaptures:{"1":{name:"keyword.nextflow"}},end:/\}/dgv,name:"params.nextflow",patterns:[{include:"source.nextflow-groovy#groovy"}]},"process-body":{patterns:[{match:/(?:input|output|when|script|shell|exec):/dgv,name:"constant.block.nextflow"},{match:/\b(val|env|file|path|stdin|stdout|tuple)([\(\p{space}])/dgv,name:"entity.name.function.nextflow"},{include:"source.nextflow-groovy#groovy"}]},"process-def":{begin:/^\p{space}*(process)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*\{/dgv,beginCaptures:{"1":{name:"keyword.nextflow"},"2":{name:"entity.name.function.nextflow"}},end:/\}/dgv,name:"process.nextflow",patterns:[{include:"#process-body"}]},"record-def":{begin:/^\p{space}*(record)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*\{/dgv,beginCaptures:{"1":{name:"keyword.nextflow"},"2":{name:"storage.type.groovy"}},end:/\}/dgv,name:"record.nextflow",patterns:[{include:"source.nextflow-groovy#groovy"}]},"workflow-body":{patterns:[{match:/(?:take|main|emit|publish):/dgv,name:"constant.block.nextflow"},{include:"source.nextflow-groovy#groovy"}]},"workflow-def":{begin:/^\p{space}*(workflow)(?:\p{space}+([\p{L}\p{M}\p{N}\p{Pc}]+))?\p{space}*\{/dgv,beginCaptures:{"1":{name:"keyword.nextflow"},"2":{name:"entity.name.function.nextflow"}},end:/\}/dgv,name:"workflow.nextflow",patterns:[{include:"#workflow-body"}]}},scopeName:"source.nextflow",embeddedLangs:["nextflow-groovy"],aliases:["nf"]})
|
|
2
4
|
|
|
3
5
|
export default [
|
|
6
|
+
...nextflow_groovy,
|
|
4
7
|
lang
|
|
5
8
|
]
|
package/dist/nushell.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EmulatedRegExp } from 'oniguruma-to-es'
|
|
2
2
|
|
|
3
|
-
const lang = Object.freeze({displayName:"nushell",name:"nushell",patterns:[{include:"#define-variable"},{include:"#define-alias"},{include:"#function"},{include:"#extern"},{include:"#module"},{include:"#use-module"},{include:"#expression"},{include:"#comment"}],repository:{binary:{begin:/\b(0x)(\[)/dgv,beginCaptures:{"1":{name:"constant.numeric.nushell"},"2":{name:"meta.brace.square.begin.nushell"}},end:/\]/dgv,endCaptures:{"0":{name:"meta.brace.square.begin.nushell"}},name:"constant.binary.nushell",patterns:[{match:/\p{AHex}{2}/dgv,name:"constant.numeric.nushell"}]},"braced-expression":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.section.block.begin.bracket.curly.nushell"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.section.block.end.bracket.curly.nushell"}},name:"meta.expression.braced.nushell",patterns:[{begin:/(?<=\{)\p{space}*\|/dgv,end:/\|/dgv,name:"meta.closure.parameters.nushell",patterns:[{include:"#function-parameter"}]},{captures:{"1":{name:"variable.other.nushell"},"2":{name:"keyword.control.nushell"}},match:/([\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*(:)\p{space}*/dgv},{captures:{"1":{name:"variable.other.nushell"},"2":{name:"variable.other.nushell",patterns:[{include:"#paren-expression"}]},"3":{name:"keyword.control.nushell"}},match:/(\$"((?:[^"\\]|\\[^\n])*)")\p{space}*(:)\p{space}*/dgv,name:"meta.record-entry.nushell"},{captures:{"1":{name:"variable.other.nushell"},"2":{name:"keyword.control.nushell"}},match:/("(?:[^"\\]|\\[^\n])*")\p{space}*(:)\p{space}*/dgv,name:"meta.record-entry.nushell"},{captures:{"1":{name:"variable.other.nushell"},"2":{name:"variable.other.nushell",patterns:[{include:"#paren-expression"}]},"3":{name:"keyword.control.nushell"}},match:/(\$'([^']*)')\p{space}*(:)\p{space}*/dgv,name:"meta.record-entry.nushell"},{captures:{"1":{name:"variable.other.nushell"},"2":{name:"keyword.control.nushell"}},match:/('[^']*')\p{space}*(:)\p{space}*/dgv,name:"meta.record-entry.nushell"},{include:"#spread"},{include:"source.nushell"}]},command:{begin:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(?:(\^)|(?![\$0-9]))([\!\.\p{L}\p{M}\p{N}\p{Pc}]+(?: (?!-)[\-\!\.\p{L}\p{M}\p{N}\p{Pc}]+(?:(?=[ \)])|(?=\n?$))|[\-\!\.\p{L}\p{M}\p{N}\p{Pc}]+)*|(?<=\^)\$?(?:"[^"]+"|'[^']+'))/dgv,beginCaptures:{"1":{name:"keyword.operator.nushell"},"2":{patterns:[{include:"#control-keywords"},{captures:{"0":{name:"keyword.other.builtin.nushell"}},match:/(?:ansi|char) [\p{L}\p{M}\p{N}\p{Pc}]+/dgv},{captures:{"1":{name:"keyword.other.builtin.nushell"},"2":{patterns:[{include:"#value"}]}},match:/*@__PURE__*/ new EmulatedRegExp("(a(?:l(?:ias|l)|n(?:si(?: (?:gradient|link|strip))?|y)|ppend|st|ttr(?: (?:category|deprecated|example|search-terms))?)|b(?:its(?: (?:and|not|or|ro[lr]|sh[lr]|xor))?|reak|ytes(?: (?:a(?:dd|t)|build|collect|ends-with|index-of|length|re(?:move|place|verse)|s(?:plit|tarts-with)))?)|c(?:al|d|h(?:ar|unk(?:-by|s))|lear|o(?:l(?:lect|umns)|m(?:mandline(?: (?:edit|get-cursor|set-cursor))?|p(?:act|lete))|n(?:fig(?: (?:env|flatten|nu|reset|use-colors))?|st|tinue))|p)|d(?:ate(?: (?:f(?:ormat|rom-human)|humanize|list-timezone|now|to-timezone))?|e(?:bug(?: (?:e(?:nv|xperimental-options)|info|profile))?|code(?: (?:base(?:32(?:hex)?|64)|hex))?|f(?:ault)?|scribe|tect(?: columns)?)|o|rop(?: (?:column|nth))?|t(?: (?:add|diff|format|now|part|to|utcnow))?|u)|e(?:ach(?: while)?|cho|moji|n(?:code(?: (?:base(?:32(?:hex)?|64)|hex))?|umerate)|rror(?: make)?|very|x(?:ec|it|p(?:l(?:ain|ore)|ort(?: (?:alias|const|def|extern|module|use)|-env)?)|tern))|f(?:i(?:l(?:[el]|ter)|nd|rst)|latten|or(?:mat(?: (?:bits|d(?:ate|uration)|filesize|number|pattern))?)?|rom(?: (?:csv|eml|i(?:cs|ni)|json|msgpackz?|nuon|ods|p(?:arquet|list)|ssv|t(?:oml|sv)|url|vcf|x(?:lsx|ml)|ya?ml))?)|g(?:e(?:nerate|t)|lob|r(?:id|oup-by)|stat)|h(?:ash(?: (?:md5|sha256))?|e(?:aders|lp(?: (?:aliases|commands|e(?:scapes|xterns)|modules|operators|pipe-and-redirect))?)|i(?:de(?:-env)?|sto(?:gram|ry(?: (?:import|session))?))|ttp(?: (?:delete|get|head|options|p(?:atch|ost|ut)))?)|i(?:f|gnore|n(?:c|put(?: list(?:en)?)?|s(?:ert|pect)|t(?:erleave|o(?: (?:b(?:inary|ool)|cell-path|d(?:atetime|uration)|f(?:ilesize|loat)|glob|int|record|s(?:qlite|tring)|value))?))|s-(?:admin|empty|not-empty|terminal)|tems)|j(?:o(?:b(?: (?:flush|id|kill|list|recv|s(?:end|pawn)|tag|unfreeze))?|in)|son path|walk)|k(?:eybindings(?: (?:default|list(?:en)?))?|ill)|l(?:ast|e(?:ngth|t(?:-env)?)|ines|o(?:ad-env|op)|s)|m(?:at(?:ch|h(?: (?:a(?:bs|rc(?:cosh?|sinh?|tanh?)|vg)|c(?:eil|osh?)|exp|floor|l(?:n|og)|m(?:ax|edian|in|ode)|product|round|s(?:inh?|qrt|tddev|um)|tanh?|variance))?)|e(?:rge(?: deep)?|tadata(?: (?:access|set))?)|k(?:dir|temp)|o(?:dule|ve)|ut|v)|nu-(?:check|highlight)|o(?:pen|verlay(?: (?:hide|list|new|use))?)|p(?:a(?:nic|r(?:-each|se)|th(?: (?:basename|dirname|ex(?:ists|pand)|join|parse|relative-to|s(?:elf|plit)|type))?)|lugin(?: (?:add|list|rm|stop|use))?|o(?:lars(?: (?:a(?:gg(?:-groups)?|ll-(?:false|true)|ppend|rg-(?:m(?:ax|in)|sort|true|unique|where)|s(?:-date(?:time)?)?)|c(?:a(?:che|st)|o(?:l(?:lect|umns)?|n(?:cat(?:-str)?|tains|vert-time-zone)|unt(?:-null)?)|u(?:mulative|t))|d(?:atepart|ecimal|rop(?:-(?:duplicates|nulls))?|ummies)|exp(?:lode|r-not)|f(?:etch|i(?:l(?:l-n(?:an|ull)|ter(?:-with)?)|rst)|latten)|g(?:et(?:-(?:day|hour|m(?:inute|onth)|nanosecond|ordinal|second|week(?:day)?|year))?|roup-by)|horizontal|i(?:mplode|nt(?:eger|o-(?:d(?:f|type)|lazy|nu|repr|schema))|s-(?:duplicated|in|n(?:ot-n|)ull|unique))|join(?:-where)?|l(?:ast|en|i(?:st-contains|t)|owercase)|m(?:a(?:th|x)|e(?:an|dian)|in)|n(?:-unique|ot)|o(?:pen|therwise|ver)|p(?:ivot|rofile)|q(?:cut|u(?:antile|ery))|r(?:e(?:name|place(?:-time-zone)?|verse)|olling)|s(?:a(?:mple|ve)|chema|e(?:lect|t(?:-with-idx)?)|h(?:ape|ift)|lice|ort-by|t(?:d|ore-(?:get|ls|rm)|r(?:-(?:join|lengths|replace(?:-all)?|s(?:lice|plit|trip-chars))|ftime|uct-json-encode))|um(?:mary)?)|t(?:ake|runcate)|u(?:n(?:ique|nest|pivot)|ppercase)|va(?:lue-counts|r)|w(?:hen|ith-column)))?|rt)|r(?:epend|int)|s)|query(?: (?:db|git|json|web(?:page-info)?|xml))?|r(?:andom(?: (?:b(?:inary|ool)|chars|dice|float|int|uuid))?|e(?:duce|g(?:ex|istry(?: query)?)|ject|name|turn|verse)|m|o(?:ll(?: (?:down|left|right|up))?|tate)|un-(?:ex|in)ternal)|s(?:ave|c(?:hema|ope(?: (?:aliases|commands|e(?:ngine-stats|xterns)|modules|variables))?)|e(?:lect|q(?: (?:char|date))?)|huffle|kip(?: (?:until|while))?|l(?:eep|ice)|o(?:rt(?:-by)?|urce(?:-env)?)|plit(?: (?:c(?:ell-path|hars|olumn)|list|row|words))?|t(?:art|or(?: (?:create|delete|export|i(?:mport|nsert)|open|reset|update))?|r(?: (?:c(?:a(?:mel-case|pitalize)|o(?:mpress|ntains))|d(?:e(?:compress|dent|unicode)|istance|owncase)|e(?:nds-with|xpand)|inde(?:nt|x-of)|join|kebab-case|length|pascal-case|re(?:place|verse)|s(?:creaming-snake-case|hl-(?:quote|split)|imilarity|lug|nake-case|ta(?:rts-with|ts)|ubstring)|t(?:itle-case|rim)|upcase|wrap)|ess_internals)?)|ys(?: (?:cpu|disks|host|mem|net|temp|users))?)|t(?:a(?:ble|ke(?: (?:until|while))?)|e(?:e|rm(?: (?:query|size))?)|imeit|o(?: (?:csv|html|json|m(?:d|sgpackz?)|nuon|p(?:arquet|list)|t(?:ext|oml|sv)|xml|ya?ml)|uch)?|r(?:anspose|y)|utor)|u(?:limit|n(?:ame|iq(?:-by)?)|p(?:date(?: cells)?|sert)|rl(?: (?:build-query|decode|encode|join|parse|split-query))?|se)|v(?:alues|ersion(?: check)?|iew(?: (?:blocks|files|ir|s(?:ource|pan)))?)|w(?:atch|h(?:ere|i(?:ch|le)|oami)|i(?:ndow|th-env)|rap)|zip)(?![\\-\\p{L}\\p{M}\\p{N}\\p{Pc}])( ([^\\n]*))?","dgv",{"lazyCompile":true})},{captures:{"1":{patterns:[{include:"#paren-expression"}]}},match:/(?<=\^)(?:\$("[^"]+"|'[^']+')|"[^"]+"|'[^']+')/dgv,name:"entity.name.type.external.nushell"},{captures:{"1":{name:"entity.name.type.external.nushell"},"2":{patterns:[{include:"#value"}]}},match:/([\.\p{L}\p{M}\p{N}\p{Pc}]+(?:-[\!\.\p{L}\p{M}\p{N}\p{Pc}]+)*)(?: ([^\n]*))?/dgv},{include:"#value"}]}},end:/(?=[\)\;\|\}])|(?=\n?$)/dgv,name:"meta.command.nushell",patterns:[{include:"#parameters"},{include:"#spread"},{include:"#value"}]},comment:{match:/(#[^\n]*)(?=\n?$)/dgv,name:"comment.nushell"},"constant-keywords":{match:/\b(?:true|false|null)\b/dgv,name:"constant.language.nushell"},"constant-value":{patterns:[{include:"#constant-keywords"},{include:"#datetime"},{include:"#numbers"},{include:"#numbers-hexa"},{include:"#numbers-octal"},{include:"#numbers-binary"},{include:"#binary"}]},"control-keywords":{match:/(?<![\--\:A-Z\\_a-z])(?:break|continue|else(?: if)?|for|if|loop|mut|return|try|while)(?![\--\:A-Z\\_a-z])/dgv,name:"keyword.control.nushell"},datetime:{match:/\b\p{Nd}{4}-\p{Nd}{2}-\p{Nd}{2}(?:T\p{Nd}{2}:\p{Nd}{2}:\p{Nd}{2}(?:\.\p{Nd}+)?(?:\+\p{Nd}{2}:?\p{Nd}{2}|Z)?)?\b/dgv,name:"constant.numeric.nushell"},"define-alias":{captures:{"1":{name:"entity.name.function.nushell"},"2":{name:"entity.name.type.nushell"},"3":{patterns:[{include:"#operators"}]}},match:/((?:export )?alias)\p{space}+([\-\!\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*(=)/dgv},"define-variable":{captures:{"1":{name:"keyword.other.nushell"},"2":{name:"variable.other.nushell"},"3":{patterns:[{include:"#operators"}]}},match:/(let|mut|(?:export\p{space}+)?const)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}+(=)/dgv},expression:{patterns:[{include:"#pre-command"},{include:"#for-loop"},{include:"#operators"},{match:/\|/dgv,name:"keyword.control.nushell"},{include:"#control-keywords"},{include:"#constant-value"},{include:"#string-raw"},{include:"#command"},{include:"#value"}]},extern:{begin:/((?:export\p{space}+)?extern)\p{space}+([\-\p{L}\p{M}\p{N}\p{Pc}]+|"[\- \p{L}\p{M}\p{N}\p{Pc}]+")/dgv,beginCaptures:{"1":{name:"entity.name.function.nushell"},"2":{name:"entity.name.type.nushell"}},end:/(?<=\])/dgv,endCaptures:{"0":{name:"punctuation.definition.function.end.nushell"}},patterns:[{include:"#function-parameters"}]},"for-loop":{begin:/(for)\p{space}+(\$?[\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}+(in)\p{space}+([^\n]+)\p{space}*(\{)/dgv,beginCaptures:{"1":{name:"keyword.other.nushell"},"2":{name:"variable.other.nushell"},"3":{name:"keyword.other.nushell"},"4":{patterns:[{include:"#value"}]},"5":{name:"punctuation.section.block.begin.bracket.curly.nushell"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.section.block.end.bracket.curly.nushell"}},name:"meta.for-loop.nushell",patterns:[{include:"source.nushell"}]},function:{begin:/((?:export\p{space}+)?def)(?:\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{L}\p{M}\p{N}\p{Pc}]+"|'[\- \p{L}\p{M}\p{N}\p{Pc}]+'|`[\- \p{L}\p{M}\p{N}\p{Pc}]+`)(?:\p{space}+(--[\p{L}\p{M}\p{N}\p{Pc}]+(?:\p{space}+--[\p{L}\p{M}\p{N}\p{Pc}]+)*))?/dgv,beginCaptures:{"1":{name:"entity.name.function.nushell"},"2":{name:"entity.name.function.nushell"},"3":{name:"entity.name.type.nushell"},"4":{name:"entity.name.function.nushell"}},end:/(?<=\})/dgv,patterns:[{include:"#function-parameters"},{include:"#function-body"},{include:"#function-inout"}]},"function-body":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.function.begin.nushell"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.function.end.nushell"}},name:"meta.function.body.nushell",patterns:[{include:"source.nushell"}]},"function-inout":{patterns:[{include:"#types"},{match:/->/dgv,name:"keyword.operator.nushell"},{include:"#function-multiple-inout"}]},"function-multiple-inout":{begin:/(?<=\]\p{space}*)(:)\p{space}+(\[)/dgv,beginCaptures:{"1":{name:"punctuation.definition.in-out.nushell"},"2":{name:"meta.brace.square.begin.nushell"}},end:/\]/dgv,endCaptures:{"0":{name:"meta.brace.square.end.nushell"}},patterns:[{include:"#types"},{captures:{"1":{name:"punctuation.separator.nushell"}},match:/\p{space}*(,)\p{space}*/dgv},{captures:{"1":{name:"keyword.operator.nushell"}},match:/\p{space}+(->)\p{space}+/dgv}]},"function-parameter":{patterns:[{captures:{"1":{name:"keyword.control.nushell"}},match:/(-{0,2}|\.{3})[\-\p{L}\p{M}\p{N}\p{Pc}]+(?:\((-[\?\p{L}\p{M}\p{N}\p{Pc}])\))?/dgv,name:"variable.parameter.nushell"},{begin:/\??:\p{space}*/dgv,end:/(?=\p{space}+(?:-{0,2}|\.{3})[\-\p{L}\p{M}\p{N}\p{Pc}]+|\p{space}*(?:[\]\#\,\=\@\|]|(?=\n?$)))/dgv,patterns:[{include:"#types"}]},{begin:/@(?=["'])/dgv,end:/(?<=["'])/dgv,patterns:[{include:"#string"}]},{begin:/=\p{space}*/dgv,end:/(?=\p{space}+-{0,2}[\-\p{L}\p{M}\p{N}\p{Pc}]+|\p{space}*(?:[\]\#\,\|]|(?=\n?$)))/dgv,name:"default.value.nushell",patterns:[{include:"#value"}]}]},"function-parameters":{begin:/\[/dgv,beginCaptures:{"0":{name:"meta.brace.square.begin.nushell"}},end:/\]/dgv,endCaptures:{"0":{name:"meta.brace.square.end.nushell"}},name:"meta.function.parameters.nushell",patterns:[{include:"#function-parameter"},{include:"#comment"}]},"internal-variables":{match:/\$(?:nu|env)\b/dgv,name:"variable.language.nushell"},keyword:{match:/def(?:-env)?/dgv,name:"keyword.other.nushell"},module:{begin:/((?:export\p{space}+)?module)\p{space}+([\-\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*\{/dgv,beginCaptures:{"1":{name:"entity.name.function.nushell"},"2":{name:"entity.name.namespace.nushell"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.module.end.nushell"}},name:"meta.module.nushell",patterns:[{include:"source.nushell"}]},numbers:{match:/*@__PURE__*/ new EmulatedRegExp("(?<![\\-\\p{L}\\p{M}\\p{N}\\p{Pc}])(?:(?=(_*))\\1)[\\-\\+]?(?:(?=(_*))\\2)(?:(?:NaN|infinity|inf)(?:(?=(_*))\\3)|(?:\\p{Nd}(?:(?=([_\\p{Nd}]*))\\4)\\.?|\\.(?:(?=(_*))\\5)\\p{Nd})(?:(?=([_\\p{Nd}]*))\\6)(?:E(?:(?=(_*))\\7)[\\-\\+]?(?:(?=(_*))\\8)\\p{Nd}(?:(?=([_\\p{Nd}]*))\\9))?)(?:ns|us|µs|ms|sec|min|hr|day|wk|b|kb|mb|gb|tb|pt|eb|zb|kib|mib|gib|tib|pit|eib|zib)?(?:(?![\\.\\p{L}\\p{M}\\p{N}\\p{Pc}])|(?=\\.\\.))","dgiv",{"hiddenCaptures":[1,2,3,4,5,6,7,8,9]}),name:"constant.numeric.nushell"},"numbers-binary":{match:/*@__PURE__*/ new EmulatedRegExp("(?<![\\-\\p{L}\\p{M}\\p{N}\\p{Pc}])(?:(?=(_*))\\1)0(?:(?=(_*))\\2)b(?:(?=(_*))\\3)[01](?:(?=([01_]*))\\4)(?![\\.\\p{L}\\p{M}\\p{N}\\p{Pc}])","dgv",{"hiddenCaptures":[1,2,3,4]}),name:"constant.numeric.nushell"},"numbers-hexa":{match:/*@__PURE__*/ new EmulatedRegExp("(?<![\\-\\p{L}\\p{M}\\p{N}\\p{Pc}])(?:(?=(_*))\\1)0(?:(?=(_*))\\2)x(?:(?=(_*))\\3)\\p{AHex}(?:(?=([_\\p{AHex}]*))\\4)(?![\\.\\p{L}\\p{M}\\p{N}\\p{Pc}])","dgv",{"hiddenCaptures":[1,2,3,4]}),name:"constant.numeric.nushell"},"numbers-octal":{match:/*@__PURE__*/ new EmulatedRegExp("(?<![\\-\\p{L}\\p{M}\\p{N}\\p{Pc}])(?:(?=(_*))\\1)0(?:(?=(_*))\\2)o(?:(?=(_*))\\3)[0-7](?:(?=([0-7_]*))\\4)(?![\\.\\p{L}\\p{M}\\p{N}\\p{Pc}])","dgv",{"hiddenCaptures":[1,2,3,4]}),name:"constant.numeric.nushell"},operators:{patterns:[{include:"#operators-word"},{include:"#operators-symbols"},{include:"#ranges"}]},"operators-symbols":{match:/(?<= )(?:[\-\*\+\/]=?|\/\/|\*\*|!=|[\<\=\>]=?|[\!\=]~|\+\+=?)(?= |(?=\n?$))/dgv,name:"keyword.control.nushell"},"operators-word":{match:/(?<=[ \(])(?:mod|in|not-(?:in|like|has)|not|and|or|xor|bit-(?:or|and|xor|shl|shr)|starts-with|ends-with|like|has)(?=[ \)]|(?=\n?$))/dgv,name:"keyword.control.nushell"},parameters:{captures:{"1":{name:"keyword.control.nushell"}},match:/(?<=\p{space})(-{1,2})[\-\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.parameter.nushell"},"paren-expression":{begin:/\(/dgv,beginCaptures:{"0":{name:"meta.brace.round.begin.nushell"}},end:/\)/dgv,endCaptures:{"0":{name:"meta.brace.round.end.nushell"}},name:"meta.expression.parenthesis.nushell",patterns:[{include:"#expression"}]},"pre-command":{begin:/([\p{L}\p{M}\p{N}\p{Pc}]+)(=)/dgv,beginCaptures:{"1":{name:"variable.other.nushell"},"2":{patterns:[{include:"#operators"}]}},end:/(?=\p{space}+)/dgv,patterns:[{include:"#value"}]},ranges:{match:/\.\.<?/dgv,name:"keyword.control.nushell"},spread:{match:/\.\.\.(?=[^\]\}\p{space}])/dgv,name:"keyword.control.nushell"},string:{patterns:[{include:"#string-single-quote"},{include:"#string-backtick"},{include:"#string-double-quote"},{include:"#string-interpolated-double"},{include:"#string-interpolated-single"},{include:"#string-raw"},{include:"#string-bare"}]},"string-backtick":{begin:/`/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.nushell"}},end:/`/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.nushell"}},name:"string.quoted.single.nushell"},"string-bare":{match:/[^"\#\$'\(\,\;\[\{\|\p{space}][^\]"'\(\)\,\;\[\{\|\}\p{space}]*/dgv,name:"string.bare.nushell"},"string-double-quote":{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.nushell"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.nushell"}},name:"string.quoted.double.nushell",patterns:[{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv},{include:"#string-escape"}]},"string-escape":{match:/\\(?:["'\/\\bfnrt]|u\p{AHex}{4})/dgv,name:"constant.character.escape.nushell"},"string-interpolated-double":{begin:/\$"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.nushell"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.nushell"}},name:"string.interpolated.double.nushell",patterns:[{match:/\\[\(\)]/dgv,name:"constant.character.escape.nushell"},{include:"#string-escape"},{include:"#paren-expression"}]},"string-interpolated-single":{begin:/\$'/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.nushell"}},end:/'/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.nushell"}},name:"string.interpolated.single.nushell",patterns:[{include:"#paren-expression"}]},"string-raw":{begin:/r(#+)'/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.nushell"}},end:/'\1()/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.nushell"}},name:"string.raw.nushell"},"string-single-quote":{begin:/'/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.nushell"}},end:/'/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.nushell"}},name:"string.quoted.single.nushell"},table:{begin:/\[/dgv,beginCaptures:{"0":{name:"meta.brace.square.begin.nushell"}},end:/\]/dgv,endCaptures:{"0":{name:"meta.brace.square.end.nushell"}},name:"meta.table.nushell",patterns:[{include:"#spread"},{include:"#value"},{match:/,/dgv,name:"punctuation.separator.nushell"}]},types:{patterns:[{begin:/\b(list)\p{space}*</dgv,beginCaptures:{"1":{name:"entity.name.type.nushell"}},end:/>/dgv,name:"meta.list.nushell",patterns:[{include:"#types"}]},{begin:/\b(record)\p{space}*</dgv,beginCaptures:{"1":{name:"entity.name.type.nushell"}},end:/>/dgv,name:"meta.record.nushell",patterns:[{captures:{"1":{name:"variable.parameter.nushell"}},match:/([\-\p{L}\p{M}\p{N}\p{Pc}]+|"[\- \p{L}\p{M}\p{N}\p{Pc}]+"|'[^']+')\p{space}*:\p{space}*/dgv},{include:"#types"}]},{match:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,name:"entity.name.type.nushell"}]},"use-module":{patterns:[{captures:{"1":{name:"entity.name.function.nushell"},"2":{name:"entity.name.namespace.nushell"},"3":{name:"keyword.other.nushell"}},match:/^\p{space}*((?:export )?use)\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}]+|"[\- \p{L}\p{M}\p{N}\p{Pc}]+"|'[\- \p{L}\p{M}\p{N}\p{Pc}]+'|\*))?\p{space}*;?(?=\n?$)/dgv},{begin:/^\p{space}*((?:export )?use)\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}*\[/dgv,beginCaptures:{"1":{name:"entity.name.function.nushell"},"2":{name:"entity.name.namespace.nushell"}},end:/(\])\p{space}*;?\p{space}*(?=\n?$)/dgv,endCaptures:{"1":{name:"meta.brace.square.end.nushell"}},patterns:[{captures:{"1":{name:"keyword.other.nushell"}},match:/([\-\p{L}\p{M}\p{N}\p{Pc}]+|"[\- \p{L}\p{M}\p{N}\p{Pc}]+"|'[\- \p{L}\p{M}\p{N}\p{Pc}]+'|\*),?/dgv},{include:"#comment"}]},{captures:{"2":{name:"entity.name.function.nushell"},"3":{name:"string.bare.nushell",patterns:[{captures:{"1":{name:"entity.name.namespace.nushell"}},match:/([\- \p{L}\p{M}\p{N}\p{Pc}]+)(?:\.nu)?(?=(?=\n?$)|["'])/dgv}]},"4":{name:"keyword.other.nushell"}},match:/*@__PURE__*/ new EmulatedRegExp("(?<path>(?:[\\/\\\\]|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\- \\p{L}\\p{M}\\p{N}\\p{Pc}]+(?:\\.nu)?){0}^\\p{space}*((?:export )?use)\\p{space}+(\"((?:[\\/\\\\]|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\- \\p{L}\\p{M}\\p{N}\\p{Pc}]+(?:\\.nu)?)\"|'((?:[\\/\\\\]|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\- \\p{L}\\p{M}\\p{N}\\p{Pc}]+(?:\\.nu)?)'|(?![\"'])((?:[\\/\\\\]|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\- \\p{L}\\p{M}\\p{N}\\p{Pc}]+(?:\\.nu)?))(?:\\p{space}+([\\-\\p{L}\\p{M}\\p{N}\\p{Pc}]+|\"[\\- \\p{L}\\p{M}\\p{N}\\p{Pc}]+\"|'[^']+'|\\*))?\\p{space}*;?(?=\\n?$)","dgv",{"hiddenCaptures":[4,5,6],"transfers":[[1,[4,5,6]]]})},{begin:/*@__PURE__*/ new EmulatedRegExp("(?<path>(?:[\\/\\\\]|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\- \\p{L}\\p{M}\\p{N}\\p{Pc}]+(?:\\.nu)?){0}^\\p{space}*((?:export )?use)\\p{space}+(\"((?:[\\/\\\\]|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\- \\p{L}\\p{M}\\p{N}\\p{Pc}]+(?:\\.nu)?)\"|'((?:[\\/\\\\]|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\- \\p{L}\\p{M}\\p{N}\\p{Pc}]+(?:\\.nu)?)'|(?![\"'])((?:[\\/\\\\]|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\- \\p{L}\\p{M}\\p{N}\\p{Pc}]+(?:\\.nu)?))\\p{space}+\\[","dgv",{"hiddenCaptures":[4,5,6],"transfers":[[1,[4,5,6]]]}),beginCaptures:{"2":{name:"entity.name.function.nushell"},"3":{name:"string.bare.nushell",patterns:[{captures:{"1":{name:"entity.name.namespace.nushell"}},match:/([\- \p{L}\p{M}\p{N}\p{Pc}]+)(?:\.nu)?(?=(?=\n?$)|["'])/dgv}]}},end:/(\])\p{space}*;?\p{space}*(?=\n?$)/dgv,endCaptures:{"1":{name:"meta.brace.square.end.nushell"}},patterns:[{captures:{"0":{name:"keyword.other.nushell"}},match:/([\-\p{L}\p{M}\p{N}\p{Pc}]+|"[\- \p{L}\p{M}\p{N}\p{Pc}]+"|'[\- \p{L}\p{M}\p{N}\p{Pc}]+'|\*),?/dgv},{include:"#comment"}]},{captures:{"0":{name:"entity.name.function.nushell"}},match:/^\p{space}*(?:export )?use\b/dgv}]},value:{patterns:[{include:"#variables"},{include:"#variable-fields"},{include:"#control-keywords"},{include:"#constant-value"},{include:"#table"},{include:"#operators"},{include:"#paren-expression"},{include:"#braced-expression"},{include:"#string"},{include:"#comment"}]},"variable-fields":{match:/(?<=[\]\)\}])(?:\.(?:[\-\p{L}\p{M}\p{N}\p{Pc}]+|"[\- \p{L}\p{M}\p{N}\p{Pc}]+"))+/dgv,name:"variable.other.nushell"},variables:{captures:{"1":{patterns:[{include:"#internal-variables"},{match:/\$[^\n]+/dgv,name:"variable.other.nushell"}]},"2":{name:"variable.other.nushell"}},match:/(\$[0-9A-Z_a-z]+)((?:\.(?:[\-\p{L}\p{M}\p{N}\p{Pc}]+|"[\- \p{L}\p{M}\p{N}\p{Pc}]+"))*)/dgv}},scopeName:"source.nushell",embeddedLangs:undefined,aliases:["nu"]})
|
|
3
|
+
const lang = Object.freeze({displayName:"nushell",name:"nushell",patterns:[{include:"#define-variable"},{include:"#define-alias"},{include:"#function"},{include:"#extern"},{include:"#module"},{include:"#use-module"},{include:"#expression"},{include:"#comment"}],repository:{binary:{begin:/\b(0x)(\[)/dgv,beginCaptures:{"1":{name:"constant.numeric.nushell"},"2":{name:"meta.brace.square.begin.nushell"}},end:/\]/dgv,endCaptures:{"0":{name:"meta.brace.square.begin.nushell"}},name:"constant.binary.nushell",patterns:[{match:/\p{AHex}{2}/dgv,name:"constant.numeric.nushell"}]},"braced-expression":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.section.block.begin.bracket.curly.nushell"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.section.block.end.bracket.curly.nushell"}},name:"meta.expression.braced.nushell",patterns:[{begin:/(?<=\{)\p{space}*\|/dgv,end:/\|/dgv,name:"meta.closure.parameters.nushell",patterns:[{include:"#function-parameter"}]},{captures:{"1":{name:"variable.other.nushell"},"2":{name:"keyword.control.nushell"}},match:/([\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*(:)\p{space}*/dgv},{captures:{"1":{name:"variable.other.nushell"},"2":{name:"variable.other.nushell",patterns:[{include:"#paren-expression"}]},"3":{name:"keyword.control.nushell"}},match:/(\$"((?:[^"\\]|\\[^\n])*)")\p{space}*(:)\p{space}*/dgv,name:"meta.record-entry.nushell"},{captures:{"1":{name:"variable.other.nushell"},"2":{name:"keyword.control.nushell"}},match:/("(?:[^"\\]|\\[^\n])*")\p{space}*(:)\p{space}*/dgv,name:"meta.record-entry.nushell"},{captures:{"1":{name:"variable.other.nushell"},"2":{name:"variable.other.nushell",patterns:[{include:"#paren-expression"}]},"3":{name:"keyword.control.nushell"}},match:/(\$'([^']*)')\p{space}*(:)\p{space}*/dgv,name:"meta.record-entry.nushell"},{captures:{"1":{name:"variable.other.nushell"},"2":{name:"keyword.control.nushell"}},match:/('[^']*')\p{space}*(:)\p{space}*/dgv,name:"meta.record-entry.nushell"},{include:"#spread"},{include:"source.nushell"}]},command:{begin:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(?:(\^)|(?![\$0-9]))([\!\.\p{L}\p{M}\p{N}\p{Pc}]+(?: (?!-)[\-\!\.\p{L}\p{M}\p{N}\p{Pc}]+(?:(?=[ \)])|(?=\n?$))|[\-\!\.\p{L}\p{M}\p{N}\p{Pc}]+)*|(?<=\^)\$?(?:"[^"]+"|'[^']+'))/dgv,beginCaptures:{"1":{name:"keyword.operator.nushell"},"2":{patterns:[{include:"#control-keywords"},{captures:{"0":{name:"keyword.other.builtin.nushell"}},match:/(?:ansi|char) [\p{L}\p{M}\p{N}\p{Pc}]+/dgv},{captures:{"1":{name:"keyword.other.builtin.nushell"},"2":{patterns:[{include:"#value"}]}},match:/*@__PURE__*/ new EmulatedRegExp("(a(?:l(?:ias|l)|n(?:si(?: (?:gradient|link|strip))?|y)|ppend|st|ttr(?: (?:category|deprecated|example|search-terms))?)|b(?:its(?: (?:and|not|or|ro[lr]|sh[lr]|xor))?|reak|ytes(?: (?:a(?:dd|t)|build|collect|ends-with|index-of|length|re(?:move|place|verse)|s(?:plit|tarts-with)))?)|c(?:al|d|h(?:ar|unk(?:-by|s))|lear|o(?:l(?:lect|umns)|m(?:mandline(?: (?:edit|get-cursor|set-cursor))?|p(?:act|lete))|n(?:fig(?: (?:env|flatten|nu|reset|use-colors))?|st|tinue))|p)|d(?:ate(?: (?:f(?:ormat|rom-human)|humanize|list-timezone|now|to-timezone))?|e(?:bug(?: (?:e(?:nv|xperimental-options)|info|profile))?|code(?: (?:base(?:32(?:hex)?|64)|hex))?|f(?:ault)?|scribe|tect(?: columns)?)|o|rop(?: (?:column|nth))?|t(?: (?:add|diff|format|now|part|to|utcnow))?|u)|e(?:ach(?: while)?|cho|moji|n(?:code(?: (?:base(?:32(?:hex)?|64)|hex))?|umerate)|rror(?: make)?|very|x(?:ec|it|p(?:l(?:ain|ore)|ort(?: (?:alias|const|def|extern|module|use)|-env)?)|tern))|f(?:i(?:l(?:[el]|ter)|nd|rst)|latten|or(?:mat(?: (?:bits|d(?:ate|uration)|filesize|number|pattern))?)?|rom(?: (?:csv|eml|i(?:cs|ni)|json|msgpackz?|nuon|ods|p(?:arquet|list)|ssv|t(?:oml|sv)|url|vcf|x(?:lsx|ml)|ya?ml))?)|g(?:e(?:nerate|t)|lob|r(?:id|oup-by)|stat)|h(?:ash(?: (?:md5|sha256))?|e(?:aders|lp(?: (?:aliases|commands|e(?:scapes|xterns)|modules|operators|pipe-and-redirect))?)|i(?:de(?:-env)?|sto(?:gram|ry(?: (?:import|session))?))|ttp(?: (?:delete|get|head|options|p(?:atch|ost|ut)))?)|i(?:f|gnore|n(?:c|put(?: list(?:en)?)?|s(?:ert|pect)|t(?:erleave|o(?: (?:b(?:inary|ool)|cell-path|d(?:atetime|uration)|f(?:ilesize|loat)|glob|int|record|s(?:qlite|tring)|value))?))|s-(?:admin|empty|not-empty|terminal)|tems)|j(?:o(?:b(?: (?:flush|id|kill|list|recv|s(?:end|pawn)|tag|unfreeze))?|in)|son path|walk)|k(?:eybindings(?: (?:default|list(?:en)?))?|ill)|l(?:ast|e(?:ngth|t(?:-env)?)|ines|o(?:ad-env|op)|s)|m(?:at(?:ch|h(?: (?:a(?:bs|rc(?:cosh?|sinh?|tanh?)|vg)|c(?:eil|osh?)|exp|floor|l(?:n|og)|m(?:ax|edian|in|ode)|product|round|s(?:inh?|qrt|tddev|um)|tanh?|variance))?)|e(?:rge(?: deep)?|tadata(?: (?:access|set))?)|k(?:dir|temp)|o(?:dule|ve)|ut|v)|nu-(?:check|highlight)|o(?:pen|verlay(?: (?:hide|list|new|use))?)|p(?:a(?:nic|r(?:-each|se)|th(?: (?:basename|dirname|ex(?:ists|pand)|join|parse|relative-to|s(?:elf|plit)|type))?)|lugin(?: (?:add|list|rm|stop|use))?|o(?:lars(?: (?:a(?:gg(?:-groups)?|ll-(?:false|true)|ppend|rg-(?:m(?:ax|in)|sort|true|unique|where)|s(?:-date(?:time)?)?)|c(?:a(?:che|st)|o(?:l(?:lect|umns)?|n(?:cat(?:-str)?|tains|vert-time-zone)|unt(?:-null)?)|u(?:mulative|t))|d(?:atepart|ecimal|rop(?:-(?:duplicates|nulls))?|ummies)|exp(?:lode|r-not)|f(?:etch|i(?:l(?:l-n(?:an|ull)|ter(?:-with)?)|rst)|latten)|g(?:et(?:-(?:day|hour|m(?:inute|onth)|nanosecond|ordinal|second|week(?:day)?|year))?|roup-by)|horizontal|i(?:mplode|nt(?:eger|o-(?:d(?:f|type)|lazy|nu|repr|schema))|s-(?:duplicated|in|n(?:ot-n|)ull|unique))|join(?:-where)?|l(?:ast|en|i(?:st-contains|t)|owercase)|m(?:a(?:th|x)|e(?:an|dian)|in)|n(?:-unique|ot)|o(?:pen|therwise|ver)|p(?:ivot|rofile)|q(?:cut|u(?:antile|ery))|r(?:e(?:name|place(?:-time-zone)?|verse)|olling)|s(?:a(?:mple|ve)|chema|e(?:lect|t(?:-with-idx)?)|h(?:ape|ift)|lice|ort-by|t(?:d|ore-(?:get|ls|rm)|r(?:-(?:join|lengths|replace(?:-all)?|s(?:lice|plit|trip-chars))|ftime|uct-json-encode))|um(?:mary)?)|t(?:ake|runcate)|u(?:n(?:ique|nest|pivot)|ppercase)|va(?:lue-counts|r)|w(?:hen|ith-column)))?|rt)|r(?:epend|int)|s)|query(?: (?:db|git|json|web(?:page-info)?|xml))?|r(?:andom(?: (?:b(?:inary|ool)|chars|dice|float|int|uuid))?|e(?:duce|g(?:ex|istry(?: query)?)|ject|name|turn|verse)|m|o(?:ll(?: (?:down|left|right|up))?|tate)|un-(?:ex|in)ternal)|s(?:ave|c(?:hema|ope(?: (?:aliases|commands|e(?:ngine-stats|xterns)|modules|variables))?)|e(?:lect|q(?: (?:char|date))?)|huffle|kip(?: (?:until|while))?|l(?:eep|ice)|o(?:rt(?:-by)?|urce(?:-env)?)|plit(?: (?:c(?:ell-path|hars|olumn)|list|row|words))?|t(?:art|or(?: (?:create|delete|export|i(?:mport|nsert)|open|reset|update))?|r(?: (?:c(?:a(?:mel-case|pitalize)|o(?:mpress|ntains))|d(?:e(?:compress|dent|unicode)|istance|owncase)|e(?:nds-with|xpand)|inde(?:nt|x-of)|join|kebab-case|length|pascal-case|re(?:place|verse)|s(?:creaming-snake-case|hl-(?:quote|split)|imilarity|lug|nake-case|ta(?:rts-with|ts)|ubstring)|t(?:itle-case|rim)|upcase|wrap)|ess_internals)?)|ys(?: (?:cpu|disks|host|mem|net|temp|users))?)|t(?:a(?:ble|ke(?: (?:until|while))?)|e(?:e|rm(?: (?:query|size))?)|imeit|o(?: (?:csv|html|json|m(?:d|sgpackz?)|nuon|p(?:arquet|list)|t(?:ext|oml|sv)|xml|ya?ml)|uch)?|r(?:anspose|y)|utor)|u(?:limit|n(?:ame|iq(?:-by)?)|p(?:date(?: cells)?|sert)|rl(?: (?:build-query|decode|encode|join|parse|split-query))?|se)|v(?:alues|ersion(?: check)?|iew(?: (?:blocks|files|ir|s(?:ource|pan)))?)|w(?:atch|h(?:ere|i(?:ch|le)|oami)|i(?:ndow|th-env)|rap)|zip)(?![\\-\\p{L}\\p{M}\\p{N}\\p{Pc}])( ([^\\n]*))?","dgv",{"lazyCompile":true})},{captures:{"1":{patterns:[{include:"#paren-expression"}]}},match:/(?<=\^)(?:\$("[^"]+"|'[^']+')|"[^"]+"|'[^']+')/dgv,name:"entity.name.type.external.nushell"},{captures:{"1":{name:"entity.name.type.external.nushell"},"2":{patterns:[{include:"#value"}]}},match:/([\.\p{L}\p{M}\p{N}\p{Pc}]+(?:-[\!\.\p{L}\p{M}\p{N}\p{Pc}]+)*)(?: ([^\n]*))?/dgv},{include:"#value"}]}},end:/(?=[\)\;\|\}])|(?=\n?$)/dgv,name:"meta.command.nushell",patterns:[{include:"#parameters"},{include:"#spread"},{include:"#value"}]},comment:{match:/(#[^\n]*)(?=\n?$)/dgv,name:"comment.nushell"},"constant-keywords":{match:/\b(?:true|false|null)\b/dgv,name:"constant.language.nushell"},"constant-value":{patterns:[{include:"#constant-keywords"},{include:"#datetime"},{include:"#numbers"},{include:"#numbers-hexa"},{include:"#numbers-octal"},{include:"#numbers-binary"},{include:"#binary"}]},"control-keywords":{match:/(?<![\--\:A-Z\\_a-z])(?:break|continue|else(?: if)?|for|if|loop|mut|return|try|while)(?![\--\:A-Z\\_a-z])/dgv,name:"keyword.control.nushell"},datetime:{match:/\b\p{Nd}{4}-\p{Nd}{2}-\p{Nd}{2}(?:T\p{Nd}{2}:\p{Nd}{2}:\p{Nd}{2}(?:\.\p{Nd}+)?(?:\+\p{Nd}{2}:?\p{Nd}{2}|Z)?)?\b/dgv,name:"constant.numeric.nushell"},"define-alias":{captures:{"1":{name:"storage.type.alias.nushell"},"2":{name:"entity.name.function.nushell"},"3":{patterns:[{include:"#operators"}]}},match:/((?:export )?alias)\p{space}+([\-\!\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*(=)/dgv},"define-variable":{captures:{"1":{name:"keyword.other.nushell"},"2":{name:"variable.other.nushell"},"3":{patterns:[{include:"#operators"}]}},match:/(let|mut|(?:export\p{space}+)?const)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}+(=)/dgv},expression:{patterns:[{include:"#pre-command"},{include:"#for-loop"},{include:"#operators"},{match:/\|/dgv,name:"keyword.control.nushell"},{include:"#control-keywords"},{include:"#constant-value"},{include:"#string-raw"},{include:"#command"},{include:"#value"}]},extern:{begin:/((?:export\p{space}+)?extern)\p{space}+([\-\p{L}\p{M}\p{N}\p{Pc}]+|"[\- \p{L}\p{M}\p{N}\p{Pc}]+")/dgv,beginCaptures:{"1":{name:"storage.type.function.nushell"},"2":{name:"entity.name.function.nushell"}},end:/(?<=\])/dgv,endCaptures:{"0":{name:"punctuation.definition.function.end.nushell"}},patterns:[{include:"#function-parameters"}]},"for-loop":{begin:/(for)\p{space}+(\$?[\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}+(in)\p{space}+([^\n]+)\p{space}*(\{)/dgv,beginCaptures:{"1":{name:"keyword.other.nushell"},"2":{name:"variable.other.nushell"},"3":{name:"keyword.other.nushell"},"4":{patterns:[{include:"#value"}]},"5":{name:"punctuation.section.block.begin.bracket.curly.nushell"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.section.block.end.bracket.curly.nushell"}},name:"meta.for-loop.nushell",patterns:[{include:"source.nushell"}]},function:{begin:/((?:export\p{space}+)?def)(?:\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{L}\p{M}\p{N}\p{Pc}]+"|'[\- \p{L}\p{M}\p{N}\p{Pc}]+'|`[\- \p{L}\p{M}\p{N}\p{Pc}]+`)(?:\p{space}+(--[\p{L}\p{M}\p{N}\p{Pc}]+(?:\p{space}+--[\p{L}\p{M}\p{N}\p{Pc}]+)*))?/dgv,beginCaptures:{"1":{name:"storage.type.function.nushell"},"2":{name:"storage.modifier.nushell"},"3":{name:"entity.name.function.nushell"},"4":{name:"storage.modifier.nushell"}},end:/(?<=\})/dgv,patterns:[{include:"#function-parameters"},{include:"#function-body"},{include:"#function-inout"}]},"function-body":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.function.begin.nushell"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.function.end.nushell"}},name:"meta.function.body.nushell",patterns:[{include:"source.nushell"}]},"function-inout":{patterns:[{include:"#types"},{match:/->/dgv,name:"keyword.operator.nushell"},{include:"#function-multiple-inout"}]},"function-multiple-inout":{begin:/(?<=\]\p{space}*)(:)\p{space}+(\[)/dgv,beginCaptures:{"1":{name:"punctuation.definition.in-out.nushell"},"2":{name:"meta.brace.square.begin.nushell"}},end:/\]/dgv,endCaptures:{"0":{name:"meta.brace.square.end.nushell"}},patterns:[{include:"#types"},{captures:{"1":{name:"punctuation.separator.nushell"}},match:/\p{space}*(,)\p{space}*/dgv},{captures:{"1":{name:"keyword.operator.nushell"}},match:/\p{space}+(->)\p{space}+/dgv}]},"function-parameter":{patterns:[{captures:{"1":{name:"keyword.control.nushell"}},match:/(-{0,2}|\.{3})[\-\p{L}\p{M}\p{N}\p{Pc}]+(?:\((-[\?\p{L}\p{M}\p{N}\p{Pc}])\))?/dgv,name:"variable.parameter.nushell"},{begin:/\??:\p{space}*/dgv,end:/(?=\p{space}+(?:-{0,2}|\.{3})[\-\p{L}\p{M}\p{N}\p{Pc}]+|\p{space}*(?:[\]\#\,\=\@\|]|(?=\n?$)))/dgv,patterns:[{include:"#types"}]},{begin:/@(?=["'])/dgv,end:/(?<=["'])/dgv,patterns:[{include:"#string"}]},{begin:/=\p{space}*/dgv,end:/(?=\p{space}+-{0,2}[\-\p{L}\p{M}\p{N}\p{Pc}]+|\p{space}*(?:[\]\#\,\|]|(?=\n?$)))/dgv,name:"default.value.nushell",patterns:[{include:"#value"}]}]},"function-parameters":{begin:/\[/dgv,beginCaptures:{"0":{name:"meta.brace.square.begin.nushell"}},end:/\]/dgv,endCaptures:{"0":{name:"meta.brace.square.end.nushell"}},name:"meta.function.parameters.nushell",patterns:[{include:"#function-parameter"},{include:"#comment"}]},"internal-variables":{match:/\$(?:nu|env)\b/dgv,name:"variable.language.nushell"},keyword:{match:/def(?:-env)?/dgv,name:"keyword.other.nushell"},module:{begin:/((?:export\p{space}+)?module)\p{space}+([\-\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*\{/dgv,beginCaptures:{"1":{name:"storage.type.module.nushell"},"2":{name:"entity.name.namespace.nushell"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.module.end.nushell"}},name:"meta.module.nushell",patterns:[{include:"source.nushell"}]},numbers:{match:/*@__PURE__*/ new EmulatedRegExp("(?<![\\-\\p{L}\\p{M}\\p{N}\\p{Pc}])(?:(?=(_*))\\1)[\\-\\+]?(?:(?=(_*))\\2)(?:(?:NaN|infinity|inf)(?:(?=(_*))\\3)|(?:\\p{Nd}(?:(?=([_\\p{Nd}]*))\\4)\\.?|\\.(?:(?=(_*))\\5)\\p{Nd})(?:(?=([_\\p{Nd}]*))\\6)(?:E(?:(?=(_*))\\7)[\\-\\+]?(?:(?=(_*))\\8)\\p{Nd}(?:(?=([_\\p{Nd}]*))\\9))?)(?:ns|us|µs|ms|sec|min|hr|day|wk|b|kb|mb|gb|tb|pt|eb|zb|kib|mib|gib|tib|pit|eib|zib)?(?:(?![\\.\\p{L}\\p{M}\\p{N}\\p{Pc}])|(?=\\.\\.))","dgiv",{"hiddenCaptures":[1,2,3,4,5,6,7,8,9]}),name:"constant.numeric.nushell"},"numbers-binary":{match:/*@__PURE__*/ new EmulatedRegExp("(?<![\\-\\p{L}\\p{M}\\p{N}\\p{Pc}])(?:(?=(_*))\\1)0(?:(?=(_*))\\2)b(?:(?=(_*))\\3)[01](?:(?=([01_]*))\\4)(?![\\.\\p{L}\\p{M}\\p{N}\\p{Pc}])","dgv",{"hiddenCaptures":[1,2,3,4]}),name:"constant.numeric.nushell"},"numbers-hexa":{match:/*@__PURE__*/ new EmulatedRegExp("(?<![\\-\\p{L}\\p{M}\\p{N}\\p{Pc}])(?:(?=(_*))\\1)0(?:(?=(_*))\\2)x(?:(?=(_*))\\3)\\p{AHex}(?:(?=([_\\p{AHex}]*))\\4)(?![\\.\\p{L}\\p{M}\\p{N}\\p{Pc}])","dgv",{"hiddenCaptures":[1,2,3,4]}),name:"constant.numeric.nushell"},"numbers-octal":{match:/*@__PURE__*/ new EmulatedRegExp("(?<![\\-\\p{L}\\p{M}\\p{N}\\p{Pc}])(?:(?=(_*))\\1)0(?:(?=(_*))\\2)o(?:(?=(_*))\\3)[0-7](?:(?=([0-7_]*))\\4)(?![\\.\\p{L}\\p{M}\\p{N}\\p{Pc}])","dgv",{"hiddenCaptures":[1,2,3,4]}),name:"constant.numeric.nushell"},operators:{patterns:[{include:"#operators-word"},{include:"#operators-symbols"},{include:"#ranges"}]},"operators-symbols":{match:/(?<= )(?:[\-\*\+\/]=?|\/\/|\*\*|!=|[\<\=\>]=?|[\!\=]~|\+\+=?)(?= |(?=\n?$))/dgv,name:"keyword.control.nushell"},"operators-word":{match:/(?<=[ \(])(?:mod|in|not-(?:in|like|has)|not|and|or|xor|bit-(?:or|and|xor|shl|shr)|starts-with|ends-with|like|has)(?=[ \)]|(?=\n?$))/dgv,name:"keyword.control.nushell"},parameters:{captures:{"1":{name:"keyword.control.nushell"}},match:/(?<=\p{space})(-{1,2})[\-\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.parameter.nushell"},"paren-expression":{begin:/\(/dgv,beginCaptures:{"0":{name:"meta.brace.round.begin.nushell"}},end:/\)/dgv,endCaptures:{"0":{name:"meta.brace.round.end.nushell"}},name:"meta.expression.parenthesis.nushell",patterns:[{include:"#expression"}]},"pre-command":{begin:/([\p{L}\p{M}\p{N}\p{Pc}]+)(=)/dgv,beginCaptures:{"1":{name:"variable.other.nushell"},"2":{patterns:[{include:"#operators"}]}},end:/(?=\p{space}+)/dgv,patterns:[{include:"#value"}]},ranges:{match:/\.\.<?/dgv,name:"keyword.control.nushell"},spread:{match:/\.\.\.(?=[^\]\}\p{space}])/dgv,name:"keyword.control.nushell"},string:{patterns:[{include:"#string-single-quote"},{include:"#string-backtick"},{include:"#string-double-quote"},{include:"#string-interpolated-double"},{include:"#string-interpolated-single"},{include:"#string-raw"},{include:"#string-bare"}]},"string-backtick":{begin:/`/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.nushell"}},end:/`/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.nushell"}},name:"string.quoted.single.nushell"},"string-bare":{match:/[^"\#\$'\(\,\;\[\{\|\p{space}][^\]"'\(\)\,\;\[\{\|\}\p{space}]*/dgv,name:"string.bare.nushell"},"string-double-quote":{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.nushell"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.nushell"}},name:"string.quoted.double.nushell",patterns:[{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv},{include:"#string-escape"}]},"string-escape":{match:/\\(?:["'\/\\bfnrt]|u\p{AHex}{4})/dgv,name:"constant.character.escape.nushell"},"string-interpolated-double":{begin:/\$"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.nushell"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.nushell"}},name:"string.interpolated.double.nushell",patterns:[{match:/\\[\(\)]/dgv,name:"constant.character.escape.nushell"},{include:"#string-escape"},{include:"#paren-expression"}]},"string-interpolated-single":{begin:/\$'/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.nushell"}},end:/'/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.nushell"}},name:"string.interpolated.single.nushell",patterns:[{include:"#paren-expression"}]},"string-raw":{begin:/r(#+)'/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.nushell"}},end:/'\1()/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.nushell"}},name:"string.raw.nushell"},"string-single-quote":{begin:/'/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.nushell"}},end:/'/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.nushell"}},name:"string.quoted.single.nushell"},table:{begin:/\[/dgv,beginCaptures:{"0":{name:"meta.brace.square.begin.nushell"}},end:/\]/dgv,endCaptures:{"0":{name:"meta.brace.square.end.nushell"}},name:"meta.table.nushell",patterns:[{include:"#spread"},{include:"#value"},{match:/,/dgv,name:"punctuation.separator.nushell"}]},types:{patterns:[{begin:/\b(list)\p{space}*</dgv,beginCaptures:{"1":{name:"entity.name.type.nushell"}},end:/>/dgv,name:"meta.list.nushell",patterns:[{include:"#types"}]},{begin:/\b(record)\p{space}*</dgv,beginCaptures:{"1":{name:"entity.name.type.nushell"}},end:/>/dgv,name:"meta.record.nushell",patterns:[{captures:{"1":{name:"variable.parameter.nushell"}},match:/([\-\p{L}\p{M}\p{N}\p{Pc}]+|"[\- \p{L}\p{M}\p{N}\p{Pc}]+"|'[^']+')\p{space}*:\p{space}*/dgv},{include:"#types"}]},{match:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,name:"entity.name.type.nushell"}]},"use-module":{patterns:[{captures:{"1":{name:"keyword.control.import.nushell"},"2":{name:"entity.name.namespace.nushell"},"3":{name:"keyword.other.nushell"}},match:/^\p{space}*((?:export )?use)\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}]+|"[\- \p{L}\p{M}\p{N}\p{Pc}]+"|'[\- \p{L}\p{M}\p{N}\p{Pc}]+'|\*))?\p{space}*;?(?=\n?$)/dgv},{begin:/^\p{space}*((?:export )?use)\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}*\[/dgv,beginCaptures:{"1":{name:"keyword.control.import.nushell"},"2":{name:"entity.name.namespace.nushell"}},end:/(\])\p{space}*;?\p{space}*(?=\n?$)/dgv,endCaptures:{"1":{name:"meta.brace.square.end.nushell"}},patterns:[{captures:{"1":{name:"keyword.other.nushell"}},match:/([\-\p{L}\p{M}\p{N}\p{Pc}]+|"[\- \p{L}\p{M}\p{N}\p{Pc}]+"|'[\- \p{L}\p{M}\p{N}\p{Pc}]+'|\*),?/dgv},{include:"#comment"}]},{captures:{"2":{name:"keyword.control.import.nushell"},"3":{name:"string.bare.nushell",patterns:[{captures:{"1":{name:"entity.name.namespace.nushell"}},match:/([\- \p{L}\p{M}\p{N}\p{Pc}]+)(?:\.nu)?(?=(?=\n?$)|["'])/dgv}]},"4":{name:"keyword.other.nushell"}},match:/*@__PURE__*/ new EmulatedRegExp("(?<path>(?:[\\/\\\\]|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\- \\p{L}\\p{M}\\p{N}\\p{Pc}]+(?:\\.nu)?){0}^\\p{space}*((?:export )?use)\\p{space}+(\"((?:[\\/\\\\]|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\- \\p{L}\\p{M}\\p{N}\\p{Pc}]+(?:\\.nu)?)\"|'((?:[\\/\\\\]|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\- \\p{L}\\p{M}\\p{N}\\p{Pc}]+(?:\\.nu)?)'|(?![\"'])((?:[\\/\\\\]|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\- \\p{L}\\p{M}\\p{N}\\p{Pc}]+(?:\\.nu)?))(?:\\p{space}+([\\-\\p{L}\\p{M}\\p{N}\\p{Pc}]+|\"[\\- \\p{L}\\p{M}\\p{N}\\p{Pc}]+\"|'[^']+'|\\*))?\\p{space}*;?(?=\\n?$)","dgv",{"hiddenCaptures":[4,5,6],"transfers":[[1,[4,5,6]]]})},{begin:/*@__PURE__*/ new EmulatedRegExp("(?<path>(?:[\\/\\\\]|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\- \\p{L}\\p{M}\\p{N}\\p{Pc}]+(?:\\.nu)?){0}^\\p{space}*((?:export )?use)\\p{space}+(\"((?:[\\/\\\\]|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\- \\p{L}\\p{M}\\p{N}\\p{Pc}]+(?:\\.nu)?)\"|'((?:[\\/\\\\]|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\- \\p{L}\\p{M}\\p{N}\\p{Pc}]+(?:\\.nu)?)'|(?![\"'])((?:[\\/\\\\]|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\- \\p{L}\\p{M}\\p{N}\\p{Pc}]+(?:\\.nu)?))\\p{space}+\\[","dgv",{"hiddenCaptures":[4,5,6],"transfers":[[1,[4,5,6]]]}),beginCaptures:{"2":{name:"keyword.control.import.nushell"},"3":{name:"string.bare.nushell",patterns:[{captures:{"1":{name:"entity.name.namespace.nushell"}},match:/([\- \p{L}\p{M}\p{N}\p{Pc}]+)(?:\.nu)?(?=(?=\n?$)|["'])/dgv}]}},end:/(\])\p{space}*;?\p{space}*(?=\n?$)/dgv,endCaptures:{"1":{name:"meta.brace.square.end.nushell"}},patterns:[{captures:{"0":{name:"keyword.other.nushell"}},match:/([\-\p{L}\p{M}\p{N}\p{Pc}]+|"[\- \p{L}\p{M}\p{N}\p{Pc}]+"|'[\- \p{L}\p{M}\p{N}\p{Pc}]+'|\*),?/dgv},{include:"#comment"}]},{captures:{"0":{name:"keyword.control.import.nushell"}},match:/^\p{space}*(?:export )?use\b/dgv}]},value:{patterns:[{include:"#variables"},{include:"#variable-fields"},{include:"#control-keywords"},{include:"#constant-value"},{include:"#table"},{include:"#operators"},{include:"#paren-expression"},{include:"#braced-expression"},{include:"#string"},{include:"#comment"}]},"variable-fields":{match:/(?<=[\]\)\}])(?:\.(?:[\-\p{L}\p{M}\p{N}\p{Pc}]+|"[\- \p{L}\p{M}\p{N}\p{Pc}]+"))+/dgv,name:"variable.other.nushell"},variables:{captures:{"1":{patterns:[{include:"#internal-variables"},{match:/\$[^\n]+/dgv,name:"variable.other.nushell"}]},"2":{name:"variable.other.nushell"}},match:/(\$[0-9A-Z_a-z]+)((?:\.(?:[\-\p{L}\p{M}\p{N}\p{Pc}]+|"[\- \p{L}\p{M}\p{N}\p{Pc}]+"))*)/dgv}},scopeName:"source.nushell",embeddedLangs:undefined,aliases:["nu"]})
|
|
4
4
|
|
|
5
5
|
export default [
|
|
6
6
|
lang
|
package/dist/odin.d.mts
ADDED
package/dist/odin.mjs
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const lang = Object.freeze({displayName:"Odin",name:"odin",patterns:[{include:"#file-tags"},{include:"#package-name-declaration"},{include:"#import-declaration"},{include:"#statements"}],repository:{assignments:{patterns:[{include:"#procedure-assignment"},{include:"#type-assignment"},{include:"#distinct-type-assignment"},{include:"#constant-assignment"},{include:"#variable-assignment"},{include:"#type-annotation"}]},attribute:{patterns:[{captures:{"1":{name:"keyword.control.attribute.odin"},"2":{name:"entity.other.attribute-name.odin"}},match:/(@)\p{space}*([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\b/dgv,name:"meta.attribute.odin"},{begin:/(@)\p{space}*(\()/dgv,beginCaptures:{"1":{name:"keyword.control.attribute.odin"},"2":{name:"meta.brace.round.odin"}},end:/\)/dgv,endCaptures:{"0":{name:"meta.brace.round.odin"}},name:"meta.attribute.odin",patterns:[{match:/\b([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\b/dgv,name:"entity.other.attribute-name.odin"},{match:/,/dgv,name:"punctuation.odin"},{begin:/=/dgv,beginCaptures:{"0":{name:"keyword.operator.assignment.odin"}},end:/(?=[\)\,])/dgv,patterns:[{include:"#expressions"}]}]}]},"basic-types":{patterns:[{match:/\b(i(?:8|16|32|64|128|nt))\b/dgv,name:"support.type.primitive.odin"},{match:/\b(u(?:8|16|32|64|128|int|intptr))\b/dgv,name:"support.type.primitive.odin"},{match:/\b((?:u16|u32|u64|u128|i16|i32|i64|i128)le)\b/dgv,name:"support.type.primitive.odin"},{match:/\b((?:i16|i32|i64|i128|u16|u32|u64|u128)be)\b/dgv,name:"support.type.primitive.odin"},{match:/\b(f(?:16|32|64))\b/dgv,name:"support.type.primitive.odin"},{match:/\b(f(?:16|32|64)le)\b/dgv,name:"support.type.primitive.odin"},{match:/\b(f(?:16|32|64)be)\b/dgv,name:"support.type.primitive.odin"},{match:/\b(complex(?:32|64|128))\b/dgv,name:"support.type.primitive.odin"},{match:/\b(quaternion(?:64|128|256))\b/dgv,name:"support.type.primitive.odin"},{match:/\b(b(?:ool|8|16|32|64))\b/dgv,name:"support.type.primitive.odin"},{match:/\b(string|cstring|rune)\b/dgv,name:"support.type.primitive.odin"},{match:/\b(rawptr)\b/dgv,name:"support.type.primitive.odin"},{match:/\b(any|typeid)\b/dgv,name:"support.type.primitive.odin"},{match:/\b(byte)\b/dgv,name:"support.type.primitive.odin"}]},"block-comment":{begin:/\/\*/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.begin.odin"}},end:/\*\//dgv,endCaptures:{"0":{name:"punctuation.definition.comment.end.odin"}},name:"comment.block.odin",patterns:[{include:"#block-comment"}]},"block-definition":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.block.odin"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.block.odin"}},name:"meta.block.odin",patterns:[{include:"#statements"}]},"block-label":{captures:{"1":{name:"entity.name.label.odin"},"2":{name:"punctuation.definition.label.odin"}},match:/([\p{L}\p{M}\p{N}\p{Pc}]+)(:)\p{space}*(?=for|switch|if|\{)/dgv,name:"meta.block.label.odin"},"case-clause":{begin:/\b(case)\b/dgv,beginCaptures:{"1":{name:"keyword.control.case.odin"}},end:/:/dgv,endCaptures:{"0":{name:"punctuation.definition.section.case-statement.odin"}},name:"meta.case-clause.expr.odin",patterns:[{include:"#expressions"}]},comments:{patterns:[{include:"#block-comment"},{begin:/\/\//dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.odin"}},end:/\n/dgv,name:"comment.line.double-slash.odin"},{begin:/#!/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.odin"}},end:/\n/dgv,name:"comment.line.shebang.odin"}]},"constant-assignment":{captures:{"1":{name:"variable.other.constant.odin"},"2":{name:"keyword.operator.assignment.odin"}},match:/([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(:\p{space}*:)/dgv,name:"meta.definition.variable.odin"},"distinct-type-assignment":{begin:/\b([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(:\p{space}*:)\p{space}*(?=(distinct)\b)/dgv,beginCaptures:{"1":{name:"entity.name.type.odin"},"2":{name:"keyword.operator.assignment.odin"},"3":{name:"storage.type.odin"}},end:/(?=^)|(?<=\})/dgv,name:"meta.definition.variable.odin",patterns:[{include:"#type-declaration"}]},expressions:{patterns:[{include:"#comments"},{include:"#ternary"},{include:"#map-bitset"},{include:"#slice"},{include:"#keywords"},{include:"#type-parameter"},{include:"#basic-types"},{include:"#procedure-calls"},{include:"#property-access"},{include:"#union-member-access"},{include:"#union-non-nil-access"},{include:"#strings"},{include:"#punctuation"},{include:"#variable-name"}]},"file-tags":{begin:/#\+[A-Z_a-z][\-0-9A-Z_a-z]*/dgv,beginCaptures:{"0":{name:"entity.name.tag.odin"}},end:/\n/dgv,name:"comment.line.double-slash.odin",patterns:[{match:/,/dgv,name:"punctuation.odin"},{match:/!/dgv,name:"keyword.operator.logical.odin"},{match:/[A-Z_a-z][\-0-9A-Z_a-z]*/dgv,name:"entity.other.attribute-name.odin"}]},"import-declaration":{begin:/\b((?:|foreign\p{space}+)import)\b/dgv,beginCaptures:{"0":{name:"keyword.control.import.odin"}},end:/(?=^|;)/dgv,name:"meta.import.odin",patterns:[{begin:/\b[A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*/dgv,beginCaptures:{"0":{name:"entity.name.namespace.odin"}},end:/(?=^|;)/dgv,name:"entity.name.alias.odin",patterns:[{include:"#strings"},{include:"#comments"}]},{include:"#strings"},{include:"#comments"}]},keywords:{patterns:[{match:/\b(import|foreign|package)\b/dgv,name:"keyword.control.odin"},{match:/\b(if|else|or_else|when|where|for|in|not_in|defer|switch|return|or_return)\b/dgv,name:"keyword.control.odin"},{captures:{"1":{name:"keyword.control.odin"},"2":{name:"entity.name.label.odin"}},match:/\b((?:|or_)(?:break|continue))\b\p{space}*([\p{L}\p{M}\p{N}\p{Pc}]+)?/dgv},{match:/\b(fallthrough|case|dynamic)\b/dgv,name:"keyword.control.odin"},{match:/\b(do|force_inline|no_inline)\b/dgv,name:"keyword.control.odin"},{match:/\b(asm)\b/dgv,name:"keyword.control.odin"},{match:/\b(auto_cast|distinct|using)\b/dgv,name:"storage.modifier.odin"},{match:/\b(context)\b/dgv,name:"keyword.context.odin"},{match:/\b(ODIN_(?:ARCH|OS))\b/dgv,name:"variable.other.constant.odin"},{match:/\b(nil|true|false)\b/dgv,name:"constant.language.odin"},{match:/---/dgv,name:"constant.language.odin"},{match:/\b(\p{Nd}([_\p{Nd}])*(\.\p{Nd}([_\p{Nd}])*)?)(([Ee])([\-\+])?\p{Nd}+)?[ijk]?\b/dgv,name:"constant.numeric.odin"},{match:/\b((0b([01_])+)|(0o([_\p{Nd}])+)|(0d([_\p{Nd}])+)|(0[Xhx]([_\p{AHex}])+))i?\b/dgv,name:"constant.numeric.odin"},{match:/\b(struct|enum|union|map|bit_set|bit_field|matrix)\b/dgv,name:"storage.type.odin"},{match:/[\-\%\*\+\/]=|%%=/dgv,name:"keyword.operator.assignment.compound.odin"},{match:/(?:[\|\~]|&~?|<<|>>)=/dgv,name:"keyword.operator.assignment.compound.bitwise.odin"},{match:/[\!\=]=/dgv,name:"keyword.operator.comparison.odin"},{match:/[\<\>]=?/dgv,name:"keyword.operator.relational.odin"},{match:/\.\.[\<\=]/dgv,name:"keyword.operator.range.odin"},{match:/\.\./dgv,name:"keyword.operator.spread.odin"},{match:/:[\:\=]|=/dgv,name:"keyword.operator.assignment.odin"},{match:/&/dgv,name:"keyword.operator.address.odin"},{match:/\^/dgv,name:"keyword.operator.address.odin"},{match:/->/dgv,name:"storage.type.function.arrow.odin"},{match:/@|([\-\!\%\*\+\/\:\|]|<<?|>>?|~)=?|=|: : ?|\$/dgv,name:"keyword.operator.odin"},{match:/#[A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*/dgv,name:"entity.name.tag.odin"}]},"map-bitset":{begin:/\b(bit_set|map)\b/dgv,beginCaptures:{"0":{name:"storage.type.odin"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.definition.bracket.square.odin"}},patterns:[{match:/\[/dgv,name:"punctuation.definition.bracket.square.odin"},{include:"#type-declaration"}]},"object-definition":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.block.odin"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.block.odin"}},name:"meta.object.type.odin",patterns:[{include:"#statements"}]},"package-name-declaration":{captures:{"1":{name:"keyword.control.odin"},"2":{name:"entity.name.type.module.odin"}},match:/^\p{space}*(package)\p{space}+([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)/dgv},parameters:{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.parameters.begin.odin"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.parameters.end.odin"}},name:"meta.parameters.odin",patterns:[{include:"#assignments"},{include:"#expressions"}]},"procedure-assignment":{begin:/\b([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(:\p{space}*:|=)\p{space}*(#[\p{L}\p{M}\p{N}\p{Pc}]+)?\p{space}*(?=proc\b)/dgv,beginCaptures:{"1":{name:"meta.definition.function.odin entity.name.function.odin"},"2":{name:"keyword.operator.assignment.odin"},"3":{name:"keyword.other.odin"}},end:/(?=^)|(?<=\})/dgv,name:"meta.definition.variable.odin",patterns:[{include:"#type-declaration"}]},"procedure-calls":{patterns:[{begin:/\b(cast|transmute)\b\p{space}*(\()/dgv,beginCaptures:{"1":{name:"keyword.function.odin"},"2":{name:"meta.brace.round.odin"}},end:/\)/dgv,endCaptures:{"0":{name:"meta.brace.round.odin"}},name:"meta.function-call.odin",patterns:[{include:"#type-declaration"}]},{begin:/\b((?:size|align)_of)\b\p{space}*(\()/dgv,beginCaptures:{"1":{name:"support.function.builtin.odin"},"2":{name:"meta.brace.round.odin"}},end:/\)/dgv,endCaptures:{"0":{name:"meta.brace.round.odin"}},name:"meta.function-call.odin",patterns:[{include:"#type-declaration"}]},{begin:/\b(len|cap|offset_of_selector|offset_of_member|offset_of|offset_of_by_string|type_of|type_info_of|typeid_of|swizzle|complex|quaternion|real|imag|jmag|kmag|conj|expand_values|min|max|abs|clamp|soa_zip|soa_unzip|make|new|new_clone|resize|reserve|append|delete|free|free_all|assert|panic)\b\p{space}*(\()/dgv,beginCaptures:{"1":{name:"support.function.builtin.odin"},"2":{name:"meta.brace.round.odin"}},end:/\)/dgv,endCaptures:{"0":{name:"meta.brace.round.odin"}},name:"meta.function-call.odin",patterns:[{include:"#expressions"}]},{begin:/([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(\()/dgv,beginCaptures:{"1":{name:"entity.name.function.odin"},"2":{name:"meta.brace.round.odin"}},end:/\)/dgv,endCaptures:{"0":{name:"meta.brace.round.odin"}},name:"meta.function-call.odin",patterns:[{include:"#expressions"}]}]},"property-access":{captures:{"1":{name:"variable.other.object.odin"},"2":{name:"punctuation.accessor.odin"}},match:/([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(\.)\p{space}*(?=[A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)/dgv},punctuation:{match:/[\]\(\)\,\.\;\[\\\{\}]/dgv,name:"punctuation.odin"},"return-type-declaration":{begin:/->/dgv,beginCaptures:{"0":{name:"storage.type.function.arrow.odin"}},end:/(?=^|[\)\,\;\{]|where)/dgv,name:"meta.return.type.odin",patterns:[{include:"#comments"},{include:"#keywords"},{include:"#basic-types"},{include:"#property-access"},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.parameters.begin.odin"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.parameters.end.odin"}},name:"meta.parameters.odin",patterns:[{include:"#comments"},{include:"#assignments"},{include:"#keywords"},{include:"#basic-types"},{include:"#property-access"},{include:"#type-name"},{include:"#punctuation"}]},{include:"#type-name"}]},slice:{begin:/\[/dgv,beginCaptures:{"0":{name:"meta.brace.square.odin"}},end:/\]/dgv,endCaptures:{"0":{name:"meta.brace.square.odin"}},name:"meta.slice.odin",patterns:[{match:/\?/dgv,name:"keyword.operator.array.odin"},{match:/:/dgv,name:"keyword.operator.slice.odin"},{include:"#expressions"}]},statements:{patterns:[{include:"#attribute"},{include:"#procedure-assignment"},{include:"#type-assignment"},{include:"#distinct-type-assignment"},{include:"#constant-assignment"},{include:"#variable-assignment"},{include:"#case-clause"},{include:"#block-label"},{include:"#type-annotation"},{include:"#block-definition"},{include:"#expressions"}]},"string-escaped-char":{patterns:[{match:/\\(x1b|e|033)\[[0-9\;]*m/dgv,name:"constant.character.escape.ansi-color-sequence.odin"},{match:/\\(["'\\abefnrtuv]|x\p{AHex}{2}|u\p{AHex}{4}|U\p{AHex}{8}|[0-7]{3})/dgv,name:"constant.character.escape.odin"},{match:/%([\%E-HMTUXb-imo-tvwxz])/dgv,name:"constant.character.escape.placeholders.odin"},{match:/%(\p{Nd}*\.?\p{Nd}*f)/dgv,name:"constant.character.escape.placeholders-floats.odin"},{match:/\\[^\n]/dgv,name:"invalid.illegal.unknown-escape.odin"}]},strings:{patterns:[{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.odin"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.odin"}},name:"string.quoted.double.odin",patterns:[{include:"#string-escaped-char"}]},{begin:/'/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.odin"}},end:/'/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.odin"}},name:"string.quoted.single.odin",patterns:[{include:"#string-escaped-char"}]},{begin:/`/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.odin"}},end:/`/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.odin"}},name:"string.quoted.raw.odin"}]},ternary:{begin:/\?/dgv,beginCaptures:{"0":{name:"keyword.operator.ternary.odin"}},end:/:/dgv,endCaptures:{"0":{name:"keyword.operator.ternary.odin"}},name:"meta.ternary.odin",patterns:[{include:"#expressions"}]},"type-annotation":{begin:/(?:([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(,)\p{space}*)?(?:([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(,)\p{space}*)?([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(:)/dgv,beginCaptures:{"1":{name:"variable.name.odin"},"2":{name:"punctuation.odin"},"3":{name:"variable.name.odin"},"4":{name:"punctuation.odin"},"5":{name:"variable.name.odin"},"6":{name:"keyword.operator.type.annotation.odin"}},end:/(?=^|[\)\,\:\;\=]|for|switch|if|\{)/dgv,name:"meta.type.annotation.odin",patterns:[{include:"#type-declaration"}]},"type-assignment":{begin:/\b([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(:\p{space}*:)\p{space}*(?=(struct|union|enum|bit_set|bit_field)\b)/dgv,beginCaptures:{"1":{name:"entity.name.type.odin"},"2":{name:"keyword.operator.assignment.odin"},"3":{name:"storage.type.odin"}},end:/(?=^)|(?<=\})/dgv,name:"meta.definition.variable.odin",patterns:[{include:"#type-declaration"}]},"type-declaration":{name:"meta.type.declaration.odin",patterns:[{include:"#map-bitset"},{begin:/\b(proc|struct|union|enum|bit_field)\b/dgv,beginCaptures:{"1":{name:"storage.type.odin"}},end:/(?=^|[\)\,\;])|(?<=\})/dgv,patterns:[{include:"#parameters"},{include:"#return-type-declaration"},{include:"#object-definition"},{include:"#expressions"}]},{include:"#comments"},{include:"#strings"},{include:"#block-definition"},{include:"#keywords"},{include:"#basic-types"},{include:"#slice"},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.typeparameters.begin.odin"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.typeparameters.end.odin"}},patterns:[{include:"#type-declaration"}]},{include:"#property-access"},{include:"#punctuation"},{include:"#type-name"}]},"type-name":{match:/\b[A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*\b/dgv,name:"entity.name.type.odin"},"type-parameter":{captures:{"1":{name:"keyword.operator.odin"},"2":{name:"entity.name.type.parameter.odin"}},match:/(\$)\p{space}*\b([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\b/dgv},"union-member-access":{begin:/([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(\.)\p{space}*(\()/dgv,beginCaptures:{"1":{name:"variable.other.object.odin"},"2":{name:"punctuation.accessor.odin"},"3":{name:"meta.brace.round.odin"}},end:/\)/dgv,endCaptures:{"0":{name:"meta.brace.round.odin"}},patterns:[{include:"#type-declaration"}]},"union-non-nil-access":{captures:{"1":{name:"variable.other.object.odin"},"2":{name:"punctuation.accessor.odin"},"3":{name:"punctuation.accessor.optional.odin"}},match:/([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(\.)\p{space}*(\?)/dgv},"variable-assignment":{captures:{"1":{name:"variable.name.odin"},"2":{name:"punctuation.odin"},"3":{name:"variable.name.odin"},"4":{name:"punctuation.odin"},"5":{name:"variable.name.odin"},"6":{name:"keyword.operator.assignment.odin"}},match:/(?:([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(,)\p{space}*)?(?:([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(,)\p{space}*)?([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(:\p{space}*=)/dgv,name:"meta.definition.variable.odin"},"variable-name":{match:/\b[A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*\b/dgv,name:"variable.name.odin"}},scopeName:"source.odin",embeddedLangs:undefined,aliases:undefined})
|
|
2
|
+
|
|
3
|
+
export default [
|
|
4
|
+
lang
|
|
5
|
+
]
|