@shikijs/langs-precompiled 3.13.0 → 3.15.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/apex.mjs +1 -1
- package/dist/beancount.mjs +1 -1
- package/dist/bicep.mjs +1 -1
- package/dist/cadence.mjs +1 -1
- package/dist/cjs.d.mts +3 -0
- package/dist/cjs.mjs +2 -0
- package/dist/clarity.mjs +1 -1
- package/dist/csharp.mjs +1 -1
- package/dist/cts.d.mts +3 -0
- package/dist/cts.mjs +2 -0
- package/dist/fish.mjs +3 -1
- package/dist/fsharp.mjs +1 -1
- package/dist/hack.mjs +1 -1
- package/dist/hurl.d.mts +3 -0
- package/dist/hurl.mjs +12 -0
- package/dist/index.mjs +8 -0
- package/dist/javascript.mjs +1 -1
- package/dist/kdl.d.mts +3 -0
- package/dist/kdl.mjs +5 -0
- package/dist/latex.mjs +1 -1
- package/dist/lean.mjs +1 -1
- package/dist/llvm.mjs +1 -1
- package/dist/mjs.d.mts +3 -0
- package/dist/mjs.mjs +2 -0
- package/dist/move.mjs +1 -1
- package/dist/mts.d.mts +3 -0
- package/dist/mts.mjs +2 -0
- package/dist/nix.mjs +1 -1
- package/dist/nushell.mjs +1 -1
- package/dist/pkl.d.mts +3 -0
- package/dist/pkl.mjs +5 -0
- package/dist/rosmsg.d.mts +3 -0
- package/dist/rosmsg.mjs +5 -0
- package/dist/tex.mjs +1 -1
- package/dist/typescript.mjs +1 -1
- package/dist/v.mjs +1 -1
- package/package.json +11 -3
package/dist/move.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const lang = Object.freeze({displayName:"Move",name:"move",patterns:[{include:"#address"},{include:"#comments"},{include:"#module"},{include:"#script"},{include:"#annotation"},{include:"#comments"},{include:"#annotation"},{include:"#entry"},{include:"#public-scope"},{include:"#public"},{include:"#native"},{include:"#import"},{include:"#friend"},{include:"#const"},{include:"#struct"},{include:"#has_ability"},{include:"#enum"},{include:"#macro"},{include:"#fun"},{include:"#spec"}],repository:{"=== DEPRECATED_BELOW ===":{},abilities:{match:/\b(store|key|drop|copy)\b/dgv,name:"support.type.ability.move"},address:{begin:/\b(address)\b/dgv,beginCaptures:{"1":{name:"storage.modifier.type.address.keyword.move"}},end:/(?<=\})/dgv,name:"meta.address_block.move",patterns:[{include:"#comments"},{begin:/(?<=address)/dgv,end:/(?=\{)/dgv,name:"meta.address.definition.move",patterns:[{include:"#comments"},{include:"#address_literal"},{match:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,name:"entity.name.type.move"}]},{include:"#module"}]},annotation:{begin:/#\[/dgv,end:/\]/dgv,name:"support.constant.annotation.move",patterns:[{match:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*(?==)/dgv,name:"meta.annotation.name.move"},{begin:/=/dgv,end:/(?=[\]\,])/dgv,name:"meta.annotation.value.move",patterns:[{include:"#literals"}]}]},as:{match:/\b(as)\b/dgv,name:"keyword.control.as.move"},"as-import":{match:/\b(as)\b/dgv,name:"meta.import.as.move"},block:{begin:/\{/dgv,end:/\}/dgv,name:"meta.block.move",patterns:[{include:"#expr"}]},"block-comments":{patterns:[{begin:/\/\*[\!\*](?![\*\/])/dgv,end:/\*\//dgv,name:"comment.block.documentation.move"},{begin:/\/\*/dgv,end:/\*\//dgv,name:"comment.block.move"}]},capitalized:{match:/\b([A-Z][0-9A-Z_a-z]*)\b/dgv,name:"entity.name.type.use.move"},comments:{name:"meta.comments.move",patterns:[{include:"#doc-comments"},{include:"#line-comments"},{include:"#block-comments"}]},const:{begin:/\b(const)\b/dgv,beginCaptures:{"1":{name:"storage.modifier.const.move"}},end:/;/dgv,name:"meta.const.move",patterns:[{include:"#comments"},{include:"#primitives"},{include:"#literals"},{include:"#types"},{match:/\b([A-Z][0-9A-Z_]+)\b/dgv,name:"constant.other.move"},{include:"#error_const"}]},control:{match:/\b(return|while|loop|if|else|break|continue|abort)\b/dgv,name:"keyword.control.move"},"doc-comments":{begin:/\/\/\//dgv,end:/(?=\n?$)/dgv,name:"comment.block.documentation.move",patterns:[{captures:{"1":{name:"markup.underline.link.move"}},match:/`([\p{L}\p{M}\p{N}\p{Pc}]+)`/dgv}]},entry:{match:/\b(entry)\b/dgv,name:"storage.modifier.visibility.entry.move"},enum:{begin:/\b(enum)\b/dgv,beginCaptures:{"1":{name:"keyword.control.enum.move"}},end:/(?<=\})/dgv,name:"meta.enum.move",patterns:[{include:"#comments"},{include:"#escaped_identifier"},{include:"#type_param"},{match:/\b[A-Z][0-9A-Z_a-z]*\b/dgv,name:"entity.name.type.enum.move"},{include:"#has"},{include:"#abilities"},{begin:/\{/dgv,end:/\}/dgv,name:"meta.enum.definition.move",patterns:[{include:"#comments"},{match:/\b([A-Z][0-9A-Z_a-z]*)\b(?=\p{space}*\()/dgv,name:"entity.name.function.enum.move"},{match:/\b([A-Z][0-9A-Z_a-z]*)\b/dgv,name:"entity.name.type.enum.move"},{begin:/\(/dgv,end:/\)/dgv,name:"meta.enum.tuple.move",patterns:[{include:"#comments"},{include:"#expr_generic"},{include:"#capitalized"},{include:"#types"}]},{begin:/\{/dgv,end:/\}/dgv,name:"meta.enum.struct.move",patterns:[{include:"#comments"},{include:"#escaped_identifier"},{include:"#expr_generic"},{include:"#capitalized"},{include:"#types"}]}]}]},error_const:{match:/\b(E[A-Z][0-9A-Z_a-z]*)\b/dgv,name:"variable.other.error.const.move"},escaped_identifier:{begin:/`/dgv,end:/`/dgv,name:"variable.language.escaped.move"},expr:{name:"meta.expression.move",patterns:[{include:"#comments"},{include:"#escaped_identifier"},{include:"#expr_generic"},{include:"#packed_field"},{include:"#import"},{include:"#as"},{include:"#mut"},{include:"#let"},{include:"#types"},{include:"#literals"},{include:"#control"},{include:"#move_copy"},{include:"#resource_methods"},{include:"#self_access"},{include:"#module_access"},{include:"#label"},{include:"#macro_call"},{include:"#local_call"},{include:"#method_call"},{include:"#path_access"},{include:"#match_expression"},{match:/\$(?=[a-z])/dgv,name:"keyword.operator.macro.dollar.move"},{match:/(?<=\$)[a-z][0-9A-Z_a-z]*/dgv,name:"variable.other.meta.move"},{match:/\b([A-Z][A-Z_]+)\b/dgv,name:"constant.other.move"},{include:"#error_const"},{match:/\b([A-Z][0-9A-Z_a-z]*)\b/dgv,name:"entity.name.type.move"},{include:"#paren"},{include:"#block"}]},expr_generic:{begin:/<(?=([\,0-9\<\>A-Z_a-z\p{space}]+>))/dgv,end:/>/dgv,name:"meta.expression.generic.type.move",patterns:[{include:"#comments"},{include:"#types"},{include:"#capitalized"},{include:"#expr_generic"}]},friend:{begin:/\b(friend)\b/dgv,beginCaptures:{"1":{name:"storage.modifier.type.move"}},end:/;/dgv,name:"meta.friend.move",patterns:[{include:"#comments"},{include:"#address_literal"},{match:/\b([A-Za-z][0-9A-Z_a-z]*)\b/dgv,name:"entity.name.type.module.move"}]},fun:{patterns:[{include:"#fun_signature"},{include:"#block"}]},fun_body:{begin:/\{/dgv,end:/(?<=\})/dgv,name:"meta.fun_body.move",patterns:[{include:"#expr"}]},fun_call:{begin:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*(?:<[\,\p{L}\p{M}\p{N}\p{Pc}\p{space}]+>)?\p{space}*\(/dgv,beginCaptures:{"1":{name:"entity.name.function.call.move"}},end:/\)/dgv,name:"meta.fun_call.move",patterns:[{include:"#comments"},{include:"#resource_methods"},{include:"#self_access"},{include:"#module_access"},{include:"#move_copy"},{include:"#literals"},{include:"#fun_call"},{include:"#block"},{include:"#mut"},{include:"#as"}]},fun_signature:{begin:/\b(fun)\b/dgv,beginCaptures:{"1":{name:"storage.modifier.fun.move"}},end:/(?=[\;\{])/dgv,name:"meta.fun_signature.move",patterns:[{include:"#comments"},{include:"#module_access"},{include:"#capitalized"},{include:"#types"},{include:"#mut"},{begin:/(?<=\bfun)/dgv,end:/(?=[\(\<])/dgv,name:"meta.function_name.move",patterns:[{include:"#comments"},{include:"#escaped_identifier"},{match:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,name:"entity.name.function.move"}]},{include:"#fun_type_param"},{begin:/\(/dgv,end:/\)/dgv,name:"meta.parentheses.move",patterns:[{include:"#comments"},{include:"#self_access"},{include:"#expr_generic"},{include:"#escaped_identifier"},{include:"#module_access"},{include:"#capitalized"},{include:"#types"},{include:"#mut"}]},{match:/\b(acquires)\b/dgv,name:"storage.modifier"}]},fun_type_param:{begin:/</dgv,end:/>/dgv,name:"meta.fun_generic_param.move",patterns:[{include:"#comments"},{include:"#types"},{include:"#phantom"},{include:"#capitalized"},{include:"#module_access"},{include:"#abilities"}]},has:{match:/\b(has)\b/dgv,name:"keyword.control.ability.has.move"},has_ability:{begin:/(?<=[\)\}])\p{space}+(has)\b/dgv,beginCaptures:{"1":{name:"storage.modifier.type.move"}},end:/;/dgv,name:"meta.has.ability.move",patterns:[{include:"#comments"},{include:"#abilities"}]},ident:{match:/\b([A-Za-z][0-9A-Z_a-z]*)\b/dgv,name:"meta.identifier.move"},import:{begin:/\b(use)\b/dgv,beginCaptures:{"1":{name:"storage.modifier.type.move"}},end:/;/dgv,name:"meta.import.move",patterns:[{include:"#comments"},{include:"#use_fun"},{include:"#address_literal"},{include:"#as-import"},{match:/\b([A-Z][\p{L}\p{M}\p{N}\p{Pc}]*)\b/dgv,name:"entity.name.type.move"},{begin:/\{/dgv,end:/\}/dgv,patterns:[{include:"#comments"},{include:"#as-import"},{match:/\b([A-Z][\p{L}\p{M}\p{N}\p{Pc}]*)\b/dgv,name:"entity.name.type.move"}]},{match:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,name:"meta.entity.name.type.module.move"}]},inline:{match:/\b(inline)\b/dgv,name:"storage.modifier.visibility.inline.move"},label:{match:/'[a-z][0-9_a-z]*/dgv,name:"string.quoted.single.label.move"},let:{match:/\b(let)\b/dgv,name:"keyword.control.move"},"line-comments":{begin:/\/\//dgv,end:/(?=\n?$)/dgv,name:"comment.line.double-slash.move"},literals:{name:"meta.literal.move",patterns:[{match:/@0x\p{AHex}+/dgv,name:"support.constant.address.base16.move"},{match:/@[A-Za-z][0-9A-Z_a-z]*/dgv,name:"support.constant.address.name.move"},{match:/0x[_\p{AHex}]+(?:u(?:8|16|32|64|128|256))?/dgv,name:"constant.numeric.hex.move"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}]|(?<!\.)\.)[0-9][0-9_]*(?:\.(?!\.)(?:[0-9][0-9_]*)?)?(?:[Ee][\-\+]?[0-9_]+)?(?:u(?:8|16|32|64|128|256))?/dgv,name:"constant.numeric.move"},{begin:/\bb"/dgv,end:/"/dgv,name:"meta.vector.literal.ascii.move",patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.move"},{match:/\\[\x00"nrt]/dgv,name:"constant.character.escape.move"},{match:/\\x\p{AHex}\p{AHex}/dgv,name:"constant.character.escape.hex.move"},{match:/[\x00-\x7F]/dgv,name:"string.quoted.double.raw.move"}]},{begin:/x"/dgv,end:/"/dgv,name:"meta.vector.literal.hex.move",patterns:[{match:/\p{AHex}+/dgv,name:"constant.character.move"}]},{match:/\b(?:true|false)\b/dgv,name:"constant.language.boolean.move"},{begin:/\b(vector)\b\[/dgv,captures:{"1":{name:"support.type.vector.move"}},end:/\]/dgv,name:"meta.vector.literal.move",patterns:[{include:"#expr"}]}]},local_call:{match:/\b([a-z][0-9_a-z]*)(?=[\(\<])/dgv,name:"entity.name.function.call.local.move"},macro:{begin:/\b(macro)\b/dgv,beginCaptures:{"1":{name:"keyword.control.macro.move"}},end:/(?<=\})/dgv,name:"meta.macro.move",patterns:[{include:"#comments"},{include:"#fun"}]},macro_call:{captures:{"2":{name:"support.function.macro.move"}},match:/(\b|\.)([a-z][0-9A-Z_a-z]*)!/dgv,name:"meta.macro.call"},match_expression:{begin:/\b(match)\b/dgv,beginCaptures:{"1":{name:"keyword.control.match.move"}},end:/(?<=\})/dgv,name:"meta.match.move",patterns:[{include:"#comments"},{include:"#escaped_identifier"},{include:"#types"},{begin:/\{/dgv,end:/\}/dgv,name:"meta.match.block.move",patterns:[{match:/\b(=>)\b/dgv,name:"operator.match.move"},{include:"#expr"}]},{include:"#expr"}]},method_call:{captures:{"1":{name:"entity.name.function.call.path.move"}},match:/\.([a-z][0-9_a-z]*)(?=[\(\<])/dgv,name:"meta.path.call.move"},module:{begin:/\b(module)\b/dgv,beginCaptures:{"1":{name:"storage.modifier.type.move"}},end:/(?<=[\;\}])/dgv,name:"meta.module.move",patterns:[{include:"#comments"},{begin:/(?<=\b(module)\b)/dgv,end:/(?=[\;\{])/dgv,patterns:[{include:"#comments"},{include:"#escaped_identifier"},{begin:/(?<=\b(module))/dgv,end:/(?=[\(\)\:\{])/dgv,name:"constant.other.move",patterns:[{include:"#comments"},{include:"#escaped_identifier"}]},{begin:/(?<=::)/dgv,end:/(?=[\;\{\p{space}])/dgv,name:"entity.name.type.move",patterns:[{include:"#comments"},{include:"#escaped_identifier"}]}]},{begin:/\{/dgv,end:/\}/dgv,name:"meta.module_scope.move",patterns:[{include:"#comments"},{include:"#annotation"},{include:"#entry"},{include:"#public-scope"},{include:"#public"},{include:"#native"},{include:"#import"},{include:"#friend"},{include:"#const"},{include:"#struct"},{include:"#has_ability"},{include:"#enum"},{include:"#macro"},{include:"#fun"},{include:"#spec"}]}]},module_access:{captures:{"1":{name:"meta.entity.name.type.accessed.module.move"},"2":{name:"entity.name.function.call.move"}},match:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)::([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,name:"meta.module_access.move"},module_label:{begin:/^\p{space}*(module)\b/dgv,end:/;\p{space}*(?=\n?$)/dgv,name:"meta.module.label.move",patterns:[{include:"#comments"},{include:"#escaped_identifier"},{begin:/(?<=\bmodule\b)/dgv,end:/(?=[\(\)\:\{])/dgv,name:"constant.other.move"},{begin:/(?<=::)/dgv,end:/(?=[\{\p{space}])/dgv,name:"entity.name.type.move"}]},move_copy:{match:/\b(move|copy)\b/dgv,name:"variable.language.move"},mut:{match:/\b(mut)\b/dgv,name:"storage.modifier.mut.move"},native:{match:/\b(native)\b/dgv,name:"storage.modifier.visibility.native.move"},packed_field:{match:/[a-z][0-9_a-z]+\p{space}*:\p{space}*(?=\p{space})/dgv,name:"meta.struct.field.move"},paren:{begin:/\(/dgv,end:/\)/dgv,name:"meta.paren.move",patterns:[{include:"#expr"}]},path_access:{match:/\.[a-z][0-9_a-z]*\b/dgv,name:"meta.path.access.move"},phantom:{match:/\b(phantom)\b/dgv,name:"keyword.control.phantom.move"},primitives:{match:/\b(u8|u16|u32|u64|u128|u256|address|bool|signer)\b/dgv,name:"support.type.primitives.move"},public:{match:/\b(public)\b/dgv,name:"storage.modifier.visibility.public.move"},"public-scope":{begin:/(?<=\b(public))\p{space}*\(/dgv,end:/\)/dgv,name:"meta.public.scoped.move",patterns:[{include:"#comments"},{match:/\b(friend|script|package)\b/dgv,name:"keyword.control.public.scope.move"}]},resource_methods:{match:/\b(borrow_global|borrow_global_mut|exists|move_from|move_to_sender|move_to)\b/dgv,name:"support.function.typed.move"},script:{begin:/\b(script)\b/dgv,beginCaptures:{"1":{name:"storage.modifier.script.move"}},end:/(?<=\})/dgv,name:"meta.script.move",patterns:[{include:"#comments"},{begin:/\{/dgv,end:/\}/dgv,name:"meta.script_scope.move",patterns:[{include:"#const"},{include:"#comments"},{include:"#import"},{include:"#fun"}]}]},self_access:{captures:{"1":{name:"variable.language.self.move"},"2":{name:"entity.name.function.call.move"}},match:/\b(Self)::([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,name:"meta.self_access.move"},spec:{begin:/\b(spec)\b/dgv,beginCaptures:{"1":{name:"storage.modifier.spec.move"}},end:/(?<=[\;\}])/dgv,name:"meta.spec.move",patterns:[{match:/\b(module|schema|struct|fun)/dgv,name:"storage.modifier.spec.target.move"},{match:/\b(define)/dgv,name:"storage.modifier.spec.define.move"},{match:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,name:"entity.name.function.move"},{begin:/\{/dgv,end:/\}/dgv,patterns:[{include:"#comments"},{include:"#spec_block"},{include:"#spec_types"},{include:"#spec_define"},{include:"#spec_keywords"},{include:"#control"},{include:"#fun_call"},{include:"#literals"},{include:"#types"},{include:"#let"}]}]},spec_block:{begin:/\{/dgv,end:/\}/dgv,name:"meta.spec_block.move",patterns:[{include:"#comments"},{include:"#spec_block"},{include:"#spec_types"},{include:"#fun_call"},{include:"#literals"},{include:"#control"},{include:"#types"},{include:"#let"}]},spec_define:{begin:/\b(define)\b/dgv,beginCaptures:{"1":{name:"keyword.control.move.spec"}},end:/(?=[\;\{])/dgv,name:"meta.spec_define.move",patterns:[{include:"#comments"},{include:"#spec_types"},{include:"#types"},{begin:/(?<=\bdefine)/dgv,end:/(?=\()/dgv,patterns:[{include:"#comments"},{match:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,name:"entity.name.function.move"}]}]},spec_keywords:{match:/\b(global|pack|unpack|pragma|native|include|ensures|requires|invariant|apply|aborts_if|modifies)\b/dgv,name:"keyword.control.move.spec"},spec_types:{match:/\b(range|num|vector|bool|u8|u16|u32|u64|u128|u256|address)\b/dgv,name:"support.type.vector.move"},struct:{begin:/\b(struct)\b/dgv,beginCaptures:{"1":{name:"storage.modifier.type.move"}},end:/(?<=[\)\;\}])/dgv,name:"meta.struct.move",patterns:[{include:"#comments"},{include:"#escaped_identifier"},{include:"#has"},{include:"#abilities"},{match:/\b[A-Z][0-9A-Z_a-z]*\b/dgv,name:"entity.name.type.struct.move"},{begin:/\(/dgv,end:/\)/dgv,name:"meta.struct.paren.move",patterns:[{include:"#comments"},{include:"#capitalized"},{include:"#types"}]},{include:"#type_param"},{begin:/\(/dgv,end:/(?<=\))/dgv,name:"meta.struct.paren.move",patterns:[{include:"#comments"},{include:"#types"}]},{begin:/\{/dgv,end:/\}/dgv,name:"meta.struct.body.move",patterns:[{include:"#comments"},{include:"#self_access"},{include:"#escaped_identifier"},{include:"#module_access"},{include:"#expr_generic"},{include:"#capitalized"},{include:"#types"}]},{include:"#has_ability"}]},struct_pack:{begin:/(?<=[0-9\>A-Z_a-z])\p{space}*\{/dgv,end:/\}/dgv,name:"meta.struct.pack.move",patterns:[{include:"#comments"}]},type_param:{begin:/</dgv,end:/>/dgv,name:"meta.generic_param.move",patterns:[{include:"#comments"},{include:"#phantom"},{include:"#capitalized"},{include:"#module_access"},{include:"#abilities"}]},types:{name:"meta.types.move",patterns:[{include:"#primitives"},{include:"#vector"}]},use_fun:{begin:/\b(fun)\b/dgv,beginCaptures:{"1":{name:"storage.modifier.fun.move"}},end:/(?=;)/dgv,name:"meta.import.fun.move",patterns:[{include:"#comments"},{match:/\b(as)\b/dgv,name:"keyword.control.as.move"},{match:/\b(Self)\b/dgv,name:"variable.language.self.use.fun.move"},{match:/\b(_______[a-z][0-9_a-z]+)\b/dgv,name:"entity.name.function.use.move"},{include:"#types"},{include:"#escaped_identifier"},{include:"#capitalized"}]},vector:{match:/\b(vector)\b/dgv,name:"support.type.vector.move"}},scopeName:"source.move",embeddedLangs:undefined,aliases:undefined})
|
|
1
|
+
const lang = Object.freeze({displayName:"Move",name:"move",patterns:[{include:"#address"},{include:"#comments"},{include:"#extend_module"},{include:"#module"},{include:"#script"},{include:"#annotation"},{include:"#entry"},{include:"#public-scope"},{include:"#public"},{include:"#native"},{include:"#import"},{include:"#friend"},{include:"#const"},{include:"#struct"},{include:"#has_ability"},{include:"#enum"},{include:"#macro"},{include:"#fun"},{include:"#spec"}],repository:{"=== DEPRECATED_BELOW ===":{},abilities:{match:/\b(store|key|drop|copy)\b/dgv,name:"support.type.ability.move"},address:{begin:/\b(address)\b/dgv,beginCaptures:{"1":{name:"storage.modifier.type.address.keyword.move"}},end:/(?<=\})/dgv,name:"meta.address_block.move",patterns:[{include:"#comments"},{begin:/(?<=address)/dgv,end:/(?=\{)/dgv,name:"meta.address.definition.move",patterns:[{include:"#comments"},{include:"#address_literal"},{match:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,name:"entity.name.type.move"}]},{include:"#module"}]},annotation:{begin:/#\[/dgv,end:/\]/dgv,name:"support.constant.annotation.move",patterns:[{include:"#comments"},{match:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*(?==)/dgv,name:"meta.annotation.name.move"},{begin:/=/dgv,end:/(?=[\]\,])/dgv,name:"meta.annotation.value.move",patterns:[{include:"#literals"}]}]},as:{match:/\b(as)\b/dgv,name:"keyword.control.as.move"},"as-import":{match:/\b(as)\b/dgv,name:"meta.import.as.move"},block:{begin:/\{/dgv,end:/\}/dgv,name:"meta.block.move",patterns:[{include:"#expr"}]},"block-comments":{patterns:[{begin:/\/\*[\!\*](?![\*\/])/dgv,end:/\*\//dgv,name:"comment.block.documentation.move"},{begin:/\/\*/dgv,end:/\*\//dgv,name:"comment.block.move"}]},capitalized:{match:/\b([A-Z][0-9A-Z_a-z]*)\b/dgv,name:"entity.name.type.use.move"},comments:{name:"meta.comments.move",patterns:[{include:"#doc-comments"},{include:"#line-comments"},{include:"#block-comments"}]},const:{begin:/\b(const)\b/dgv,beginCaptures:{"1":{name:"storage.modifier.const.move"}},end:/;/dgv,name:"meta.const.move",patterns:[{include:"#comments"},{include:"#primitives"},{include:"#literals"},{include:"#types"},{match:/\b([A-Z][0-9A-Z_]+)\b/dgv,name:"constant.other.move"},{include:"#error_const"}]},control:{match:/\b(return|while|loop|if|else|break|continue|abort)\b/dgv,name:"keyword.control.move"},"doc-comments":{begin:/\/\/\//dgv,end:/(?=\n?$)/dgv,name:"comment.block.documentation.move",patterns:[{captures:{"1":{name:"markup.underline.link.move"}},match:/`([\p{L}\p{M}\p{N}\p{Pc}]+)`/dgv}]},entry:{match:/\b(entry)\b/dgv,name:"storage.modifier.visibility.entry.move"},enum:{begin:/\b(enum)\b/dgv,beginCaptures:{"1":{name:"keyword.control.enum.move"}},end:/(?<=\})/dgv,name:"meta.enum.move",patterns:[{include:"#comments"},{include:"#escaped_identifier"},{include:"#type_param"},{match:/\b[A-Z][0-9A-Z_a-z]*\b/dgv,name:"entity.name.type.enum.move"},{include:"#has"},{include:"#abilities"},{begin:/\{/dgv,end:/\}/dgv,name:"meta.enum.definition.move",patterns:[{include:"#comments"},{match:/\b([A-Z][0-9A-Z_a-z]*)\b(?=\p{space}*\()/dgv,name:"entity.name.function.enum.move"},{match:/\b([A-Z][0-9A-Z_a-z]*)\b/dgv,name:"entity.name.type.enum.move"},{begin:/\(/dgv,end:/\)/dgv,name:"meta.enum.tuple.move",patterns:[{include:"#comments"},{include:"#expr_generic"},{include:"#capitalized"},{include:"#types"}]},{begin:/\{/dgv,end:/\}/dgv,name:"meta.enum.struct.move",patterns:[{include:"#comments"},{include:"#escaped_identifier"},{include:"#expr_generic"},{include:"#capitalized"},{include:"#types"}]}]}]},error_const:{match:/\b(E[A-Z][0-9A-Z_a-z]*)\b/dgv,name:"variable.other.error.const.move"},escaped_identifier:{begin:/`/dgv,end:/`/dgv,name:"variable.language.escaped.move"},expr:{name:"meta.expression.move",patterns:[{include:"#comments"},{include:"#escaped_identifier"},{include:"#expr_generic"},{include:"#packed_field"},{include:"#import"},{include:"#as"},{include:"#mut"},{include:"#let"},{include:"#types"},{include:"#literals"},{include:"#control"},{include:"#move_copy"},{include:"#resource_methods"},{include:"#self_access"},{include:"#module_access"},{include:"#label"},{include:"#macro_call"},{include:"#local_call"},{include:"#method_call"},{include:"#path_access"},{include:"#match_expression"},{match:/\$(?=[a-z])/dgv,name:"keyword.operator.macro.dollar.move"},{match:/(?<=\$)[a-z][0-9A-Z_a-z]*/dgv,name:"variable.other.meta.move"},{match:/\b([A-Z][A-Z_]+)\b/dgv,name:"constant.other.move"},{include:"#error_const"},{match:/\b([A-Z][0-9A-Z_a-z]*)\b/dgv,name:"entity.name.type.move"},{include:"#paren"},{include:"#block"}]},expr_generic:{begin:/<(?=([\,0-9\<\>A-Z_a-z\p{space}]+>))/dgv,end:/>/dgv,name:"meta.expression.generic.type.move",patterns:[{include:"#comments"},{include:"#types"},{include:"#capitalized"},{include:"#expr_generic"}]},extend_module:{begin:/\b(extend)\b/dgv,beginCaptures:{"1":{name:"storage.modifier.type.extend.move"}},end:/(?<=[\;\}])/dgv,name:"meta.extend_module.move",patterns:[{include:"#comments"},{include:"#module"}]},friend:{begin:/\b(friend)\b/dgv,beginCaptures:{"1":{name:"storage.modifier.type.move"}},end:/;/dgv,name:"meta.friend.move",patterns:[{include:"#comments"},{include:"#address_literal"},{match:/\b([A-Za-z][0-9A-Z_a-z]*)\b/dgv,name:"entity.name.type.module.move"}]},fun:{patterns:[{include:"#fun_signature"},{include:"#block"}]},fun_body:{begin:/\{/dgv,end:/(?<=\})/dgv,name:"meta.fun_body.move",patterns:[{include:"#expr"}]},fun_call:{begin:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*(?:<[\,\p{L}\p{M}\p{N}\p{Pc}\p{space}]+>)?\p{space}*\(/dgv,beginCaptures:{"1":{name:"entity.name.function.call.move"}},end:/\)/dgv,name:"meta.fun_call.move",patterns:[{include:"#comments"},{include:"#resource_methods"},{include:"#self_access"},{include:"#module_access"},{include:"#move_copy"},{include:"#literals"},{include:"#fun_call"},{include:"#block"},{include:"#mut"},{include:"#as"}]},fun_signature:{begin:/\b(fun)\b/dgv,beginCaptures:{"1":{name:"storage.modifier.fun.move"}},end:/(?=[\;\{])/dgv,name:"meta.fun_signature.move",patterns:[{include:"#comments"},{include:"#module_access"},{include:"#capitalized"},{include:"#types"},{include:"#mut"},{begin:/(?<=\bfun)/dgv,end:/(?=[\(\<])/dgv,name:"meta.function_name.move",patterns:[{include:"#comments"},{include:"#escaped_identifier"},{match:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,name:"entity.name.function.move"}]},{include:"#fun_type_param"},{begin:/\(/dgv,end:/\)/dgv,name:"meta.parentheses.move",patterns:[{include:"#comments"},{include:"#self_access"},{include:"#expr_generic"},{include:"#escaped_identifier"},{include:"#module_access"},{include:"#capitalized"},{include:"#types"},{include:"#mut"}]},{match:/\b(acquires)\b/dgv,name:"storage.modifier"}]},fun_type_param:{begin:/</dgv,end:/>/dgv,name:"meta.fun_generic_param.move",patterns:[{include:"#comments"},{include:"#types"},{include:"#phantom"},{include:"#capitalized"},{include:"#module_access"},{include:"#abilities"}]},has:{match:/\b(has)\b/dgv,name:"keyword.control.ability.has.move"},has_ability:{begin:/(?<=[\)\}])\p{space}+(has)\b/dgv,beginCaptures:{"1":{name:"storage.modifier.type.move"}},end:/;/dgv,name:"meta.has.ability.move",patterns:[{include:"#comments"},{include:"#abilities"}]},ident:{match:/\b([A-Za-z][0-9A-Z_a-z]*)\b/dgv,name:"meta.identifier.move"},import:{begin:/\b(use)\b/dgv,beginCaptures:{"1":{name:"storage.modifier.type.move"}},end:/;/dgv,name:"meta.import.move",patterns:[{include:"#comments"},{include:"#use_fun"},{include:"#address_literal"},{include:"#as-import"},{match:/\b([A-Z][\p{L}\p{M}\p{N}\p{Pc}]*)\b/dgv,name:"entity.name.type.move"},{begin:/\{/dgv,end:/\}/dgv,patterns:[{include:"#comments"},{include:"#as-import"},{match:/\b([A-Z][\p{L}\p{M}\p{N}\p{Pc}]*)\b/dgv,name:"entity.name.type.move"}]},{match:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,name:"meta.entity.name.type.module.move"}]},inline:{match:/\b(inline)\b/dgv,name:"storage.modifier.visibility.inline.move"},label:{match:/'[a-z][0-9_a-z]*/dgv,name:"string.quoted.single.label.move"},let:{match:/\b(let)\b/dgv,name:"keyword.control.move"},"line-comments":{begin:/\/\//dgv,end:/(?=\n?$)/dgv,name:"comment.line.double-slash.move"},literals:{name:"meta.literal.move",patterns:[{match:/@0x\p{AHex}+/dgv,name:"support.constant.address.base16.move"},{match:/@[A-Za-z][0-9A-Z_a-z]*/dgv,name:"support.constant.address.name.move"},{match:/0x[_\p{AHex}]+(?:u(?:8|16|32|64|128|256))?/dgv,name:"constant.numeric.hex.move"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}]|(?<!\.)\.)[0-9][0-9_]*(?:\.(?!\.)(?:[0-9][0-9_]*)?)?(?:[Ee][\-\+]?[0-9_]+)?(?:u(?:8|16|32|64|128|256))?/dgv,name:"constant.numeric.move"},{begin:/\bb"/dgv,end:/"/dgv,name:"meta.vector.literal.ascii.move",patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.move"},{match:/\\[\x00"nrt]/dgv,name:"constant.character.escape.move"},{match:/\\x\p{AHex}\p{AHex}/dgv,name:"constant.character.escape.hex.move"},{match:/[\x00-\x7F]/dgv,name:"string.quoted.double.raw.move"}]},{begin:/x"/dgv,end:/"/dgv,name:"meta.vector.literal.hex.move",patterns:[{match:/\p{AHex}+/dgv,name:"constant.character.move"}]},{match:/\b(?:true|false)\b/dgv,name:"constant.language.boolean.move"},{begin:/\b(vector)\b\[/dgv,captures:{"1":{name:"support.type.vector.move"}},end:/\]/dgv,name:"meta.vector.literal.move",patterns:[{include:"#expr"}]}]},local_call:{match:/\b([a-z][0-9_a-z]*)(?=[\(\<])/dgv,name:"entity.name.function.call.local.move"},macro:{begin:/\b(macro)\b/dgv,beginCaptures:{"1":{name:"keyword.control.macro.move"}},end:/(?<=\})/dgv,name:"meta.macro.move",patterns:[{include:"#comments"},{include:"#fun"}]},macro_call:{captures:{"2":{name:"support.function.macro.move"},"3":{name:"support.function.operator.macro.move"}},match:/(\b|\.)([a-z][0-9A-Z_a-z]*)(!)/dgv,name:"meta.macro.call"},match_expression:{begin:/\b(match)\b/dgv,beginCaptures:{"1":{name:"keyword.control.match.move"}},end:/(?<=\})/dgv,name:"meta.match.move",patterns:[{include:"#comments"},{include:"#escaped_identifier"},{include:"#types"},{begin:/\{/dgv,end:/\}/dgv,name:"meta.match.block.move",patterns:[{match:/\b(=>)\b/dgv,name:"operator.match.move"},{include:"#expr"}]},{include:"#expr"}]},method_call:{captures:{"1":{name:"entity.name.function.call.path.move"}},match:/\.([a-z][0-9_a-z]*)(?=[\(\<])/dgv,name:"meta.path.call.move"},module:{begin:/\b(module)\b/dgv,beginCaptures:{"1":{name:"storage.modifier.type.move"}},end:/(?<=[\;\}])/dgv,name:"meta.module.move",patterns:[{include:"#comments"},{begin:/(?<=\b(module)\b)/dgv,end:/(?=[\;\{])/dgv,patterns:[{include:"#comments"},{include:"#escaped_identifier"},{begin:/(?<=\b(module))/dgv,end:/(?=[\(\)\:\{])/dgv,name:"constant.other.move",patterns:[{include:"#comments"},{include:"#escaped_identifier"}]},{begin:/(?<=::)/dgv,end:/(?=[\;\{\p{space}])/dgv,name:"entity.name.type.move",patterns:[{include:"#comments"},{include:"#escaped_identifier"}]}]},{begin:/\{/dgv,end:/\}/dgv,name:"meta.module_scope.move",patterns:[{include:"#comments"},{include:"#annotation"},{include:"#entry"},{include:"#public-scope"},{include:"#public"},{include:"#native"},{include:"#import"},{include:"#friend"},{include:"#const"},{include:"#struct"},{include:"#has_ability"},{include:"#enum"},{include:"#macro"},{include:"#fun"},{include:"#spec"}]}]},module_access:{captures:{"1":{name:"meta.entity.name.type.accessed.module.move"},"2":{name:"entity.name.function.call.move"}},match:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)::([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,name:"meta.module_access.move"},move_copy:{match:/\b(move|copy)\b/dgv,name:"variable.language.move"},mut:{match:/\b(mut)\b/dgv,name:"storage.modifier.mut.move"},native:{match:/\b(native)\b/dgv,name:"storage.modifier.visibility.native.move"},packed_field:{match:/[a-z][0-9_a-z]+\p{space}*:\p{space}*(?=\p{space})/dgv,name:"meta.struct.field.move"},paren:{begin:/\(/dgv,end:/\)/dgv,name:"meta.paren.move",patterns:[{include:"#expr"}]},path_access:{match:/\.[a-z][0-9_a-z]*\b/dgv,name:"meta.path.access.move"},phantom:{match:/\b(phantom)\b/dgv,name:"keyword.control.phantom.move"},primitives:{match:/\b(u8|u16|u32|u64|u128|u256|address|bool|signer)\b/dgv,name:"support.type.primitives.move"},public:{match:/\b(public)\b/dgv,name:"storage.modifier.visibility.public.move"},"public-scope":{begin:/(?<=\b(public))\p{space}*\(/dgv,end:/\)/dgv,name:"meta.public.scoped.move",patterns:[{include:"#comments"},{match:/\b(friend|script|package)\b/dgv,name:"keyword.control.public.scope.move"}]},resource_methods:{match:/\b(borrow_global|borrow_global_mut|exists|move_from|move_to_sender|move_to)\b/dgv,name:"support.function.typed.move"},script:{begin:/\b(script)\b/dgv,beginCaptures:{"1":{name:"storage.modifier.script.move"}},end:/(?<=\})/dgv,name:"meta.script.move",patterns:[{include:"#comments"},{begin:/\{/dgv,end:/\}/dgv,name:"meta.script_scope.move",patterns:[{include:"#const"},{include:"#comments"},{include:"#import"},{include:"#fun"}]}]},self_access:{captures:{"1":{name:"variable.language.self.move"},"2":{name:"entity.name.function.call.move"}},match:/\b(Self)::([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,name:"meta.self_access.move"},spec:{begin:/\b(spec)\b/dgv,beginCaptures:{"1":{name:"storage.modifier.spec.move"}},end:/(?<=[\;\}])/dgv,name:"meta.spec.move",patterns:[{match:/\b(module|schema|struct|fun)/dgv,name:"storage.modifier.spec.target.move"},{match:/\b(define)/dgv,name:"storage.modifier.spec.define.move"},{match:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,name:"entity.name.function.move"},{begin:/\{/dgv,end:/\}/dgv,patterns:[{include:"#comments"},{include:"#spec_block"},{include:"#spec_types"},{include:"#spec_define"},{include:"#spec_keywords"},{include:"#control"},{include:"#fun_call"},{include:"#literals"},{include:"#types"},{include:"#let"}]}]},spec_block:{begin:/\{/dgv,end:/\}/dgv,name:"meta.spec_block.move",patterns:[{include:"#comments"},{include:"#spec_block"},{include:"#spec_types"},{include:"#fun_call"},{include:"#literals"},{include:"#control"},{include:"#types"},{include:"#let"}]},spec_define:{begin:/\b(define)\b/dgv,beginCaptures:{"1":{name:"keyword.control.move.spec"}},end:/(?=[\;\{])/dgv,name:"meta.spec_define.move",patterns:[{include:"#comments"},{include:"#spec_types"},{include:"#types"},{begin:/(?<=\bdefine)/dgv,end:/(?=\()/dgv,patterns:[{include:"#comments"},{match:/\b([\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv,name:"entity.name.function.move"}]}]},spec_keywords:{match:/\b(global|pack|unpack|pragma|native|include|ensures|requires|invariant|apply|aborts_if|modifies)\b/dgv,name:"keyword.control.move.spec"},spec_types:{match:/\b(range|num|vector|bool|u8|u16|u32|u64|u128|u256|address)\b/dgv,name:"support.type.vector.move"},struct:{begin:/\b(struct)\b/dgv,beginCaptures:{"1":{name:"storage.modifier.type.move"}},end:/(?<=[\)\;\}])/dgv,name:"meta.struct.move",patterns:[{include:"#comments"},{include:"#escaped_identifier"},{include:"#has"},{include:"#abilities"},{match:/\b[A-Z][0-9A-Z_a-z]*\b/dgv,name:"entity.name.type.struct.move"},{begin:/\(/dgv,end:/\)/dgv,name:"meta.struct.paren.move",patterns:[{include:"#comments"},{include:"#capitalized"},{include:"#types"}]},{include:"#type_param"},{begin:/\(/dgv,end:/(?<=\))/dgv,name:"meta.struct.paren.move",patterns:[{include:"#comments"},{include:"#types"}]},{begin:/\{/dgv,end:/\}/dgv,name:"meta.struct.body.move",patterns:[{include:"#comments"},{include:"#self_access"},{include:"#escaped_identifier"},{include:"#module_access"},{include:"#expr_generic"},{include:"#capitalized"},{include:"#types"}]},{include:"#has_ability"}]},struct_pack:{begin:/(?<=[0-9\>A-Z_a-z])\p{space}*\{/dgv,end:/\}/dgv,name:"meta.struct.pack.move",patterns:[{include:"#comments"}]},type_param:{begin:/</dgv,end:/>/dgv,name:"meta.generic_param.move",patterns:[{include:"#comments"},{include:"#phantom"},{include:"#capitalized"},{include:"#module_access"},{include:"#abilities"}]},types:{name:"meta.types.move",patterns:[{include:"#primitives"},{include:"#vector"}]},use_fun:{begin:/\b(fun)\b/dgv,beginCaptures:{"1":{name:"storage.modifier.fun.move"}},end:/(?=;)/dgv,name:"meta.import.fun.move",patterns:[{include:"#comments"},{match:/\b(as)\b/dgv,name:"keyword.control.as.move"},{match:/\b(Self)\b/dgv,name:"variable.language.self.use.fun.move"},{match:/\b(_______[a-z][0-9_a-z]+)\b/dgv,name:"entity.name.function.use.move"},{include:"#types"},{include:"#escaped_identifier"},{include:"#capitalized"}]},vector:{match:/\b(vector)\b/dgv,name:"support.type.vector.move"}},scopeName:"source.move",embeddedLangs:undefined,aliases:undefined})
|
|
2
2
|
|
|
3
3
|
export default [
|
|
4
4
|
lang
|
package/dist/mts.d.mts
ADDED
package/dist/mts.mjs
ADDED
package/dist/nix.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const lang = Object.freeze({displayName:"Nix",fileTypes:["nix"],name:"nix",patterns:[{include:"#expression"}],repository:{"attribute-bind":{patterns:[{include:"#attribute-name"},{include:"#attribute-bind-from-equals"}]},"attribute-bind-from-equals":{begin:/=/dgv,beginCaptures:{"0":{name:"keyword.operator.bind.nix"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.terminator.bind.nix"}},patterns:[{include:"#expression"}]},"attribute-inherit":{begin:/\binherit\b/dgv,beginCaptures:{"0":{name:"keyword.other.inherit.nix"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.terminator.inherit.nix"}},patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.section.function.arguments.nix"}},end:/(?=;)/dgv,patterns:[{begin:/\)/dgv,beginCaptures:{"0":{name:"punctuation.section.function.arguments.nix"}},end:/(?=;)/dgv,patterns:[{include:"#bad-reserved"},{include:"#attribute-name-single"},{include:"#others"}]},{include:"#expression"}]},{begin:/(?=[A-Z_a-z])/dgv,end:/(?=;)/dgv,patterns:[{include:"#bad-reserved"},{include:"#attribute-name-single"},{include:"#others"}]},{include:"#others"}]},"attribute-name":{patterns:[{match:/\b[A-Z_a-z][\-'0-9A-Z_a-z]*/dgv,name:"entity.other.attribute-name.multipart.nix"},{match:/\./dgv},{include:"#string-quoted"},{include:"#interpolation"}]},"attribute-name-single":{match:/\b[A-Z_a-z][\-'0-9A-Z_a-z]*/dgv,name:"entity.other.attribute-name.single.nix"},"attrset-contents":{patterns:[{include:"#attribute-inherit"},{include:"#bad-reserved"},{include:"#attribute-bind"},{include:"#others"}]},"attrset-definition":{begin:/(?=\{)/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{begin:/(\{)/dgv,beginCaptures:{"0":{name:"punctuation.definition.attrset.nix"}},end:/(\})/dgv,endCaptures:{"0":{name:"punctuation.definition.attrset.nix"}},patterns:[{include:"#attrset-contents"}]},{begin:/(?<=\})/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#expression-cont"}]}]},"attrset-definition-brace-opened":{patterns:[{begin:/(?<=\})/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#expression-cont"}]},{begin:/(?=[^\n]?)/dgv,end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.attrset.nix"}},patterns:[{include:"#attrset-contents"}]}]},"attrset-for-sure":{patterns:[{begin:/(?=\brec\b)/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{begin:/\brec\b/dgv,beginCaptures:{"0":{name:"keyword.other.nix"}},end:/(?=\{)/dgv,patterns:[{include:"#others"}]},{include:"#attrset-definition"},{include:"#others"}]},{begin:/(?=\{\p{space}*(\}|[^\,\?]*([\;\=])))/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#attrset-definition"},{include:"#others"}]}]},"attrset-or-function":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.attrset-or-function.nix"}},end:/(?=([\]\)\;\}]|\b(else|then)\b))/dgv,patterns:[{begin:/(?=(\p{space}*\}|"|\binherit\b|\$\{|\b[A-Z_a-z][\-'0-9A-Z_a-z]*(\p{space}*\.|\p{space}*=[^\=])))/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#attrset-definition-brace-opened"}]},{begin:/(?=(\.\.\.|\b[A-Z_a-z][\-'0-9A-Z_a-z]*\p{space}*[\,\?]))/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#function-definition-brace-opened"}]},{include:"#bad-reserved"},{begin:/\b[A-Z_a-z][\-'0-9A-Z_a-z]*/dgv,beginCaptures:{"0":{name:"variable.parameter.function.maybe.nix"}},end:/(?=([\]\)\;\}]|\b(else|then)\b))/dgv,patterns:[{begin:/(?=\.)/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#attrset-definition-brace-opened"}]},{begin:/\p{space}*(,)/dgv,beginCaptures:{"1":{name:"keyword.operator.nix"}},end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#function-definition-brace-opened"}]},{begin:/(?==)/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#attribute-bind-from-equals"},{include:"#attrset-definition-brace-opened"}]},{begin:/(?=\?)/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#function-parameter-default"},{begin:/,/dgv,beginCaptures:{"0":{name:"keyword.operator.nix"}},end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#function-definition-brace-opened"}]}]},{include:"#others"}]},{include:"#others"}]},"bad-reserved":{match:/(?<![\-'\p{L}\p{M}\p{N}\p{Pc}])(if|then|else|assert|with|let|in|rec|inherit)(?![\-'\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"invalid.illegal.reserved.nix"},comment:{patterns:[{begin:/\/\*([^\*]|\*[^\/])*/dgv,end:/\*\//dgv,name:"comment.block.nix",patterns:[{include:"#comment-remark"}]},{begin:/#/dgv,end:/(?=\n?$)/dgv,name:"comment.line.number-sign.nix",patterns:[{include:"#comment-remark"}]}]},"comment-remark":{captures:{"1":{name:"markup.bold.comment.nix"}},match:/(TODO|FIXME|BUG|!!!):?/dgv},constants:{patterns:[{begin:/\b(builtins|true|false|null)\b/dgv,beginCaptures:{"0":{name:"constant.language.nix"}},end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#expression-cont"}]},{begin:/\b(scopedImport|import|isNull|abort|throw|baseNameOf|dirOf|removeAttrs|map|toString|derivationStrict|derivation)\b/dgv,beginCaptures:{"0":{name:"support.function.nix"}},end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#expression-cont"}]},{begin:/\b[0-9]+\b/dgv,beginCaptures:{"0":{name:"constant.numeric.nix"}},end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#expression-cont"}]}]},expression:{patterns:[{include:"#parens-and-cont"},{include:"#list-and-cont"},{include:"#string"},{include:"#interpolation"},{include:"#with-assert"},{include:"#function-for-sure"},{include:"#attrset-for-sure"},{include:"#attrset-or-function"},{include:"#let"},{include:"#if"},{include:"#operator-unary"},{include:"#constants"},{include:"#bad-reserved"},{include:"#parameter-name-and-cont"},{include:"#others"}]},"expression-cont":{begin:/(?=[^\n]?)/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#parens"},{include:"#list"},{include:"#string"},{include:"#interpolation"},{include:"#function-for-sure"},{include:"#attrset-for-sure"},{include:"#attrset-or-function"},{match:/(\bor\b|\.|\|>|<\||==|!=?|<=?|>=?|&&|\|\||->|\/\/|\?|\+\+|[\-\*]|\/(?=([^\*]|(?=\n?$)))|\+)/dgv,name:"keyword.operator.nix"},{include:"#constants"},{include:"#bad-reserved"},{include:"#parameter-name"},{include:"#others"}]},"function-body":{begin:/(@\p{space}*([A-Z_a-z][\-'0-9A-Z_a-z]*)\p{space}*)?(:)/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#expression"}]},"function-body-from-colon":{begin:/(:)/dgv,beginCaptures:{"0":{name:"punctuation.definition.function.nix"}},end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#expression"}]},"function-contents":{patterns:[{include:"#bad-reserved"},{include:"#function-parameter"},{include:"#others"}]},"function-definition":{begin:/(?=[^\n]?)/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#function-body-from-colon"},{begin:/(?=[^\n]?)/dgv,end:/(?=:)/dgv,patterns:[{begin:/\b([A-Z_a-z][\-'0-9A-Z_a-z]*)/dgv,beginCaptures:{"0":{name:"variable.parameter.function.4.nix"}},end:/(?=:)/dgv,patterns:[{begin:/@/dgv,end:/(?=:)/dgv,patterns:[{include:"#function-header-until-colon-no-arg"},{include:"#others"}]},{include:"#others"}]},{begin:/(?=\{)/dgv,end:/(?=:)/dgv,patterns:[{include:"#function-header-until-colon-with-arg"}]}]},{include:"#others"}]},"function-definition-brace-opened":{begin:/(?=[^\n]?)/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#function-body-from-colon"},{begin:/(?=[^\n]?)/dgv,end:/(?=:)/dgv,patterns:[{include:"#function-header-close-brace-with-arg"},{begin:/(?=[^\n]?)/dgv,end:/(?=\})/dgv,patterns:[{include:"#function-contents"}]}]},{include:"#others"}]},"function-for-sure":{patterns:[{begin:/(?=(\b[A-Z_a-z][\-'0-9A-Z_a-z]*\p{space}*[\:\@]|\{[^\}]*\}\p{space}*:|\{[^"\#'\/\=\}]*[\,\?]))/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#function-definition"}]}]},"function-header-close-brace-no-arg":{begin:/\}/dgv,beginCaptures:{"0":{name:"punctuation.definition.entity.function.nix"}},end:/(?=:)/dgv,patterns:[{include:"#others"}]},"function-header-close-brace-with-arg":{begin:/\}/dgv,beginCaptures:{"0":{name:"punctuation.definition.entity.function.nix"}},end:/(?=:)/dgv,patterns:[{include:"#function-header-terminal-arg"},{include:"#others"}]},"function-header-open-brace":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.entity.function.2.nix"}},end:/(?=\})/dgv,patterns:[{include:"#function-contents"}]},"function-header-terminal-arg":{begin:/(?=@)/dgv,end:/(?=:)/dgv,patterns:[{begin:/@/dgv,end:/(?=:)/dgv,patterns:[{begin:/\b([A-Z_a-z][\-'0-9A-Z_a-z]*)/dgv,end:/(?=:)/dgv,name:"variable.parameter.function.3.nix"},{include:"#others"}]},{include:"#others"}]},"function-header-until-colon-no-arg":{begin:/(?=\{)/dgv,end:/(?=:)/dgv,patterns:[{include:"#function-header-open-brace"},{include:"#function-header-close-brace-no-arg"}]},"function-header-until-colon-with-arg":{begin:/(?=\{)/dgv,end:/(?=:)/dgv,patterns:[{include:"#function-header-open-brace"},{include:"#function-header-close-brace-with-arg"}]},"function-parameter":{patterns:[{begin:/(\.\.\.)/dgv,end:/(,|(?=\}))/dgv,name:"keyword.operator.nix",patterns:[{include:"#others"}]},{begin:/\b[A-Z_a-z][\-'0-9A-Z_a-z]*/dgv,beginCaptures:{"0":{name:"variable.parameter.function.1.nix"}},end:/(,|(?=\}))/dgv,endCaptures:{"0":{name:"keyword.operator.nix"}},patterns:[{include:"#whitespace"},{include:"#comment"},{include:"#function-parameter-default"},{include:"#expression"}]},{include:"#others"}]},"function-parameter-default":{begin:/\?/dgv,beginCaptures:{"0":{name:"keyword.operator.nix"}},end:/(?=[\,\}])/dgv,patterns:[{include:"#expression"}]},if:{begin:/(?=\bif\b)/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{begin:/\bif\b/dgv,beginCaptures:{"0":{name:"keyword.other.nix"}},end:/\bth(?=en\b)/dgv,endCaptures:{"0":{name:"keyword.other.nix"}},patterns:[{include:"#expression"}]},{begin:/(?<=th)en\b/dgv,beginCaptures:{"0":{name:"keyword.other.nix"}},end:/\bel(?=se\b)/dgv,endCaptures:{"0":{name:"keyword.other.nix"}},patterns:[{include:"#expression"}]},{begin:/(?<=el)se\b/dgv,beginCaptures:{"0":{name:"keyword.other.nix"}},end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,endCaptures:{"0":{name:"keyword.other.nix"}},patterns:[{include:"#expression"}]}]},illegal:{match:/[^\n]/dgv,name:"invalid.illegal"},interpolation:{begin:/\$\{/dgv,beginCaptures:{"0":{name:"punctuation.section.embedded.begin.nix"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.section.embedded.end.nix"}},name:"meta.embedded",patterns:[{include:"#expression"}]},let:{begin:/(?=\blet\b)/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{begin:/\blet\b/dgv,beginCaptures:{"0":{name:"keyword.other.nix"}},end:/(?=([\]\)\,\;\}]|\b(in|else|then)\b))/dgv,patterns:[{begin:/(?=\{)/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{begin:/\{/dgv,end:/\}/dgv,patterns:[{include:"#attrset-contents"}]},{begin:/(^|(?<=\}))/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#expression-cont"}]},{include:"#others"}]},{include:"#attrset-contents"},{include:"#others"}]},{begin:/\bin\b/dgv,beginCaptures:{"0":{name:"keyword.other.nix"}},end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#expression"}]}]},list:{begin:/\[/dgv,beginCaptures:{"0":{name:"punctuation.definition.list.nix"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.definition.list.nix"}},patterns:[{include:"#expression"}]},"list-and-cont":{begin:/(?=\[)/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#list"},{include:"#expression-cont"}]},"operator-unary":{match:/([\-\!])/dgv,name:"keyword.operator.unary.nix"},others:{patterns:[{include:"#whitespace"},{include:"#comment"},{include:"#illegal"}]},"parameter-name":{captures:{"0":{name:"variable.parameter.name.nix"}},match:/\b[A-Z_a-z][\-'0-9A-Z_a-z]*/dgv},"parameter-name-and-cont":{begin:/\b[A-Z_a-z][\-'0-9A-Z_a-z]*/dgv,beginCaptures:{"0":{name:"variable.parameter.name.nix"}},end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#expression-cont"}]},parens:{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.expression.nix"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.expression.nix"}},patterns:[{include:"#expression"}]},"parens-and-cont":{begin:/(?=\()/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#parens"},{include:"#expression-cont"}]},string:{patterns:[{begin:/(?='')/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{begin:/''/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.other.start.nix"}},end:/''(?![\$']|\\[^\n])/dgv,endCaptures:{"0":{name:"punctuation.definition.string.other.end.nix"}},name:"string.quoted.other.nix",patterns:[{match:/''([\$']|\\[^\n])/dgv,name:"constant.character.escape.nix"},{include:"#interpolation"}]},{include:"#expression-cont"}]},{begin:/(?=")/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#string-quoted"},{include:"#expression-cont"}]},{begin:/(~?[\-\+\.0-9A-Z_a-z]*(\/[\-\+\.0-9A-Z_a-z]+)+)/dgv,beginCaptures:{"0":{name:"string.unquoted.path.nix"}},end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#expression-cont"}]},{begin:/(<[\-\+\.0-9A-Z_a-z]+(\/[\-\+\.0-9A-Z_a-z]+)*>)/dgv,beginCaptures:{"0":{name:"string.unquoted.spath.nix"}},end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#expression-cont"}]},{begin:/([A-Za-z][\-\+\.0-9A-Za-z]*:[\!\$-'\*-\:\=\?-Z_a-z\~]+)/dgv,beginCaptures:{"0":{name:"string.unquoted.url.nix"}},end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#expression-cont"}]}]},"string-quoted":{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.double.start.nix"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.double.end.nix"}},name:"string.quoted.double.nix",patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.nix"},{include:"#interpolation"}]},whitespace:{match:/\p{space}+/dgv},"with-assert":{begin:/(?<![\-'\p{L}\p{M}\p{N}\p{Pc}])(with|assert)(?![\-'\p{L}\p{M}\p{N}\p{Pc}])/dgv,beginCaptures:{"0":{name:"keyword.other.nix"}},end:/;/dgv,patterns:[{include:"#expression"}]}},scopeName:"source.nix",embeddedLangs:undefined,aliases:undefined})
|
|
1
|
+
const lang = Object.freeze({displayName:"Nix",fileTypes:["nix"],name:"nix",patterns:[{include:"#expression"}],repository:{"attribute-bind":{patterns:[{include:"#attribute-name"},{include:"#attribute-bind-from-equals"}]},"attribute-bind-from-equals":{begin:/=/dgv,beginCaptures:{"0":{name:"keyword.operator.bind.nix"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.terminator.bind.nix"}},patterns:[{include:"#expression"}]},"attribute-inherit":{begin:/\binherit\b/dgv,beginCaptures:{"0":{name:"keyword.other.inherit.nix"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.terminator.inherit.nix"}},patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.section.function.arguments.nix"}},end:/(?=;)/dgv,patterns:[{begin:/\)/dgv,beginCaptures:{"0":{name:"punctuation.section.function.arguments.nix"}},end:/(?=;)/dgv,patterns:[{include:"#bad-reserved"},{include:"#attribute-name-single"},{include:"#others"}]},{include:"#expression"}]},{begin:/(?=[A-Z_a-z])/dgv,end:/(?=;)/dgv,patterns:[{include:"#bad-reserved"},{include:"#attribute-name-single"},{include:"#others"}]},{include:"#others"}]},"attribute-name":{patterns:[{match:/\b[A-Z_a-z][\-'0-9A-Z_a-z]*/dgv,name:"entity.other.attribute-name.multipart.nix"},{match:/\./dgv},{include:"#string-quoted"},{include:"#interpolation"}]},"attribute-name-single":{match:/\b[A-Z_a-z][\-'0-9A-Z_a-z]*/dgv,name:"entity.other.attribute-name.single.nix"},"attrset-contents":{patterns:[{include:"#attribute-inherit"},{include:"#bad-reserved"},{include:"#attribute-bind"},{include:"#others"}]},"attrset-definition":{begin:/(?=\{)/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{begin:/(\{)/dgv,beginCaptures:{"0":{name:"punctuation.definition.attrset.nix"}},end:/(\})/dgv,endCaptures:{"0":{name:"punctuation.definition.attrset.nix"}},patterns:[{include:"#attrset-contents"}]},{begin:/(?<=\})/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#expression-cont"}]}]},"attrset-definition-brace-opened":{patterns:[{begin:/(?<=\})/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#expression-cont"}]},{begin:/(?=[^\n]?)/dgv,end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.attrset.nix"}},patterns:[{include:"#attrset-contents"}]}]},"attrset-for-sure":{patterns:[{begin:/(?=\brec\b)/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{begin:/\brec\b/dgv,beginCaptures:{"0":{name:"keyword.other.nix"}},end:/(?=\{)/dgv,patterns:[{include:"#others"}]},{include:"#attrset-definition"},{include:"#others"}]},{begin:/(?=\{\p{space}*(\}|[^\,\?]*([\;\=])))/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#attrset-definition"},{include:"#others"}]}]},"attrset-or-function":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.attrset-or-function.nix"}},end:/(?=([\]\)\;\}]|\b(else|then)\b))/dgv,patterns:[{begin:/(?=(\p{space}*\}|"|\binherit\b|\$\{|\b[A-Z_a-z][\-'0-9A-Z_a-z]*(\p{space}*\.|\p{space}*=[^\=])))/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#attrset-definition-brace-opened"}]},{begin:/(?=(\.\.\.|\b[A-Z_a-z][\-'0-9A-Z_a-z]*\p{space}*[\,\?]))/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#function-definition-brace-opened"}]},{include:"#bad-reserved"},{begin:/\b[A-Z_a-z][\-'0-9A-Z_a-z]*/dgv,beginCaptures:{"0":{name:"variable.parameter.function.maybe.nix"}},end:/(?=([\]\)\;\}]|\b(else|then)\b))/dgv,patterns:[{begin:/(?=\.)/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#attrset-definition-brace-opened"}]},{begin:/\p{space}*(,)/dgv,beginCaptures:{"1":{name:"keyword.operator.nix"}},end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#function-definition-brace-opened"}]},{begin:/(?==)/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#attribute-bind-from-equals"},{include:"#attrset-definition-brace-opened"}]},{begin:/(?=\?)/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#function-parameter-default"},{begin:/,/dgv,beginCaptures:{"0":{name:"keyword.operator.nix"}},end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#function-definition-brace-opened"}]}]},{include:"#others"}]},{include:"#others"}]},"bad-reserved":{match:/(?<![\-'\p{L}\p{M}\p{N}\p{Pc}])(if|then|else|assert|with|let|in|rec|inherit)(?![\-'\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"invalid.illegal.reserved.nix"},comment:{patterns:[{begin:/\/\*([^\*]|\*[^\/])*/dgv,end:/\*\//dgv,name:"comment.block.nix"},{begin:/#/dgv,end:/(?=\n?$)/dgv,name:"comment.line.number-sign.nix"}]},constants:{patterns:[{begin:/\b(builtins|true|false|null)\b/dgv,beginCaptures:{"0":{name:"constant.language.nix"}},end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#expression-cont"}]},{begin:/\b(scopedImport|import|isNull|abort|throw|baseNameOf|dirOf|removeAttrs|map|toString|derivationStrict|derivation)\b/dgv,beginCaptures:{"0":{name:"support.function.nix"}},end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#expression-cont"}]},{begin:/\b[0-9]+\b/dgv,beginCaptures:{"0":{name:"constant.numeric.nix"}},end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#expression-cont"}]}]},expression:{patterns:[{include:"#parens-and-cont"},{include:"#list-and-cont"},{include:"#string"},{include:"#interpolation"},{include:"#with-assert"},{include:"#function-for-sure"},{include:"#attrset-for-sure"},{include:"#attrset-or-function"},{include:"#let"},{include:"#if"},{include:"#operator-unary"},{include:"#constants"},{include:"#bad-reserved"},{include:"#parameter-name-and-cont"},{include:"#others"}]},"expression-cont":{begin:/(?=[^\n]?)/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#parens"},{include:"#list"},{include:"#string"},{include:"#interpolation"},{include:"#function-for-sure"},{include:"#attrset-for-sure"},{include:"#attrset-or-function"},{match:/(\bor\b|\.|\|>|<\||==|!=?|<=?|>=?|&&|\|\||->|\/\/|\?|\+\+|[\-\*]|\/(?=([^\*]|(?=\n?$)))|\+)/dgv,name:"keyword.operator.nix"},{include:"#constants"},{include:"#bad-reserved"},{include:"#parameter-name"},{include:"#others"}]},"function-body":{begin:/(@\p{space}*([A-Z_a-z][\-'0-9A-Z_a-z]*)\p{space}*)?(:)/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#expression"}]},"function-body-from-colon":{begin:/(:)/dgv,beginCaptures:{"0":{name:"punctuation.definition.function.nix"}},end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#expression"}]},"function-contents":{patterns:[{include:"#bad-reserved"},{include:"#function-parameter"},{include:"#others"}]},"function-definition":{begin:/(?=[^\n]?)/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#function-body-from-colon"},{begin:/(?=[^\n]?)/dgv,end:/(?=:)/dgv,patterns:[{begin:/\b([A-Z_a-z][\-'0-9A-Z_a-z]*)/dgv,beginCaptures:{"0":{name:"variable.parameter.function.4.nix"}},end:/(?=:)/dgv,patterns:[{begin:/@/dgv,end:/(?=:)/dgv,patterns:[{include:"#function-header-until-colon-no-arg"},{include:"#others"}]},{include:"#others"}]},{begin:/(?=\{)/dgv,end:/(?=:)/dgv,patterns:[{include:"#function-header-until-colon-with-arg"}]}]},{include:"#others"}]},"function-definition-brace-opened":{begin:/(?=[^\n]?)/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#function-body-from-colon"},{begin:/(?=[^\n]?)/dgv,end:/(?=:)/dgv,patterns:[{include:"#function-header-close-brace-with-arg"},{begin:/(?=[^\n]?)/dgv,end:/(?=\})/dgv,patterns:[{include:"#function-contents"}]}]},{include:"#others"}]},"function-for-sure":{patterns:[{begin:/(?=(\b[A-Z_a-z][\-'0-9A-Z_a-z]*\p{space}*[\:\@]|\{[^"'\}]*\}\p{space}*:|\{[^"\#'\/\=\}]*[\,\?]))/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#function-definition"}]}]},"function-header-close-brace-no-arg":{begin:/\}/dgv,beginCaptures:{"0":{name:"punctuation.definition.entity.function.nix"}},end:/(?=:)/dgv,patterns:[{include:"#others"}]},"function-header-close-brace-with-arg":{begin:/\}/dgv,beginCaptures:{"0":{name:"punctuation.definition.entity.function.nix"}},end:/(?=:)/dgv,patterns:[{include:"#function-header-terminal-arg"},{include:"#others"}]},"function-header-open-brace":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.entity.function.2.nix"}},end:/(?=\})/dgv,patterns:[{include:"#function-contents"}]},"function-header-terminal-arg":{begin:/(?=@)/dgv,end:/(?=:)/dgv,patterns:[{begin:/@/dgv,end:/(?=:)/dgv,patterns:[{begin:/\b([A-Z_a-z][\-'0-9A-Z_a-z]*)/dgv,end:/(?=:)/dgv,name:"variable.parameter.function.3.nix"},{include:"#others"}]},{include:"#others"}]},"function-header-until-colon-no-arg":{begin:/(?=\{)/dgv,end:/(?=:)/dgv,patterns:[{include:"#function-header-open-brace"},{include:"#function-header-close-brace-no-arg"}]},"function-header-until-colon-with-arg":{begin:/(?=\{)/dgv,end:/(?=:)/dgv,patterns:[{include:"#function-header-open-brace"},{include:"#function-header-close-brace-with-arg"}]},"function-parameter":{patterns:[{begin:/(\.\.\.)/dgv,end:/(,|(?=\}))/dgv,name:"keyword.operator.nix",patterns:[{include:"#others"}]},{begin:/\b[A-Z_a-z][\-'0-9A-Z_a-z]*/dgv,beginCaptures:{"0":{name:"variable.parameter.function.1.nix"}},end:/(,|(?=\}))/dgv,endCaptures:{"0":{name:"keyword.operator.nix"}},patterns:[{include:"#whitespace"},{include:"#comment"},{include:"#function-parameter-default"},{include:"#expression"}]},{include:"#others"}]},"function-parameter-default":{begin:/\?/dgv,beginCaptures:{"0":{name:"keyword.operator.nix"}},end:/(?=[\,\}])/dgv,patterns:[{include:"#expression"}]},if:{begin:/(?=\bif\b)/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{begin:/\bif\b/dgv,beginCaptures:{"0":{name:"keyword.other.nix"}},end:/\bth(?=en\b)/dgv,endCaptures:{"0":{name:"keyword.other.nix"}},patterns:[{include:"#expression"}]},{begin:/(?<=th)en\b/dgv,beginCaptures:{"0":{name:"keyword.other.nix"}},end:/\bel(?=se\b)/dgv,endCaptures:{"0":{name:"keyword.other.nix"}},patterns:[{include:"#expression"}]},{begin:/(?<=el)se\b/dgv,beginCaptures:{"0":{name:"keyword.other.nix"}},end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,endCaptures:{"0":{name:"keyword.other.nix"}},patterns:[{include:"#expression"}]}]},illegal:{match:/[^\n]/dgv,name:"invalid.illegal"},interpolation:{begin:/\$\{/dgv,beginCaptures:{"0":{name:"punctuation.section.embedded.begin.nix"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.section.embedded.end.nix"}},name:"meta.embedded",patterns:[{include:"#expression"}]},let:{begin:/(?=\blet\b)/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{begin:/\blet\b/dgv,beginCaptures:{"0":{name:"keyword.other.nix"}},end:/(?=([\]\)\,\;\}]|\b(in|else|then)\b))/dgv,patterns:[{begin:/(?=\{)/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{begin:/\{/dgv,end:/\}/dgv,patterns:[{include:"#attrset-contents"}]},{begin:/(^|(?<=\}))/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#expression-cont"}]},{include:"#others"}]},{include:"#attrset-contents"},{include:"#others"}]},{begin:/\bin\b/dgv,beginCaptures:{"0":{name:"keyword.other.nix"}},end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#expression"}]}]},list:{begin:/\[/dgv,beginCaptures:{"0":{name:"punctuation.definition.list.nix"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.definition.list.nix"}},patterns:[{include:"#expression"}]},"list-and-cont":{begin:/(?=\[)/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#list"},{include:"#expression-cont"}]},"operator-unary":{match:/([\-\!])/dgv,name:"keyword.operator.unary.nix"},others:{patterns:[{include:"#whitespace"},{include:"#comment"},{include:"#illegal"}]},"parameter-name":{captures:{"0":{name:"variable.parameter.name.nix"}},match:/\b[A-Z_a-z][\-'0-9A-Z_a-z]*/dgv},"parameter-name-and-cont":{begin:/\b[A-Z_a-z][\-'0-9A-Z_a-z]*/dgv,beginCaptures:{"0":{name:"variable.parameter.name.nix"}},end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#expression-cont"}]},parens:{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.expression.nix"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.expression.nix"}},patterns:[{include:"#expression"}]},"parens-and-cont":{begin:/(?=\()/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#parens"},{include:"#expression-cont"}]},string:{patterns:[{begin:/(?='')/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{begin:/''/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.other.start.nix"}},end:/''(?![\$']|\\[^\n])/dgv,endCaptures:{"0":{name:"punctuation.definition.string.other.end.nix"}},name:"string.quoted.other.nix",patterns:[{match:/''([\$']|\\[^\n])/dgv,name:"constant.character.escape.nix"},{include:"#interpolation"}]},{include:"#expression-cont"}]},{begin:/(?=")/dgv,end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#string-quoted"},{include:"#expression-cont"}]},{begin:/(~?[\-\+\.0-9A-Z_a-z]*(\/[\-\+\.0-9A-Z_a-z]+)+)/dgv,beginCaptures:{"0":{name:"string.unquoted.path.nix"}},end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#expression-cont"}]},{begin:/(<[\-\+\.0-9A-Z_a-z]+(\/[\-\+\.0-9A-Z_a-z]+)*>)/dgv,beginCaptures:{"0":{name:"string.unquoted.spath.nix"}},end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#expression-cont"}]},{begin:/([A-Za-z][\-\+\.0-9A-Za-z]*:[\!\$-'\*-\:\=\?-Z_a-z\~]+)/dgv,beginCaptures:{"0":{name:"string.unquoted.url.nix"}},end:/(?=([\]\)\,\;\}]|\b(else|then)\b))/dgv,patterns:[{include:"#expression-cont"}]}]},"string-quoted":{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.double.start.nix"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.double.end.nix"}},name:"string.quoted.double.nix",patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.nix"},{include:"#interpolation"}]},whitespace:{match:/\p{space}+/dgv},"with-assert":{begin:/(?<![\-'\p{L}\p{M}\p{N}\p{Pc}])(with|assert)(?![\-'\p{L}\p{M}\p{N}\p{Pc}])/dgv,beginCaptures:{"0":{name:"keyword.other.nix"}},end:/;/dgv,patterns:[{include:"#expression"}]}},scopeName:"source.nix",embeddedLangs:undefined,aliases:undefined})
|
|
2
2
|
|
|
3
3
|
export default [
|
|
4
4
|
lang
|
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{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}]+)*/dgv,beginCaptures:{"1":{name:"entity.name.function.nushell"},"2":{name:"entity.name.type.nushell"},"3":{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:"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"]})
|
|
4
4
|
|
|
5
5
|
export default [
|
|
6
6
|
lang
|
package/dist/pkl.d.mts
ADDED
package/dist/pkl.mjs
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const lang = Object.freeze({displayName:"Pkl",fileTypes:["pkl","pcf"],foldingStartMarker:/\{/dgv,foldingStopMarker:/\}/dgv,name:"pkl",patterns:[{captures:{"1":{name:"variable.language.pkl"},"2":{name:"variable.other.module.pkl"}},match:/\b(module)\p{space}+([\$_\p{L}][\$0-9_\p{L}]*(?:\.[\$_\p{L}][\$0-9_\p{L}]*)*)/dgv},{captures:{"1":{name:"keyword.class.pkl"},"2":{name:"entity.name.type.pkl"},"3":{name:"punctuation.pkl"},"4":{name:"entity.name.type.pkl"}},match:/(typealias)\p{space}+([\$_\p{L}][\$0-9_\p{L}]*)\p{space}*(=)\p{space}*([\$_\p{L}][\$0-9_\p{L}]*\p{space}*(?:<[^\>]*>)?\p{space}*(?:\([^\)]*\))?\p{space}*\??\p{space}*(\|\p{space}*[\$_\p{L}][\$0-9_\p{L}]*\p{space}*(?:<[^\>]*>)?\p{space}*(?:\([^\)]*\))?\p{space}*\??)*)/dgv},{captures:{"1":{name:"keyword.class.pkl"}},match:/\b(class)\p{space}+[\$_\p{L}][\$0-9_\p{L}]*/dgv,name:"entity.name.type.pkl"},{captures:{"1":{name:"keyword.control.pkl"},"2":{name:"variable.other.property.pkl"},"3":{name:"variable.other.property.pkl"},"4":{name:"storage.modifier.pkl"}},match:/\b(for)\p{space}*\(([\$_\p{L}][\$0-9_\p{L}]*)(?:\p{space}*,\p{space}*([\$_\p{L}][\$0-9_\p{L}]*))*\p{space}+(in)/dgv},{captures:{"1":{name:"keyword.control.pkl"},"2":{name:"entity.name.type.pkl"}},match:/\b(new)\p{space}+([\$_\p{L}][\$0-9_\p{L}]*\p{space}*(?:<[^\>]*>)?\p{space}*(?:\([^\)]*\))?\p{space}*\??\p{space}*(\|\p{space}*[\$_\p{L}][\$0-9_\p{L}]*\p{space}*(?:<[^\>]*>)?\p{space}*(?:\([^\)]*\))?\p{space}*\??)*)/dgv},{captures:{"1":{name:"keyword.pkl"},"2":{name:"variable.other.property.pkl"}},match:/\b(function)\p{space}+([\$_\p{L}][\$0-9_\p{L}]*)/dgv},{captures:{"1":{name:"keyword.pkl"},"2":{name:"entity.name.type.pkl"}},match:/\b(as)\p{space}+([\$_\p{L}][\$0-9_\p{L}]*\p{space}*(?:<[^\>]*>)?\p{space}*(?:\([^\)]*\))?\p{space}*\??\p{space}*(\|\p{space}*[\$_\p{L}][\$0-9_\p{L}]*\p{space}*(?:<[^\>]*>)?\p{space}*(?:\([^\)]*\))?\p{space}*\??)*)/dgv},{match:/\b(true|false|null)\b/dgv,name:"constant.character.language.pkl"},{match:/\/\/[^\n]*/dgv,name:"comment.line.pkl"},{begin:/\/\*/dgv,end:/\*\//dgv,name:"comment.block.pkl"},{begin:/((?:\b|\p{space}*)[\$_\p{L}][\$0-9_\p{L}]*|`[^\`]+`)\p{space}*(:)\p{space}*([\$_\p{L}][\$0-9_\p{L}]*\p{space}*(?:<[^\>]*>)?\p{space}*(?:\([^\)]*\))?\p{space}*\??\p{space}*(\|\p{space}*[\$_\p{L}][\$0-9_\p{L}]*\p{space}*(?:<[^\>]*>)?\p{space}*(?:\([^\)]*\))?\p{space}*\??)*)/dgv,captures:{"1":{name:"variable.other.property.pkl"},"2":{name:"punctuation.pkl"},"3":{name:"entity.name.type.pkl"}},end:/\p{space}*=|[\)\,]|^[\t ]*(?=\n?$)/dgv},{captures:{"1":{name:"variable.other.property.pkl"},"2":{name:"punctuation.pkl"}},match:/(\b[\$_\p{L}][\$0-9_\p{L}]*|`[^\`]+`)\p{space}*(=)(?!=)/dgv},{captures:{"1":{name:"punctuation.pkl"},"2":{name:"entity.name.type.pkl"}},match:/(:)\p{space}*([\$_\p{L}][\$0-9_\p{L}]*\p{space}*(?:<[^\>]*>)?\p{space}*(?:\([^\)]*\))?\p{space}*\??\p{space}*(\|\p{space}*[\$_\p{L}][\$0-9_\p{L}]*\p{space}*(?:<[^\>]*>)?\p{space}*(?:\([^\)]*\))?\p{space}*\??)*)/dgv},{captures:{"1":{name:"variable.other.property.pkl"}},match:/^\p{space}*([\$_\p{L}][\$0-9_\p{L}]*)\p{space}*\{/dgv},{match:/\b(hidden|local|abstract|external|open|in|out|amends|extends|fixed|const)\b/dgv,name:"storage.modifier.pkl"},{match:/\b(amends|as|extends|function|is|let|read\???|import|throw|trace)\b/dgv,name:"keyword.pkl"},{match:/\b(if|else|when|for|import|new)\b/dgv,name:"keyword.control.pkl"},{match:/\b0x(?:[A-Fa-f\p{Nd}][A-F_a-f\p{Nd}]*[A-Fa-f\p{Nd}]|[A-F_a-f\p{Nd}])\b/dgv,name:"constant.numeric.hex.pkl"},{match:/\b0b(?:[01][01_]*[01]|[01])\b/dgv,name:"constant.numeric.binary.pkl"},{match:/\b0o(?:[0-7][0-7_]*[0-7]|[0-7])\b/dgv,name:"constant.numeric.octal.pkl"},{match:/\b\p{Nd}(?:[0-9_]*\p{Nd}|)\b/dgv,name:"constant.numeric.decimal.pkl"},{match:/\b(?:(?:\p{Nd}(?:[0-9_]*\p{Nd}|))?\.\p{Nd}(?:[0-9_]*\p{Nd}|)(?:[Ee][\-\+]?\p{Nd}(?:[0-9_]*\p{Nd}|))?|\p{Nd}(?:[0-9_]*\p{Nd}|)[Ee][\-\+]?\p{Nd}(?:[0-9_]*\p{Nd}|))\b/dgv,name:"constant.numeric.pkl"},{match:/[\-\*\+\/]|~\/|%|\*\*|>=??|<=??|==|!=?|&&|\|\||\|>|\?\?|!!|=|->|\|/dgv,name:"keyword.operator.pkl"},{match:/\b(this|module|outer|super)\b/dgv,name:"variable.language.pkl"},{match:/\b(unknown|never)\b/dgv,name:"support.type.pkl"},{match:/[\]\(\)\[\{\}]/dgv,name:"meta.brace.pkl"},{match:/\b(class|typealias)\b/dgv,name:"keyword.class.pkl"},{match:/\.\?|[\.\:\;]/dgv,name:"punctuation.pkl"},{match:/@[\$_\p{L}][\$0-9_\p{L}]*/dgv,name:"entity.name.type.pkl"},{begin:/(""")/dgv,captures:{"1":{name:"punctuation.delimiter.pkl"}},end:/(""")/dgv,name:"string.quoted.triple.0.pkl",patterns:[{captures:{"1":{name:"invalid.illegal.unrecognized-string-escape.pkl"}},match:/\\(?:["\\nrt]|u\{[A-Fa-f\p{Nd}]+\}|\([^\n]+?\))|(\\[^\n])/dgv,name:"constant.character.escape.0.pkl"}]},{begin:/(")/dgv,beginCaptures:{"1":{name:"punctuation.delimiter.pkl"}},end:/(")|([^\n]?)(?=\n?$)/dgv,endCaptures:{"1":{name:"punctuation.delimimter.pkl"},"2":{name:"invalid.illegal.newline.pkl"}},name:"string.quoted.double.0.pkl",patterns:[{captures:{"1":{name:"invalid.illegal.unrecognized-string-escape.pkl"}},match:/\\(?:["\\nrt]|u\{[A-Fa-f\p{Nd}]+\}|\([^\n]+?\))|(\\[^\n])/dgv,name:"constant.character.escape.0.pkl"}]},{begin:/(#""")/dgv,captures:{"1":{name:"punctuation.delimiter.pkl"}},end:/("""#)/dgv,name:"string.quoted.triple.1.pkl",patterns:[{captures:{"1":{name:"invalid.illegal.unrecognized-string-escape.pkl"}},match:/\\#(?:["\\nrt]|u\{[A-Fa-f\p{Nd}]+\}|\([^\n]+?\))|(\\#[^\n])/dgv,name:"constant.character.escape.1.pkl"}]},{begin:/(#")/dgv,beginCaptures:{"1":{name:"punctuation.delimiter.pkl"}},end:/("#)|([^\n]?)(?=\n?$)/dgv,endCaptures:{"1":{name:"punctuation.delimimter.pkl"},"2":{name:"invalid.illegal.newline.pkl"}},name:"string.quoted.double.1.pkl",patterns:[{captures:{"1":{name:"invalid.illegal.unrecognized-string-escape.pkl"}},match:/\\#(?:["\\nrt]|u\{[A-Fa-f\p{Nd}]+\}|\([^\n]+?\))|(\\#[^\n])/dgv,name:"constant.character.escape.1.pkl"}]},{begin:/(##""")/dgv,captures:{"1":{name:"punctuation.delimiter.pkl"}},end:/("""##)/dgv,name:"string.quoted.triple.2.pkl",patterns:[{captures:{"1":{name:"invalid.illegal.unrecognized-string-escape.pkl"}},match:/\\##(?:["\\nrt]|u\{[A-Fa-f\p{Nd}]+\}|\([^\n]+?\))|(\\##[^\n])/dgv,name:"constant.character.escape.2.pkl"}]},{begin:/(##")/dgv,beginCaptures:{"1":{name:"punctuation.delimiter.pkl"}},end:/("##)|([^\n]?)(?=\n?$)/dgv,endCaptures:{"1":{name:"punctuation.delimimter.pkl"},"2":{name:"invalid.illegal.newline.pkl"}},name:"string.quoted.double.2.pkl",patterns:[{captures:{"1":{name:"invalid.illegal.unrecognized-string-escape.pkl"}},match:/\\##(?:["\\nrt]|u\{[A-Fa-f\p{Nd}]+\}|\([^\n]+?\))|(\\##[^\n])/dgv,name:"constant.character.escape.2.pkl"}]},{begin:/(###""")/dgv,captures:{"1":{name:"punctuation.delimiter.pkl"}},end:/("""###)/dgv,name:"string.quoted.triple.3.pkl",patterns:[{captures:{"1":{name:"invalid.illegal.unrecognized-string-escape.pkl"}},match:/\\###(?:["\\nrt]|u\{[A-Fa-f\p{Nd}]+\}|\([^\n]+?\))|(\\###[^\n])/dgv,name:"constant.character.escape.3.pkl"}]},{begin:/(###")/dgv,beginCaptures:{"1":{name:"punctuation.delimiter.pkl"}},end:/("###)|([^\n]?)(?=\n?$)/dgv,endCaptures:{"1":{name:"punctuation.delimimter.pkl"},"2":{name:"invalid.illegal.newline.pkl"}},name:"string.quoted.double.3.pkl",patterns:[{captures:{"1":{name:"invalid.illegal.unrecognized-string-escape.pkl"}},match:/\\###(?:["\\nrt]|u\{[A-Fa-f\p{Nd}]+\}|\([^\n]+?\))|(\\###[^\n])/dgv,name:"constant.character.escape.3.pkl"}]},{begin:/(####""")/dgv,captures:{"1":{name:"punctuation.delimiter.pkl"}},end:/("""####)/dgv,name:"string.quoted.triple.4.pkl",patterns:[{captures:{"1":{name:"invalid.illegal.unrecognized-string-escape.pkl"}},match:/\\####(?:["\\nrt]|u\{[A-Fa-f\p{Nd}]+\}|\([^\n]+?\))|(\\####[^\n])/dgv,name:"constant.character.escape.4.pkl"}]},{begin:/(####")/dgv,beginCaptures:{"1":{name:"punctuation.delimiter.pkl"}},end:/("####)|([^\n]?)(?=\n?$)/dgv,endCaptures:{"1":{name:"punctuation.delimimter.pkl"},"2":{name:"invalid.illegal.newline.pkl"}},name:"string.quoted.double.4.pkl",patterns:[{captures:{"1":{name:"invalid.illegal.unrecognized-string-escape.pkl"}},match:/\\####(?:["\\nrt]|u\{[A-Fa-f\p{Nd}]+\}|\([^\n]+?\))|(\\####[^\n])/dgv,name:"constant.character.escape.4.pkl"}]},{begin:/(#####""")/dgv,captures:{"1":{name:"punctuation.delimiter.pkl"}},end:/("""#####)/dgv,name:"string.quoted.triple.5.pkl",patterns:[{captures:{"1":{name:"invalid.illegal.unrecognized-string-escape.pkl"}},match:/\\#####(?:["\\nrt]|u\{[A-Fa-f\p{Nd}]+\}|\([^\n]+?\))|(\\#####[^\n])/dgv,name:"constant.character.escape.5.pkl"}]},{begin:/(#####")/dgv,beginCaptures:{"1":{name:"punctuation.delimiter.pkl"}},end:/("#####)|([^\n]?)(?=\n?$)/dgv,endCaptures:{"1":{name:"punctuation.delimimter.pkl"},"2":{name:"invalid.illegal.newline.pkl"}},name:"string.quoted.double.5.pkl",patterns:[{captures:{"1":{name:"invalid.illegal.unrecognized-string-escape.pkl"}},match:/\\#####(?:["\\nrt]|u\{[A-Fa-f\p{Nd}]+\}|\([^\n]+?\))|(\\#####[^\n])/dgv,name:"constant.character.escape.5.pkl"}]},{begin:/(######""")/dgv,captures:{"1":{name:"punctuation.delimiter.pkl"}},end:/("""######)/dgv,name:"string.quoted.triple.6.pkl",patterns:[{captures:{"1":{name:"invalid.illegal.unrecognized-string-escape.pkl"}},match:/\\######(?:["\\nrt]|u\{[A-Fa-f\p{Nd}]+\}|\([^\n]+?\))|(\\######[^\n])/dgv,name:"constant.character.escape.6.pkl"}]},{begin:/(######")/dgv,beginCaptures:{"1":{name:"punctuation.delimiter.pkl"}},end:/("######)|([^\n]?)(?=\n?$)/dgv,endCaptures:{"1":{name:"punctuation.delimimter.pkl"},"2":{name:"invalid.illegal.newline.pkl"}},name:"string.quoted.double.6.pkl",patterns:[{captures:{"1":{name:"invalid.illegal.unrecognized-string-escape.pkl"}},match:/\\######(?:["\\nrt]|u\{[A-Fa-f\p{Nd}]+\}|\([^\n]+?\))|(\\######[^\n])/dgv,name:"constant.character.escape.6.pkl"}]}],scopeName:"source.pkl",embeddedLangs:undefined,aliases:undefined})
|
|
2
|
+
|
|
3
|
+
export default [
|
|
4
|
+
lang
|
|
5
|
+
]
|
package/dist/rosmsg.mjs
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const lang = Object.freeze({displayName:"ROS Interface",fileTypes:["msg","srv","action"],name:"rosmsg",patterns:[{include:"#separators"},{include:"#lines"},{include:"#comments"}],repository:{attributes:{match:/@optional\b/dgv,name:"storage.modifier.attribute.rosmsg"},"builtin-types":{match:/\b(?:bool|byte|char|u?int(?:8|16|32|64)|float(?:32|64)|w?string|time|duration)\b/dgv,name:"storage.type.rosmsg"},comments:{match:/#[^\n]*/dgv,name:"comment.line.number-sign.rosmsg"},"field-other":{begin:/(?=\b[A-Z_a-z])/dgv,end:/(?=\n?$)|(?=#)/dgv,patterns:[{captures:{"0":{patterns:[{include:"#builtin-types"}]}},match:/[\/-9A-Z_a-z]+/dgvy,name:"support.type.rosmsg"},{match:/\p{Nd}+/dgv,name:"constant.numeric.integer.rosmsg"},{begin:/(?=[A-Z_a-z])/dgv,end:/(?=\n?$)|(?=#)/dgv,patterns:[{include:"#field-other-after-type"}]}]},"field-other-after-type":{patterns:[{match:/[0-9A-Z_a-z]+/dgvy,name:"variable.other.field.rosmsg"},{begin:"",end:/(?=\n?$)|(?=#)/dgv,patterns:[{include:"#literal-other"},{include:"#literal-other-array"}]}]},"field-string":{begin:/(?=\bw?string\b)/dgv,end:/(?=\n?$)|(?=#)/dgv,patterns:[{captures:{"0":{name:"storage.type.rosmsg"}},match:/w?string\b/dgvy},{match:/\p{Nd}+/dgv,name:"constant.numeric.integer.rosmsg"},{begin:/(?=[A-Z_a-z])/dgv,end:/(?=\n?$)|(?=#)/dgv,patterns:[{include:"#field-string-after-type"}]}]},"field-string-after-type":{patterns:[{match:/[0-9A-Z_a-z]+/dgvy,name:"variable.other.field.rosmsg"},{begin:/=|(?<=\p{space})/dgv,end:/(?=\n?$)|(?=#)/dgv,patterns:[{include:"#literal-string"}]}]},"field-string-array":{begin:/(?=\bw?string[\<\=\p{Nd}]*\[)/dgv,end:/(?=\n?$)|(?=#)/dgv,patterns:[{captures:{"0":{name:"storage.type.rosmsg"}},match:/w?string\b/dgvy,name:"support.type.rosmsg"},{match:/\p{Nd}+/dgv,name:"constant.numeric.integer.rosmsg"},{begin:/(?=[A-Z_a-z])/dgv,end:/(?=\n?$)|(?=#)/dgv,patterns:[{include:"#field-string-array-after-type"}]}]},"field-string-array-after-type":{patterns:[{match:/[0-9A-Z_a-z]+/dgvy,name:"variable.other.field.rosmsg"},{begin:/(?<=\p{space})/dgv,end:/(?=\n?$)|(?=#)/dgv,name:"meta.default-value.rosmsg",patterns:[{include:"#literal-string-array"}]}]},lines:{patterns:[{include:"#attributes"},{include:"#field-string-array"},{include:"#field-string"},{include:"#field-other"}]},"literal-other":{patterns:[{match:/[\-\+]?(?:(?:\p{Nd}+(?:_\p{Nd}+)*)?\.\p{Nd}+(?:_\p{Nd}+)*|\p{Nd}+(?:_\p{Nd}+)*\.)(?:[Ee][\-\+]?\p{Nd}+(?:_\p{Nd}+)*)?/dgv,name:"constant.numeric.float.rosmsg"},{match:/[\-\+]?\p{Nd}+(?:_\p{Nd}+)*/dgv,name:"constant.numeric.integer.rosmsg"},{match:/\b(?:true|false)\b/dgiv,name:"constant.language.boolean.rosmsg"}]},"literal-other-array":{patterns:[{begin:/\[/dgv,end:/\]|(?=\n?$)|(?=#)/dgv,name:"meta.array.rosmsg",patterns:[{include:"#literal-other"}]}]},"literal-string":{patterns:[{include:"#literal-string-quoted"},{include:"#literal-string-unquoted"}]},"literal-string-array":{patterns:[{begin:/\[/dgv,end:/\]|(?=\n?$)|(?=#)/dgv,name:"meta.array.rosmsg",patterns:[{include:"#literal-string-quoted"},{include:"#literal-string-unquoted-in-array"}]}]},"literal-string-escape":{patterns:[{match:/\\(?:[0-7]{3}|x\p{AHex}{2}|u\p{AHex}{4}|U\p{AHex}{8}|[^\n])/dgv,name:"constant.character.escape.rosmsg"}]},"literal-string-quoted":{patterns:[{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.rosmsg"}},end:/"|(?=\n?$)/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.rosmsg"}},name:"string.quoted.double.rosmsg",patterns:[{include:"#literal-string-escape"}]},{begin:/'/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.rosmsg"}},end:/'|(?=\n?$)/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.rosmsg"}},name:"string.quoted.single.rosmsg",patterns:[{include:"#literal-string-escape"}]}]},"literal-string-unquoted":{begin:/(?=[^"'\p{space}])/dgv,end:/(?=\p{space}*(?:#|(?=\n?$)))/dgv,name:"string.unquoted.rosmsg",patterns:[{include:"#literal-string-escape"}]},"literal-string-unquoted-in-array":{begin:/(?=[^\]"'\,\p{space}])/dgv,end:/(?=\p{space}*(?:(?=\n?$)|[\]\,]))/dgv,name:"string.unquoted.rosmsg",patterns:[{include:"#literal-string-escape"}]},separators:{patterns:[{match:/^---\p{space}*(?=\n?$)\n?/dgv,name:"meta.separator.rosmsg"},{match:/^={3,}\p{space}*(?=\n?$)\n?/dgv,name:"meta.separator.rosmsg"},{captures:{"1":{name:"entity.name.type.class.rosmsg"}},match:/^MSG:\p{space}+([\/-9A-Z_a-z]+)\p{space}*(?=\n?$)\n?/dgv,name:"meta.separator.rosmsg"}]}},scopeName:"source.rosmsg",embeddedLangs:undefined,aliases:undefined})
|
|
2
|
+
|
|
3
|
+
export default [
|
|
4
|
+
lang
|
|
5
|
+
]
|
package/dist/tex.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EmulatedRegExp } from 'oniguruma-to-es'
|
|
2
2
|
import r from './r.mjs'
|
|
3
3
|
|
|
4
|
-
const lang = Object.freeze({displayName:"TeX",name:"tex",patterns:[{include:"#iffalse-block"},{include:"#macro-control"},{include:"#catcode"},{include:"#comment"},{match:/[\]\[]/dgv,name:"punctuation.definition.brackets.tex"},{include:"#dollar-math"},{match:/\\\\/dgv,name:"keyword.control.newline.tex"},{include:"#macro-general"}],repository:{braces:{begin:/(?<!\\)\{/dgv,beginCaptures:{"0":{name:"punctuation.group.begin.tex"}},end:/(?<!\\)\}/dgv,endCaptures:{"0":{name:"punctuation.group.end.tex"}},name:"meta.group.braces.tex",patterns:[{include:"#braces"}]},catcode:{captures:{"1":{name:"keyword.control.catcode.tex"},"2":{name:"punctuation.definition.keyword.tex"},"3":{name:"punctuation.separator.key-value.tex"},"4":{name:"constant.numeric.category.tex"}},match:/((\\)catcode)`\\?[^\n](=)(\p{Nd}+)/dgv,name:"meta.catcode.tex"},comment:{begin:/(^[\t ]+)?(?=%)/dgv,beginCaptures:{"1":{name:"punctuation.whitespace.comment.leading.tex"}},end:/*@__PURE__*/ new EmulatedRegExp("(?!^)","dgv",{"strategy":"clip_search"}),patterns:[{begin:/%:?/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.tex"}},end:/(?=\n?$)\n?/dgv,name:"comment.line.percentage.tex"},{begin:/^(%!TEX) (\P{space}*) =/dgv,beginCaptures:{"1":{name:"punctuation.definition.comment.tex"}},end:/(?=\n?$)\n?/dgv,name:"comment.line.percentage.directive.tex"}]},conditionals:{begin:/(?<=^\p{space}*)\\if[a-z]*/dgv,end:/(?<=^\p{space}*)\\fi/dgv,patterns:[{include:"#comment"},{include:"#conditionals"}]},"dollar-math":{begin:/(\$\$?)/dgv,beginCaptures:{"1":{name:"punctuation.definition.string.begin.tex"}},end:/((?!))/dgv,endCaptures:{"1":{name:"punctuation.definition.string.end.tex"}},name:"meta.math.block.tex support.class.math.block.tex",patterns:[{match:/\\\$/dgv,name:"constant.character.escape.tex"},{include:"#math-content"},{include:"$self"}]},"iffalse-block":{begin:/(?<=^\p{space}*)((\\)iffalse)(?!\p{space}*[\{\}]\p{space}*\\fi\b)/dgv,beginCaptures:{"1":{name:"keyword.control.tex"},"2":{name:"punctuation.definition.keyword.tex"}},contentName:"comment.line.percentage.tex",end:/((\\)(?:else|fi))\b/dgv,endCaptures:{"1":{name:"keyword.control.tex"},"2":{name:"punctuation.definition.keyword.tex"}},patterns:[{include:"#comment"},{include:"#braces"},{include:"#conditionals"}]},"macro-control":{captures:{"1":{name:"punctuation.definition.keyword.tex"}},match:/(\\)(backmatter|csname|else|endcsname|fi|frontmatter|mainmatter|unless|if(case|cat|csname|defined|dim|eof|false|fontchar|hbox|hmode|inner|mmode|num|odd|true|vbox|vmode|void|x)?)(?![\@-Za-z])/dgv,name:"keyword.control.tex"},"macro-general":{patterns:[{captures:{"1":{name:"punctuation.definition.function.tex"}},match:/(\\)_*[\@\p{Alphabetic}]+(?:_[\@\p{Alphabetic}]+)*:[DFNTVcefnopvwx]*/dgv,name:"support.class.general.latex3.tex"},{captures:{"1":{name:"punctuation.definition.function.tex"}},match:/(\.)[\@\p{Alphabetic}]+(?:_[\@\p{Alphabetic}]+)*:[DFNTVcefnopvwx]*/dgv,name:"support.class.general.latex3.tex"},{captures:{"1":{name:"punctuation.definition.function.tex"}},match:/(\\)(?:[\,\;]|[\@\p{Alphabetic}]+)/dgv,name:"support.function.general.tex"},{captures:{"1":{name:"punctuation.definition.keyword.tex"}},match:/(\\)[^\@-Za-z]/dgv,name:"constant.character.escape.tex"}]},"math-content":{patterns:[{begin:/((\\)(?:text|mbox))(\{)/dgv,beginCaptures:{"1":{name:"constant.other.math.tex"},"2":{name:"punctuation.definition.function.tex"},"3":{name:"punctuation.definition.arguments.begin.tex meta.text.normal.tex"}},contentName:"meta.text.normal.tex",end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.arguments.end.tex meta.text.normal.tex"}},patterns:[{include:"#math-content"},{include:"$self"}]},{match:/\\[\{\}]/dgv,name:"punctuation.math.bracket.pair.tex"},{match:/\\(left|right|((bigg??|Bigg??)[lr]?))([\]\(\)\.\<\>\[\|]|\\[\{\|\}]|\\[lr]?[Vv]ert|\\[lr]angle)/dgv,name:"punctuation.math.bracket.pair.big.tex"},{captures:{"1":{name:"punctuation.definition.constant.math.tex"}},match:/*@__PURE__*/ new EmulatedRegExp("(\\\\)(s(s(earrow|warrow|lash)|h(ort(downarrow|uparrow|parallel|leftarrow|rightarrow|mid)|arp)|tar|i(gma|m(eq)?)|u(cc(sim|n(sim|approx)|curlyeq|eq|approx)?|pset(neq(q)?|plus(eq)?|eq(q)?)?|rd|m|bset(neq(q)?|plus(eq)?|eq(q)?)?)|p(hericalangle|adesuit)|e(tminus|arrow)|q(su(pset(eq)?|bset(eq)?)|c([au]p)|uare)|warrow|m(ile|all(s(etminus|mile)|frown)))|h(slash|ook((?:lef|righ)tarrow)|eartsuit|bar)|R(sh|ightarrow|e|bag)|Gam(e|ma)|n(s(hort(parallel|mid)|im|u(cc(eq)?|pseteq(q)?|bseteq))|Rightarrow|n([ew]arrow)|cong|triangle(left(eq(slant)?)?|right(eq(slant)?)?)|i(plus)?|u|p(lus|arallel|rec(eq)?)|e(q|arrow|g|xists)|v([Dd]ash)|warrow|le(ss|q(slant|q)?|ft((?:|right)arrow))|a(tural|bla)|VDash|rightarrow|g(tr|eq(slant|q)?)|mid|Left((?:|right)arrow))|c(hi|irc(eq|le(d(circ|S|dash|ast)|arrow(left|right)))?|o(ng|prod|lon|mplement)|dot([ps])?|u(p|r(vearrow(left|right)|ly(eq(succ|prec)|vee((?:down|up)arrow)?|wedge((?:down|up)arrow)?)))|enterdot|lubsuit|ap)|Xi|Maps(to(char)?|from(char)?)|B(ox|umpeq|bbk)|t(h(ick(sim|approx)|e(ta|refore))|imes|op|wohead((?:lef|righ)tarrow)|a(u|lloblong)|riangle(down|q|left(eq(slant)?)?|right(eq(slant)?)?)?)|i(n(t(er(cal|leave))?|plus|fty)?|ota|math)|S(igma|u([bp]set))|zeta|o(slash|times|int|dot|plus|vee|wedge|lessthan|greaterthan|m(inus|ega)|b(slash|long|ar))|d(i(v(ideontimes)?|a(g(down|up)|mond(suit)?)|gamma)|o(t(plus|eq(dot)?)|ublebarwedge|wn(harpoon(left|right)|downarrows|arrow))|d(ots|agger)|elta|a(sh(v|leftarrow|rightarrow)|leth|gger))|Y(down|up|left|right)|C([au]p)|u(n([lr]hd)|p(silon|harpoon(left|right)|downarrow|uparrows|lus|arrow)|lcorner|rcorner)|jmath|Theta|Im|p(si|hi|i(tchfork)?|erp|ar(tial|allel)|r(ime|o(d|pto)|ec(sim|n(sim|approx)|curlyeq|eq|approx)?)|m)|e(t([ah])|psilon|q(slant(less|gtr)|circ|uiv)|ll|xists|mptyset)|Omega|D(iamond|ownarrow|elta)|v(d(ots|ash)|ee(bar)?|Dash|ar(s(igma|u(psetneq(q)?|bsetneq(q)?))|nothing|curly(vee|wedge)|t(heta|imes|riangle(left|right)?)|o(slash|circle|times|dot|plus|vee|wedge|lessthan|ast|greaterthan|minus|b(slash|ar))|p(hi|i|ropto)|epsilon|kappa|rho|bigcirc))|kappa|Up(silon|downarrow|arrow)|Join|f(orall|lat|a(t(s(emi|lash)|bslash)|llingdotseq)|rown)|P((?:s|h?)i)|w(p|edge|r)|l(hd|n(sim|eq(q)?|approx)|ceil|times|ightning|o(ng(left((?:|right)arrow)|rightarrow|maps(to|from))|zenge|oparrow(left|right))|dot([ps])|e(ss(sim|dot|eq(q?gtr)|approx|gtr)|q(slant|q)?|ft(slice|harpoon(down|up)|threetimes|leftarrows|arrow(t(ail|riangle))?|right(squigarrow|harpoons|arrow(s|triangle|eq)?))|adsto)|vertneqq|floor|l(c(orner|eil)|floor|l|bracket)?|a(ngle|mbda)|rcorner|bag)|a(s(ymp|t)|ngle|pprox(eq)?|l(pha|eph)|rrownot|malg)|V(v??dash)|r(h([do])|ceil|times|i(singdotseq|ght(s(quigarrow|lice)|harpoon(down|up)|threetimes|left(harpoons|arrows)|arrow(t(ail|riangle))?|rightarrows))|floor|angle|r(ceil|parenthesis|floor|bracket)|bag)|g(n(sim|eq(q)?|approx)|tr(sim|dot|eq(q?less)|less|approx)|imel|eq(slant|q)?|vertneqq|amma|g(g)?)|Finv|xi|m(ho|i(nuso|d)|o(o|dels)|u(ltimap)?|p|e(asuredangle|rge)|aps(to|from(char)?))|b(i(n(dnasrepma|ampersand)|g(s(tar|qc([au]p))|nplus|c(irc|u(p|rly(vee|wedge))|ap)|triangle(down|up)|interleave|o(times|dot|plus)|uplus|parallel|vee|wedge|box))|o(t|wtie|x(slash|circle|times|dot|plus|empty|ast|minus|b(slash|ox|ar)))|u(llet|mpeq)|e(cause|t(h|ween|a))|lack(square|triangle(down|left|right)?|lozenge)|a(ck(s(im(eq)?|lash)|prime|epsilon)|r(o|wedge))|bslash)|L(sh|ong(left((?:|right)arrow)|rightarrow|maps(to|from))|eft((?:|right)arrow)|leftarrow|ambda|bag)|Arrownot)(?![\\@-Za-z])","dgv",{"lazyCompile":true}),name:"constant.character.math.tex"},{captures:{"1":{name:"punctuation.definition.constant.math.tex"}},match:/(\\)(sum|prod|coprod|int|oint|bigcap|bigcup|bigsqcup|bigvee|bigwedge|bigodot|bigotimes|bogoplus|biguplus)\b/dgv,name:"constant.character.math.tex"},{captures:{"1":{name:"punctuation.definition.constant.math.tex"}},match:/(\\)(arccos|arcsin|arctan|arg|cosh??|coth??|csc|deg|det|dim|exp|gcd|hom|inf|ker|lg|lim|liminf|limsup|ln|log|max|min|pr|sec|sinh??|sup|tanh??)\b/dgv,name:"constant.other.math.tex"},{begin:/((\\)Sexpr(\{))/dgv,beginCaptures:{"1":{name:"support.function.sexpr.math.tex"},"2":{name:"punctuation.definition.function.math.tex"},"3":{name:"punctuation.section.embedded.begin.math.tex"}},contentName:"support.function.sexpr.math.tex",end:/(((\})))/dgv,endCaptures:{"1":{name:"support.function.sexpr.math.tex"},"2":{name:"punctuation.section.embedded.end.math.tex"},"3":{name:"source.r"}},name:"meta.embedded.line.r",patterns:[{begin:/(?!\})/dgvy,end:/(?=\})/dgv,name:"source.r",patterns:[{include:"source.r"}]}]},{captures:{"1":{name:"punctuation.definition.constant.math.tex"}},match:/(\\)(?!begin\{|verb)([A-Za-z]+)/dgv,name:"constant.other.general.math.tex"},{match:/(?<!\\)\{/dgv,name:"punctuation.math.begin.bracket.curly.tex"},{match:/(?<!\\)\}/dgv,name:"punctuation.math.end.bracket.curly.tex"},{match:/(?<!\\)\(/dgv,name:"punctuation.math.begin.bracket.round.tex"},{match:/(?<!\\)\)/dgv,name:"punctuation.math.end.bracket.round.tex"},{match:/(([0-9]*\.[0-9]+)|[0-9]+)/dgv,name:"constant.numeric.math.tex"},{match:/[\-\*\+\/]|(?<!\^)\^(?!\^)|(?<!_)_(?!_)/dgv,name:"punctuation.math.operator.tex"}]}},scopeName:"text.tex",embeddedLangs:["r"],aliases:undefined})
|
|
4
|
+
const lang = Object.freeze({displayName:"TeX",name:"tex",patterns:[{include:"#iffalse-block"},{include:"#macro-control"},{include:"#catcode"},{include:"#comment"},{match:/[\]\[]/dgv,name:"punctuation.definition.brackets.tex"},{include:"#dollar-math"},{match:/\\\\/dgv,name:"keyword.control.newline.tex"},{include:"#ifnextchar"},{include:"#macro-general"}],repository:{braces:{begin:/(?<!\\)\{/dgv,beginCaptures:{"0":{name:"punctuation.group.begin.tex"}},end:/(?<!\\)\}/dgv,endCaptures:{"0":{name:"punctuation.group.end.tex"}},name:"meta.group.braces.tex",patterns:[{include:"#braces"}]},catcode:{captures:{"1":{name:"keyword.control.catcode.tex"},"2":{name:"punctuation.definition.keyword.tex"},"3":{name:"punctuation.separator.key-value.tex"},"4":{name:"constant.numeric.category.tex"}},match:/((\\)catcode)`\\?[^\n](=)(\p{Nd}+)/dgv,name:"meta.catcode.tex"},comment:{begin:/(^[\t ]+)?(?=%)/dgv,beginCaptures:{"1":{name:"punctuation.whitespace.comment.leading.tex"}},end:/*@__PURE__*/ new EmulatedRegExp("(?!^)","dgv",{"strategy":"clip_search"}),patterns:[{begin:/%:?/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.tex"}},end:/(?=\n?$)\n?/dgv,name:"comment.line.percentage.tex"},{begin:/^(%!TEX) (\P{space}*) =/dgv,beginCaptures:{"1":{name:"punctuation.definition.comment.tex"}},end:/(?=\n?$)\n?/dgv,name:"comment.line.percentage.directive.tex"}]},conditionals:{begin:/(?<=^\p{space}*)\\if[a-z]*/dgv,end:/(?<=^\p{space}*)\\fi/dgv,patterns:[{include:"#comment"},{include:"#conditionals"}]},"dollar-math":{begin:/(\$\$?)/dgv,beginCaptures:{"1":{name:"punctuation.definition.string.begin.tex"}},end:/((?!))/dgv,endCaptures:{"1":{name:"punctuation.definition.string.end.tex"}},name:"meta.math.block.tex support.class.math.block.tex",patterns:[{match:/\\\$/dgv,name:"constant.character.escape.tex"},{include:"#math-content"},{include:"$self"}]},"iffalse-block":{begin:/(?<=^\p{space}*)((\\)iffalse)(?!\p{space}*[\{\}]\p{space}*\\fi\b)/dgv,beginCaptures:{"1":{name:"keyword.control.tex"},"2":{name:"punctuation.definition.keyword.tex"}},contentName:"comment.line.percentage.tex",end:/((\\)(?:else|fi))\b/dgv,endCaptures:{"1":{name:"keyword.control.tex"},"2":{name:"punctuation.definition.keyword.tex"}},patterns:[{include:"#comment"},{include:"#braces"},{include:"#conditionals"}]},ifnextchar:{match:/\\@ifnextchar[\(\[\{]/dgv,name:"keyword.control.ifnextchar.tex"},"macro-control":{captures:{"1":{name:"punctuation.definition.keyword.tex"}},match:/(\\)(backmatter|csname|else|endcsname|fi|frontmatter|mainmatter|unless|if(case|cat|csname|defined|dim|eof|false|fontchar|hbox|hmode|inner|mmode|num|odd|true|vbox|vmode|void|x)?)(?![\@-Za-z])/dgv,name:"keyword.control.tex"},"macro-general":{patterns:[{captures:{"1":{name:"punctuation.definition.function.tex"}},match:/(\\)_*[\@\p{Alphabetic}]+(?:_[\@\p{Alphabetic}]+)*:[DFNTVcefnopvwx]*/dgv,name:"support.class.general.latex3.tex"},{captures:{"1":{name:"punctuation.definition.function.tex"}},match:/(\.)[\@\p{Alphabetic}]+(?:_[\@\p{Alphabetic}]+)*:[DFNTVcefnopvwx]*/dgv,name:"support.class.general.latex3.tex"},{captures:{"1":{name:"punctuation.definition.function.tex"}},match:/(\\)(?:[\,\;]|[\@\p{Alphabetic}]+)/dgv,name:"support.function.general.tex"},{captures:{"1":{name:"punctuation.definition.keyword.tex"}},match:/(\\)[^\@-Za-z]/dgv,name:"constant.character.escape.tex"}]},"math-content":{patterns:[{begin:/((\\)(?:text|mbox))(\{)/dgv,beginCaptures:{"1":{name:"constant.other.math.tex"},"2":{name:"punctuation.definition.function.tex"},"3":{name:"punctuation.definition.arguments.begin.tex meta.text.normal.tex"}},contentName:"meta.text.normal.tex",end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.arguments.end.tex meta.text.normal.tex"}},patterns:[{include:"#math-content"},{include:"$self"}]},{match:/\\[\{\}]/dgv,name:"punctuation.math.bracket.pair.tex"},{match:/\\(left|right|((bigg??|Bigg??)[lr]?))([\]\(\)\.\<\>\[\|]|\\[\{\|\}]|\\[lr]?[Vv]ert|\\[lr]angle)/dgv,name:"punctuation.math.bracket.pair.big.tex"},{captures:{"1":{name:"punctuation.definition.constant.math.tex"}},match:/*@__PURE__*/ new EmulatedRegExp("(\\\\)(s(s(earrow|warrow|lash)|h(ort(downarrow|uparrow|parallel|leftarrow|rightarrow|mid)|arp)|tar|i(gma|m(eq)?)|u(cc(sim|n(sim|approx)|curlyeq|eq|approx)?|pset(neq(q)?|plus(eq)?|eq(q)?)?|rd|m|bset(neq(q)?|plus(eq)?|eq(q)?)?)|p(hericalangle|adesuit)|e(tminus|arrow)|q(su(pset(eq)?|bset(eq)?)|c([au]p)|uare)|warrow|m(ile|all(s(etminus|mile)|frown)))|h(slash|ook((?:lef|righ)tarrow)|eartsuit|bar)|R(sh|ightarrow|e|bag)|Gam(e|ma)|n(s(hort(parallel|mid)|im|u(cc(eq)?|pseteq(q)?|bseteq))|Rightarrow|n([ew]arrow)|cong|triangle(left(eq(slant)?)?|right(eq(slant)?)?)|i(plus)?|u|p(lus|arallel|rec(eq)?)|e(q|arrow|g|xists)|v([Dd]ash)|warrow|le(ss|q(slant|q)?|ft((?:|right)arrow))|a(tural|bla)|VDash|rightarrow|g(tr|eq(slant|q)?)|mid|Left((?:|right)arrow))|c(hi|irc(eq|le(d(circ|S|dash|ast)|arrow(left|right)))?|o(ng|prod|lon|mplement)|dot([ps])?|u(p|r(vearrow(left|right)|ly(eq(succ|prec)|vee((?:down|up)arrow)?|wedge((?:down|up)arrow)?)))|enterdot|lubsuit|ap)|Xi|Maps(to(char)?|from(char)?)|B(ox|umpeq|bbk)|t(h(ick(sim|approx)|e(ta|refore))|imes|op|wohead((?:lef|righ)tarrow)|a(u|lloblong)|riangle(down|q|left(eq(slant)?)?|right(eq(slant)?)?)?)|i(n(t(er(cal|leave))?|plus|fty)?|ota|math)|S(igma|u([bp]set))|zeta|o(slash|times|int|dot|plus|vee|wedge|lessthan|greaterthan|m(inus|ega)|b(slash|long|ar))|d(i(v(ideontimes)?|a(g(down|up)|mond(suit)?)|gamma)|o(t(plus|eq(dot)?)|ublebarwedge|wn(harpoon(left|right)|downarrows|arrow))|d(ots|agger)|elta|a(sh(v|leftarrow|rightarrow)|leth|gger))|Y(down|up|left|right)|C([au]p)|u(n([lr]hd)|p(silon|harpoon(left|right)|downarrow|uparrows|lus|arrow)|lcorner|rcorner)|jmath|Theta|Im|p(si|hi|i(tchfork)?|erp|ar(tial|allel)|r(ime|o(d|pto)|ec(sim|n(sim|approx)|curlyeq|eq|approx)?)|m)|e(t([ah])|psilon|q(slant(less|gtr)|circ|uiv)|ll|xists|mptyset)|Omega|D(iamond|ownarrow|elta)|v(d(ots|ash)|ee(bar)?|Dash|ar(s(igma|u(psetneq(q)?|bsetneq(q)?))|nothing|curly(vee|wedge)|t(heta|imes|riangle(left|right)?)|o(slash|circle|times|dot|plus|vee|wedge|lessthan|ast|greaterthan|minus|b(slash|ar))|p(hi|i|ropto)|epsilon|kappa|rho|bigcirc))|kappa|Up(silon|downarrow|arrow)|Join|f(orall|lat|a(t(s(emi|lash)|bslash)|llingdotseq)|rown)|P((?:s|h?)i)|w(p|edge|r)|l(hd|n(sim|eq(q)?|approx)|ceil|times|ightning|o(ng(left((?:|right)arrow)|rightarrow|maps(to|from))|zenge|oparrow(left|right))|dot([ps])|e(ss(sim|dot|eq(q?gtr)|approx|gtr)|q(slant|q)?|ft(slice|harpoon(down|up)|threetimes|leftarrows|arrow(t(ail|riangle))?|right(squigarrow|harpoons|arrow(s|triangle|eq)?))|adsto)|vertneqq|floor|l(c(orner|eil)|floor|l|bracket)?|a(ngle|mbda)|rcorner|bag)|a(s(ymp|t)|ngle|pprox(eq)?|l(pha|eph)|rrownot|malg)|V(v??dash)|r(h([do])|ceil|times|i(singdotseq|ght(s(quigarrow|lice)|harpoon(down|up)|threetimes|left(harpoons|arrows)|arrow(t(ail|riangle))?|rightarrows))|floor|angle|r(ceil|parenthesis|floor|bracket)|bag)|g(n(sim|eq(q)?|approx)|tr(sim|dot|eq(q?less)|less|approx)|imel|eq(slant|q)?|vertneqq|amma|g(g)?)|Finv|xi|m(ho|i(nuso|d)|o(o|dels)|u(ltimap)?|p|e(asuredangle|rge)|aps(to|from(char)?))|b(i(n(dnasrepma|ampersand)|g(s(tar|qc([au]p))|nplus|c(irc|u(p|rly(vee|wedge))|ap)|triangle(down|up)|interleave|o(times|dot|plus)|uplus|parallel|vee|wedge|box))|o(t|wtie|x(slash|circle|times|dot|plus|empty|ast|minus|b(slash|ox|ar)))|u(llet|mpeq)|e(cause|t(h|ween|a))|lack(square|triangle(down|left|right)?|lozenge)|a(ck(s(im(eq)?|lash)|prime|epsilon)|r(o|wedge))|bslash)|L(sh|ong(left((?:|right)arrow)|rightarrow|maps(to|from))|eft((?:|right)arrow)|leftarrow|ambda|bag)|Arrownot)(?![\\@-Za-z])","dgv",{"lazyCompile":true}),name:"constant.character.math.tex"},{captures:{"1":{name:"punctuation.definition.constant.math.tex"}},match:/(\\)(sum|prod|coprod|int|oint|bigcap|bigcup|bigsqcup|bigvee|bigwedge|bigodot|bigotimes|bogoplus|biguplus)\b/dgv,name:"constant.character.math.tex"},{captures:{"1":{name:"punctuation.definition.constant.math.tex"}},match:/(\\)(arccos|arcsin|arctan|arg|cosh??|coth??|csc|deg|det|dim|exp|gcd|hom|inf|ker|lg|lim|liminf|limsup|ln|log|max|min|pr|sec|sinh??|sup|tanh??)\b/dgv,name:"constant.other.math.tex"},{begin:/((\\)Sexpr(\{))/dgv,beginCaptures:{"1":{name:"support.function.sexpr.math.tex"},"2":{name:"punctuation.definition.function.math.tex"},"3":{name:"punctuation.section.embedded.begin.math.tex"}},contentName:"support.function.sexpr.math.tex",end:/(((\})))/dgv,endCaptures:{"1":{name:"support.function.sexpr.math.tex"},"2":{name:"punctuation.section.embedded.end.math.tex"},"3":{name:"source.r"}},name:"meta.embedded.line.r",patterns:[{begin:/(?!\})/dgvy,end:/(?=\})/dgv,name:"source.r",patterns:[{include:"source.r"}]}]},{captures:{"1":{name:"punctuation.definition.constant.math.tex"}},match:/(\\)(?!begin\{|verb)([A-Za-z]+)/dgv,name:"constant.other.general.math.tex"},{match:/(?<!\\)\{/dgv,name:"punctuation.math.begin.bracket.curly.tex"},{match:/(?<!\\)\}/dgv,name:"punctuation.math.end.bracket.curly.tex"},{match:/(?<!\\)\(/dgv,name:"punctuation.math.begin.bracket.round.tex"},{match:/(?<!\\)\)/dgv,name:"punctuation.math.end.bracket.round.tex"},{match:/(([0-9]*\.[0-9]+)|[0-9]+)/dgv,name:"constant.numeric.math.tex"},{match:/[\-\*\+\/]|(?<!\^)\^(?!\^)|(?<!_)_(?!_)/dgv,name:"punctuation.math.operator.tex"}]}},scopeName:"text.tex",embeddedLangs:["r"],aliases:undefined})
|
|
5
5
|
|
|
6
6
|
export default [
|
|
7
7
|
...r,
|