@shikijs/langs-precompiled 3.21.0 → 3.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actionscript-3.mjs +1 -1
- package/dist/csharp.mjs +1 -1
- package/dist/gd.d.mts +3 -0
- package/dist/gd.mjs +2 -0
- package/dist/gdresource.mjs +1 -1
- package/dist/gdscript.mjs +1 -1
- package/dist/go.mjs +1 -1
- package/dist/index.mjs +7 -0
- package/dist/latex.mjs +1 -1
- package/dist/lua.mjs +1 -1
- package/dist/move.mjs +1 -1
- package/dist/odin.d.mts +3 -0
- package/dist/odin.mjs +5 -0
- package/dist/php.mjs +1 -1
- package/dist/ron.d.mts +3 -0
- package/dist/ron.mjs +5 -0
- package/dist/surql.d.mts +3 -0
- package/dist/surql.mjs +2 -0
- package/dist/surrealql.d.mts +3 -0
- package/dist/surrealql.mjs +8 -0
- package/dist/tres.d.mts +3 -0
- package/dist/tres.mjs +2 -0
- package/dist/tscn.d.mts +3 -0
- package/dist/tscn.mjs +2 -0
- package/package.json +10 -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:"#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})
|
|
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:/"/dgv,end:/"/dgv,name:"meta.string.literal.move",patterns:[{match:/\\x\p{AHex}\p{AHex}/dgv,name:"constant.character.escape.hex.move"},{match:/\\[^\n]/dgv,name:"constant.character.escape.move"},{match:/[^\n]/dgv,name:"string.quoted.double.raw.move"}]},{begin:/\bb"/dgv,end:/"/dgv,name:"meta.vector.literal.ascii.move",patterns:[{match:/\\x\p{AHex}\p{AHex}/dgv,name:"constant.character.escape.hex.move"},{match:/\\[^\n]/dgv,name:"constant.character.escape.move"},{match:/[^\n]/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/odin.d.mts
ADDED
package/dist/odin.mjs
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const lang = Object.freeze({displayName:"Odin",name:"odin",patterns:[{include:"#file-tags"},{include:"#package-name-declaration"},{include:"#import-declaration"},{include:"#statements"}],repository:{assignments:{patterns:[{include:"#procedure-assignment"},{include:"#type-assignment"},{include:"#distinct-type-assignment"},{include:"#constant-assignment"},{include:"#variable-assignment"},{include:"#type-annotation"}]},attribute:{patterns:[{captures:{"1":{name:"keyword.control.attribute.odin"},"2":{name:"entity.other.attribute-name.odin"}},match:/(@)\p{space}*([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\b/dgv,name:"meta.attribute.odin"},{begin:/(@)\p{space}*(\()/dgv,beginCaptures:{"1":{name:"keyword.control.attribute.odin"},"2":{name:"meta.brace.round.odin"}},end:/\)/dgv,endCaptures:{"0":{name:"meta.brace.round.odin"}},name:"meta.attribute.odin",patterns:[{match:/\b([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\b/dgv,name:"entity.other.attribute-name.odin"},{match:/,/dgv,name:"punctuation.odin"},{begin:/=/dgv,beginCaptures:{"0":{name:"keyword.operator.assignment.odin"}},end:/(?=[\)\,])/dgv,patterns:[{include:"#expressions"}]}]}]},"basic-types":{patterns:[{match:/\b(i(?:8|16|32|64|128|nt))\b/dgv,name:"support.type.primitive.odin"},{match:/\b(u(?:8|16|32|64|128|int|intptr))\b/dgv,name:"support.type.primitive.odin"},{match:/\b((?:u16|u32|u64|u128|i16|i32|i64|i128)le)\b/dgv,name:"support.type.primitive.odin"},{match:/\b((?:i16|i32|i64|i128|u16|u32|u64|u128)be)\b/dgv,name:"support.type.primitive.odin"},{match:/\b(f(?:16|32|64))\b/dgv,name:"support.type.primitive.odin"},{match:/\b(f(?:16|32|64)le)\b/dgv,name:"support.type.primitive.odin"},{match:/\b(f(?:16|32|64)be)\b/dgv,name:"support.type.primitive.odin"},{match:/\b(complex(?:32|64|128))\b/dgv,name:"support.type.primitive.odin"},{match:/\b(quaternion(?:64|128|256))\b/dgv,name:"support.type.primitive.odin"},{match:/\b(b(?:ool|8|16|32|64))\b/dgv,name:"support.type.primitive.odin"},{match:/\b(string|cstring|rune)\b/dgv,name:"support.type.primitive.odin"},{match:/\b(rawptr)\b/dgv,name:"support.type.primitive.odin"},{match:/\b(any|typeid)\b/dgv,name:"support.type.primitive.odin"},{match:/\b(byte)\b/dgv,name:"support.type.primitive.odin"}]},"block-comment":{begin:/\/\*/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.begin.odin"}},end:/\*\//dgv,endCaptures:{"0":{name:"punctuation.definition.comment.end.odin"}},name:"comment.block.odin",patterns:[{include:"#block-comment"}]},"block-definition":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.block.odin"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.block.odin"}},name:"meta.block.odin",patterns:[{include:"#statements"}]},"block-label":{captures:{"1":{name:"entity.name.label.odin"},"2":{name:"punctuation.definition.label.odin"}},match:/([\p{L}\p{M}\p{N}\p{Pc}]+)(:)\p{space}*(?=for|switch|if|\{)/dgv,name:"meta.block.label.odin"},"case-clause":{begin:/\b(case)\b/dgv,beginCaptures:{"1":{name:"keyword.control.case.odin"}},end:/:/dgv,endCaptures:{"0":{name:"punctuation.definition.section.case-statement.odin"}},name:"meta.case-clause.expr.odin",patterns:[{include:"#expressions"}]},comments:{patterns:[{include:"#block-comment"},{begin:/\/\//dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.odin"}},end:/\n/dgv,name:"comment.line.double-slash.odin"},{begin:/#!/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.odin"}},end:/\n/dgv,name:"comment.line.shebang.odin"}]},"constant-assignment":{captures:{"1":{name:"variable.other.constant.odin"},"2":{name:"keyword.operator.assignment.odin"}},match:/([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(:\p{space}*:)/dgv,name:"meta.definition.variable.odin"},"distinct-type-assignment":{begin:/\b([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(:\p{space}*:)\p{space}*(?=(distinct)\b)/dgv,beginCaptures:{"1":{name:"entity.name.type.odin"},"2":{name:"keyword.operator.assignment.odin"},"3":{name:"storage.type.odin"}},end:/(?=^)|(?<=\})/dgv,name:"meta.definition.variable.odin",patterns:[{include:"#type-declaration"}]},expressions:{patterns:[{include:"#comments"},{include:"#ternary"},{include:"#map-bitset"},{include:"#slice"},{include:"#keywords"},{include:"#type-parameter"},{include:"#basic-types"},{include:"#procedure-calls"},{include:"#property-access"},{include:"#union-member-access"},{include:"#union-non-nil-access"},{include:"#strings"},{include:"#punctuation"},{include:"#variable-name"}]},"file-tags":{begin:/#\+[A-Z_a-z][\-0-9A-Z_a-z]*/dgv,beginCaptures:{"0":{name:"entity.name.tag.odin"}},end:/\n/dgv,name:"comment.line.double-slash.odin",patterns:[{match:/,/dgv,name:"punctuation.odin"},{match:/!/dgv,name:"keyword.operator.logical.odin"},{match:/[A-Z_a-z][\-0-9A-Z_a-z]*/dgv,name:"entity.other.attribute-name.odin"}]},"import-declaration":{begin:/\b((?:|foreign\p{space}+)import)\b/dgv,beginCaptures:{"0":{name:"keyword.control.import.odin"}},end:/(?=^|;)/dgv,name:"meta.import.odin",patterns:[{begin:/\b[A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*/dgv,beginCaptures:{"0":{name:"entity.name.namespace.odin"}},end:/(?=^|;)/dgv,name:"entity.name.alias.odin",patterns:[{include:"#strings"},{include:"#comments"}]},{include:"#strings"},{include:"#comments"}]},keywords:{patterns:[{match:/\b(import|foreign|package)\b/dgv,name:"keyword.control.odin"},{match:/\b(if|else|or_else|when|where|for|in|not_in|defer|switch|return|or_return)\b/dgv,name:"keyword.control.odin"},{captures:{"1":{name:"keyword.control.odin"},"2":{name:"entity.name.label.odin"}},match:/\b((?:|or_)(?:break|continue))\b\p{space}*([\p{L}\p{M}\p{N}\p{Pc}]+)?/dgv},{match:/\b(fallthrough|case|dynamic)\b/dgv,name:"keyword.control.odin"},{match:/\b(do|force_inline|no_inline)\b/dgv,name:"keyword.control.odin"},{match:/\b(asm)\b/dgv,name:"keyword.control.odin"},{match:/\b(auto_cast|distinct|using)\b/dgv,name:"storage.modifier.odin"},{match:/\b(context)\b/dgv,name:"keyword.context.odin"},{match:/\b(ODIN_(?:ARCH|OS))\b/dgv,name:"variable.other.constant.odin"},{match:/\b(nil|true|false)\b/dgv,name:"constant.language.odin"},{match:/---/dgv,name:"constant.language.odin"},{match:/\b(\p{Nd}([_\p{Nd}])*(\.\p{Nd}([_\p{Nd}])*)?)(([Ee])([\-\+])?\p{Nd}+)?[ijk]?\b/dgv,name:"constant.numeric.odin"},{match:/\b((0b([01_])+)|(0o([_\p{Nd}])+)|(0d([_\p{Nd}])+)|(0[Xhx]([_\p{AHex}])+))i?\b/dgv,name:"constant.numeric.odin"},{match:/\b(struct|enum|union|map|bit_set|bit_field|matrix)\b/dgv,name:"storage.type.odin"},{match:/[\-\%\*\+\/]=|%%=/dgv,name:"keyword.operator.assignment.compound.odin"},{match:/(?:[\|\~]|&~?|<<|>>)=/dgv,name:"keyword.operator.assignment.compound.bitwise.odin"},{match:/[\!\=]=/dgv,name:"keyword.operator.comparison.odin"},{match:/[\<\>]=?/dgv,name:"keyword.operator.relational.odin"},{match:/\.\.[\<\=]/dgv,name:"keyword.operator.range.odin"},{match:/\.\./dgv,name:"keyword.operator.spread.odin"},{match:/:[\:\=]|=/dgv,name:"keyword.operator.assignment.odin"},{match:/&/dgv,name:"keyword.operator.address.odin"},{match:/\^/dgv,name:"keyword.operator.address.odin"},{match:/->/dgv,name:"storage.type.function.arrow.odin"},{match:/@|([\-\!\%\*\+\/\:\|]|<<?|>>?|~)=?|=|: : ?|\$/dgv,name:"keyword.operator.odin"},{match:/#[A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*/dgv,name:"entity.name.tag.odin"}]},"map-bitset":{begin:/\b(bit_set|map)\b/dgv,beginCaptures:{"0":{name:"storage.type.odin"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.definition.bracket.square.odin"}},patterns:[{match:/\[/dgv,name:"punctuation.definition.bracket.square.odin"},{include:"#type-declaration"}]},"object-definition":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.block.odin"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.block.odin"}},name:"meta.object.type.odin",patterns:[{include:"#statements"}]},"package-name-declaration":{captures:{"1":{name:"keyword.control.odin"},"2":{name:"entity.name.type.module.odin"}},match:/^\p{space}*(package)\p{space}+([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)/dgv},parameters:{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.parameters.begin.odin"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.parameters.end.odin"}},name:"meta.parameters.odin",patterns:[{include:"#assignments"},{include:"#expressions"}]},"procedure-assignment":{begin:/\b([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(:\p{space}*:|=)\p{space}*(#[\p{L}\p{M}\p{N}\p{Pc}]+)?\p{space}*(?=proc\b)/dgv,beginCaptures:{"1":{name:"meta.definition.function.odin entity.name.function.odin"},"2":{name:"keyword.operator.assignment.odin"},"3":{name:"keyword.other.odin"}},end:/(?=^)|(?<=\})/dgv,name:"meta.definition.variable.odin",patterns:[{include:"#type-declaration"}]},"procedure-calls":{patterns:[{begin:/\b(cast|transmute)\b\p{space}*(\()/dgv,beginCaptures:{"1":{name:"keyword.function.odin"},"2":{name:"meta.brace.round.odin"}},end:/\)/dgv,endCaptures:{"0":{name:"meta.brace.round.odin"}},name:"meta.function-call.odin",patterns:[{include:"#type-declaration"}]},{begin:/\b((?:size|align)_of)\b\p{space}*(\()/dgv,beginCaptures:{"1":{name:"support.function.builtin.odin"},"2":{name:"meta.brace.round.odin"}},end:/\)/dgv,endCaptures:{"0":{name:"meta.brace.round.odin"}},name:"meta.function-call.odin",patterns:[{include:"#type-declaration"}]},{begin:/\b(len|cap|offset_of_selector|offset_of_member|offset_of|offset_of_by_string|type_of|type_info_of|typeid_of|swizzle|complex|quaternion|real|imag|jmag|kmag|conj|expand_values|min|max|abs|clamp|soa_zip|soa_unzip|make|new|new_clone|resize|reserve|append|delete|free|free_all|assert|panic)\b\p{space}*(\()/dgv,beginCaptures:{"1":{name:"support.function.builtin.odin"},"2":{name:"meta.brace.round.odin"}},end:/\)/dgv,endCaptures:{"0":{name:"meta.brace.round.odin"}},name:"meta.function-call.odin",patterns:[{include:"#expressions"}]},{begin:/([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(\()/dgv,beginCaptures:{"1":{name:"entity.name.function.odin"},"2":{name:"meta.brace.round.odin"}},end:/\)/dgv,endCaptures:{"0":{name:"meta.brace.round.odin"}},name:"meta.function-call.odin",patterns:[{include:"#expressions"}]}]},"property-access":{captures:{"1":{name:"variable.other.object.odin"},"2":{name:"punctuation.accessor.odin"}},match:/([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(\.)\p{space}*(?=[A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)/dgv},punctuation:{match:/[\]\(\)\,\.\;\[\\\{\}]/dgv,name:"punctuation.odin"},"return-type-declaration":{begin:/->/dgv,beginCaptures:{"0":{name:"storage.type.function.arrow.odin"}},end:/(?=^|[\)\,\;\{]|where)/dgv,name:"meta.return.type.odin",patterns:[{include:"#comments"},{include:"#keywords"},{include:"#basic-types"},{include:"#property-access"},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.parameters.begin.odin"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.parameters.end.odin"}},name:"meta.parameters.odin",patterns:[{include:"#comments"},{include:"#assignments"},{include:"#keywords"},{include:"#basic-types"},{include:"#property-access"},{include:"#type-name"},{include:"#punctuation"}]},{include:"#type-name"}]},slice:{begin:/\[/dgv,beginCaptures:{"0":{name:"meta.brace.square.odin"}},end:/\]/dgv,endCaptures:{"0":{name:"meta.brace.square.odin"}},name:"meta.slice.odin",patterns:[{match:/\?/dgv,name:"keyword.operator.array.odin"},{match:/:/dgv,name:"keyword.operator.slice.odin"},{include:"#expressions"}]},statements:{patterns:[{include:"#attribute"},{include:"#procedure-assignment"},{include:"#type-assignment"},{include:"#distinct-type-assignment"},{include:"#constant-assignment"},{include:"#variable-assignment"},{include:"#case-clause"},{include:"#block-label"},{include:"#type-annotation"},{include:"#block-definition"},{include:"#expressions"}]},"string-escaped-char":{patterns:[{match:/\\(x1b|e|033)\[[0-9\;]*m/dgv,name:"constant.character.escape.ansi-color-sequence.odin"},{match:/\\(["'\\abefnrtuv]|x\p{AHex}{2}|u\p{AHex}{4}|U\p{AHex}{8}|[0-7]{3})/dgv,name:"constant.character.escape.odin"},{match:/%([\%E-HMTUXb-imo-tvwxz])/dgv,name:"constant.character.escape.placeholders.odin"},{match:/%(\p{Nd}*\.?\p{Nd}*f)/dgv,name:"constant.character.escape.placeholders-floats.odin"},{match:/\\[^\n]/dgv,name:"invalid.illegal.unknown-escape.odin"}]},strings:{patterns:[{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.odin"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.odin"}},name:"string.quoted.double.odin",patterns:[{include:"#string-escaped-char"}]},{begin:/'/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.odin"}},end:/'/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.odin"}},name:"string.quoted.single.odin",patterns:[{include:"#string-escaped-char"}]},{begin:/`/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.odin"}},end:/`/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.odin"}},name:"string.quoted.raw.odin"}]},ternary:{begin:/\?/dgv,beginCaptures:{"0":{name:"keyword.operator.ternary.odin"}},end:/:/dgv,endCaptures:{"0":{name:"keyword.operator.ternary.odin"}},name:"meta.ternary.odin",patterns:[{include:"#expressions"}]},"type-annotation":{begin:/(?:([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(,)\p{space}*)?(?:([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(,)\p{space}*)?([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(:)/dgv,beginCaptures:{"1":{name:"variable.name.odin"},"2":{name:"punctuation.odin"},"3":{name:"variable.name.odin"},"4":{name:"punctuation.odin"},"5":{name:"variable.name.odin"},"6":{name:"keyword.operator.type.annotation.odin"}},end:/(?=^|[\)\,\:\;\=]|for|switch|if|\{)/dgv,name:"meta.type.annotation.odin",patterns:[{include:"#type-declaration"}]},"type-assignment":{begin:/\b([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(:\p{space}*:)\p{space}*(?=(struct|union|enum|bit_set|bit_field)\b)/dgv,beginCaptures:{"1":{name:"entity.name.type.odin"},"2":{name:"keyword.operator.assignment.odin"},"3":{name:"storage.type.odin"}},end:/(?=^)|(?<=\})/dgv,name:"meta.definition.variable.odin",patterns:[{include:"#type-declaration"}]},"type-declaration":{name:"meta.type.declaration.odin",patterns:[{include:"#map-bitset"},{begin:/\b(proc|struct|union|enum|bit_field)\b/dgv,beginCaptures:{"1":{name:"storage.type.odin"}},end:/(?=^|[\)\,\;])|(?<=\})/dgv,patterns:[{include:"#parameters"},{include:"#return-type-declaration"},{include:"#object-definition"},{include:"#expressions"}]},{include:"#comments"},{include:"#strings"},{include:"#block-definition"},{include:"#keywords"},{include:"#basic-types"},{include:"#slice"},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.typeparameters.begin.odin"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.typeparameters.end.odin"}},patterns:[{include:"#type-declaration"}]},{include:"#property-access"},{include:"#punctuation"},{include:"#type-name"}]},"type-name":{match:/\b[A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*\b/dgv,name:"entity.name.type.odin"},"type-parameter":{captures:{"1":{name:"keyword.operator.odin"},"2":{name:"entity.name.type.parameter.odin"}},match:/(\$)\p{space}*\b([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\b/dgv},"union-member-access":{begin:/([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(\.)\p{space}*(\()/dgv,beginCaptures:{"1":{name:"variable.other.object.odin"},"2":{name:"punctuation.accessor.odin"},"3":{name:"meta.brace.round.odin"}},end:/\)/dgv,endCaptures:{"0":{name:"meta.brace.round.odin"}},patterns:[{include:"#type-declaration"}]},"union-non-nil-access":{captures:{"1":{name:"variable.other.object.odin"},"2":{name:"punctuation.accessor.odin"},"3":{name:"punctuation.accessor.optional.odin"}},match:/([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(\.)\p{space}*(\?)/dgv},"variable-assignment":{captures:{"1":{name:"variable.name.odin"},"2":{name:"punctuation.odin"},"3":{name:"variable.name.odin"},"4":{name:"punctuation.odin"},"5":{name:"variable.name.odin"},"6":{name:"keyword.operator.assignment.odin"}},match:/(?:([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(,)\p{space}*)?(?:([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(,)\p{space}*)?([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(:\p{space}*=)/dgv,name:"meta.definition.variable.odin"},"variable-name":{match:/\b[A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*\b/dgv,name:"variable.name.odin"}},scopeName:"source.odin",embeddedLangs:undefined,aliases:undefined})
|
|
2
|
+
|
|
3
|
+
export default [
|
|
4
|
+
lang
|
|
5
|
+
]
|