@shikijs/langs-precompiled 3.4.2 → 3.6.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/coq.mjs +1 -1
- package/dist/go.mjs +1 -1
- package/dist/liquid.mjs +1 -1
- package/dist/log.mjs +1 -1
- package/dist/r.mjs +1 -1
- package/dist/svelte.mjs +1 -1
- package/dist/vue.mjs +1 -2
- package/package.json +3 -3
package/dist/go.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EmulatedRegExp } from 'oniguruma-to-es'
|
|
2
2
|
|
|
3
|
-
const lang = Object.freeze({displayName:"Go",name:"go",patterns:[{include:"#statements"}],repository:{after_control_variables:{captures:{"1":{patterns:[{include:"#type-declarations-without-brackets"},{match:/\[/dgv,name:"punctuation.definition.begin.bracket.square.go"},{match:/\]/dgv,name:"punctuation.definition.end.bracket.square.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.go"}]}},match:/(?<=\brange\b|\bswitch\b|;|\bif\b|\bfor\b|[\<\>]|<=|>=|==|!=|[\p{L}\p{M}\p{N}\p{Pc}][\-\%\*\+\/]|[\p{L}\p{M}\p{N}\p{Pc}][\-\%\*\+\/]=|\|\||&&)\p{space}*((?![\]\[]+)[\-\]\!\%\*\+\.\/\:\<\=\>\[_\p{Alpha}\p{Nd}]+)\p{space}*(?=\{)/dgv},brackets:{patterns:[{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.begin.bracket.curly.go"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.curly.go"}},patterns:[{include:"$self"}]},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{include:"$self"}]},{begin:/\[/dgv,beginCaptures:{"0":{name:"punctuation.definition.begin.bracket.square.go"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.square.go"}},patterns:[{include:"$self"}]}]},built_in_functions:{patterns:[{match:/\b(append|cap|close|complex|copy|delete|imag|len|panic|print|println|real|recover|min|max|clear)\b(?=\()/dgv,name:"entity.name.function.support.builtin.go"},{begin:/\b(new)\b(\()/dgv,beginCaptures:{"1":{name:"entity.name.function.support.builtin.go"},"2":{name:"punctuation.definition.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{include:"#functions"},{include:"#struct_variables_types"},{include:"#type-declarations"},{include:"#generic_types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"},{include:"$self"}]},{begin:/\b(make)\b(\()((?:(?:(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+(?:\([^\)]+\))?)?(?:[\]\*\[]+)?(?:(?!\bmap\b)[\.\p{L}\p{M}\p{N}\p{Pc}]+)?(\[(?:\P{space}+(?:,\p{space}*\P{space}+)*)?\])?,?)?/dgv,beginCaptures:{"1":{name:"entity.name.function.support.builtin.go"},"2":{name:"punctuation.definition.begin.bracket.round.go"},"3":{patterns:[{include:"#type-declarations-without-brackets"},{include:"#parameter-variable-types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{include:"$self"}]}]},comments:{patterns:[{begin:/(\/\*)/dgv,beginCaptures:{"1":{name:"punctuation.definition.comment.go"}},end:/(\*\/)/dgv,endCaptures:{"1":{name:"punctuation.definition.comment.go"}},name:"comment.block.go"},{begin:/(\/\/)/dgv,beginCaptures:{"1":{name:"punctuation.definition.comment.go"}},end:/\n|(?=\n?$)/dgv,name:"comment.line.double-slash.go"}]},const_assignment:{patterns:[{captures:{"1":{patterns:[{include:"#delimiters"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.constant.go"}]},"2":{patterns:[{include:"#type-declarations-without-brackets"},{include:"#generic_types"},{match:/\(/dgv,name:"punctuation.definition.begin.bracket.round.go"},{match:/\)/dgv,name:"punctuation.definition.end.bracket.round.go"},{match:/\[/dgv,name:"punctuation.definition.begin.bracket.square.go"},{match:/\]/dgv,name:"punctuation.definition.end.bracket.square.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/(?<=\bconst\b)\p{space}*\b([\.\p{L}\p{M}\p{N}\p{Pc}]+(?:,\p{space}*[\.\p{L}\p{M}\p{N}\p{Pc}]+)*)\p{space}*((?:(?:(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+(?:\([^\)]+\))?)?(?!(?:[\]\*\[]+)?\b(?:struct|func|map)\b)(?:[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+(?:,\p{space}*[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+)*)?\p{space}*=?)?/dgv},{begin:/(?<=\bconst\b)\p{space}*(\()/dgv,beginCaptures:{"1":{name:"punctuation.definition.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{captures:{"1":{patterns:[{include:"#delimiters"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.constant.go"}]},"2":{patterns:[{include:"#type-declarations-without-brackets"},{include:"#generic_types"},{match:/\(/dgv,name:"punctuation.definition.begin.bracket.round.go"},{match:/\)/dgv,name:"punctuation.definition.end.bracket.round.go"},{match:/\[/dgv,name:"punctuation.definition.begin.bracket.square.go"},{match:/\]/dgv,name:"punctuation.definition.end.bracket.square.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/^\p{space}*\b([\.\p{L}\p{M}\p{N}\p{Pc}]+(?:,\p{space}*[\.\p{L}\p{M}\p{N}\p{Pc}]+)*)\p{space}*((?:(?:(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+(?:\([^\)]+\))?)?(?!(?:[\]\*\[]+)?\b(?:struct|func|map)\b)(?:[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+(?:,\p{space}*[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+)*)?\p{space}*=?)?/dgv},{include:"$self"}]}]},delimiters:{patterns:[{match:/,/dgv,name:"punctuation.other.comma.go"},{match:/\.(?!\.\.)/dgv,name:"punctuation.other.period.go"},{match:/:(?!=)/dgv,name:"punctuation.other.colon.go"}]},double_parentheses_types:{captures:{"1":{patterns:[{include:"#type-declarations-without-brackets"},{match:/\(/dgv,name:"punctuation.definition.begin.bracket.round.go"},{match:/\)/dgv,name:"punctuation.definition.end.bracket.round.go"},{match:/\[/dgv,name:"punctuation.definition.begin.bracket.square.go"},{match:/\]/dgv,name:"punctuation.definition.end.bracket.square.go"},{match:/\{/dgv,name:"punctuation.definition.begin.bracket.curly.go"},{match:/\}/dgv,name:"punctuation.definition.end.bracket.curly.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},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}]+(?:,\p{space}*[\]\*\.\[\{\}\p{L}\p{M}\p{N}\p{Pc}]+)*)?\])?\))(?=\()/dgv},field_hover:{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.property.go"}]},"2":{patterns:[{match:/\binvalid\b\p{space}+\btype\b/dgv,name:"invalid.field.go"},{include:"#type-declarations-without-brackets"},{include:"#parameter-variable-types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/(?<=^\bfield\b)\p{space}+([\*\.\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}+([\p{space}\P{space}]+)/dgv},function_declaration:{begin:/^\b(func)\b\p{space}*(\([^\)]+\)\p{space}*)?(?:([\p{L}\p{M}\p{N}\p{Pc}]+)(?=[\(\[]))?/dgv,beginCaptures:{"1":{name:"keyword.function.go"},"2":{patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{captures:{"1":{name:"variable.parameter.go"},"2":{patterns:[{include:"#type-declarations-without-brackets"},{include:"#parameter-variable-types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/([\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{space}+)?)+)?\])?)/dgv},{include:"$self"}]}]},"3":{patterns:[{match:/\p{Nd}[\p{L}\p{M}\p{N}\p{Pc}]*/dgv,name:"invalid.illegal.identifier.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.function.go"}]}},end:/(?<=\))\p{space}*((?:(?:(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?(?!(?:[\]\*\[]+)?\b(?:struct|interface)\b)[\-\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+)?\p{space}*(?=\{)/dgv,endCaptures:{"1":{patterns:[{include:"#type-declarations-without-brackets"},{include:"#parameter-variable-types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{include:"#function_param_types"}]},{begin:/([\*\.\p{L}\p{M}\p{N}\p{Pc}]+)?(\[)/dgv,beginCaptures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]},"2":{name:"punctuation.definition.begin.bracket.square.go"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.square.go"}},patterns:[{include:"#generic_param_types"}]},{captures:{"1":{patterns:[{include:"#type-declarations-without-brackets"},{include:"#parameter-variable-types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/(?<=\))\p{space}*((?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?[\-\]\*\.\<\>\[\p{L}\p{M}\p{N}\p{Pc}]+\p{space}*(?:\/[\*\/][^\n]*)?)(?=\n?$)/dgv},{include:"$self"}]},function_param_types:{patterns:[{include:"#struct_variables_types"},{include:"#interface_variables_types"},{include:"#type-declarations-without-brackets"},{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.parameter.go"}]}},match:/((?:(?:\b[\p{L}\p{M}\p{N}\p{Pc}]+,\p{space}*)+)?\b[\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}+(?=(?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?(?:[\]\*\[]+)?\b(?:struct|interface)\b\p{space}*\{)/dgv},{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.parameter.go"}]}},match:/(?:(?<=\()|^\p{space}*)((?:\b[\p{L}\p{M}\p{N}\p{Pc}]+,\p{space}*)+(?:\/[\*\/][^\n]*)?)(?=\n?$)/dgv},{captures:{"1":{patterns:[{include:"#delimiters"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.parameter.go"}]},"2":{patterns:[{include:"#type-declarations-without-brackets"},{include:"#parameter-variable-types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/((?:(?:\b[\p{L}\p{M}\p{N}\p{Pc}]+,\p{space}*)+)?\b[\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}+((?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?(?:(?:[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+)?(?:\bfunc\b\((?:[^\)]+)?\)(?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?\p{space}*)+(?:[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+|\((?:[^\)]+)?\))?|(?:(?:[\]\*\[]+)?[\*\.\p{L}\p{M}\p{N}\p{Pc}]+(?:\[[^\]]+\])?(?:[\*\.\p{L}\p{M}\p{N}\p{Pc}]+)?)+))/dgv},{begin:/([\*\.\p{L}\p{M}\p{N}\p{Pc}]+)?(\[)/dgv,beginCaptures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]},"2":{name:"punctuation.definition.begin.bracket.square.go"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.square.go"}},patterns:[{include:"#generic_param_types"}]},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{include:"#function_param_types"}]},{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/([\.\p{L}\p{M}\p{N}\p{Pc}]+)/dgv},{include:"$self"}]},functions:{begin:/\b(func)\b(?=\()/dgv,beginCaptures:{"1":{name:"keyword.function.go"}},end:/(?<=\))(\p{space}*(?:(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?(\p{space}*(?:(?:[\]\*\[]+)?[\*\.\p{L}\p{M}\p{N}\p{Pc}]+)?(?:\[(?:(?:[\*\.\p{L}\p{M}\p{N}\p{Pc}]+)?(?:\[(?:[^\]]+)?\])?(?:,\p{space}+)?)+\]|\((?:[^\)]+)?\))?(?:[\*\.\p{L}\p{M}\p{N}\p{Pc}]+)?\p{space}*(?=\{)|\p{space}*(?:(?:[\]\*\[]+)?(?!\bfunc\b)[\*\.\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,endCaptures:{"1":{patterns:[{include:"#type-declarations"}]},"2":{patterns:[{include:"#type-declarations-without-brackets"},{include:"#parameter-variable-types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},patterns:[{include:"#parameter-variable-types"}]},functions_inline:{captures:{"1":{name:"keyword.function.go"},"2":{patterns:[{include:"#type-declarations-without-brackets"},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{include:"#function_param_types"},{include:"$self"}]},{match:/\[/dgv,name:"punctuation.definition.begin.bracket.square.go"},{match:/\]/dgv,name:"punctuation.definition.end.bracket.square.go"},{match:/\{/dgv,name:"punctuation.definition.begin.bracket.curly.go"},{match:/\}/dgv,name:"punctuation.definition.end.bracket.curly.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/\b(func)\b(\([^\/]*?\)\p{space}+\([^\/]*?\))\p{space}+(?=\{)/dgv},generic_param_types:{patterns:[{include:"#struct_variables_types"},{include:"#interface_variables_types"},{include:"#type-declarations-without-brackets"},{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.parameter.go"}]}},match:/((?:(?:\b[\p{L}\p{M}\p{N}\p{Pc}]+,\p{space}*)+)?\b[\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}+(?=(?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?(?:[\]\*\[]+)?\b(?:struct|interface)\b\p{space}*\{)/dgv},{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.parameter.go"}]}},match:/(?:(?<=\()|^\p{space}*)((?:\b[\p{L}\p{M}\p{N}\p{Pc}]+,\p{space}*)+(?:\/[\*\/][^\n]*)?)(?=\n?$)/dgv},{captures:{"1":{patterns:[{include:"#delimiters"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.parameter.go"}]},"2":{patterns:[{include:"#type-declarations-without-brackets"},{include:"#parameter-variable-types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]},"3":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/((?:(?:\b[\p{L}\p{M}\p{N}\p{Pc}]+,\p{space}*)+)?\b[\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}+((?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?(?:(?:[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+)?(?:\bfunc\b\((?:[^\)]+)?\)(?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?\p{space}*)+(?:[\*\.\p{L}\p{M}\p{N}\p{Pc}]+|\((?:[^\)]+)?\))?|(?:(?:[\*\.\~\p{L}\p{M}\p{N}\p{Pc}]+|\[(?:(?:[\*\.\p{L}\p{M}\p{N}\p{Pc}]+)?(?:\[(?:[^\]]+)?\])?(?:,\p{space}+)?)+\])(?:[\*\.\p{L}\p{M}\p{N}\p{Pc}]+)?)+))/dgv},{begin:/([\*\.\p{L}\p{M}\p{N}\p{Pc}]+)?(\[)/dgv,beginCaptures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]},"2":{name:"punctuation.definition.begin.bracket.square.go"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.square.go"}},patterns:[{include:"#generic_param_types"}]},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{include:"#function_param_types"}]},{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/\b([\.\p{L}\p{M}\p{N}\p{Pc}]+)/dgv},{include:"$self"}]},generic_types:{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]},"2":{patterns:[{include:"#parameter-variable-types"}]}},match:/([\*\.\p{L}\p{M}\p{N}\p{Pc}]+)(\[(?:[^\]]+)?\])/dgv},"group-functions":{patterns:[{include:"#function_declaration"},{include:"#functions_inline"},{include:"#functions"},{include:"#built_in_functions"},{include:"#support_functions"}]},"group-types":{patterns:[{include:"#other_struct_interface_expressions"},{include:"#type_assertion_inline"},{include:"#struct_variables_types"},{include:"#interface_variables_types"},{include:"#single_type"},{include:"#multi_types"},{include:"#struct_interface_declaration"},{include:"#double_parentheses_types"},{include:"#switch_types"},{include:"#type-declarations"}]},"group-variables":{patterns:[{include:"#const_assignment"},{include:"#var_assignment"},{include:"#variable_assignment"},{include:"#label_loop_variables"},{include:"#slice_index_variables"},{include:"#property_variables"},{include:"#switch_select_case_variables"},{include:"#other_variables"}]},import:{patterns:[{begin:/\b(import)\p{space}+/dgv,beginCaptures:{"1":{name:"keyword.control.import.go"}},end:/*@__PURE__*/ new EmulatedRegExp("(?!^)","dgv",{"strategy":"clip_search"}),patterns:[{include:"#imports"}]}]},imports:{patterns:[{captures:{"1":{patterns:[{include:"#delimiters"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.import.go"}]},"2":{name:"string.quoted.double.go"},"3":{name:"punctuation.definition.string.begin.go"},"4":{name:"entity.name.import.go"},"5":{name:"punctuation.definition.string.end.go"}},match:/(\p{space}*[\.\p{L}\p{M}\p{N}\p{Pc}]+)?\p{space}*((")([^"]*)("))/dgv},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.imports.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.imports.end.bracket.round.go"}},patterns:[{include:"#comments"},{include:"#imports"}]},{include:"$self"}]},interface_variables_types:{begin:/\b(interface)\b\p{space}*(\{)/dgv,beginCaptures:{"1":{name:"keyword.interface.go"},"2":{name:"punctuation.definition.begin.bracket.curly.go"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.curly.go"}},patterns:[{include:"#interface_variables_types_field"},{include:"$self"}]},interface_variables_types_field:{patterns:[{include:"#support_functions"},{include:"#type-declarations-without-brackets"},{begin:/([\*\.\p{L}\p{M}\p{N}\p{Pc}]+)?(\[)/dgv,beginCaptures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]},"2":{name:"punctuation.definition.begin.bracket.square.go"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.square.go"}},patterns:[{include:"#generic_param_types"}]},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{include:"#function_param_types"}]},{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/([\.\p{L}\p{M}\p{N}\p{Pc}]+)/dgv}]},keywords:{patterns:[{match:/\b(break|case|continue|default|defer|else|fallthrough|for|go|goto|if|range|return|select|switch)\b/dgv,name:"keyword.control.go"},{match:/\bchan\b/dgv,name:"keyword.channel.go"},{match:/\bconst\b/dgv,name:"keyword.const.go"},{match:/\bvar\b/dgv,name:"keyword.var.go"},{match:/\bfunc\b/dgv,name:"keyword.function.go"},{match:/\binterface\b/dgv,name:"keyword.interface.go"},{match:/\bmap\b/dgv,name:"keyword.map.go"},{match:/\bstruct\b/dgv,name:"keyword.struct.go"},{match:/\bimport\b/dgv,name:"keyword.control.import.go"},{match:/\btype\b/dgv,name:"keyword.type.go"}]},label_loop_variables:{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.label.go"}]}},match:/^(\p{space}*[\p{L}\p{M}\p{N}\p{Pc}]+:\p{space}*|\p{space}*\b(?:break|goto|continue)\b\p{space}+[\p{L}\p{M}\p{N}\p{Pc}]+(?:\p{space}*\/[\*\/]\p{space}*[^\n]*)?)(?=\n?$)/dgv},language_constants:{captures:{"1":{name:"constant.language.boolean.go"},"2":{name:"constant.language.null.go"},"3":{name:"constant.language.iota.go"}},match:/\b(?:(true|false)|(nil)|(iota))\b/dgv},map_types:{begin:/\b(map)\b(\[)/dgv,beginCaptures:{"1":{name:"keyword.map.go"},"2":{name:"punctuation.definition.begin.bracket.square.go"}},end:/(\])((?:(?:(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?(?!(?:[\]\*\[]+)?\b(?:func|struct|map)\b)(?:[\]\*\[]+)?[\.\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,endCaptures:{"1":{name:"punctuation.definition.end.bracket.square.go"},"2":{patterns:[{include:"#type-declarations-without-brackets"},{match:/\[/dgv,name:"punctuation.definition.begin.bracket.square.go"},{match:/\]/dgv,name:"punctuation.definition.end.bracket.square.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},patterns:[{include:"#type-declarations-without-brackets"},{include:"#parameter-variable-types"},{include:"#functions"},{match:/\[/dgv,name:"punctuation.definition.begin.bracket.square.go"},{match:/\]/dgv,name:"punctuation.definition.end.bracket.square.go"},{match:/\{/dgv,name:"punctuation.definition.begin.bracket.curly.go"},{match:/\}/dgv,name:"punctuation.definition.end.bracket.curly.go"},{match:/\(/dgv,name:"punctuation.definition.begin.bracket.round.go"},{match:/\)/dgv,name:"punctuation.definition.end.bracket.round.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]},multi_types:{begin:/\b(type)\b\p{space}*(\()/dgv,beginCaptures:{"1":{name:"keyword.type.go"},"2":{name:"punctuation.definition.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{include:"#struct_variables_types"},{include:"#interface_variables_types"},{include:"#type-declarations-without-brackets"},{include:"#parameter-variable-types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]},numeric_literals:{captures:{"0":{patterns:[{begin:/(?=[^\n])/dgv,end:/\n|(?=\n?$)/dgv,patterns:[{captures:{"1":{name:"constant.numeric.decimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"2":{name:"punctuation.separator.constant.numeric.go"},"3":{name:"constant.numeric.decimal.point.go"},"4":{name:"constant.numeric.decimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"5":{name:"punctuation.separator.constant.numeric.go"},"6":{name:"keyword.other.unit.exponent.decimal.go"},"7":{name:"keyword.operator.plus.exponent.decimal.go"},"8":{name:"keyword.operator.minus.exponent.decimal.go"},"9":{name:"constant.numeric.exponent.decimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"10":{name:"keyword.other.unit.imaginary.go"},"11":{name:"constant.numeric.decimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"12":{name:"punctuation.separator.constant.numeric.go"},"13":{name:"keyword.other.unit.exponent.decimal.go"},"14":{name:"keyword.operator.plus.exponent.decimal.go"},"15":{name:"keyword.operator.minus.exponent.decimal.go"},"16":{name:"constant.numeric.exponent.decimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"17":{name:"keyword.other.unit.imaginary.go"},"18":{name:"constant.numeric.decimal.point.go"},"19":{name:"constant.numeric.decimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"20":{name:"punctuation.separator.constant.numeric.go"},"21":{name:"keyword.other.unit.exponent.decimal.go"},"22":{name:"keyword.operator.plus.exponent.decimal.go"},"23":{name:"keyword.operator.minus.exponent.decimal.go"},"24":{name:"constant.numeric.exponent.decimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"25":{name:"keyword.other.unit.imaginary.go"},"26":{name:"keyword.other.unit.hexadecimal.go"},"27":{name:"constant.numeric.hexadecimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"28":{name:"punctuation.separator.constant.numeric.go"},"29":{name:"constant.numeric.hexadecimal.go"},"30":{name:"constant.numeric.hexadecimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"31":{name:"punctuation.separator.constant.numeric.go"},"32":{name:"keyword.other.unit.exponent.hexadecimal.go"},"33":{name:"keyword.operator.plus.exponent.hexadecimal.go"},"34":{name:"keyword.operator.minus.exponent.hexadecimal.go"},"35":{name:"constant.numeric.exponent.hexadecimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"36":{name:"keyword.other.unit.imaginary.go"},"37":{name:"keyword.other.unit.hexadecimal.go"},"38":{name:"constant.numeric.hexadecimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"39":{name:"punctuation.separator.constant.numeric.go"},"40":{name:"keyword.other.unit.exponent.hexadecimal.go"},"41":{name:"keyword.operator.plus.exponent.hexadecimal.go"},"42":{name:"keyword.operator.minus.exponent.hexadecimal.go"},"43":{name:"constant.numeric.exponent.hexadecimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"44":{name:"keyword.other.unit.imaginary.go"},"45":{name:"keyword.other.unit.hexadecimal.go"},"46":{name:"constant.numeric.hexadecimal.go"},"47":{name:"constant.numeric.hexadecimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"48":{name:"punctuation.separator.constant.numeric.go"},"49":{name:"keyword.other.unit.exponent.hexadecimal.go"},"50":{name:"keyword.operator.plus.exponent.hexadecimal.go"},"51":{name:"keyword.operator.minus.exponent.hexadecimal.go"},"52":{name:"constant.numeric.exponent.hexadecimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"53":{name:"keyword.other.unit.imaginary.go"}},match:/(?:(?:(?:(?:(?:(?=[\.0-9])(?!0[BOXbox])([0-9](?:[0-9]|((?<=\p{AHex})_(?=\p{AHex})))*)((?<=[0-9])\.|\.(?=[0-9]))([0-9](?:[0-9]|((?<=\p{AHex})_(?=\p{AHex})))*)?(?:(?<!_)([Ee])(\+?)(-?)([0-9](?:[0-9]|(?<=\p{AHex})_(?=\p{AHex}))*))?(i(?![\p{L}\p{M}\p{N}\p{Pc}]))?(?:\n|(?=\n?$))|(?=[\.0-9])(?!0[BOXbox])([0-9](?:[0-9]|((?<=\p{AHex})_(?=\p{AHex})))*)(?<!_)([Ee])(\+?)(-?)([0-9](?:[0-9]|(?<=\p{AHex})_(?=\p{AHex}))*)(i(?![\p{L}\p{M}\p{N}\p{Pc}]))?(?:\n|(?=\n?$)))|((?<=[0-9])\.|\.(?=[0-9]))([0-9](?:[0-9]|((?<=\p{AHex})_(?=\p{AHex})))*)(?:(?<!_)([Ee])(\+?)(-?)([0-9](?:[0-9]|(?<=\p{AHex})_(?=\p{AHex}))*))?(i(?![\p{L}\p{M}\p{N}\p{Pc}]))?(?:\n|(?=\n?$)))|(0[Xx])_?(\p{AHex}(?:\p{AHex}|((?<=\p{AHex})_(?=\p{AHex})))*)((?<=\p{AHex})\.|\.(?=\p{AHex}))(\p{AHex}(?:\p{AHex}|((?<=\p{AHex})_(?=\p{AHex})))*)?(?<!_)([Pp])(\+?)(-?)([0-9](?:[0-9]|(?<=\p{AHex})_(?=\p{AHex}))*)(i(?![\p{L}\p{M}\p{N}\p{Pc}]))?(?:\n|(?=\n?$)))|(0[Xx])_?(\p{AHex}(?:\p{AHex}|((?<=\p{AHex})_(?=\p{AHex})))*)(?<!_)([Pp])(\+?)(-?)([0-9](?:[0-9]|(?<=\p{AHex})_(?=\p{AHex}))*)(i(?![\p{L}\p{M}\p{N}\p{Pc}]))?(?:\n|(?=\n?$)))|(0[Xx])((?<=\p{AHex})\.|\.(?=\p{AHex}))(\p{AHex}(?:\p{AHex}|((?<=\p{AHex})_(?=\p{AHex})))*)(?<!_)([Pp])(\+?)(-?)([0-9](?:[0-9]|(?<=\p{AHex})_(?=\p{AHex}))*)(i(?![\p{L}\p{M}\p{N}\p{Pc}]))?(?:\n|(?=\n?$)))/dgvy},{captures:{"1":{name:"constant.numeric.decimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"2":{name:"punctuation.separator.constant.numeric.go"},"3":{name:"keyword.other.unit.imaginary.go"},"4":{name:"keyword.other.unit.binary.go"},"5":{name:"constant.numeric.binary.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"6":{name:"punctuation.separator.constant.numeric.go"},"7":{name:"keyword.other.unit.imaginary.go"},"8":{name:"keyword.other.unit.octal.go"},"9":{name:"constant.numeric.octal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"10":{name:"punctuation.separator.constant.numeric.go"},"11":{name:"keyword.other.unit.imaginary.go"},"12":{name:"keyword.other.unit.hexadecimal.go"},"13":{name:"constant.numeric.hexadecimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"14":{name:"punctuation.separator.constant.numeric.go"},"15":{name:"keyword.other.unit.imaginary.go"}},match:/(?:(?:(?:(?=[\.0-9])(?!0[BOXbox])([0-9](?:[0-9]|((?<=\p{AHex})_(?=\p{AHex})))*)(i(?![\p{L}\p{M}\p{N}\p{Pc}]))?(?:\n|(?=\n?$))|(0[Bb])_?([01](?:[01]|((?<=\p{AHex})_(?=\p{AHex})))*)(i(?![\p{L}\p{M}\p{N}\p{Pc}]))?(?:\n|(?=\n?$)))|(0[Oo]?)_?((?:[0-7]|((?<=\p{AHex})_(?=\p{AHex})))+)(i(?![\p{L}\p{M}\p{N}\p{Pc}]))?(?:\n|(?=\n?$)))|(0[Xx])_?(\p{AHex}(?:\p{AHex}|((?<=\p{AHex})_(?=\p{AHex})))*)(i(?![\p{L}\p{M}\p{N}\p{Pc}]))?(?:\n|(?=\n?$)))/dgvy},{match:/(?:[\.0-9A-Z_a-z]|(?<=[EPep])[\-\+])+/dgv,name:"invalid.illegal.constant.numeric.go"}]}]}},match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])\.?\p{Nd}(?:[\.0-9A-Z_a-z]|(?<=[EPep])[\-\+])*/dgv},operators:{patterns:[{match:/([\&\*]+)(?!\p{Nd})(?=[\]\[\p{L}\p{M}\p{N}\p{Pc}]|<-)/dgv,name:"keyword.operator.address.go"},{match:/<-/dgv,name:"keyword.operator.channel.go"},{match:/--/dgv,name:"keyword.operator.decrement.go"},{match:/\+\+/dgv,name:"keyword.operator.increment.go"},{match:/(==|!=|<=|>=|<(?!<)|>(?!>))/dgv,name:"keyword.operator.comparison.go"},{match:/(&&|\|\||!)/dgv,name:"keyword.operator.logical.go"},{match:/((?:|[\-\%\*\+\/\:\^\|]|<<|>>|&\^?)=)/dgv,name:"keyword.operator.assignment.go"},{match:/([\-\%\*\+\/])/dgv,name:"keyword.operator.arithmetic.go"},{match:/(&(?!\^)|[\^\|]|&\^|<<|>>|~)/dgv,name:"keyword.operator.arithmetic.bitwise.go"},{match:/\.\.\./dgv,name:"keyword.operator.ellipsis.go"}]},other_struct_interface_expressions:{patterns:[{include:"#after_control_variables"},{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]},"2":{patterns:[{include:"#type-declarations-without-brackets"},{match:/\[/dgv,name:"punctuation.definition.begin.bracket.square.go"},{match:/\]/dgv,name:"punctuation.definition.end.bracket.square.go"},{match:/\{/dgv,name:"punctuation.definition.begin.bracket.curly.go"},{match:/\}/dgv,name:"punctuation.definition.end.bracket.curly.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/\b([\.\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}]+)*)?\])?(?=\{)(?<!\b(?:struct|interface)\b)/dgv}]},other_variables:{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.go"},package_name:{patterns:[{begin:/\b(package)\p{space}+/dgv,beginCaptures:{"1":{name:"keyword.package.go"}},end:/*@__PURE__*/ new EmulatedRegExp("(?!^)","dgv",{"strategy":"clip_search"}),patterns:[{match:/\p{Nd}[\p{L}\p{M}\p{N}\p{Pc}]*/dgv,name:"invalid.illegal.identifier.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.package.go"}]}]},"parameter-variable-types":{patterns:[{match:/\{/dgv,name:"punctuation.definition.begin.bracket.curly.go"},{match:/\}/dgv,name:"punctuation.definition.end.bracket.curly.go"},{begin:/([\*\.\p{L}\p{M}\p{N}\p{Pc}]+)?(\[)/dgv,beginCaptures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]},"2":{name:"punctuation.definition.begin.bracket.square.go"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.square.go"}},patterns:[{include:"#generic_param_types"}]},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{include:"#function_param_types"}]}]},property_variables:{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.property.go"}]}},match:/\b([\.\p{L}\p{M}\p{N}\p{Pc}]+:(?!=))/dgv},raw_string_literals:{begin:/`/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.go"}},end:/`/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.go"}},name:"string.quoted.raw.go",patterns:[{include:"#string_placeholder"}]},runes:{patterns:[{begin:/'/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.go"}},end:/'/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.go"}},name:"string.quoted.rune.go",patterns:[{match:/(\\([0-7]{3}|["'\\abfnrtv]|x\p{AHex}{2}|u\p{AHex}{4}|U\p{AHex}{8})|[^\n])(?=')/dgvy,name:"constant.other.rune.go"},{match:/[^']+/dgv,name:"invalid.illegal.unknown-rune.go"}]}]},single_type:{patterns:[{captures:{"1":{name:"keyword.type.go"},"2":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]},"3":{patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{include:"#function_param_types"},{include:"$self"}]},{include:"#type-declarations"},{include:"#generic_types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/^\p{space}*\b(type)\b\p{space}*([\*\.\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}+(?!(?:=\p{space}*)?(?:[\]\*\[]+)?\b(?:struct|interface)\b)([\p{space}\P{space}]+)/dgv},{begin:/(?:^|\p{space}+)\b(type)\b\p{space}*([\*\.\p{L}\p{M}\p{N}\p{Pc}]+)(?=\[)/dgv,beginCaptures:{"1":{name:"keyword.type.go"},"2":{patterns:[{include:"#type-declarations-without-brackets"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},end:/(?<=\])(\p{space}+(?:=\p{space}*)?(?:(?:(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?(?!(?:[\]\*\[]+)?\b(?:struct|interface|func)\b)[\-\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+(?:,\p{space}*[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+)*)?/dgv,endCaptures:{"1":{patterns:[{include:"#type-declarations-without-brackets"},{match:/\[/dgv,name:"punctuation.definition.begin.bracket.square.go"},{match:/\]/dgv,name:"punctuation.definition.end.bracket.square.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},patterns:[{include:"#struct_variables_types"},{include:"#type-declarations-without-brackets"},{include:"#parameter-variable-types"},{match:/\[/dgv,name:"punctuation.definition.begin.bracket.square.go"},{match:/\]/dgv,name:"punctuation.definition.end.bracket.square.go"},{match:/\{/dgv,name:"punctuation.definition.begin.bracket.curly.go"},{match:/\}/dgv,name:"punctuation.definition.end.bracket.curly.go"},{match:/\(/dgv,name:"punctuation.definition.begin.bracket.round.go"},{match:/\)/dgv,name:"punctuation.definition.end.bracket.round.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}]},slice_index_variables:{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.go"}]}},match:/(?<=[\p{L}\p{M}\p{N}\p{Pc}]\[)((?:\b[\-\%\&\*\+\.\/\<\>\|\p{L}\p{M}\p{N}\p{Pc}]+:|:\b[\-\%\&\*\+\.\/\<\>\|\p{L}\p{M}\p{N}\p{Pc}]+)(?:\b[\-\%\&\*\+\.\/\<\>\|\p{L}\p{M}\p{N}\p{Pc}]+)?(?::\b[\-\%\&\*\+\.\/\<\>\|\p{L}\p{M}\p{N}\p{Pc}]+)?)(?=\])/dgv},statements:{patterns:[{include:"#package_name"},{include:"#import"},{include:"#syntax_errors"},{include:"#group-functions"},{include:"#group-types"},{include:"#group-variables"},{include:"#field_hover"}]},storage_types:{patterns:[{match:/\bbool\b/dgv,name:"storage.type.boolean.go"},{match:/\bbyte\b/dgv,name:"storage.type.byte.go"},{match:/\berror\b/dgv,name:"storage.type.error.go"},{match:/\b(complex(64|128)|float(32|64)|u?int(8|16|32|64)?)\b/dgv,name:"storage.type.numeric.go"},{match:/\brune\b/dgv,name:"storage.type.rune.go"},{match:/\bstring\b/dgv,name:"storage.type.string.go"},{match:/\buintptr\b/dgv,name:"storage.type.uintptr.go"},{match:/\bany\b/dgv,name:"entity.name.type.any.go"},{match:/\bcomparable\b/dgv,name:"entity.name.type.comparable.go"}]},string_escaped_char:{patterns:[{match:/\\([0-7]{3}|["'\\abfnrtv]|x\p{AHex}{2}|u\p{AHex}{4}|U\p{AHex}{8})/dgv,name:"constant.character.escape.go"},{match:/\\[^"'0-7Uabfnrtuvx]/dgv,name:"invalid.illegal.unknown-escape.go"}]},string_literals:{patterns:[{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.go"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.go"}},name:"string.quoted.double.go",patterns:[{include:"#string_escaped_char"},{include:"#string_placeholder"}]}]},string_placeholder:{patterns:[{match:/%(\[\p{Nd}+\])?([\- \#\+0]{0,2}((\p{Nd}+|\*)?(\.?(\p{Nd}+|\*|(\[\p{Nd}+\])\*?)?(\[\p{Nd}+\])?)?))?[\%EFGTUXb-gopqstvwx]/dgv,name:"constant.other.placeholder.go"}]},struct_interface_declaration:{captures:{"1":{name:"keyword.type.go"},"2":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/^\p{space}*\b(type)\b\p{space}*([\.\p{L}\p{M}\p{N}\p{Pc}]+)/dgv},struct_variable_types_fields_multi:{patterns:[{begin:/([\p{L}\p{M}\p{N}\p{Pc}]+(?:,\p{space}*[\p{L}\p{M}\p{N}\p{Pc}]+)*(?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?\p{space}+(?:[\]\*\[]+)?)\b(struct)\b\p{space}*(\{)/dgv,beginCaptures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.property.go"}]},"2":{name:"keyword.struct.go"},"3":{name:"punctuation.definition.begin.bracket.curly.go"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.curly.go"}},patterns:[{include:"#struct_variables_types_fields"},{include:"$self"}]},{begin:/([\p{L}\p{M}\p{N}\p{Pc}]+(?:,\p{space}*[\p{L}\p{M}\p{N}\p{Pc}]+)*(?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?\p{space}+(?:[\]\*\[]+)?)\b(interface)\b\p{space}*(\{)/dgv,beginCaptures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.property.go"}]},"2":{name:"keyword.interface.go"},"3":{name:"punctuation.definition.begin.bracket.curly.go"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.curly.go"}},patterns:[{include:"#interface_variables_types_field"},{include:"$self"}]},{begin:/([\p{L}\p{M}\p{N}\p{Pc}]+(?:,\p{space}*[\p{L}\p{M}\p{N}\p{Pc}]+)*(?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?\p{space}+(?:[\]\*\[]+)?)\b(func)\b\p{space}*(\()/dgv,beginCaptures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.property.go"}]},"2":{name:"keyword.function.go"},"3":{name:"punctuation.definition.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{include:"#function_param_types"},{include:"$self"}]},{include:"#parameter-variable-types"}]},struct_variables_types:{begin:/\b(struct)\b\p{space}*(\{)/dgv,beginCaptures:{"1":{name:"keyword.struct.go"},"2":{name:"punctuation.definition.begin.bracket.curly.go"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.curly.go"}},patterns:[{include:"#struct_variables_types_fields"},{include:"$self"}]},struct_variables_types_fields:{patterns:[{include:"#struct_variable_types_fields_multi"},{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/(?<=\{)\p{space}*((?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*(?=\})/dgv},{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.property.go"}]},"2":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/(?<=\{)\p{space}*((?:(?:[\p{L}\p{M}\p{N}\p{Pc}]+,\p{space}*)+)?[\p{L}\p{M}\p{N}\p{Pc}]+\p{space}+)((?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*(?=\})/dgv},{captures:{"1":{patterns:[{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.property.go"}]},"2":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/((?:(?:[\p{L}\p{M}\p{N}\p{Pc}]+,\p{space}*)+)?[\p{L}\p{M}\p{N}\p{Pc}]+\p{space}+)?((?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?\P{space}+;?)/dgv}]}},match:/(?<=\{)((?:\p{space}*(?:(?:(?:[\p{L}\p{M}\p{N}\p{Pc}]+,\p{space}*)+)?[\p{L}\p{M}\p{N}\p{Pc}]+\p{space}+)?(?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?\P{space}+;?)+)\p{space}*(?=\})/dgv},{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/((?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?[\*\.\p{L}\p{M}\p{N}\p{Pc}]+\p{space}*)(?:(?=["\/\`])|(?=\n?$))/dgv},{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.property.go"}]},"2":{patterns:[{include:"#type-declarations-without-brackets"},{include:"#parameter-variable-types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/((?:(?:[\p{L}\p{M}\p{N}\p{Pc}]+,\p{space}*)+)?[\p{L}\p{M}\p{N}\p{Pc}]+\p{space}+)([^"\/\`]+)/dgv}]},support_functions:{captures:{"1":{name:"entity.name.function.support.go"},"2":{patterns:[{include:"#type-declarations"},{match:/\p{Nd}[\p{L}\p{M}\p{N}\p{Pc}]*/dgv,name:"invalid.illegal.identifier.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.function.support.go"}]},"3":{patterns:[{include:"#type-declarations-without-brackets"},{match:/\[/dgv,name:"punctuation.definition.begin.bracket.square.go"},{match:/\]/dgv,name:"punctuation.definition.end.bracket.square.go"},{match:/\{/dgv,name:"punctuation.definition.begin.bracket.curly.go"},{match:/\}/dgv,name:"punctuation.definition.end.bracket.curly.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/(?:((?<=\.)\b[\p{L}\p{M}\p{N}\p{Pc}]+)|\b([\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},switch_select_case_variables:{captures:{"1":{name:"keyword.control.go"},"2":{patterns:[{include:"#type-declarations"},{include:"#support_functions"},{include:"#variable_assignment"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.go"}]}},match:/^\p{space}*\b(case)\b\p{space}+([\p{space}\P{space}]+:\p{space}*(?:\/[\*\/][^\n]*)?)(?=\n?$)/dgv},switch_types:{begin:/(?<=\bswitch\b)\p{space}*([\p{L}\p{M}\p{N}\p{Pc}]+\p{space}*:=)?\p{space}*([\-\]\%\&\(-\+\.\/\<\>\[\|\p{L}\p{M}\p{N}\p{Pc}]+)(\.\(\btype\b\)\p{space}*)(\{)/dgv,beginCaptures:{"1":{patterns:[{include:"#operators"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.assignment.go"}]},"2":{patterns:[{include:"#support_functions"},{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.go"}]},"3":{patterns:[{include:"#delimiters"},{include:"#brackets"},{match:/\btype\b/dgv,name:"keyword.type.go"}]},"4":{name:"punctuation.definition.begin.bracket.curly.go"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.curly.go"}},patterns:[{captures:{"1":{name:"keyword.control.go"},"2":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]},"3":{name:"punctuation.other.colon.go"},"4":{patterns:[{include:"#comments"}]}},match:/^\p{space}*\b(case)\b\p{space}+([\!\*\,\.\<\=\>\p{L}\p{M}\p{N}\p{Pc}\p{space}]+)(:)(\p{space}*\/[\*\/]\p{space}*[^\n]*)?(?=\n?$)/dgv},{begin:/\bcase\b/dgv,beginCaptures:{"0":{name:"keyword.control.go"}},end:/:/dgv,endCaptures:{"0":{name:"punctuation.other.colon.go"}},patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]},{include:"$self"}]},syntax_errors:{patterns:[{captures:{"1":{name:"invalid.illegal.slice.go"}},match:/\[\](\p{space}+)/dgv},{match:/\b0[0-7]*[89]\p{Nd}*\b/dgv,name:"invalid.illegal.numeric.go"}]},terminators:{match:/;/dgv,name:"punctuation.terminator.go"},"type-declarations":{patterns:[{include:"#language_constants"},{include:"#comments"},{include:"#map_types"},{include:"#brackets"},{include:"#delimiters"},{include:"#keywords"},{include:"#operators"},{include:"#runes"},{include:"#storage_types"},{include:"#raw_string_literals"},{include:"#string_literals"},{include:"#numeric_literals"},{include:"#terminators"}]},"type-declarations-without-brackets":{patterns:[{include:"#language_constants"},{include:"#comments"},{include:"#map_types"},{include:"#delimiters"},{include:"#keywords"},{include:"#operators"},{include:"#runes"},{include:"#storage_types"},{include:"#raw_string_literals"},{include:"#string_literals"},{include:"#numeric_literals"},{include:"#terminators"}]},type_assertion_inline:{captures:{"1":{name:"keyword.type.go"},"2":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/(?<=\.\()(?:\b(type)\b|((?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+))(?=\))/dgv},var_assignment:{patterns:[{captures:{"1":{patterns:[{include:"#delimiters"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.assignment.go"}]},"2":{patterns:[{include:"#type-declarations-without-brackets"},{include:"#generic_types"},{match:/\(/dgv,name:"punctuation.definition.begin.bracket.round.go"},{match:/\)/dgv,name:"punctuation.definition.end.bracket.round.go"},{match:/\[/dgv,name:"punctuation.definition.begin.bracket.square.go"},{match:/\]/dgv,name:"punctuation.definition.end.bracket.square.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/(?<=\bvar\b)\p{space}*\b([\.\p{L}\p{M}\p{N}\p{Pc}]+(?:,\p{space}*[\.\p{L}\p{M}\p{N}\p{Pc}]+)*)\p{space}*((?:(?:(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+(?:\([^\)]+\))?)?(?!(?:[\]\*\[]+)?\b(?:struct|func|map)\b)(?:[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+(?:,\p{space}*[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+)*)?\p{space}*=?)?/dgv},{begin:/(?<=\bvar\b)\p{space}*(\()/dgv,beginCaptures:{"1":{name:"punctuation.definition.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{captures:{"1":{patterns:[{include:"#delimiters"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.assignment.go"}]},"2":{patterns:[{include:"#type-declarations-without-brackets"},{include:"#generic_types"},{match:/\(/dgv,name:"punctuation.definition.begin.bracket.round.go"},{match:/\)/dgv,name:"punctuation.definition.end.bracket.round.go"},{match:/\[/dgv,name:"punctuation.definition.begin.bracket.square.go"},{match:/\]/dgv,name:"punctuation.definition.end.bracket.square.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/^\p{space}*\b([\.\p{L}\p{M}\p{N}\p{Pc}]+(?:,\p{space}*[\.\p{L}\p{M}\p{N}\p{Pc}]+)*)\p{space}*((?:(?:(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+(?:\([^\)]+\))?)?(?!(?:[\]\*\[]+)?\b(?:struct|func|map)\b)(?:[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+(?:,\p{space}*[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+)*)?\p{space}*=?)?/dgv},{include:"$self"}]}]},variable_assignment:{patterns:[{captures:{"0":{patterns:[{include:"#delimiters"},{match:/\p{Nd}[\p{L}\p{M}\p{N}\p{Pc}]*/dgv,name:"invalid.illegal.identifier.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.assignment.go"}]}},match:/\b[\p{L}\p{M}\p{N}\p{Pc}]+(?:,\p{space}*[\p{L}\p{M}\p{N}\p{Pc}]+)*(?=\p{space}*:=)/dgv},{captures:{"0":{patterns:[{include:"#delimiters"},{include:"#operators"},{match:/\p{Nd}[\p{L}\p{M}\p{N}\p{Pc}]*/dgv,name:"invalid.illegal.identifier.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.assignment.go"}]}},match:/\b[\*\.\p{L}\p{M}\p{N}\p{Pc}]+(?:,\p{space}*[\*\.\p{L}\p{M}\p{N}\p{Pc}]+)*(?=\p{space}*=(?!=))/dgv}]}},scopeName:"source.go",embeddedLangs:undefined,aliases:undefined})
|
|
3
|
+
const lang = Object.freeze({displayName:"Go",name:"go",patterns:[{include:"#statements"}],repository:{after_control_variables:{captures:{"1":{patterns:[{include:"#type-declarations-without-brackets"},{match:/\[/dgv,name:"punctuation.definition.begin.bracket.square.go"},{match:/\]/dgv,name:"punctuation.definition.end.bracket.square.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.go"}]}},match:/(?<=\brange\b|\bswitch\b|;|\bif\b|\bfor\b|[\<\>]|<=|>=|==|!=|[\p{L}\p{M}\p{N}\p{Pc}][\-\%\*\+\/]|[\p{L}\p{M}\p{N}\p{Pc}][\-\%\*\+\/]=|\|\||&&)\p{space}*((?![\]\[]+)[\-\]\!\%\*\+\.\/\:\<\=\>\[_\p{Alpha}\p{Nd}]+)\p{space}*(?=\{)/dgv},brackets:{patterns:[{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.begin.bracket.curly.go"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.curly.go"}},patterns:[{include:"$self"}]},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{include:"$self"}]},{begin:/\[/dgv,beginCaptures:{"0":{name:"punctuation.definition.begin.bracket.square.go"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.square.go"}},patterns:[{include:"$self"}]}]},built_in_functions:{patterns:[{match:/\b(append|cap|close|complex|copy|delete|imag|len|panic|print|println|real|recover|min|max|clear)\b(?=\()/dgv,name:"entity.name.function.support.builtin.go"},{begin:/\b(new)\b(\()/dgv,beginCaptures:{"1":{name:"entity.name.function.support.builtin.go"},"2":{name:"punctuation.definition.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{include:"#functions"},{include:"#struct_variables_types"},{include:"#type-declarations"},{include:"#generic_types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"},{include:"$self"}]},{begin:/\b(make)\b(\()((?:(?:(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+(?:\([^\)]+\))?)?(?:[\]\*\[]+)?(?:(?!\bmap\b)[\.\p{L}\p{M}\p{N}\p{Pc}]+)?(\[(?:\P{space}+(?:,\p{space}*\P{space}+)*)?\])?,?)?/dgv,beginCaptures:{"1":{name:"entity.name.function.support.builtin.go"},"2":{name:"punctuation.definition.begin.bracket.round.go"},"3":{patterns:[{include:"#type-declarations-without-brackets"},{include:"#parameter-variable-types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{include:"$self"}]}]},comments:{patterns:[{begin:/(\/\*)/dgv,beginCaptures:{"1":{name:"punctuation.definition.comment.go"}},end:/(\*\/)/dgv,endCaptures:{"1":{name:"punctuation.definition.comment.go"}},name:"comment.block.go"},{begin:/(\/\/)/dgv,beginCaptures:{"1":{name:"punctuation.definition.comment.go"}},end:/\n|(?=\n?$)/dgv,name:"comment.line.double-slash.go"}]},const_assignment:{patterns:[{captures:{"1":{patterns:[{include:"#delimiters"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.constant.go"}]},"2":{patterns:[{include:"#type-declarations-without-brackets"},{include:"#generic_types"},{match:/\(/dgv,name:"punctuation.definition.begin.bracket.round.go"},{match:/\)/dgv,name:"punctuation.definition.end.bracket.round.go"},{match:/\[/dgv,name:"punctuation.definition.begin.bracket.square.go"},{match:/\]/dgv,name:"punctuation.definition.end.bracket.square.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/(?<=\bconst\b)\p{space}*\b([\.\p{L}\p{M}\p{N}\p{Pc}]+(?:,\p{space}*[\.\p{L}\p{M}\p{N}\p{Pc}]+)*)\p{space}*((?:(?:(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+(?:\([^\)]+\))?)?(?!(?:[\]\*\[]+)?\b(?:struct|func|map)\b)(?:[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+(?:,\p{space}*[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+)*)?\p{space}*=?)?/dgv},{begin:/(?<=\bconst\b)\p{space}*(\()/dgv,beginCaptures:{"1":{name:"punctuation.definition.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{captures:{"1":{patterns:[{include:"#delimiters"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.constant.go"}]},"2":{patterns:[{include:"#type-declarations-without-brackets"},{include:"#generic_types"},{match:/\(/dgv,name:"punctuation.definition.begin.bracket.round.go"},{match:/\)/dgv,name:"punctuation.definition.end.bracket.round.go"},{match:/\[/dgv,name:"punctuation.definition.begin.bracket.square.go"},{match:/\]/dgv,name:"punctuation.definition.end.bracket.square.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/^\p{space}*\b([\.\p{L}\p{M}\p{N}\p{Pc}]+(?:,\p{space}*[\.\p{L}\p{M}\p{N}\p{Pc}]+)*)\p{space}*((?:(?:(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+(?:\([^\)]+\))?)?(?!(?:[\]\*\[]+)?\b(?:struct|func|map)\b)(?:[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+(?:,\p{space}*[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+)*)?\p{space}*=?)?/dgv},{include:"$self"}]}]},delimiters:{patterns:[{match:/,/dgv,name:"punctuation.other.comma.go"},{match:/\.(?!\.\.)/dgv,name:"punctuation.other.period.go"},{match:/:(?!=)/dgv,name:"punctuation.other.colon.go"}]},double_parentheses_types:{captures:{"1":{patterns:[{include:"#type-declarations-without-brackets"},{match:/\(/dgv,name:"punctuation.definition.begin.bracket.round.go"},{match:/\)/dgv,name:"punctuation.definition.end.bracket.round.go"},{match:/\[/dgv,name:"punctuation.definition.begin.bracket.square.go"},{match:/\]/dgv,name:"punctuation.definition.end.bracket.square.go"},{match:/\{/dgv,name:"punctuation.definition.begin.bracket.curly.go"},{match:/\}/dgv,name:"punctuation.definition.end.bracket.curly.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},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}]+(?:,\p{space}*[\]\*\.\[\{\}\p{L}\p{M}\p{N}\p{Pc}]+)*)?\])?\))(?=\()/dgv},field_hover:{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.property.go"}]},"2":{patterns:[{match:/\binvalid\b\p{space}+\btype\b/dgv,name:"invalid.field.go"},{include:"#type-declarations-without-brackets"},{include:"#parameter-variable-types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/(?<=^\bfield\b)\p{space}+([\*\.\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}+([\p{space}\P{space}]+)/dgv},function_declaration:{begin:/^\b(func)\b\p{space}*(\([^\)]+\)\p{space}*)?(?:([\p{L}\p{M}\p{N}\p{Pc}]+)(?=[\(\[]))?/dgv,beginCaptures:{"1":{name:"keyword.function.go"},"2":{patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{captures:{"1":{name:"variable.parameter.go"},"2":{patterns:[{include:"#type-declarations-without-brackets"},{include:"#parameter-variable-types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/([\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{space}+)?)+)?\])?)/dgv},{include:"$self"}]}]},"3":{patterns:[{match:/\p{Nd}[\p{L}\p{M}\p{N}\p{Pc}]*/dgv,name:"invalid.illegal.identifier.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.function.go"}]}},end:/(?<=\))\p{space}*((?:(?:(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?(?!(?:[\]\*\[]+)?\b(?:struct|interface)\b)[\-\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+)?\p{space}*(?=\{)/dgv,endCaptures:{"1":{patterns:[{include:"#type-declarations-without-brackets"},{include:"#parameter-variable-types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{include:"#function_param_types"}]},{begin:/([\*\.\p{L}\p{M}\p{N}\p{Pc}]+)?(\[)/dgv,beginCaptures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]},"2":{name:"punctuation.definition.begin.bracket.square.go"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.square.go"}},patterns:[{include:"#generic_param_types"}]},{captures:{"1":{patterns:[{include:"#type-declarations-without-brackets"},{include:"#parameter-variable-types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/(?<=\))\p{space}*((?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?[\-\]\*\.\<\>\[\p{L}\p{M}\p{N}\p{Pc}]+\p{space}*(?:\/[\*\/][^\n]*)?)(?=\n?$)/dgv},{include:"$self"}]},function_param_types:{patterns:[{include:"#struct_variables_types"},{include:"#interface_variables_types"},{include:"#type-declarations-without-brackets"},{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.parameter.go"}]}},match:/((?:(?:\b[\p{L}\p{M}\p{N}\p{Pc}]+,\p{space}*)+)?\b[\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}+(?=(?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?(?:[\]\*\[]+)?\b(?:struct|interface)\b\p{space}*\{)/dgv},{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.parameter.go"}]}},match:/(?:(?<=\()|^\p{space}*)((?:\b[\p{L}\p{M}\p{N}\p{Pc}]+,\p{space}*)+(?:\/[\*\/][^\n]*)?)(?=\n?$)/dgv},{captures:{"1":{patterns:[{include:"#delimiters"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.parameter.go"}]},"2":{patterns:[{include:"#type-declarations-without-brackets"},{include:"#parameter-variable-types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/((?:(?:\b[\p{L}\p{M}\p{N}\p{Pc}]+,\p{space}*)+)?\b[\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}+((?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?(?:(?:[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+)?(?:\bfunc\b\((?:[^\)]+)?\)(?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?\p{space}*)+(?:[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+|\((?:[^\)]+)?\))?|(?:(?:[\]\*\[]+)?[\*\.\p{L}\p{M}\p{N}\p{Pc}]+(?:\[[^\]]+\])?(?:[\*\.\p{L}\p{M}\p{N}\p{Pc}]+)?)+))/dgv},{begin:/([\*\.\p{L}\p{M}\p{N}\p{Pc}]+)?(\[)/dgv,beginCaptures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]},"2":{name:"punctuation.definition.begin.bracket.square.go"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.square.go"}},patterns:[{include:"#generic_param_types"}]},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{include:"#function_param_types"}]},{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/([\.\p{L}\p{M}\p{N}\p{Pc}]+)/dgv},{include:"$self"}]},functions:{begin:/\b(func)\b(?=\()/dgv,beginCaptures:{"1":{name:"keyword.function.go"}},end:/(?<=\))(\p{space}*(?:(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?(\p{space}*(?:(?:[\]\*\[]+)?[\*\.\p{L}\p{M}\p{N}\p{Pc}]+)?(?:\[(?:(?:[\*\.\p{L}\p{M}\p{N}\p{Pc}]+)?(?:\[(?:[^\]]+)?\])?(?:,\p{space}+)?)+\]|\((?:[^\)]+)?\))?(?:[\*\.\p{L}\p{M}\p{N}\p{Pc}]+)?\p{space}*(?=\{)|\p{space}*(?:(?:[\]\*\[]+)?(?!\bfunc\b)[\*\.\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,endCaptures:{"1":{patterns:[{include:"#type-declarations"}]},"2":{patterns:[{include:"#type-declarations-without-brackets"},{include:"#parameter-variable-types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},patterns:[{include:"#parameter-variable-types"}]},functions_inline:{captures:{"1":{name:"keyword.function.go"},"2":{patterns:[{include:"#type-declarations-without-brackets"},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{include:"#function_param_types"},{include:"$self"}]},{match:/\[/dgv,name:"punctuation.definition.begin.bracket.square.go"},{match:/\]/dgv,name:"punctuation.definition.end.bracket.square.go"},{match:/\{/dgv,name:"punctuation.definition.begin.bracket.curly.go"},{match:/\}/dgv,name:"punctuation.definition.end.bracket.curly.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/\b(func)\b(\([^\/]*?\)\p{space}+\([^\/]*?\))\p{space}+(?=\{)/dgv},generic_param_types:{patterns:[{include:"#struct_variables_types"},{include:"#interface_variables_types"},{include:"#type-declarations-without-brackets"},{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.parameter.go"}]}},match:/((?:(?:\b[\p{L}\p{M}\p{N}\p{Pc}]+,\p{space}*)+)?\b[\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}+(?=(?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?(?:[\]\*\[]+)?\b(?:struct|interface)\b\p{space}*\{)/dgv},{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.parameter.go"}]}},match:/(?:(?<=\()|^\p{space}*)((?:\b[\p{L}\p{M}\p{N}\p{Pc}]+,\p{space}*)+(?:\/[\*\/][^\n]*)?)(?=\n?$)/dgv},{captures:{"1":{patterns:[{include:"#delimiters"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.parameter.go"}]},"2":{patterns:[{include:"#type-declarations-without-brackets"},{include:"#parameter-variable-types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]},"3":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/((?:(?:\b[\p{L}\p{M}\p{N}\p{Pc}]+,\p{space}*)+)?\b[\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}+((?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?(?:(?:[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+)?(?:\bfunc\b\((?:[^\)]+)?\)(?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?\p{space}*)+(?:[\*\.\p{L}\p{M}\p{N}\p{Pc}]+|\((?:[^\)]+)?\))?|(?:(?:[\*\.\~\p{L}\p{M}\p{N}\p{Pc}]+|\[(?:(?:[\*\.\p{L}\p{M}\p{N}\p{Pc}]+)?(?:\[(?:[^\]]+)?\])?(?:,\p{space}+)?)+\])(?:[\*\.\p{L}\p{M}\p{N}\p{Pc}]+)?)+))/dgv},{begin:/([\*\.\p{L}\p{M}\p{N}\p{Pc}]+)?(\[)/dgv,beginCaptures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]},"2":{name:"punctuation.definition.begin.bracket.square.go"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.square.go"}},patterns:[{include:"#generic_param_types"}]},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{include:"#function_param_types"}]},{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/\b([\.\p{L}\p{M}\p{N}\p{Pc}]+)/dgv},{include:"$self"}]},generic_types:{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]},"2":{patterns:[{include:"#parameter-variable-types"}]}},match:/([\*\.\p{L}\p{M}\p{N}\p{Pc}]+)(\[(?:[^\]]+)?\])/dgv},"group-functions":{patterns:[{include:"#function_declaration"},{include:"#functions_inline"},{include:"#functions"},{include:"#built_in_functions"},{include:"#support_functions"}]},"group-types":{patterns:[{include:"#other_struct_interface_expressions"},{include:"#type_assertion_inline"},{include:"#struct_variables_types"},{include:"#interface_variables_types"},{include:"#single_type"},{include:"#multi_types"},{include:"#struct_interface_declaration"},{include:"#double_parentheses_types"},{include:"#switch_types"},{include:"#type-declarations"}]},"group-variables":{patterns:[{include:"#const_assignment"},{include:"#var_assignment"},{include:"#variable_assignment"},{include:"#label_loop_variables"},{include:"#slice_index_variables"},{include:"#property_variables"},{include:"#switch_select_case_variables"},{include:"#other_variables"}]},import:{patterns:[{begin:/\b(import)\p{space}+/dgv,beginCaptures:{"1":{name:"keyword.control.import.go"}},end:/*@__PURE__*/ new EmulatedRegExp("(?!^)","dgv",{"strategy":"clip_search"}),patterns:[{include:"#imports"}]}]},imports:{patterns:[{captures:{"1":{patterns:[{include:"#delimiters"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.import.go"}]},"2":{name:"string.quoted.double.go"},"3":{name:"punctuation.definition.string.begin.go"},"4":{name:"entity.name.import.go"},"5":{name:"punctuation.definition.string.end.go"}},match:/(\p{space}*[\.\p{L}\p{M}\p{N}\p{Pc}]+)?\p{space}*((")([^"]*)("))/dgv},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.imports.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.imports.end.bracket.round.go"}},patterns:[{include:"#comments"},{include:"#imports"}]},{include:"$self"}]},interface_variables_types:{begin:/\b(interface)\b\p{space}*(\{)/dgv,beginCaptures:{"1":{name:"keyword.interface.go"},"2":{name:"punctuation.definition.begin.bracket.curly.go"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.curly.go"}},patterns:[{include:"#interface_variables_types_field"},{include:"$self"}]},interface_variables_types_field:{patterns:[{include:"#support_functions"},{include:"#type-declarations-without-brackets"},{begin:/([\*\.\p{L}\p{M}\p{N}\p{Pc}]+)?(\[)/dgv,beginCaptures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]},"2":{name:"punctuation.definition.begin.bracket.square.go"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.square.go"}},patterns:[{include:"#generic_param_types"}]},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{include:"#function_param_types"}]},{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/([\.\p{L}\p{M}\p{N}\p{Pc}]+)/dgv}]},keywords:{patterns:[{match:/\b(break|case|continue|default|defer|else|fallthrough|for|go|goto|if|range|return|select|switch)\b/dgv,name:"keyword.control.go"},{match:/\bchan\b/dgv,name:"keyword.channel.go"},{match:/\bconst\b/dgv,name:"keyword.const.go"},{match:/\bvar\b/dgv,name:"keyword.var.go"},{match:/\bfunc\b/dgv,name:"keyword.function.go"},{match:/\binterface\b/dgv,name:"keyword.interface.go"},{match:/\bmap\b/dgv,name:"keyword.map.go"},{match:/\bstruct\b/dgv,name:"keyword.struct.go"},{match:/\bimport\b/dgv,name:"keyword.control.import.go"},{match:/\btype\b/dgv,name:"keyword.type.go"}]},label_loop_variables:{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.label.go"}]}},match:/^(\p{space}*[\p{L}\p{M}\p{N}\p{Pc}]+:\p{space}*|\p{space}*\b(?:break|goto|continue)\b\p{space}+[\p{L}\p{M}\p{N}\p{Pc}]+(?:\p{space}*\/[\*\/]\p{space}*[^\n]*)?)(?=\n?$)/dgv},language_constants:{captures:{"1":{name:"constant.language.boolean.go"},"2":{name:"constant.language.null.go"},"3":{name:"constant.language.iota.go"}},match:/\b(?:(true|false)|(nil)|(iota))\b/dgv},map_types:{begin:/\b(map)\b(\[)/dgv,beginCaptures:{"1":{name:"keyword.map.go"},"2":{name:"punctuation.definition.begin.bracket.square.go"}},end:/(\])((?:(?:(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?(?!(?:[\]\*\[]+)?\b(?:func|struct|map)\b)(?:[\]\*\[]+)?[\.\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,endCaptures:{"1":{name:"punctuation.definition.end.bracket.square.go"},"2":{patterns:[{include:"#type-declarations-without-brackets"},{match:/\[/dgv,name:"punctuation.definition.begin.bracket.square.go"},{match:/\]/dgv,name:"punctuation.definition.end.bracket.square.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},patterns:[{include:"#type-declarations-without-brackets"},{include:"#parameter-variable-types"},{include:"#functions"},{match:/\[/dgv,name:"punctuation.definition.begin.bracket.square.go"},{match:/\]/dgv,name:"punctuation.definition.end.bracket.square.go"},{match:/\{/dgv,name:"punctuation.definition.begin.bracket.curly.go"},{match:/\}/dgv,name:"punctuation.definition.end.bracket.curly.go"},{match:/\(/dgv,name:"punctuation.definition.begin.bracket.round.go"},{match:/\)/dgv,name:"punctuation.definition.end.bracket.round.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]},multi_types:{begin:/\b(type)\b\p{space}*(\()/dgv,beginCaptures:{"1":{name:"keyword.type.go"},"2":{name:"punctuation.definition.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{include:"#struct_variables_types"},{include:"#interface_variables_types"},{include:"#type-declarations-without-brackets"},{include:"#parameter-variable-types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]},numeric_literals:{captures:{"0":{patterns:[{begin:/(?=[^\n])/dgv,end:/\n|(?=\n?$)/dgv,patterns:[{captures:{"1":{name:"constant.numeric.decimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"2":{name:"punctuation.separator.constant.numeric.go"},"3":{name:"constant.numeric.decimal.point.go"},"4":{name:"constant.numeric.decimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"5":{name:"punctuation.separator.constant.numeric.go"},"6":{name:"keyword.other.unit.exponent.decimal.go"},"7":{name:"keyword.operator.plus.exponent.decimal.go"},"8":{name:"keyword.operator.minus.exponent.decimal.go"},"9":{name:"constant.numeric.exponent.decimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"10":{name:"keyword.other.unit.imaginary.go"},"11":{name:"constant.numeric.decimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"12":{name:"punctuation.separator.constant.numeric.go"},"13":{name:"keyword.other.unit.exponent.decimal.go"},"14":{name:"keyword.operator.plus.exponent.decimal.go"},"15":{name:"keyword.operator.minus.exponent.decimal.go"},"16":{name:"constant.numeric.exponent.decimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"17":{name:"keyword.other.unit.imaginary.go"},"18":{name:"constant.numeric.decimal.point.go"},"19":{name:"constant.numeric.decimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"20":{name:"punctuation.separator.constant.numeric.go"},"21":{name:"keyword.other.unit.exponent.decimal.go"},"22":{name:"keyword.operator.plus.exponent.decimal.go"},"23":{name:"keyword.operator.minus.exponent.decimal.go"},"24":{name:"constant.numeric.exponent.decimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"25":{name:"keyword.other.unit.imaginary.go"},"26":{name:"keyword.other.unit.hexadecimal.go"},"27":{name:"constant.numeric.hexadecimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"28":{name:"punctuation.separator.constant.numeric.go"},"29":{name:"constant.numeric.hexadecimal.go"},"30":{name:"constant.numeric.hexadecimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"31":{name:"punctuation.separator.constant.numeric.go"},"32":{name:"keyword.other.unit.exponent.hexadecimal.go"},"33":{name:"keyword.operator.plus.exponent.hexadecimal.go"},"34":{name:"keyword.operator.minus.exponent.hexadecimal.go"},"35":{name:"constant.numeric.exponent.hexadecimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"36":{name:"keyword.other.unit.imaginary.go"},"37":{name:"keyword.other.unit.hexadecimal.go"},"38":{name:"constant.numeric.hexadecimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"39":{name:"punctuation.separator.constant.numeric.go"},"40":{name:"keyword.other.unit.exponent.hexadecimal.go"},"41":{name:"keyword.operator.plus.exponent.hexadecimal.go"},"42":{name:"keyword.operator.minus.exponent.hexadecimal.go"},"43":{name:"constant.numeric.exponent.hexadecimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"44":{name:"keyword.other.unit.imaginary.go"},"45":{name:"keyword.other.unit.hexadecimal.go"},"46":{name:"constant.numeric.hexadecimal.go"},"47":{name:"constant.numeric.hexadecimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"48":{name:"punctuation.separator.constant.numeric.go"},"49":{name:"keyword.other.unit.exponent.hexadecimal.go"},"50":{name:"keyword.operator.plus.exponent.hexadecimal.go"},"51":{name:"keyword.operator.minus.exponent.hexadecimal.go"},"52":{name:"constant.numeric.exponent.hexadecimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"53":{name:"keyword.other.unit.imaginary.go"}},match:/(?:(?:(?:(?:(?:(?=[\.0-9])(?!0[BOXbox])([0-9](?:[0-9]|((?<=\p{AHex})_(?=\p{AHex})))*)((?<=[0-9])\.|\.(?=[0-9]))([0-9](?:[0-9]|((?<=\p{AHex})_(?=\p{AHex})))*)?(?:(?<!_)([Ee])(\+?)(-?)([0-9](?:[0-9]|(?<=\p{AHex})_(?=\p{AHex}))*))?(i(?![\p{L}\p{M}\p{N}\p{Pc}]))?(?:\n|(?=\n?$))|(?=[\.0-9])(?!0[BOXbox])([0-9](?:[0-9]|((?<=\p{AHex})_(?=\p{AHex})))*)(?<!_)([Ee])(\+?)(-?)([0-9](?:[0-9]|(?<=\p{AHex})_(?=\p{AHex}))*)(i(?![\p{L}\p{M}\p{N}\p{Pc}]))?(?:\n|(?=\n?$)))|((?<=[0-9])\.|\.(?=[0-9]))([0-9](?:[0-9]|((?<=\p{AHex})_(?=\p{AHex})))*)(?:(?<!_)([Ee])(\+?)(-?)([0-9](?:[0-9]|(?<=\p{AHex})_(?=\p{AHex}))*))?(i(?![\p{L}\p{M}\p{N}\p{Pc}]))?(?:\n|(?=\n?$)))|(0[Xx])_?(\p{AHex}(?:\p{AHex}|((?<=\p{AHex})_(?=\p{AHex})))*)((?<=\p{AHex})\.|\.(?=\p{AHex}))(\p{AHex}(?:\p{AHex}|((?<=\p{AHex})_(?=\p{AHex})))*)?(?<!_)([Pp])(\+?)(-?)([0-9](?:[0-9]|(?<=\p{AHex})_(?=\p{AHex}))*)(i(?![\p{L}\p{M}\p{N}\p{Pc}]))?(?:\n|(?=\n?$)))|(0[Xx])_?(\p{AHex}(?:\p{AHex}|((?<=\p{AHex})_(?=\p{AHex})))*)(?<!_)([Pp])(\+?)(-?)([0-9](?:[0-9]|(?<=\p{AHex})_(?=\p{AHex}))*)(i(?![\p{L}\p{M}\p{N}\p{Pc}]))?(?:\n|(?=\n?$)))|(0[Xx])((?<=\p{AHex})\.|\.(?=\p{AHex}))(\p{AHex}(?:\p{AHex}|((?<=\p{AHex})_(?=\p{AHex})))*)(?<!_)([Pp])(\+?)(-?)([0-9](?:[0-9]|(?<=\p{AHex})_(?=\p{AHex}))*)(i(?![\p{L}\p{M}\p{N}\p{Pc}]))?(?:\n|(?=\n?$)))/dgvy},{captures:{"1":{name:"constant.numeric.decimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"2":{name:"punctuation.separator.constant.numeric.go"},"3":{name:"keyword.other.unit.imaginary.go"},"4":{name:"keyword.other.unit.binary.go"},"5":{name:"constant.numeric.binary.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"6":{name:"punctuation.separator.constant.numeric.go"},"7":{name:"keyword.other.unit.imaginary.go"},"8":{name:"keyword.other.unit.octal.go"},"9":{name:"constant.numeric.octal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"10":{name:"punctuation.separator.constant.numeric.go"},"11":{name:"keyword.other.unit.imaginary.go"},"12":{name:"keyword.other.unit.hexadecimal.go"},"13":{name:"constant.numeric.hexadecimal.go",patterns:[{match:/(?<=\p{AHex})_(?=\p{AHex})/dgv,name:"punctuation.separator.constant.numeric.go"}]},"14":{name:"punctuation.separator.constant.numeric.go"},"15":{name:"keyword.other.unit.imaginary.go"}},match:/(?:(?:(?:(?=[\.0-9])(?!0[BOXbox])([0-9](?:[0-9]|((?<=\p{AHex})_(?=\p{AHex})))*)(i(?![\p{L}\p{M}\p{N}\p{Pc}]))?(?:\n|(?=\n?$))|(0[Bb])_?([01](?:[01]|((?<=\p{AHex})_(?=\p{AHex})))*)(i(?![\p{L}\p{M}\p{N}\p{Pc}]))?(?:\n|(?=\n?$)))|(0[Oo]?)_?((?:[0-7]|((?<=\p{AHex})_(?=\p{AHex})))+)(i(?![\p{L}\p{M}\p{N}\p{Pc}]))?(?:\n|(?=\n?$)))|(0[Xx])_?(\p{AHex}(?:\p{AHex}|((?<=\p{AHex})_(?=\p{AHex})))*)(i(?![\p{L}\p{M}\p{N}\p{Pc}]))?(?:\n|(?=\n?$)))/dgvy},{match:/(?:[\.0-9A-Z_a-z]|(?<=[EPep])[\-\+])+/dgv,name:"invalid.illegal.constant.numeric.go"}]}]}},match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])\.?\p{Nd}(?:[\.0-9A-Z_a-z]|(?<=[EPep])[\-\+])*/dgv},operators:{patterns:[{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])[\&\*]+(?!\p{Nd})(?=[\]\[\p{L}\p{M}\p{N}\p{Pc}]|<-)/dgv,name:"keyword.operator.address.go"},{match:/<-/dgv,name:"keyword.operator.channel.go"},{match:/--/dgv,name:"keyword.operator.decrement.go"},{match:/\+\+/dgv,name:"keyword.operator.increment.go"},{match:/(==|!=|<=|>=|<(?!<)|>(?!>))/dgv,name:"keyword.operator.comparison.go"},{match:/(&&|\|\||!)/dgv,name:"keyword.operator.logical.go"},{match:/((?:|[\-\%\*\+\/\:\^\|]|<<|>>|&\^?)=)/dgv,name:"keyword.operator.assignment.go"},{match:/([\-\%\*\+\/])/dgv,name:"keyword.operator.arithmetic.go"},{match:/(&(?!\^)|[\^\|]|&\^|<<|>>|~)/dgv,name:"keyword.operator.arithmetic.bitwise.go"},{match:/\.\.\./dgv,name:"keyword.operator.ellipsis.go"}]},other_struct_interface_expressions:{patterns:[{include:"#after_control_variables"},{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]},"2":{patterns:[{include:"#type-declarations-without-brackets"},{match:/\[/dgv,name:"punctuation.definition.begin.bracket.square.go"},{match:/\]/dgv,name:"punctuation.definition.end.bracket.square.go"},{match:/\{/dgv,name:"punctuation.definition.begin.bracket.curly.go"},{match:/\}/dgv,name:"punctuation.definition.end.bracket.curly.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/\b([\.\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}]+)*)?\])?(?=\{)(?<!\b(?:struct|interface)\b)/dgv}]},other_variables:{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.go"},package_name:{patterns:[{begin:/\b(package)\p{space}+/dgv,beginCaptures:{"1":{name:"keyword.package.go"}},end:/*@__PURE__*/ new EmulatedRegExp("(?!^)","dgv",{"strategy":"clip_search"}),patterns:[{match:/\p{Nd}[\p{L}\p{M}\p{N}\p{Pc}]*/dgv,name:"invalid.illegal.identifier.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.package.go"}]}]},"parameter-variable-types":{patterns:[{match:/\{/dgv,name:"punctuation.definition.begin.bracket.curly.go"},{match:/\}/dgv,name:"punctuation.definition.end.bracket.curly.go"},{begin:/([\*\.\p{L}\p{M}\p{N}\p{Pc}]+)?(\[)/dgv,beginCaptures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]},"2":{name:"punctuation.definition.begin.bracket.square.go"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.square.go"}},patterns:[{include:"#generic_param_types"}]},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{include:"#function_param_types"}]}]},property_variables:{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.property.go"}]}},match:/\b([\.\p{L}\p{M}\p{N}\p{Pc}]+:(?!=))/dgv},raw_string_literals:{begin:/`/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.go"}},end:/`/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.go"}},name:"string.quoted.raw.go",patterns:[{include:"#string_placeholder"}]},runes:{patterns:[{begin:/'/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.go"}},end:/'/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.go"}},name:"string.quoted.rune.go",patterns:[{match:/(\\([0-7]{3}|["'\\abfnrtv]|x\p{AHex}{2}|u\p{AHex}{4}|U\p{AHex}{8})|[^\n])(?=')/dgvy,name:"constant.other.rune.go"},{match:/[^']+/dgv,name:"invalid.illegal.unknown-rune.go"}]}]},single_type:{patterns:[{captures:{"1":{name:"keyword.type.go"},"2":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]},"3":{patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{include:"#function_param_types"},{include:"$self"}]},{include:"#type-declarations"},{include:"#generic_types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/^\p{space}*\b(type)\b\p{space}*([\*\.\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}+(?!(?:=\p{space}*)?(?:[\]\*\[]+)?\b(?:struct|interface)\b)([\p{space}\P{space}]+)/dgv},{begin:/(?:^|\p{space}+)\b(type)\b\p{space}*([\*\.\p{L}\p{M}\p{N}\p{Pc}]+)(?=\[)/dgv,beginCaptures:{"1":{name:"keyword.type.go"},"2":{patterns:[{include:"#type-declarations-without-brackets"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},end:/(?<=\])(\p{space}+(?:=\p{space}*)?(?:(?:(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?(?!(?:[\]\*\[]+)?\b(?:struct|interface|func)\b)[\-\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+(?:,\p{space}*[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+)*)?/dgv,endCaptures:{"1":{patterns:[{include:"#type-declarations-without-brackets"},{match:/\[/dgv,name:"punctuation.definition.begin.bracket.square.go"},{match:/\]/dgv,name:"punctuation.definition.end.bracket.square.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},patterns:[{include:"#struct_variables_types"},{include:"#type-declarations-without-brackets"},{include:"#parameter-variable-types"},{match:/\[/dgv,name:"punctuation.definition.begin.bracket.square.go"},{match:/\]/dgv,name:"punctuation.definition.end.bracket.square.go"},{match:/\{/dgv,name:"punctuation.definition.begin.bracket.curly.go"},{match:/\}/dgv,name:"punctuation.definition.end.bracket.curly.go"},{match:/\(/dgv,name:"punctuation.definition.begin.bracket.round.go"},{match:/\)/dgv,name:"punctuation.definition.end.bracket.round.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}]},slice_index_variables:{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.go"}]}},match:/(?<=[\p{L}\p{M}\p{N}\p{Pc}]\[)((?:\b[\-\%\&\*\+\.\/\<\>\|\p{L}\p{M}\p{N}\p{Pc}]+:|:\b[\-\%\&\*\+\.\/\<\>\|\p{L}\p{M}\p{N}\p{Pc}]+)(?:\b[\-\%\&\*\+\.\/\<\>\|\p{L}\p{M}\p{N}\p{Pc}]+)?(?::\b[\-\%\&\*\+\.\/\<\>\|\p{L}\p{M}\p{N}\p{Pc}]+)?)(?=\])/dgv},statements:{patterns:[{include:"#package_name"},{include:"#import"},{include:"#syntax_errors"},{include:"#group-functions"},{include:"#group-types"},{include:"#group-variables"},{include:"#field_hover"}]},storage_types:{patterns:[{match:/\bbool\b/dgv,name:"storage.type.boolean.go"},{match:/\bbyte\b/dgv,name:"storage.type.byte.go"},{match:/\berror\b/dgv,name:"storage.type.error.go"},{match:/\b(complex(64|128)|float(32|64)|u?int(8|16|32|64)?)\b/dgv,name:"storage.type.numeric.go"},{match:/\brune\b/dgv,name:"storage.type.rune.go"},{match:/\bstring\b/dgv,name:"storage.type.string.go"},{match:/\buintptr\b/dgv,name:"storage.type.uintptr.go"},{match:/\bany\b/dgv,name:"entity.name.type.any.go"},{match:/\bcomparable\b/dgv,name:"entity.name.type.comparable.go"}]},string_escaped_char:{patterns:[{match:/\\([0-7]{3}|["'\\abfnrtv]|x\p{AHex}{2}|u\p{AHex}{4}|U\p{AHex}{8})/dgv,name:"constant.character.escape.go"},{match:/\\[^"'0-7Uabfnrtuvx]/dgv,name:"invalid.illegal.unknown-escape.go"}]},string_literals:{patterns:[{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.go"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.go"}},name:"string.quoted.double.go",patterns:[{include:"#string_escaped_char"},{include:"#string_placeholder"}]}]},string_placeholder:{patterns:[{match:/%(\[\p{Nd}+\])?([\- \#\+0]{0,2}((\p{Nd}+|\*)?(\.?(\p{Nd}+|\*|(\[\p{Nd}+\])\*?)?(\[\p{Nd}+\])?)?))?[\%EFGTUXb-gopqstvwx]/dgv,name:"constant.other.placeholder.go"}]},struct_interface_declaration:{captures:{"1":{name:"keyword.type.go"},"2":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/^\p{space}*\b(type)\b\p{space}*([\.\p{L}\p{M}\p{N}\p{Pc}]+)/dgv},struct_variable_types_fields_multi:{patterns:[{begin:/([\p{L}\p{M}\p{N}\p{Pc}]+(?:,\p{space}*[\p{L}\p{M}\p{N}\p{Pc}]+)*(?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?\p{space}+(?:[\]\*\[]+)?)\b(struct)\b\p{space}*(\{)/dgv,beginCaptures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.property.go"}]},"2":{name:"keyword.struct.go"},"3":{name:"punctuation.definition.begin.bracket.curly.go"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.curly.go"}},patterns:[{include:"#struct_variables_types_fields"},{include:"$self"}]},{begin:/([\p{L}\p{M}\p{N}\p{Pc}]+(?:,\p{space}*[\p{L}\p{M}\p{N}\p{Pc}]+)*(?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?\p{space}+(?:[\]\*\[]+)?)\b(interface)\b\p{space}*(\{)/dgv,beginCaptures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.property.go"}]},"2":{name:"keyword.interface.go"},"3":{name:"punctuation.definition.begin.bracket.curly.go"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.curly.go"}},patterns:[{include:"#interface_variables_types_field"},{include:"$self"}]},{begin:/([\p{L}\p{M}\p{N}\p{Pc}]+(?:,\p{space}*[\p{L}\p{M}\p{N}\p{Pc}]+)*(?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?\p{space}+(?:[\]\*\[]+)?)\b(func)\b\p{space}*(\()/dgv,beginCaptures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.property.go"}]},"2":{name:"keyword.function.go"},"3":{name:"punctuation.definition.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{include:"#function_param_types"},{include:"$self"}]},{include:"#parameter-variable-types"}]},struct_variables_types:{begin:/\b(struct)\b\p{space}*(\{)/dgv,beginCaptures:{"1":{name:"keyword.struct.go"},"2":{name:"punctuation.definition.begin.bracket.curly.go"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.curly.go"}},patterns:[{include:"#struct_variables_types_fields"},{include:"$self"}]},struct_variables_types_fields:{patterns:[{include:"#struct_variable_types_fields_multi"},{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/(?<=\{)\p{space}*((?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*(?=\})/dgv},{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.property.go"}]},"2":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/(?<=\{)\p{space}*((?:(?:[\p{L}\p{M}\p{N}\p{Pc}]+,\p{space}*)+)?[\p{L}\p{M}\p{N}\p{Pc}]+\p{space}+)((?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*(?=\})/dgv},{captures:{"1":{patterns:[{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.property.go"}]},"2":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/((?:(?:[\p{L}\p{M}\p{N}\p{Pc}]+,\p{space}*)+)?[\p{L}\p{M}\p{N}\p{Pc}]+\p{space}+)?((?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?\P{space}+;?)/dgv}]}},match:/(?<=\{)((?:\p{space}*(?:(?:(?:[\p{L}\p{M}\p{N}\p{Pc}]+,\p{space}*)+)?[\p{L}\p{M}\p{N}\p{Pc}]+\p{space}+)?(?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?\P{space}+;?)+)\p{space}*(?=\})/dgv},{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/((?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?[\*\.\p{L}\p{M}\p{N}\p{Pc}]+\p{space}*)(?:(?=["\/\`])|(?=\n?$))/dgv},{captures:{"1":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.property.go"}]},"2":{patterns:[{include:"#type-declarations-without-brackets"},{include:"#parameter-variable-types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/((?:(?:[\p{L}\p{M}\p{N}\p{Pc}]+,\p{space}*)+)?[\p{L}\p{M}\p{N}\p{Pc}]+\p{space}+)([^"\/\`]+)/dgv}]},support_functions:{captures:{"1":{name:"entity.name.function.support.go"},"2":{patterns:[{include:"#type-declarations"},{match:/\p{Nd}[\p{L}\p{M}\p{N}\p{Pc}]*/dgv,name:"invalid.illegal.identifier.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.function.support.go"}]},"3":{patterns:[{include:"#type-declarations-without-brackets"},{match:/\[/dgv,name:"punctuation.definition.begin.bracket.square.go"},{match:/\]/dgv,name:"punctuation.definition.end.bracket.square.go"},{match:/\{/dgv,name:"punctuation.definition.begin.bracket.curly.go"},{match:/\}/dgv,name:"punctuation.definition.end.bracket.curly.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/(?:((?<=\.)\b[\p{L}\p{M}\p{N}\p{Pc}]+)|\b([\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},switch_select_case_variables:{captures:{"1":{name:"keyword.control.go"},"2":{patterns:[{include:"#type-declarations"},{include:"#support_functions"},{include:"#variable_assignment"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.go"}]}},match:/^\p{space}*\b(case)\b\p{space}+([\p{space}\P{space}]+:\p{space}*(?:\/[\*\/][^\n]*)?)(?=\n?$)/dgv},switch_types:{begin:/(?<=\bswitch\b)\p{space}*([\p{L}\p{M}\p{N}\p{Pc}]+\p{space}*:=)?\p{space}*([\-\]\%\&\(-\+\.\/\<\>\[\|\p{L}\p{M}\p{N}\p{Pc}]+)(\.\(\btype\b\)\p{space}*)(\{)/dgv,beginCaptures:{"1":{patterns:[{include:"#operators"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.assignment.go"}]},"2":{patterns:[{include:"#support_functions"},{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.go"}]},"3":{patterns:[{include:"#delimiters"},{include:"#brackets"},{match:/\btype\b/dgv,name:"keyword.type.go"}]},"4":{name:"punctuation.definition.begin.bracket.curly.go"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.curly.go"}},patterns:[{captures:{"1":{name:"keyword.control.go"},"2":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]},"3":{name:"punctuation.other.colon.go"},"4":{patterns:[{include:"#comments"}]}},match:/^\p{space}*\b(case)\b\p{space}+([\!\*\,\.\<\=\>\p{L}\p{M}\p{N}\p{Pc}\p{space}]+)(:)(\p{space}*\/[\*\/]\p{space}*[^\n]*)?(?=\n?$)/dgv},{begin:/\bcase\b/dgv,beginCaptures:{"0":{name:"keyword.control.go"}},end:/:/dgv,endCaptures:{"0":{name:"punctuation.other.colon.go"}},patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]},{include:"$self"}]},syntax_errors:{patterns:[{captures:{"1":{name:"invalid.illegal.slice.go"}},match:/\[\](\p{space}+)/dgv},{match:/\b0[0-7]*[89]\p{Nd}*\b/dgv,name:"invalid.illegal.numeric.go"}]},terminators:{match:/;/dgv,name:"punctuation.terminator.go"},"type-declarations":{patterns:[{include:"#language_constants"},{include:"#comments"},{include:"#map_types"},{include:"#brackets"},{include:"#delimiters"},{include:"#keywords"},{include:"#operators"},{include:"#runes"},{include:"#storage_types"},{include:"#raw_string_literals"},{include:"#string_literals"},{include:"#numeric_literals"},{include:"#terminators"}]},"type-declarations-without-brackets":{patterns:[{include:"#language_constants"},{include:"#comments"},{include:"#map_types"},{include:"#delimiters"},{include:"#keywords"},{include:"#operators"},{include:"#runes"},{include:"#storage_types"},{include:"#raw_string_literals"},{include:"#string_literals"},{include:"#numeric_literals"},{include:"#terminators"}]},type_assertion_inline:{captures:{"1":{name:"keyword.type.go"},"2":{patterns:[{include:"#type-declarations"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/(?<=\.\()(?:\b(type)\b|((?:(?:\p{space}*(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+)?[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+))(?=\))/dgv},var_assignment:{patterns:[{captures:{"1":{patterns:[{include:"#delimiters"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.assignment.go"}]},"2":{patterns:[{include:"#type-declarations-without-brackets"},{include:"#generic_types"},{match:/\(/dgv,name:"punctuation.definition.begin.bracket.round.go"},{match:/\)/dgv,name:"punctuation.definition.end.bracket.round.go"},{match:/\[/dgv,name:"punctuation.definition.begin.bracket.square.go"},{match:/\]/dgv,name:"punctuation.definition.end.bracket.square.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/(?<=\bvar\b)\p{space}*\b([\.\p{L}\p{M}\p{N}\p{Pc}]+(?:,\p{space}*[\.\p{L}\p{M}\p{N}\p{Pc}]+)*)\p{space}*((?:(?:(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+(?:\([^\)]+\))?)?(?!(?:[\]\*\[]+)?\b(?:struct|func|map)\b)(?:[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+(?:,\p{space}*[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+)*)?\p{space}*=?)?/dgv},{begin:/(?<=\bvar\b)\p{space}*(\()/dgv,beginCaptures:{"1":{name:"punctuation.definition.begin.bracket.round.go"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.end.bracket.round.go"}},patterns:[{captures:{"1":{patterns:[{include:"#delimiters"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.assignment.go"}]},"2":{patterns:[{include:"#type-declarations-without-brackets"},{include:"#generic_types"},{match:/\(/dgv,name:"punctuation.definition.begin.bracket.round.go"},{match:/\)/dgv,name:"punctuation.definition.end.bracket.round.go"},{match:/\[/dgv,name:"punctuation.definition.begin.bracket.square.go"},{match:/\]/dgv,name:"punctuation.definition.end.bracket.square.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.go"}]}},match:/^\p{space}*\b([\.\p{L}\p{M}\p{N}\p{Pc}]+(?:,\p{space}*[\.\p{L}\p{M}\p{N}\p{Pc}]+)*)\p{space}*((?:(?:(?:[\]\*\[]+)?(?:<-\p{space}*)?\bchan\b(?:\p{space}*<-)?\p{space}*)+(?:\([^\)]+\))?)?(?!(?:[\]\*\[]+)?\b(?:struct|func|map)\b)(?:[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+(?:,\p{space}*[\]\*\.\[\p{L}\p{M}\p{N}\p{Pc}]+)*)?\p{space}*=?)?/dgv},{include:"$self"}]}]},variable_assignment:{patterns:[{captures:{"0":{patterns:[{include:"#delimiters"},{match:/\p{Nd}[\p{L}\p{M}\p{N}\p{Pc}]*/dgv,name:"invalid.illegal.identifier.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.assignment.go"}]}},match:/\b[\p{L}\p{M}\p{N}\p{Pc}]+(?:,\p{space}*[\p{L}\p{M}\p{N}\p{Pc}]+)*(?=\p{space}*:=)/dgv},{captures:{"0":{patterns:[{include:"#delimiters"},{include:"#operators"},{match:/\p{Nd}[\p{L}\p{M}\p{N}\p{Pc}]*/dgv,name:"invalid.illegal.identifier.go"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"variable.other.assignment.go"}]}},match:/\b[\*\.\p{L}\p{M}\p{N}\p{Pc}]+(?:,\p{space}*[\*\.\p{L}\p{M}\p{N}\p{Pc}]+)*(?=\p{space}*=(?!=))/dgv}]}},scopeName:"source.go",embeddedLangs:undefined,aliases:undefined})
|
|
4
4
|
|
|
5
5
|
export default [
|
|
6
6
|
lang
|
package/dist/liquid.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import css from './css.mjs'
|
|
|
3
3
|
import json from './json.mjs'
|
|
4
4
|
import javascript from './javascript.mjs'
|
|
5
5
|
|
|
6
|
-
const lang = Object.freeze({displayName:"Liquid",fileTypes:["liquid"],foldingStartMarker:/\{%-?\p{space}*(capture|case|comment|form??|if|javascript|paginate|schema|style)[^\%\(\)\}]+%\}/dgv,foldingStopMarker:/\{%\p{space}*(end(?:capture|case|comment|form??|if|javascript|paginate|schema|style))[^\%\(\)\}]+%\}/dgv,injections:{"L:meta.embedded.block.js, L:meta.embedded.block.css, L:meta.embedded.block.html, L:string.quoted":{patterns:[{include:"#injection"}]}},name:"liquid",patterns:[{include:"#core"}],repository:{attribute:{begin:/[\p{L}\p{M}\p{N}\p{Pc}]+:/dgv,beginCaptures:{"0":{name:"entity.other.attribute-name.liquid"}},end:/(?=,|%\}|\}\}|\|)/dgv,patterns:[{include:"#value_expression"}]},attribute_liquid:{begin:/[\p{L}\p{M}\p{N}\p{Pc}]+:/dgv,beginCaptures:{"0":{name:"entity.other.attribute-name.liquid"}},end:/(?=[\,\|])|(?=\n?$)/dgv,patterns:[{include:"#value_expression"}]},comment_block:{begin:/\{%-?\p{space}*comment\p{space}*-?%\}/dgv,end:/\{%-?\p{space}*endcomment\p{space}*-?%\}/dgv,name:"comment.block.liquid",patterns:[{include:"#comment_block"},{match:/([^\n](?!\{%-?\p{space}*((?:|end)comment)\p{space}*-?%\}))*[^\n]/dgv}]},core:{patterns:[{include:"#raw_tag"},{include:"#doc_tag"},{include:"#comment_block"},{include:"#style_codefence"},{include:"#stylesheet_codefence"},{include:"#json_codefence"},{include:"#javascript_codefence"},{include:"#object"},{include:"#tag"},{include:"text.html.basic"}]},doc_tag:{begin:/\{%-?\p{space}*(doc)\p{space}*-?%\}/dgv,beginCaptures:{"0":{name:"meta.tag.liquid"},"1":{name:"entity.name.tag.doc.liquid"}},contentName:"comment.block.documentation.liquid",end:/\{%-?\p{space}*(enddoc)\p{space}*-?%\}/dgv,endCaptures:{"0":{name:"meta.tag.liquid"},"1":{name:"entity.name.tag.doc.liquid"}},name:"meta.block.doc.liquid",patterns:[{include:"#liquid_doc_description_tag"},{include:"#liquid_doc_param_tag"},{include:"#liquid_doc_example_tag"},{include:"#liquid_doc_fallback_tag"}]},filter:{captures:{"1":{name:"support.function.liquid"}},match:/\|\p{space}*((?![\.0-9])[\-0-9A-Z_a-z]+:?)\p{space}*/dgv},injection:{patterns:[{include:"#raw_tag"},{include:"#comment_block"},{include:"#object"},{include:"#tag_injection"}]},invalid_range:{match:/\(([^\n](?!\.\.))+\)/dgv,name:"invalid.illegal.range.liquid"},javascript_codefence:{begin:/(\{%-?)\p{space}*(javascript)\p{space}*(-?%\})/dgv,beginCaptures:{"0":{name:"meta.tag.metadata.javascript.start.liquid"},"1":{name:"punctuation.definition.tag.begin.liquid"},"2":{name:"entity.name.tag.javascript.liquid"},"3":{name:"punctuation.definition.tag.begin.liquid"}},contentName:"meta.embedded.block.js",end:/(\{%-?)\p{space}*(endjavascript)\p{space}*(-?%\})/dgv,endCaptures:{"0":{name:"meta.tag.metadata.javascript.end.liquid"},"1":{name:"punctuation.definition.tag.end.liquid"},"2":{name:"entity.name.tag.javascript.liquid"},"3":{name:"punctuation.definition.tag.end.liquid"}},name:"meta.block.javascript.liquid",patterns:[{include:"source.js"}]},json_codefence:{begin:/(\{%-?)\p{space}*(schema)\p{space}*(-?%\})/dgv,beginCaptures:{"0":{name:"meta.tag.metadata.schema.start.liquid"},"1":{name:"punctuation.definition.tag.begin.liquid"},"2":{name:"entity.name.tag.schema.liquid"},"3":{name:"punctuation.definition.tag.begin.liquid"}},contentName:"meta.embedded.block.json",end:/(\{%-?)\p{space}*(endschema)\p{space}*(-?%\})/dgv,endCaptures:{"0":{name:"meta.tag.metadata.schema.end.liquid"},"1":{name:"punctuation.definition.tag.end.liquid"},"2":{name:"entity.name.tag.schema.liquid"},"3":{name:"punctuation.definition.tag.end.liquid"}},name:"meta.block.schema.liquid",patterns:[{include:"source.json"}]},language_constant:{match:/\b(false|true|nil|blank)\b|empty(?!\?)/dgv,name:"constant.language.liquid"},liquid_doc_description_tag:{begin:/(@description)\b\p{space}*/dgv,beginCaptures:{"0":{name:"comment.block.documentation.liquid"},"1":{name:"storage.type.class.liquid"}},end:/(?=@|\{%-?\p{space}*enddoc\p{space}*-?%\})/dgv,patterns:[{match:/[^\@]+/dgv,name:"string.quoted.single.liquid"}]},liquid_doc_example_tag:{begin:/(@example)\b\p{space}*/dgv,beginCaptures:{"0":{name:"comment.block.documentation.liquid"},"1":{name:"storage.type.class.liquid"}},contentName:"meta.embedded.block.liquid",end:/(?=@|\{%-?\p{space}*enddoc\p{space}*-?%\})/dgv,patterns:[{include:"#core"}]},liquid_doc_fallback_tag:{captures:{"1":{name:"comment.block.liquid"}},match:/(@[\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv},liquid_doc_param_tag:{captures:{"1":{name:"storage.type.class.liquid"},"2":{name:"entity.name.type.instance.liquid"},"3":{name:"variable.other.liquid"},"4":{name:"string.quoted.single.liquid"}},match:/(@param)\p{space}+(?:(\{[^\}]*\}?)\p{space}+)?(\[?[A-Z_a-z][\-\p{L}\p{M}\p{N}\p{Pc}]*\]?)?(?:\p{space}+([^\n]*))?/dgv},number:{match:/(([\-\+])\p{space}*)?[0-9]+(\.[0-9]+)?/dgv,name:"constant.numeric.liquid"},object:{begin:/(?<!comment %\})(?<!comment -%\})(?<!comment%\})(?<!comment-%\})(?<!raw %\})(?<!raw -%\})(?<!raw%\})(?<!raw-%\})\{\{-?/dgv,beginCaptures:{"0":{name:"punctuation.definition.tag.begin.liquid"}},end:/-?\}\}/dgv,endCaptures:{"0":{name:"punctuation.definition.tag.end.liquid"}},name:"meta.object.liquid",patterns:[{include:"#filter"},{include:"#attribute"},{include:"#value_expression"}]},operator:{captures:{"1":{name:"keyword.operator.expression.liquid"}},match:/(?:(?<=\p{space})|\b)(==|!=|[\<\>]|>=|<=|or|and|contains)(?:(?=\p{space})|\b)/dgv},range:{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.section.parens.begin.liquid"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.parens.end.liquid"}},name:"meta.range.liquid",patterns:[{match:/\.\./dgv,name:"punctuation.range.liquid"},{include:"#variable_lookup"},{include:"#number"}]},raw_tag:{begin:/\{%-?\p{space}*(raw)\p{space}*-?%\}/dgv,beginCaptures:{"1":{name:"entity.name.tag.liquid"}},contentName:"string.unquoted.liquid",end:/\{%-?\p{space}*(endraw)\p{space}*-?%\}/dgv,endCaptures:{"1":{name:"entity.name.tag.liquid"}},name:"meta.entity.tag.raw.liquid",patterns:[{match:/([^\n](?!\{%-?\p{space}*endraw\p{space}*-?%\}))*[^\n]/dgv}]},string:{patterns:[{include:"#string_single"},{include:"#string_double"}]},string_double:{begin:/"/dgv,end:/"/dgv,name:"string.quoted.double.liquid"},string_single:{begin:/'/dgv,end:/'/dgv,name:"string.quoted.single.liquid"},style_codefence:{begin:/(\{%-?)\p{space}*(style)\p{space}*(-?%\})/dgv,beginCaptures:{"0":{name:"meta.tag.metadata.style.start.liquid"},"1":{name:"punctuation.definition.tag.begin.liquid"},"2":{name:"entity.name.tag.style.liquid"},"3":{name:"punctuation.definition.tag.begin.liquid"}},contentName:"meta.embedded.block.css",end:/(\{%-?)\p{space}*(endstyle)\p{space}*(-?%\})/dgv,endCaptures:{"0":{name:"meta.tag.metadata.style.end.liquid"},"1":{name:"punctuation.definition.tag.end.liquid"},"2":{name:"entity.name.tag.style.liquid"},"3":{name:"punctuation.definition.tag.end.liquid"}},name:"meta.block.style.liquid",patterns:[{include:"source.css"}]},stylesheet_codefence:{begin:/(\{%-?)\p{space}*(stylesheet)\p{space}*(-?%\})/dgv,beginCaptures:{"0":{name:"meta.tag.metadata.style.start.liquid"},"1":{name:"punctuation.definition.tag.begin.liquid"},"2":{name:"entity.name.tag.style.liquid"},"3":{name:"punctuation.definition.tag.begin.liquid"}},contentName:"meta.embedded.block.css",end:/(\{%-?)\p{space}*(endstylesheet)\p{space}*(-?%\})/dgv,endCaptures:{"0":{name:"meta.tag.metadata.style.end.liquid"},"1":{name:"punctuation.definition.tag.end.liquid"},"2":{name:"entity.name.tag.style.liquid"},"3":{name:"punctuation.definition.tag.end.liquid"}},name:"meta.block.style.liquid",patterns:[{include:"source.css"}]},tag:{begin:/(?<!comment %\})(?<!comment -%\})(?<!comment%\})(?<!comment-%\})(?<!raw %\})(?<!raw -%\})(?<!raw%\})(?<!raw-%\})\{%-?/dgv,beginCaptures:{"0":{name:"punctuation.definition.tag.begin.liquid"}},end:/-?%\}/dgv,endCaptures:{"0":{name:"punctuation.definition.tag.end.liquid"}},name:"meta.tag.liquid",patterns:[{include:"#tag_body"}]},tag_assign:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(assign|echo)\b/dgv,beginCaptures:{"1":{name:"entity.name.tag.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.liquid",patterns:[{include:"#filter"},{include:"#attribute"},{include:"#value_expression"}]},tag_assign_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(assign|echo)\b/dgv,beginCaptures:{"1":{name:"entity.name.tag.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.liquid",patterns:[{include:"#filter"},{include:"#attribute_liquid"},{include:"#value_expression"}]},tag_body:{patterns:[{include:"#tag_liquid"},{include:"#tag_assign"},{include:"#tag_comment_inline"},{include:"#tag_case"},{include:"#tag_conditional"},{include:"#tag_for"},{include:"#tag_paginate"},{include:"#tag_render"},{include:"#tag_tablerow"},{include:"#tag_expression"}]},tag_case:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(case|when)\b/dgv,beginCaptures:{"1":{name:"keyword.control.case.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.case.liquid",patterns:[{include:"#value_expression"}]},tag_case_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(case|when)\b/dgv,beginCaptures:{"1":{name:"keyword.control.case.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.case.liquid",patterns:[{include:"#value_expression"}]},tag_comment_block_liquid:{begin:/^\p{space}*(comment)\b/dgv,end:/^\p{space}*(endcomment)\b/dgv,name:"comment.block.liquid",patterns:[{include:"#tag_comment_block_liquid"},{match:/^\p{space}*(?!((?:|end)comment))[^\n]*/dgv}]},tag_comment_inline:{begin:/#/dgv,end:/(?=%\})/dgv,name:"comment.line.number-sign.liquid"},tag_comment_inline_liquid:{begin:/^\p{space}*#[^\n]*/dgv,end:/(?=\n?$)/dgv,name:"comment.line.number-sign.liquid"},tag_conditional:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(if|elsif|unless)\b/dgv,beginCaptures:{"1":{name:"keyword.control.conditional.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.conditional.liquid",patterns:[{include:"#value_expression"}]},tag_conditional_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(if|elsif|unless)\b/dgv,beginCaptures:{"1":{name:"keyword.control.conditional.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.conditional.liquid",patterns:[{include:"#value_expression"}]},tag_expression:{patterns:[{include:"#tag_expression_without_arguments"},{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*([\p{L}\p{M}\p{N}\p{Pc}]+)/dgv,beginCaptures:{"1":{name:"entity.name.tag.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.liquid",patterns:[{include:"#value_expression"}]}]},tag_expression_liquid:{patterns:[{include:"#tag_expression_without_arguments"},{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*([\p{L}\p{M}\p{N}\p{Pc}]+)/dgv,beginCaptures:{"1":{name:"entity.name.tag.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.liquid",patterns:[{include:"#value_expression"}]}]},tag_expression_without_arguments:{patterns:[{captures:{"1":{name:"keyword.control.conditional.liquid"}},match:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(end(?:unless|if))\b/dgv},{captures:{"1":{name:"keyword.control.loop.liquid"}},match:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(end(?:for|tablerow|paginate))\b/dgv},{captures:{"1":{name:"keyword.control.case.liquid"}},match:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(endcase)\b/dgv},{captures:{"1":{name:"keyword.control.other.liquid"}},match:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(capture|case|comment|form??|if|javascript|paginate|schema|style)\b/dgv},{captures:{"1":{name:"keyword.control.other.liquid"}},match:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(end(?:capture|case|comment|form??|if|javascript|paginate|schema|style))\b/dgv},{captures:{"1":{name:"keyword.control.other.liquid"}},match:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(else|break|continue)\b/dgv}]},tag_for:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(for)\b/dgv,beginCaptures:{"1":{name:"keyword.control.for.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.for.liquid",patterns:[{include:"#tag_for_body"}]},tag_for_body:{patterns:[{match:/\b(in|reversed)\b/dgv,name:"keyword.control.liquid"},{match:/\b(offset|limit):/dgv,name:"keyword.control.liquid"},{include:"#value_expression"}]},tag_for_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(for)\b/dgv,beginCaptures:{"1":{name:"keyword.control.for.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.for.liquid",patterns:[{include:"#tag_for_body"}]},tag_injection:{begin:/(?<!comment %\})(?<!comment -%\})(?<!comment%\})(?<!comment-%\})(?<!raw %\})(?<!raw -%\})(?<!raw%\})(?<!raw-%\})\{%-?(?!-?\p{space}*(end(?:style|javascript|comment|raw)))/dgv,beginCaptures:{"0":{name:"punctuation.definition.tag.end.liquid"}},end:/-?%\}/dgv,endCaptures:{"0":{name:"punctuation.definition.tag.end.liquid"}},name:"meta.tag.liquid",patterns:[{include:"#tag_body"}]},tag_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(liquid)\b/dgv,beginCaptures:{"1":{name:"keyword.control.liquid.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.liquid.liquid",patterns:[{include:"#tag_comment_block_liquid"},{include:"#tag_comment_inline_liquid"},{include:"#tag_assign_liquid"},{include:"#tag_case_liquid"},{include:"#tag_conditional_liquid"},{include:"#tag_for_liquid"},{include:"#tag_paginate_liquid"},{include:"#tag_render_liquid"},{include:"#tag_tablerow_liquid"},{include:"#tag_expression_liquid"}]},tag_paginate:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(paginate)\b/dgv,beginCaptures:{"1":{name:"keyword.control.paginate.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.paginate.liquid",patterns:[{include:"#tag_paginate_body"}]},tag_paginate_body:{patterns:[{match:/\b(by)\b/dgv,name:"keyword.control.liquid"},{include:"#value_expression"}]},tag_paginate_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(paginate)\b/dgv,beginCaptures:{"1":{name:"keyword.control.paginate.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.paginate.liquid",patterns:[{include:"#tag_paginate_body"}]},tag_render:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(render)\b/dgv,beginCaptures:{"1":{name:"entity.name.tag.render.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.render.liquid",patterns:[{include:"#tag_render_special_keywords"},{include:"#attribute"},{include:"#value_expression"}]},tag_render_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(render)\b/dgv,beginCaptures:{"1":{name:"entity.name.tag.render.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.render.liquid",patterns:[{include:"#tag_render_special_keywords"},{include:"#attribute_liquid"},{include:"#value_expression"}]},tag_render_special_keywords:{match:/\b(with|as|for)\b/dgv,name:"keyword.control.other.liquid"},tag_tablerow:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(tablerow)\b/dgv,beginCaptures:{"1":{name:"keyword.control.tablerow.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.tablerow.liquid",patterns:[{include:"#tag_tablerow_body"}]},tag_tablerow_body:{patterns:[{match:/\b(in)\b/dgv,name:"keyword.control.liquid"},{match:/\b(cols|offset|limit):/dgv,name:"keyword.control.liquid"},{include:"#value_expression"}]},tag_tablerow_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(tablerow)\b/dgv,beginCaptures:{"1":{name:"keyword.control.tablerow.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.tablerow.liquid",patterns:[{include:"#tag_tablerow_body"}]},value_expression:{patterns:[{captures:{"2":{name:"invalid.illegal.filter.liquid"},"3":{name:"invalid.illegal.filter.liquid"}},match:/(\[)(\|)(?=[^\]]*)(?=\])/dgv},{match:/(?<=\p{space})([\-\*\+\/])(?=\p{space})/dgv,name:"invalid.illegal.filter.liquid"},{include:"#language_constant"},{include:"#operator"},{include:"#invalid_range"},{include:"#range"},{include:"#number"},{include:"#string"},{include:"#variable_lookup"}]},variable_lookup:{patterns:[{match:/\b(additional_checkout_buttons|address|all_country_option_tags|all_products|articles??|block|blogs??|canonical_url|cart|checkout|collections??|comment|content_for_additional_checkout_buttons|content_for_header|content_for_index|content_for_layout|country_option_tags|currency|current_page|current_tags|customer|customer_address|discount_allocation|discount_application|external_video|font|forloop|form|fulfillment|gift_card|handle|images??|line_item|link|linklists??|location|localization|metafield|model|model_source|order|page|page_description|page_image|page_title|pages|paginate|part|policy|powered_by_link|predictive_search|product|product_option|product_variant|recommendations|request|routes|scripts??|search|section|selling_plan|selling_plan_allocation|selling_plan_group|settings|shipping_method|shop|shop_locale|store_availability|tablerow|tax_line|template|theme|transaction|unit_price_measurement|variant|video|video_source)\b/dgv,name:"variable.language.liquid"},{match:/((?<=[\p{L}\p{M}\p{N}\p{Pc}]:\p{space})[\p{L}\p{M}\p{N}\p{Pc}]+)/dgv,name:"variable.parameter.liquid"},{begin:/(?<=[\p{L}\p{M}\p{N}\p{Pc}])\[/dgv,beginCaptures:{"0":{name:"punctuation.section.brackets.begin.liquid"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.section.brackets.end.liquid"}},name:"meta.brackets.liquid",patterns:[{include:"#string"}]},{match:/(?<=([\]\p{L}\p{M}\p{N}\p{Pc}])\.)([\-\p{L}\p{M}\p{N}\p{Pc}]+\??)/dgv,name:"variable.other.member.liquid"},{match:/(?<=[\p{L}\p{M}\p{N}\p{Pc}])\.(?=[\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"punctuation.accessor.liquid"},{match:/[_a-z]([\p{L}\p{M}\p{N}\p{Pc}]|-(?!\}\}))*/dgiv,name:"variable.other.liquid"}]}},scopeName:"text.html.liquid",embeddedLangs:["html","css","json","javascript"],aliases:undefined})
|
|
6
|
+
const lang = Object.freeze({displayName:"Liquid",fileTypes:["liquid"],foldingStartMarker:/\{%-?\p{space}*(capture|case|comment|form??|if|javascript|paginate|schema|style)[^\%\(\)\}]+%\}/dgv,foldingStopMarker:/\{%\p{space}*(end(?:capture|case|comment|form??|if|javascript|paginate|schema|style))[^\%\(\)\}]+%\}/dgv,injections:{"L:meta.embedded.block.js, L:meta.embedded.block.css, L:meta.embedded.block.html, L:string.quoted":{patterns:[{include:"#injection"}]}},name:"liquid",patterns:[{include:"#core"}],repository:{attribute:{begin:/[\p{L}\p{M}\p{N}\p{Pc}]+:/dgv,beginCaptures:{"0":{name:"entity.other.attribute-name.liquid"}},end:/(?=,|%\}|\}\}|\|)/dgv,patterns:[{include:"#value_expression"}]},attribute_liquid:{begin:/[\p{L}\p{M}\p{N}\p{Pc}]+:/dgv,beginCaptures:{"0":{name:"entity.other.attribute-name.liquid"}},end:/(?=[\,\|])|(?=\n?$)/dgv,patterns:[{include:"#value_expression"}]},comment_block:{begin:/\{%-?\p{space}*comment\p{space}*-?%\}/dgv,end:/\{%-?\p{space}*endcomment\p{space}*-?%\}/dgv,name:"comment.block.liquid",patterns:[{include:"#comment_block"},{match:/([^\n](?!\{%-?\p{space}*((?:|end)comment)\p{space}*-?%\}))*[^\n]/dgv}]},core:{patterns:[{include:"#raw_tag"},{include:"#doc_tag"},{include:"#comment_block"},{include:"#style_codefence"},{include:"#stylesheet_codefence"},{include:"#json_codefence"},{include:"#javascript_codefence"},{include:"#object"},{include:"#tag"},{include:"text.html.basic"}]},doc_tag:{begin:/\{%-?\p{space}*(doc)\p{space}*-?%\}/dgv,beginCaptures:{"0":{name:"meta.tag.liquid"},"1":{name:"entity.name.tag.doc.liquid"}},contentName:"comment.block.documentation.liquid",end:/\{%-?\p{space}*(enddoc)\p{space}*-?%\}/dgv,endCaptures:{"0":{name:"meta.tag.liquid"},"1":{name:"entity.name.tag.doc.liquid"}},name:"meta.block.doc.liquid",patterns:[{include:"#liquid_doc_description_tag"},{include:"#liquid_doc_param_tag"},{include:"#liquid_doc_example_tag"},{include:"#liquid_doc_prompt_tag"},{include:"#liquid_doc_fallback_tag"}]},filter:{captures:{"1":{name:"support.function.liquid"}},match:/\|\p{space}*((?![\.0-9])[\-0-9A-Z_a-z]+:?)\p{space}*/dgv},injection:{patterns:[{include:"#raw_tag"},{include:"#comment_block"},{include:"#object"},{include:"#tag_injection"}]},invalid_range:{match:/\(([^\n](?!\.\.))+\)/dgv,name:"invalid.illegal.range.liquid"},javascript_codefence:{begin:/(\{%-?)\p{space}*(javascript)\p{space}*(-?%\})/dgv,beginCaptures:{"0":{name:"meta.tag.metadata.javascript.start.liquid"},"1":{name:"punctuation.definition.tag.begin.liquid"},"2":{name:"entity.name.tag.javascript.liquid"},"3":{name:"punctuation.definition.tag.begin.liquid"}},contentName:"meta.embedded.block.js",end:/(\{%-?)\p{space}*(endjavascript)\p{space}*(-?%\})/dgv,endCaptures:{"0":{name:"meta.tag.metadata.javascript.end.liquid"},"1":{name:"punctuation.definition.tag.end.liquid"},"2":{name:"entity.name.tag.javascript.liquid"},"3":{name:"punctuation.definition.tag.end.liquid"}},name:"meta.block.javascript.liquid",patterns:[{include:"source.js"}]},json_codefence:{begin:/(\{%-?)\p{space}*(schema)\p{space}*(-?%\})/dgv,beginCaptures:{"0":{name:"meta.tag.metadata.schema.start.liquid"},"1":{name:"punctuation.definition.tag.begin.liquid"},"2":{name:"entity.name.tag.schema.liquid"},"3":{name:"punctuation.definition.tag.begin.liquid"}},contentName:"meta.embedded.block.json",end:/(\{%-?)\p{space}*(endschema)\p{space}*(-?%\})/dgv,endCaptures:{"0":{name:"meta.tag.metadata.schema.end.liquid"},"1":{name:"punctuation.definition.tag.end.liquid"},"2":{name:"entity.name.tag.schema.liquid"},"3":{name:"punctuation.definition.tag.end.liquid"}},name:"meta.block.schema.liquid",patterns:[{include:"source.json"}]},language_constant:{match:/\b(false|true|nil|blank)\b|empty(?!\?)/dgv,name:"constant.language.liquid"},liquid_doc_description_tag:{begin:/(@description)\b\p{space}*/dgv,beginCaptures:{"0":{name:"comment.block.documentation.liquid"},"1":{name:"storage.type.class.liquid"}},contentName:"string.quoted.single.liquid",end:/(?=@prompt|@example|@param|@description|\{%-?\p{space}*enddoc\p{space}*-?%\})/dgv},liquid_doc_example_tag:{begin:/(@example)\b\p{space}*/dgv,beginCaptures:{"0":{name:"comment.block.documentation.liquid"},"1":{name:"storage.type.class.liquid"}},contentName:"meta.embedded.block.liquid",end:/(?=@prompt|@example|@param|@description|\{%-?\p{space}*enddoc\p{space}*-?%\})/dgv,patterns:[{include:"#core"}]},liquid_doc_fallback_tag:{captures:{"1":{name:"comment.block.liquid"}},match:/(@[\p{L}\p{M}\p{N}\p{Pc}]+)\b/dgv},liquid_doc_param_tag:{captures:{"1":{name:"storage.type.class.liquid"},"2":{name:"entity.name.type.instance.liquid"},"3":{name:"variable.other.liquid"},"4":{name:"string.quoted.single.liquid"}},match:/(@param)\p{space}+(?:(\{[^\}]*\}?)\p{space}+)?(\[?[A-Z_a-z][\-\p{L}\p{M}\p{N}\p{Pc}]*\]?)?(?:\p{space}+([^\n]*))?/dgv},liquid_doc_prompt_tag:{begin:/(@prompt)\b\p{space}*/dgv,beginCaptures:{"0":{name:"comment.block.documentation.liquid"},"1":{name:"storage.type.class.liquid"}},contentName:"string.quoted.single.liquid",end:/(?=@prompt|@example|@param|@description|\{%-?\p{space}*enddoc\p{space}*-?%\})/dgv},number:{match:/(([\-\+])\p{space}*)?[0-9]+(\.[0-9]+)?/dgv,name:"constant.numeric.liquid"},object:{begin:/(?<!comment %\})(?<!comment -%\})(?<!comment%\})(?<!comment-%\})(?<!raw %\})(?<!raw -%\})(?<!raw%\})(?<!raw-%\})\{\{-?/dgv,beginCaptures:{"0":{name:"punctuation.definition.tag.begin.liquid"}},end:/-?\}\}/dgv,endCaptures:{"0":{name:"punctuation.definition.tag.end.liquid"}},name:"meta.object.liquid",patterns:[{include:"#filter"},{include:"#attribute"},{include:"#value_expression"}]},operator:{captures:{"1":{name:"keyword.operator.expression.liquid"}},match:/(?:(?<=\p{space})|\b)(==|!=|[\<\>]|>=|<=|or|and|contains)(?:(?=\p{space})|\b)/dgv},range:{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.section.parens.begin.liquid"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.parens.end.liquid"}},name:"meta.range.liquid",patterns:[{match:/\.\./dgv,name:"punctuation.range.liquid"},{include:"#variable_lookup"},{include:"#number"}]},raw_tag:{begin:/\{%-?\p{space}*(raw)\p{space}*-?%\}/dgv,beginCaptures:{"1":{name:"entity.name.tag.liquid"}},contentName:"string.unquoted.liquid",end:/\{%-?\p{space}*(endraw)\p{space}*-?%\}/dgv,endCaptures:{"1":{name:"entity.name.tag.liquid"}},name:"meta.entity.tag.raw.liquid",patterns:[{match:/([^\n](?!\{%-?\p{space}*endraw\p{space}*-?%\}))*[^\n]/dgv}]},string:{patterns:[{include:"#string_single"},{include:"#string_double"}]},string_double:{begin:/"/dgv,end:/"/dgv,name:"string.quoted.double.liquid"},string_single:{begin:/'/dgv,end:/'/dgv,name:"string.quoted.single.liquid"},style_codefence:{begin:/(\{%-?)\p{space}*(style)\p{space}*(-?%\})/dgv,beginCaptures:{"0":{name:"meta.tag.metadata.style.start.liquid"},"1":{name:"punctuation.definition.tag.begin.liquid"},"2":{name:"entity.name.tag.style.liquid"},"3":{name:"punctuation.definition.tag.begin.liquid"}},contentName:"meta.embedded.block.css",end:/(\{%-?)\p{space}*(endstyle)\p{space}*(-?%\})/dgv,endCaptures:{"0":{name:"meta.tag.metadata.style.end.liquid"},"1":{name:"punctuation.definition.tag.end.liquid"},"2":{name:"entity.name.tag.style.liquid"},"3":{name:"punctuation.definition.tag.end.liquid"}},name:"meta.block.style.liquid",patterns:[{include:"source.css"}]},stylesheet_codefence:{begin:/(\{%-?)\p{space}*(stylesheet)\p{space}*(-?%\})/dgv,beginCaptures:{"0":{name:"meta.tag.metadata.style.start.liquid"},"1":{name:"punctuation.definition.tag.begin.liquid"},"2":{name:"entity.name.tag.style.liquid"},"3":{name:"punctuation.definition.tag.begin.liquid"}},contentName:"meta.embedded.block.css",end:/(\{%-?)\p{space}*(endstylesheet)\p{space}*(-?%\})/dgv,endCaptures:{"0":{name:"meta.tag.metadata.style.end.liquid"},"1":{name:"punctuation.definition.tag.end.liquid"},"2":{name:"entity.name.tag.style.liquid"},"3":{name:"punctuation.definition.tag.end.liquid"}},name:"meta.block.style.liquid",patterns:[{include:"source.css"}]},tag:{begin:/(?<!comment %\})(?<!comment -%\})(?<!comment%\})(?<!comment-%\})(?<!raw %\})(?<!raw -%\})(?<!raw%\})(?<!raw-%\})\{%-?/dgv,beginCaptures:{"0":{name:"punctuation.definition.tag.begin.liquid"}},end:/-?%\}/dgv,endCaptures:{"0":{name:"punctuation.definition.tag.end.liquid"}},name:"meta.tag.liquid",patterns:[{include:"#tag_body"}]},tag_assign:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(assign|echo)\b/dgv,beginCaptures:{"1":{name:"entity.name.tag.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.liquid",patterns:[{include:"#filter"},{include:"#attribute"},{include:"#value_expression"}]},tag_assign_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(assign|echo)\b/dgv,beginCaptures:{"1":{name:"entity.name.tag.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.liquid",patterns:[{include:"#filter"},{include:"#attribute_liquid"},{include:"#value_expression"}]},tag_body:{patterns:[{include:"#tag_liquid"},{include:"#tag_assign"},{include:"#tag_comment_inline"},{include:"#tag_case"},{include:"#tag_conditional"},{include:"#tag_for"},{include:"#tag_paginate"},{include:"#tag_render"},{include:"#tag_tablerow"},{include:"#tag_expression"}]},tag_case:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(case|when)\b/dgv,beginCaptures:{"1":{name:"keyword.control.case.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.case.liquid",patterns:[{include:"#value_expression"}]},tag_case_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(case|when)\b/dgv,beginCaptures:{"1":{name:"keyword.control.case.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.case.liquid",patterns:[{include:"#value_expression"}]},tag_comment_block_liquid:{begin:/^\p{space}*(comment)\b/dgv,end:/^\p{space}*(endcomment)\b/dgv,name:"comment.block.liquid",patterns:[{include:"#tag_comment_block_liquid"},{match:/^\p{space}*(?!((?:|end)comment))[^\n]*/dgv}]},tag_comment_inline:{begin:/#/dgv,end:/(?=%\})/dgv,name:"comment.line.number-sign.liquid"},tag_comment_inline_liquid:{begin:/^\p{space}*#[^\n]*/dgv,end:/(?=\n?$)/dgv,name:"comment.line.number-sign.liquid"},tag_conditional:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(if|elsif|unless)\b/dgv,beginCaptures:{"1":{name:"keyword.control.conditional.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.conditional.liquid",patterns:[{include:"#value_expression"}]},tag_conditional_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(if|elsif|unless)\b/dgv,beginCaptures:{"1":{name:"keyword.control.conditional.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.conditional.liquid",patterns:[{include:"#value_expression"}]},tag_expression:{patterns:[{include:"#tag_expression_without_arguments"},{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*([\p{L}\p{M}\p{N}\p{Pc}]+)/dgv,beginCaptures:{"1":{name:"entity.name.tag.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.liquid",patterns:[{include:"#value_expression"}]}]},tag_expression_liquid:{patterns:[{include:"#tag_expression_without_arguments"},{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*([\p{L}\p{M}\p{N}\p{Pc}]+)/dgv,beginCaptures:{"1":{name:"entity.name.tag.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.liquid",patterns:[{include:"#value_expression"}]}]},tag_expression_without_arguments:{patterns:[{captures:{"1":{name:"keyword.control.conditional.liquid"}},match:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(end(?:unless|if))\b/dgv},{captures:{"1":{name:"keyword.control.loop.liquid"}},match:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(end(?:for|tablerow|paginate))\b/dgv},{captures:{"1":{name:"keyword.control.case.liquid"}},match:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(endcase)\b/dgv},{captures:{"1":{name:"keyword.control.other.liquid"}},match:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(capture|case|comment|form??|if|javascript|paginate|schema|style)\b/dgv},{captures:{"1":{name:"keyword.control.other.liquid"}},match:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(end(?:capture|case|comment|form??|if|javascript|paginate|schema|style))\b/dgv},{captures:{"1":{name:"keyword.control.other.liquid"}},match:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(else|break|continue)\b/dgv}]},tag_for:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(for)\b/dgv,beginCaptures:{"1":{name:"keyword.control.for.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.for.liquid",patterns:[{include:"#tag_for_body"}]},tag_for_body:{patterns:[{match:/\b(in|reversed)\b/dgv,name:"keyword.control.liquid"},{match:/\b(offset|limit):/dgv,name:"keyword.control.liquid"},{include:"#value_expression"}]},tag_for_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(for)\b/dgv,beginCaptures:{"1":{name:"keyword.control.for.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.for.liquid",patterns:[{include:"#tag_for_body"}]},tag_injection:{begin:/(?<!comment %\})(?<!comment -%\})(?<!comment%\})(?<!comment-%\})(?<!raw %\})(?<!raw -%\})(?<!raw%\})(?<!raw-%\})\{%-?(?!-?\p{space}*(end(?:style|javascript|comment|raw)))/dgv,beginCaptures:{"0":{name:"punctuation.definition.tag.end.liquid"}},end:/-?%\}/dgv,endCaptures:{"0":{name:"punctuation.definition.tag.end.liquid"}},name:"meta.tag.liquid",patterns:[{include:"#tag_body"}]},tag_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(liquid)\b/dgv,beginCaptures:{"1":{name:"keyword.control.liquid.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.liquid.liquid",patterns:[{include:"#tag_comment_block_liquid"},{include:"#tag_comment_inline_liquid"},{include:"#tag_assign_liquid"},{include:"#tag_case_liquid"},{include:"#tag_conditional_liquid"},{include:"#tag_for_liquid"},{include:"#tag_paginate_liquid"},{include:"#tag_render_liquid"},{include:"#tag_tablerow_liquid"},{include:"#tag_expression_liquid"}]},tag_paginate:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(paginate)\b/dgv,beginCaptures:{"1":{name:"keyword.control.paginate.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.paginate.liquid",patterns:[{include:"#tag_paginate_body"}]},tag_paginate_body:{patterns:[{match:/\b(by)\b/dgv,name:"keyword.control.liquid"},{include:"#value_expression"}]},tag_paginate_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(paginate)\b/dgv,beginCaptures:{"1":{name:"keyword.control.paginate.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.paginate.liquid",patterns:[{include:"#tag_paginate_body"}]},tag_render:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(render)\b/dgv,beginCaptures:{"1":{name:"entity.name.tag.render.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.render.liquid",patterns:[{include:"#tag_render_special_keywords"},{include:"#attribute"},{include:"#value_expression"}]},tag_render_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(render)\b/dgv,beginCaptures:{"1":{name:"entity.name.tag.render.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.render.liquid",patterns:[{include:"#tag_render_special_keywords"},{include:"#attribute_liquid"},{include:"#value_expression"}]},tag_render_special_keywords:{match:/\b(with|as|for)\b/dgv,name:"keyword.control.other.liquid"},tag_tablerow:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(tablerow)\b/dgv,beginCaptures:{"1":{name:"keyword.control.tablerow.liquid"}},end:/(?=%\})/dgv,name:"meta.entity.tag.tablerow.liquid",patterns:[{include:"#tag_tablerow_body"}]},tag_tablerow_body:{patterns:[{match:/\b(in)\b/dgv,name:"keyword.control.liquid"},{match:/\b(cols|offset|limit):/dgv,name:"keyword.control.liquid"},{include:"#value_expression"}]},tag_tablerow_liquid:{begin:/(?:(?<=\{%)|(?<=\{%-)|^)\p{space}*(tablerow)\b/dgv,beginCaptures:{"1":{name:"keyword.control.tablerow.liquid"}},end:/(?=\n?$)/dgv,name:"meta.entity.tag.tablerow.liquid",patterns:[{include:"#tag_tablerow_body"}]},value_expression:{patterns:[{captures:{"2":{name:"invalid.illegal.filter.liquid"},"3":{name:"invalid.illegal.filter.liquid"}},match:/(\[)(\|)(?=[^\]]*)(?=\])/dgv},{match:/(?<=\p{space})([\-\*\+\/])(?=\p{space})/dgv,name:"invalid.illegal.filter.liquid"},{include:"#language_constant"},{include:"#operator"},{include:"#invalid_range"},{include:"#range"},{include:"#number"},{include:"#string"},{include:"#variable_lookup"}]},variable_lookup:{patterns:[{match:/\b(additional_checkout_buttons|address|all_country_option_tags|all_products|articles??|block|blogs??|canonical_url|cart|checkout|collections??|comment|content_for_additional_checkout_buttons|content_for_header|content_for_index|content_for_layout|country_option_tags|currency|current_page|current_tags|customer|customer_address|discount_allocation|discount_application|external_video|font|forloop|form|fulfillment|gift_card|handle|images??|line_item|link|linklists??|location|localization|metafield|model|model_source|order|page|page_description|page_image|page_title|pages|paginate|part|policy|powered_by_link|predictive_search|product|product_option|product_variant|recommendations|request|routes|scripts??|search|section|selling_plan|selling_plan_allocation|selling_plan_group|settings|shipping_method|shop|shop_locale|store_availability|tablerow|tax_line|template|theme|transaction|unit_price_measurement|variant|video|video_source)\b/dgv,name:"variable.language.liquid"},{match:/((?<=[\p{L}\p{M}\p{N}\p{Pc}]:\p{space})[\p{L}\p{M}\p{N}\p{Pc}]+)/dgv,name:"variable.parameter.liquid"},{begin:/(?<=[\p{L}\p{M}\p{N}\p{Pc}])\[/dgv,beginCaptures:{"0":{name:"punctuation.section.brackets.begin.liquid"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.section.brackets.end.liquid"}},name:"meta.brackets.liquid",patterns:[{include:"#string"}]},{match:/(?<=([\]\p{L}\p{M}\p{N}\p{Pc}])\.)([\-\p{L}\p{M}\p{N}\p{Pc}]+\??)/dgv,name:"variable.other.member.liquid"},{match:/(?<=[\p{L}\p{M}\p{N}\p{Pc}])\.(?=[\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"punctuation.accessor.liquid"},{match:/[_a-z]([\p{L}\p{M}\p{N}\p{Pc}]|-(?!\}\}))*/dgiv,name:"variable.other.liquid"}]}},scopeName:"text.html.liquid",embeddedLangs:["html","css","json","javascript"],aliases:undefined})
|
|
7
7
|
|
|
8
8
|
export default [
|
|
9
9
|
...html,
|
package/dist/log.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const lang = Object.freeze({displayName:"Log file",fileTypes:["log"],name:"log",patterns:[{match:/\b(
|
|
1
|
+
const lang = Object.freeze({displayName:"Log file",fileTypes:["log"],name:"log",patterns:[{match:/\b([Tt]race|TRACE)\b:?/dgv,name:"comment log.verbose"},{match:/\[(v(?:erbose|erb|rb|b?))\]/dgiv,name:"comment log.verbose"},{match:/(?<=^[p\p{space}\p{Nd}]*)\bV\b/dgv,name:"comment log.verbose"},{match:/\b(D(?:EBUG|ebug))\b|\b([Dd][Ee][Bb][Uu][Gg]):/dgv,name:"markup.changed log.debug"},{match:/\[(d(?:ebug|bug|bg|e?))\]/dgiv,name:"markup.changed log.debug"},{match:/(?<=^[p\p{space}\p{Nd}]*)\bD\b/dgv,name:"markup.changed log.debug"},{match:/\b(HINT|INFO|INFORMATION|Info|NOTICE|II)\b|\b([Ii][Nn][Ff][Oo](?:|[Rr][Mm][Aa][Tt][Ii][Oo][Nn])):/dgv,name:"markup.inserted log.info"},{match:/\[(i(?:nformation|nfo?|n?))\]/dgiv,name:"markup.inserted log.info"},{match:/(?<=^[p\p{space}\p{Nd}]*)\bI\b/dgv,name:"markup.inserted log.info"},{match:/\b(W(?:ARNING|ARN|arn|W))\b|\b([Ww][Aa][Rr][Nn][Ii][Nn][Gg]):/dgv,name:"markup.deleted log.warning"},{match:/\[(w(?:arning|arn|rn|n?))\]/dgiv,name:"markup.deleted log.warning"},{match:/(?<=^[p\p{space}\p{Nd}]*)\bW\b/dgv,name:"markup.deleted log.warning"},{match:/\b(ALERT|CRITICAL|EMERGENCY|ERROR|FAILURE|FAIL|Fatal|FATAL|Error|EE)\b|\b([Ee][Rr][Rr][Oo][Rr]):/dgv,name:"string.regexp, strong log.error"},{match:/\[(error|eror|err?|e|fatal|fatl|ftl|fa?)\]/dgiv,name:"string.regexp, strong log.error"},{match:/(?<=^[p\p{space}\p{Nd}]*)\bE\b/dgv,name:"string.regexp, strong log.error"},{match:/\b\p{Nd}{4}-\p{Nd}{2}-\p{Nd}{2}(?=T|\b)/dgv,name:"comment log.date"},{match:/(?<=(^|\p{space}))\p{Nd}{2}[^\p{L}\p{M}\p{N}\p{Pc}\p{space}]\p{Nd}{2}[^\p{L}\p{M}\p{N}\p{Pc}\p{space}]\p{Nd}{4}\b/dgv,name:"comment log.date"},{match:/T?\p{Nd}{1,2}:\p{Nd}{2}(:\p{Nd}{2}([\,\.]\p{Nd}+)?)?(Z| ?[\-\+]\p{Nd}{1,2}:\p{Nd}{2})?\b/dgv,name:"comment log.date"},{match:/T\p{Nd}{2}\p{Nd}{2}(\p{Nd}{2}([\,\.]\p{Nd}+)?)?(Z| ?[\-\+]\p{Nd}{1,2}\p{Nd}{2})?\b/dgv,name:"comment log.date"},{match:/\b(\p{AHex}{40}|\p{AHex}{10}|\p{AHex}{7})\b/dgv,name:"constant.language"},{match:/\b\p{AHex}{8}-?(\p{AHex}{4}-?){3}\p{AHex}{12}\b/dgv,name:"constant.language log.constant"},{match:/\b(\p{AHex}{2,}[\-\:])+(?:\p{AHex}{2,})+\b/dgv,name:"constant.language log.constant"},{match:/\b([0-9]+|true|false|null)\b/dgv,name:"constant.language log.constant"},{match:/\b(0x\p{AHex}+)\b/dgv,name:"constant.language log.constant"},{match:/"[^"]*"/dgv,name:"string log.string"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])'[^']*'/dgv,name:"string log.string"},{match:/\b([\.A-Za-z]*Exception)\b/dgv,name:"string.regexp, emphasis log.exceptiontype"},{begin:/^[\t ]*at[\t ]/dgv,end:/(?=\n?$)/dgv,name:"string.key, emphasis log.exception"},{match:/\b[a-z]+:\/\/\P{space}+\b\/?/dgv,name:"constant.language log.constant"},{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}])+(?![\/\\\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"constant.language log.constant"}],scopeName:"text.log",embeddedLangs:undefined,aliases:undefined})
|
|
2
2
|
|
|
3
3
|
export default [
|
|
4
4
|
lang
|