@kong-ui-public/documentation 0.4.2 → 0.4.4
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/{arc-BSRpyMf3-DfiBlVQ8.js → arc-C2t0ExPw-C4e2PVYy.js} +1 -1
- package/dist/astro-D4FIwVxr-CovDYZfT.js +58 -0
- package/dist/{blockDiagram-6b2b5046-D02VCbQO-Biw8a3Gb.js → blockDiagram-6b2b5046-BabM1eIl-B1WAFoFS.js} +5 -5
- package/dist/{c4Diagram-b947cdbb-gYcL5VzP-DRzIbvKU.js → c4Diagram-b947cdbb-BBGJ9ivn-D2lIt2__.js} +2 -2
- package/dist/{channel-DHTQ8Ynn-Dw_fpJTx.js → channel-DXyvEer2-B9963nMw.js} +1 -1
- package/dist/{classDiagram-35230388-JdSKLSZv-DXcBaf87.js → classDiagram-35230388-CRYNduH8-BHU1sLy9.js} +5 -5
- package/dist/{classDiagram-v2-412acd34-DFFRHXE_-BhiEisbZ.js → classDiagram-v2-412acd34-5HbyJrnL-CN8uWqLr.js} +5 -5
- package/dist/{clone-p6h9XXNm-C78-TaP0.js → clone-BoeTe_OS-BEC7l3rJ.js} +1 -1
- package/dist/{createText-423428c9-LivTKT7b-C3-P5SOF.js → createText-423428c9-Q0HfccbL-BLtEGSzf.js} +1 -1
- package/dist/documentation.es.js +1 -1
- package/dist/documentation.umd.js +231 -200
- package/dist/{edges-d417c7a0-C1ggiwWz-BLkdrJ5R.js → edges-d417c7a0-DEJA2PwU-BNRQat2t.js} +3 -3
- package/dist/{erDiagram-0ea73325-mz0Z_-DA-DkNi0ZZN.js → erDiagram-0ea73325-C3DQ6B1e-B5Rrft4o.js} +4 -4
- package/dist/{flowDb-d35e309a-CPyxEMIt-ZRSiJ40G.js → flowDb-d35e309a-RvFFqjek-D-9nhzeX.js} +1 -1
- package/dist/{flowDiagram-d949d7c1-DqCa0HNN-B1nXTfQy.js → flowDiagram-d949d7c1-Boa20b_n-e2wSrZzt.js} +6 -6
- package/dist/{flowDiagram-v2-49332944-UMosz1sZ-DrLBh-E0.js → flowDiagram-v2-49332944-BJtijxhz-eRcYpz1M.js} +5 -5
- package/dist/{flowchart-elk-definition-27cc417a-D2UKpS6N-BDlq2G6v.js → flowchart-elk-definition-27cc417a-BBD3LS9k-C6RPoRDj.js} +4 -4
- package/dist/{ganttDiagram-5c869e3b-CVBHw4pG-Cli439MO.js → ganttDiagram-5c869e3b-CRDFjzTp-DZo39g5w.js} +2 -2
- package/dist/{gitGraphDiagram-b9d81de9-BGm3fU0n-B1sNBQdo.js → gitGraphDiagram-b9d81de9-D1rNIGL0-h0UkRNJn.js} +1 -1
- package/dist/go-DH2kSaeI-DH2kSaeI.js +7 -0
- package/dist/{graph-4FyIWFHN-BscqHiRD.js → graph-BIq67vWs-LA_m-7g5.js} +1 -1
- package/dist/{haml-8RvrfhLO-Bbc4xoLP.js → haml-BT5dFrjs-CmYUmNQ_.js} +1 -1
- package/dist/http-DSIFYUfg-BZm1KGvb.js +15 -0
- package/dist/{index-8fae9850-_CN7MNjP-il_sEjrK.js → index-8fae9850-CaUboB89-DMTF3atd.js} +6 -6
- package/dist/index-DvRFVEGL.js +29995 -0
- package/dist/{infoDiagram-db7b18fc-V446j9uR-B1DH0Ehl.js → infoDiagram-db7b18fc-DKsewKnu-DiUcCTtI.js} +1 -1
- package/dist/{journeyDiagram-d5636530-CFiu7dnV-wCbflCBb.js → journeyDiagram-d5636530-ClddNDmR-Cno3ZZVv.js} +3 -3
- package/dist/{latex-Bw_ghldO-BlUAi6pB.js → latex-QX-FNvxY-DfqkUAVR.js} +1 -1
- package/dist/{layout-2-aEcfuw-DKVVk2ac.js → layout-Cz0dAJah-C2Ql7ZSU.js} +2 -2
- package/dist/{line-nVq5kEiy-BMvfHXF7.js → line-BCVITS7s-Anu55pMJ.js} +1 -1
- package/dist/{linear-Bz4oRFvQ-s25kUfv8.js → linear-CLHAbj67-BGejs378.js} +1 -1
- package/dist/{markdown-DYKdIx5--DYKdIx5-.js → markdown-BTiqg07I-BTiqg07I.js} +1 -1
- package/dist/{mdc-D0DPLwil-BfE3hy8_.js → mdc-CnRHmEvX-kCov4J3y.js} +1 -1
- package/dist/{mindmap-definition-377f8f1f-C2vFYDMs-DKU2Q4vn.js → mindmap-definition-377f8f1f-BwEJ-DVg-BQTqrlTd.js} +2 -2
- package/dist/nginx-Di_jaaDw-DY2n-P23.js +9 -0
- package/dist/{pieDiagram-b0208e96-DhA_SoTh-qvgo6Ar8.js → pieDiagram-b0208e96-Cyz2Kcfu-jdhZLsVz.js} +2 -2
- package/dist/{quadrantDiagram-0332be45-C8q96Ohm-Butl4dmM.js → quadrantDiagram-0332be45-CDMkEQj0-Dq8vjQCi.js} +2 -2
- package/dist/{requirementDiagram-bf7890df-D30zCZjB-FCxgWWKE.js → requirementDiagram-bf7890df-Jk3SQ-Q1-CFh95_JW.js} +4 -4
- package/dist/{sankeyDiagram-0acdec17-B4vNjMaS-Blbu4o4R.js → sankeyDiagram-0acdec17-BJuIUJd_-2lpR33Xi.js} +1 -1
- package/dist/{sequenceDiagram-c18d009d-BniqGSPK-BWzZ6_e1.js → sequenceDiagram-c18d009d-B4IxGCEM-DnDAtNoF.js} +2 -2
- package/dist/{stateDiagram-43596fc0-F0V9suMd-_20qXzGz.js → stateDiagram-43596fc0-0xEMkbt_-DgAwRqrW.js} +5 -5
- package/dist/{stateDiagram-v2-2ead4f9c-DUgJH8tF-Bk2moq9L.js → stateDiagram-v2-2ead4f9c-DS4afpcC-DubjvGN9.js} +5 -5
- package/dist/{styles-6860f46c-Dflmq0ac-CCWTr3Qc.js → styles-6860f46c-ZdhsT5S9-DzxtwCvw.js} +1 -1
- package/dist/{styles-7383a064-Dg7mXkpq-CTa7dpTX.js → styles-7383a064-C7WyH3qz-CEHVo3tw.js} +4 -4
- package/dist/{styles-b2c874b6-HpcOhE4Y-ByOXSbWi.js → styles-b2c874b6-BFg-Nblp-jsWmR-cD.js} +1 -1
- package/dist/{svelte-DAxjO8Sh-D0e501jC.js → svelte-55Eq-wPD-ukfPHbmn.js} +1 -1
- package/dist/{svgDrawCommon-0ee1b4e9-CNkCfzsJ-B5FYSDYt.js → svgDrawCommon-0ee1b4e9-CpOZq9bS-B5XnrcWY.js} +1 -1
- package/dist/{timeline-definition-d977decf-Cl38e_0g-oZIJDTGt.js → timeline-definition-d977decf-BqZwyTB6-B8SbuwHB.js} +2 -2
- package/dist/{vue-Dz-azHaT-B9qBHMZi.js → vue-CSburxZD-BLgngoKd.js} +2 -2
- package/dist/{vue-html-DIGKAAs4-BeHSIJcx.js → vue-html-Dqg1mUyY-DQ3h4F3M.js} +1 -1
- package/dist/{xychartDiagram-e50adddc-JdLmRUgg-VZfrihSd.js → xychartDiagram-e50adddc-C1fuuOEQ-CFqyDwCV.js} +4 -4
- package/package.json +5 -5
- package/dist/astro-mwoSwJnq-CNh-xuM0.js +0 -27
- package/dist/go-BCCWZWY1-BCCWZWY1.js +0 -7
- package/dist/index-B45pn_Hn.js +0 -29996
- package/dist/nginx-C082G13W-vryM9k1W.js +0 -9
- package/dist/onig-BonMD2gC-BonMD2gC.js +0 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { p as R, c as w, d as F, an as G, h as _, l as f, y as N, ao as lt } from "./index-
|
|
2
|
-
import { U as nt } from "./createText-423428c9-
|
|
3
|
-
import { P as ot } from "./line-
|
|
1
|
+
import { p as R, c as w, d as F, an as G, h as _, l as f, y as N, ao as lt } from "./index-DvRFVEGL.js";
|
|
2
|
+
import { U as nt } from "./createText-423428c9-Q0HfccbL-BLtEGSzf.js";
|
|
3
|
+
import { P as ot } from "./line-BCVITS7s-Anu55pMJ.js";
|
|
4
4
|
const dt = (e, t, a, s) => {
|
|
5
5
|
t.forEach((l) => {
|
|
6
6
|
bt[l](e, a, s);
|
package/dist/{erDiagram-0ea73325-mz0Z_-DA-DkNi0ZZN.js → erDiagram-0ea73325-C3DQ6B1e-B5Rrft4o.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as Y, s as _t, g as ft, b as mt, a as Et, v as gt, x as bt, ar as kt, l as K, z as Ot, h as tt, y as Rt, i as Nt, ao as xt, as as Tt } from "./index-
|
|
2
|
-
import { Z as At } from "./graph-
|
|
3
|
-
import { A as Mt } from "./layout-
|
|
4
|
-
import { P as Dt } from "./line-
|
|
1
|
+
import { c as Y, s as _t, g as ft, b as mt, a as Et, v as gt, x as bt, ar as kt, l as K, z as Ot, h as tt, y as Rt, i as Nt, ao as xt, as as Tt } from "./index-DvRFVEGL.js";
|
|
2
|
+
import { Z as At } from "./graph-BIq67vWs-LA_m-7g5.js";
|
|
3
|
+
import { A as Mt } from "./layout-Cz0dAJah-C2Ql7ZSU.js";
|
|
4
|
+
import { P as Dt } from "./line-BCVITS7s-Anu55pMJ.js";
|
|
5
5
|
const It = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
6
6
|
function vt(t) {
|
|
7
7
|
return typeof t == "string" && It.test(t);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as ee, u as Bt, s as mt, g as xt, a as vt, b as Lt, v as $t, x as It, l as Q1, y as de, z as Rt, j as Nt, h as R1 } from "./index-
|
|
1
|
+
import { c as ee, u as Bt, s as mt, g as xt, a as vt, b as Lt, v as $t, x as It, l as Q1, y as de, z as Rt, j as Nt, h as R1 } from "./index-DvRFVEGL.js";
|
|
2
2
|
var pe = function() {
|
|
3
3
|
var t = function(q, a, o, n) {
|
|
4
4
|
for (o = o || {}, n = q.length; n--; o[q[n]] = a)
|
package/dist/{flowDiagram-d949d7c1-DqCa0HNN-B1nXTfQy.js → flowDiagram-d949d7c1-Boa20b_n-e2wSrZzt.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { X as mt, j as W } from "./flowDb-d35e309a-
|
|
2
|
-
import { Z as kt, E as k, m as K } from "./graph-
|
|
3
|
-
import { h as w, o as O, p as J, c as H, j as tt, l as U, q, r as R, t as St } from "./index-
|
|
4
|
-
import { e as Lt, N as _t, V as At, A as It, L as C } from "./layout-
|
|
5
|
-
import { u as Tt, w as Et, O as et, Q as Mt, Z as T, d as rt, f as _, p as at, b as nt } from "./styles-7383a064-
|
|
6
|
-
import { P as Nt } from "./line-
|
|
1
|
+
import { X as mt, j as W } from "./flowDb-d35e309a-RvFFqjek-D-9nhzeX.js";
|
|
2
|
+
import { Z as kt, E as k, m as K } from "./graph-BIq67vWs-LA_m-7g5.js";
|
|
3
|
+
import { h as w, o as O, p as J, c as H, j as tt, l as U, q, r as R, t as St } from "./index-DvRFVEGL.js";
|
|
4
|
+
import { e as Lt, N as _t, V as At, A as It, L as C } from "./layout-Cz0dAJah-C2Ql7ZSU.js";
|
|
5
|
+
import { u as Tt, w as Et, O as et, Q as Mt, Z as T, d as rt, f as _, p as at, b as nt } from "./styles-7383a064-C7WyH3qz-CEHVo3tw.js";
|
|
6
|
+
import { P as Nt } from "./line-BCVITS7s-Anu55pMJ.js";
|
|
7
7
|
function Bt(r) {
|
|
8
8
|
if (!r.ok)
|
|
9
9
|
throw new Error(r.status + " " + r.statusText);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { X as e, j as o } from "./flowDb-d35e309a-
|
|
2
|
-
import { u as a, w as t } from "./styles-7383a064-
|
|
3
|
-
import { aq as s } from "./index-
|
|
4
|
-
import "./graph-
|
|
5
|
-
import "./layout-
|
|
1
|
+
import { X as e, j as o } from "./flowDb-d35e309a-RvFFqjek-D-9nhzeX.js";
|
|
2
|
+
import { u as a, w as t } from "./styles-7383a064-C7WyH3qz-CEHVo3tw.js";
|
|
3
|
+
import { aq as s } from "./index-DvRFVEGL.js";
|
|
4
|
+
import "./graph-BIq67vWs-LA_m-7g5.js";
|
|
5
|
+
import "./layout-Cz0dAJah-C2Ql7ZSU.js";
|
|
6
6
|
const p = {
|
|
7
7
|
parser: e,
|
|
8
8
|
db: o,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { H as R$n, X as K$n } from "./flowDb-d35e309a-
|
|
2
|
-
import { az as Don, aB as F$n, b3 as PG, l as Kl, h as OL, b0 as LG, t as _$n, o as y0t, q as k0t, r as CG, j as B$n } from "./index-
|
|
3
|
-
import { h as H$n, o as U$n, M as G$n, d as q$n, r as X$n, a as z$n } from "./edges-d417c7a0-
|
|
4
|
-
import { P as V$n } from "./line-
|
|
1
|
+
import { H as R$n, X as K$n } from "./flowDb-d35e309a-RvFFqjek-D-9nhzeX.js";
|
|
2
|
+
import { az as Don, aB as F$n, b3 as PG, l as Kl, h as OL, b0 as LG, t as _$n, o as y0t, q as k0t, r as CG, j as B$n } from "./index-DvRFVEGL.js";
|
|
3
|
+
import { h as H$n, o as U$n, M as G$n, d as q$n, r as X$n, a as z$n } from "./edges-d417c7a0-DEJA2PwU-BNRQat2t.js";
|
|
4
|
+
import { P as V$n } from "./line-BCVITS7s-Anu55pMJ.js";
|
|
5
5
|
var Fon = { exports: {} };
|
|
6
6
|
(function(ae, Ge) {
|
|
7
7
|
(function(We) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { av as Ne, aw as Ve, ax as Ge, ay as Ze, az as me, aA as R, aB as ye, c as wt, s as Cn, g as Dn, v as _n, x as Sn, b as Mn, a as $n, aC as An, z as Yn, m as Fn, l as Zt, h as Pt, i as Un, j as Ln, y as En, aD as Jt, aE as On } from "./index-
|
|
2
|
-
import { Z as In, X as Hn, O as Wn, _ as zn, w as Me } from "./linear-
|
|
1
|
+
import { av as Ne, aw as Ve, ax as Ge, ay as Ze, az as me, aA as R, aB as ye, c as wt, s as Cn, g as Dn, v as _n, x as Sn, b as Mn, a as $n, aC as An, z as Yn, m as Fn, l as Zt, h as Pt, i as Un, j as Ln, y as En, aD as Jt, aE as On } from "./index-DvRFVEGL.js";
|
|
2
|
+
import { Z as In, X as Hn, O as Wn, _ as zn, w as Me } from "./linear-CLHAbj67-BGejs378.js";
|
|
3
3
|
import { t as Pn } from "./init-DjUOC4st-C8Nwz6AJ.js";
|
|
4
4
|
function Bn(t, e) {
|
|
5
5
|
let n;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as I, s as Le, g as Me, a as ve, b as Ie, v as Ae, x as Ce, l as H, j as z, z as Oe, h as Se, y as Pe, at as Be, au as Ge } from "./index-
|
|
1
|
+
import { c as I, s as Le, g as Me, a as ve, b as Ie, v as Ae, x as Ce, l as H, j as z, z as Oe, h as Se, y as Pe, at as Be, au as Ge } from "./index-DvRFVEGL.js";
|
|
2
2
|
var he = function() {
|
|
3
3
|
var r = function(R, o, d, a) {
|
|
4
4
|
for (d = d || {}, a = R.length; a--; d[R[a]] = o)
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
const e = Object.freeze({ displayName: "Go", name: "go", patterns: [{ include: "#statements" }], repository: { after_control_variables: { captures: { 1: { patterns: [{ include: "#type-declarations-without-brackets" }, { match: "\\[", name: "punctuation.definition.begin.bracket.square.go" }, { match: "\\]", name: "punctuation.definition.end.bracket.square.go" }, { match: "(?:\\w+)", name: "variable.other.go" }] } }, comment: "After control variables, to not highlight as a struct/interface (before formatting with gofmt)", match: "(?:(?<=\\brange\\b|\\bswitch\\b|\\;|\\bif\\b|\\bfor\\b|\\<|\\>|\\<\\=|\\>\\=|\\=\\=|\\!\\=|\\w(?:\\+|/|\\-|\\*|\\%)|\\w(?:\\+|/|\\-|\\*|\\%)\\=|\\|\\||\\&\\&)(?:\\s*)((?![\\[\\]]+)[[:alnum:]\\-\\_\\!\\.\\[\\]\\<\\>\\=\\*/\\+\\%\\:]+)(?:\\s*)(?=\\{))" }, brackets: { patterns: [{ begin: "\\{", beginCaptures: { 0: { name: "punctuation.definition.begin.bracket.curly.go" } }, end: "\\}", endCaptures: { 0: { name: "punctuation.definition.end.bracket.curly.go" } }, patterns: [{ include: "$self" }] }, { begin: "\\(", beginCaptures: { 0: { name: "punctuation.definition.begin.bracket.round.go" } }, end: "\\)", endCaptures: { 0: { name: "punctuation.definition.end.bracket.round.go" } }, patterns: [{ include: "$self" }] }, { begin: "\\[", beginCaptures: { 0: { name: "punctuation.definition.begin.bracket.square.go" } }, end: "\\]", endCaptures: { 0: { name: "punctuation.definition.end.bracket.square.go" } }, patterns: [{ include: "$self" }] }] }, built_in_functions: { comment: "Built-in functions", patterns: [{ match: "\\b(append|cap|close|complex|copy|delete|imag|len|panic|print|println|real|recover|min|max|clear)\\b(?=\\()", name: "entity.name.function.support.builtin.go" }, { begin: "(?:(\\bnew\\b)(\\())", beginCaptures: { 1: { name: "entity.name.function.support.builtin.go" }, 2: { name: "punctuation.definition.begin.bracket.round.go" } }, comment: "new keyword", end: "\\)", endCaptures: { 0: { name: "punctuation.definition.end.bracket.round.go" } }, patterns: [{ include: "#functions" }, { include: "#struct_variables_types" }, { include: "#type-declarations" }, { include: "#generic_types" }, { match: "(?:\\w+)", name: "entity.name.type.go" }, { include: "$self" }] }, { captures: { 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: "\\w+", name: "entity.name.type.go" }] }, 4: { patterns: [{ include: "$self" }] }, 5: { name: "punctuation.definition.end.bracket.round.go" } }, comment: "make keyword", match: "(?:(\\bmake\\b)(?:(\\()((?:(?:(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+(?:\\([^\\)]+\\))?)?(?:[\\w\\.\\*\\[\\]\\{\\}]+)?(?:\\[(?:[^\\]]+)?\\])?(?:[\\w\\.\\*\\[\\]\\{\\}]+)?)?((?:\\,\\s*(?:[\\w\\.\\(\\)/\\+\\-\\<\\>\\&\\|\\%\\*]+)?)+)?(\\))))" }] }, comments: { patterns: [{ begin: "(\\/\\*)", beginCaptures: { 1: { name: "punctuation.definition.comment.go" } }, end: "(\\*\\/)", endCaptures: { 1: { name: "punctuation.definition.comment.go" } }, name: "comment.block.go" }, { begin: "(\\/\\/)", beginCaptures: { 1: { name: "punctuation.definition.comment.go" } }, end: "(?:\\n|$)", name: "comment.line.double-slash.go" }] }, delimiters: { patterns: [{ match: "\\,", name: "punctuation.other.comma.go" }, { match: "\\.(?!\\.\\.)", name: "punctuation.other.period.go" }, { match: ":(?!=)", name: "punctuation.other.colon.go" }] }, double_parentheses_types: { captures: { 1: { patterns: [{ include: "#type-declarations-without-brackets" }, { match: "\\(", name: "punctuation.definition.begin.bracket.round.go" }, { match: "\\)", name: "punctuation.definition.end.bracket.round.go" }, { match: "\\[", name: "punctuation.definition.begin.bracket.square.go" }, { match: "\\]", name: "punctuation.definition.end.bracket.square.go" }, { match: "\\w+", name: "entity.name.type.go" }] } }, comment: "double parentheses types", match: "(?:(?<!\\w)(\\((?:[\\w\\.\\[\\]\\*\\&]+)\\))(?=\\())" }, function_declaration: { begin: "(?:^(\\bfunc\\b)(?:\\s*(\\([^\\)]+\\)\\s*)?(?:(\\w+)(?=\\(|\\[))?))", beginCaptures: { 1: { name: "keyword.function.go" }, 2: { patterns: [{ begin: "\\(", beginCaptures: { 0: { name: "punctuation.definition.begin.bracket.round.go" } }, end: "\\)", 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: "(?:\\w+)", name: "entity.name.type.go" }] } }, match: "(?:(\\w+(?:\\s+))?((?:[\\w\\.\\*]+)(?:\\[(?:(?:(?:[\\w\\.\\*]+)(?:\\,\\s+)?)+)?\\])?))" }, { include: "$self" }] }] }, 3: { patterns: [{ match: "\\d\\w*", name: "invalid.illegal.identifier.go" }, { match: "\\w+", name: "entity.name.function.go" }] } }, comment: "Function declarations", end: "(?:(?<=\\))\\s*((?:(?:(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?(?!(?:[\\[\\]\\*]+)?(?:\\bstruct\\b|\\binterface\\b))[\\w\\.\\-\\*\\[\\]]+)?\\s*(?=\\{))", endCaptures: { 1: { patterns: [{ include: "#type-declarations-without-brackets" }, { include: "#parameter-variable-types" }, { match: "(?:\\w+)", name: "entity.name.type.go" }] } }, patterns: [{ begin: "\\(", beginCaptures: { 0: { name: "punctuation.definition.begin.bracket.round.go" } }, end: "\\)", endCaptures: { 0: { name: "punctuation.definition.end.bracket.round.go" } }, patterns: [{ include: "#function_param_types" }] }, { begin: "(?:([\\w\\.\\*]+)?(\\[))", beginCaptures: { 1: { patterns: [{ include: "#type-declarations" }, { match: "(?:\\w+)", name: "entity.name.type.go" }] }, 2: { name: "punctuation.definition.begin.bracket.square.go" } }, end: "\\]", 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: "\\w+", name: "entity.name.type.go" }] } }, comment: "single function as a type returned type(s) declaration", match: "(?:(?<=\\))(?:\\s*)((?:(?:\\s*(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?[\\w\\*\\.\\[\\]\\<\\>\\-]+(?:\\s*)(?:\\/(?:\\/|\\*).*)?)$)" }, { include: "$self" }] }, function_param_types: { comment: "function parameter variables and types", patterns: [{ include: "#struct_variables_types" }, { include: "#type-declarations-without-brackets" }, { captures: { 1: { patterns: [{ include: "#type-declarations" }, { match: "\\w+", name: "variable.parameter.go" }] } }, comment: "struct type declaration", match: "((?:(?:\\b\\w+\\,\\s*)+)?\\b\\w+)\\s+(?=(?:(?:\\s*(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?(?:[\\[\\]\\*]+)?\\bstruct\\b\\s*\\{)" }, { captures: { 1: { patterns: [{ include: "#type-declarations" }, { match: "\\w+", name: "variable.parameter.go" }] } }, comment: "multiple parameters one type -with multilines", match: "(?:(?:(?<=\\()|^\\s*)((?:(?:\\b\\w+\\,\\s*)+)(?:/(?:/|\\*).*)?)$)" }, { captures: { 1: { patterns: [{ include: "#delimiters" }, { match: "\\w+", name: "variable.parameter.go" }] }, 2: { patterns: [{ include: "#type-declarations-without-brackets" }, { include: "#parameter-variable-types" }, { match: "(?:\\w+)", name: "entity.name.type.go" }] } }, comment: "multiple params and types | multiple params one type | one param one type", match: "(?:((?:(?:\\b\\w+\\,\\s*)+)?\\b\\w+)(?:\\s+)((?:(?:\\s*(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?(?:(?:(?:[\\w\\[\\]\\.\\*]+)?(?:(?:\\bfunc\\b\\((?:[^\\)]+)?\\))(?:(?:\\s*(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?(?:\\s*))+(?:(?:(?:[\\w\\*\\.\\[\\]]+)|(?:\\((?:[^\\)]+)?\\))))?)|(?:(?:[\\[\\]\\*]+)?[\\w\\*\\.]+(?:\\[(?:[^\\]]+)\\])?(?:[\\w\\.\\*]+)?)+)))" }, { include: "#parameter-variable-types" }, { captures: { 1: { patterns: [{ include: "#type-declarations" }, { match: "(?:\\w+)", name: "entity.name.type.go" }] } }, comment: "other types", match: "([\\w\\.]+)" }, { include: "$self" }] }, functions: { begin: "(?:(\\bfunc\\b)(?=\\())", beginCaptures: { 1: { name: "keyword.function.go" } }, comment: "Functions", end: "(?:(?<=\\))(\\s*(?:(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?((?:(?:\\s*(?:(?:[\\[\\]\\*]+)?[\\w\\.\\*]+)?(?:(?:\\[(?:(?:[\\w\\.\\*]+)?(?:\\[(?:[^\\]]+)?\\])?(?:\\,\\s+)?)+\\])|(?:\\((?:[^\\)]+)?\\)))?(?:[\\w\\.\\*]+)?)(?:\\s*)(?=\\{))|(?:\\s*(?:(?:(?:[\\[\\]\\*]+)?(?!\\bfunc\\b)(?:[\\w\\.\\*]+)(?:\\[(?:(?:[\\w\\.\\*]+)?(?:\\[(?:[^\\]]+)?\\])?(?:\\,\\s+)?)+\\])?(?:[\\w\\.\\*]+)?)|(?:\\((?:[^\\)]+)?\\)))))?)", endCaptures: { 1: { patterns: [{ include: "#type-declarations" }] }, 2: { patterns: [{ include: "#type-declarations-without-brackets" }, { include: "#parameter-variable-types" }, { match: "(?:\\w+)", 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: "\\(", beginCaptures: { 0: { name: "punctuation.definition.begin.bracket.round.go" } }, end: "\\)", endCaptures: { 0: { name: "punctuation.definition.end.bracket.round.go" } }, patterns: [{ include: "#function_param_types" }, { include: "$self" }] }, { match: "\\[", name: "punctuation.definition.begin.bracket.square.go" }, { match: "\\]", name: "punctuation.definition.end.bracket.square.go" }, { match: "\\{", name: "punctuation.definition.begin.bracket.curly.go" }, { match: "\\}", name: "punctuation.definition.end.bracket.curly.go" }, { match: "(?:\\w+)", name: "entity.name.type.go" }] } }, comment: "functions in-line with multi return types", match: "(?:(\\bfunc\\b)((?:\\((?:[^/]*?)\\))(?:\\s+)(?:\\((?:[^/]*?)\\)))(?:\\s+)(?=\\{))" }, generic_param_types: { comment: "generic parameter variables and types", patterns: [{ include: "#type-declarations-without-brackets" }, { captures: { 1: { patterns: [{ include: "#type-declarations" }, { match: "\\w+", name: "variable.parameter.go" }] } }, comment: "multiple parameters one type -with multilines", match: "(?:(?:(?<=\\()|^\\s*)((?:(?:\\b\\w+\\,\\s*)+)(?:/(?:/|\\*).*)?)$)" }, { captures: { 1: { patterns: [{ include: "#delimiters" }, { match: "\\w+", name: "variable.parameter.go" }] }, 2: { patterns: [{ include: "#type-declarations-without-brackets" }, { include: "#parameter-variable-types" }, { match: "(?:\\w+)", name: "entity.name.type.go" }] }, 3: { patterns: [{ include: "#type-declarations" }, { match: "(?:\\w+)", name: "entity.name.type.go" }] } }, comment: "multiple params and types | multiple types one param", match: "(?:((?:(?:\\b\\w+\\,\\s*)+)?\\b\\w+)(?:\\s+)((?:(?:\\s*(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?(?:(?:(?:[\\w\\[\\]\\.\\*]+)?(?:(?:\\bfunc\\b\\((?:[^\\)]+)?\\))(?:(?:\\s*(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?(?:\\s*))+(?:(?:(?:[\\w\\*\\.]+)|(?:\\((?:[^\\)]+)?\\))))?)|(?:(?:(?:[\\w\\*\\.\\~]+)|(?:\\[(?:(?:[\\w\\.\\*]+)?(?:\\[(?:[^\\]]+)?\\])?(?:\\,\\s+)?)+\\]))(?:[\\w\\.\\*]+)?)+)))" }, { include: "#parameter-variable-types" }, { captures: { 1: { patterns: [{ include: "#type-declarations" }, { match: "(?:\\w+)", name: "entity.name.type.go" }] } }, comment: "other types", match: "(?:\\b([\\w\\.]+))" }, { include: "$self" }] }, generic_types: { captures: { 1: { patterns: [{ include: "#type-declarations" }, { match: "\\w+", name: "entity.name.type.go" }] }, 2: { patterns: [{ include: "#parameter-variable-types" }] } }, comment: "Generic support for all types", match: "(?:([\\w\\.\\*]+)(\\[(?:[^\\]]+)?\\]))" }, "group-functions": { comment: "all statements related to functions", patterns: [{ include: "#function_declaration" }, { include: "#functions_inline" }, { include: "#functions" }, { include: "#built_in_functions" }, { include: "#support_functions" }] }, "group-types": { comment: "all statements related to 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": { comment: "all statements related to variables", patterns: [{ include: "#var_const_assignment" }, { include: "#variable_assignment" }, { include: "#label_loop_variables" }, { include: "#slice_index_variables" }, { include: "#property_variables" }, { include: "#switch_select_case_variables" }, { include: "#other_variables" }] }, import: { comment: "import", patterns: [{ begin: "\\b(import)\\s+", beginCaptures: { 1: { name: "keyword.control.import.go" } }, comment: "import", end: "(?!\\G)", patterns: [{ include: "#imports" }] }] }, imports: { comment: "import package(s)", patterns: [{ captures: { 1: { patterns: [{ include: "#delimiters" }, { match: "(?:\\w+)", 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: '(\\s*[\\w\\.]+)?\\s*((")([^"]*)("))' }, { begin: "\\(", beginCaptures: { 0: { name: "punctuation.definition.imports.begin.bracket.round.go" } }, end: "\\)", endCaptures: { 0: { name: "punctuation.definition.imports.end.bracket.round.go" } }, patterns: [{ include: "#comments" }, { include: "#imports" }] }, { include: "$self" }] }, interface_variables_types: { patterns: [{ begin: "(\\binterface\\b)\\s*(\\{)", beginCaptures: { 1: { name: "keyword.interface.go" }, 2: { name: "punctuation.definition.begin.bracket.curly.go" } }, comment: "interface variable types", end: "\\}", endCaptures: { 0: { name: "punctuation.definition.end.bracket.curly.go" } }, patterns: [{ include: "#support_functions" }, { include: "#type-declarations-without-brackets" }, { begin: "(?:([\\w\\.\\*]+)?(\\[))", beginCaptures: { 1: { patterns: [{ include: "#type-declarations" }, { match: "(?:\\w+)", name: "entity.name.type.go" }] }, 2: { name: "punctuation.definition.begin.bracket.square.go" } }, end: "\\]", endCaptures: { 0: { name: "punctuation.definition.end.bracket.square.go" } }, patterns: [{ include: "#generic_param_types" }] }, { begin: "\\(", beginCaptures: { 0: { name: "punctuation.definition.begin.bracket.round.go" } }, end: "\\)", endCaptures: { 0: { name: "punctuation.definition.end.bracket.round.go" } }, patterns: [{ include: "#function_param_types" }] }, { captures: { 1: { patterns: [{ include: "#type-declarations" }, { match: "\\w+", name: "entity.name.type.go" }] } }, comment: "other types", match: "([\\w\\.]+)" }, { include: "$self" }] }] }, keywords: { patterns: [{ comment: "Flow control keywords", match: "\\b(break|case|continue|default|defer|else|fallthrough|for|go|goto|if|range|return|select|switch)\\b", name: "keyword.control.go" }, { match: "\\bchan\\b", name: "keyword.channel.go" }, { match: "\\bconst\\b", name: "keyword.const.go" }, { match: "\\bvar\\b", name: "keyword.var.go" }, { match: "\\bfunc\\b", name: "keyword.function.go" }, { match: "\\binterface\\b", name: "keyword.interface.go" }, { match: "\\bmap\\b", name: "keyword.map.go" }, { match: "\\bstruct\\b", name: "keyword.struct.go" }, { match: "\\bimport\\b", name: "keyword.control.import.go" }, { match: "\\btype\\b", name: "keyword.type.go" }] }, label_loop_variables: { captures: { 1: { patterns: [{ include: "#type-declarations" }, { match: "\\w+", name: "variable.other.label.go" }] } }, comment: "labeled loop variable name", match: "((?:^\\s*\\w+:\\s*$)|(?:^\\s*(?:\\bbreak\\b|\\bgoto\\b|\\bcontinue\\b)\\s+\\w+(?:\\s*/(?:/|\\*)\\s*.*)?$))" }, language_constants: { comment: "Language constants", match: "\\b(true|false|nil|iota)\\b", name: "constant.language.go" }, map_types: { begin: "(?:(\\bmap\\b)(\\[))", beginCaptures: { 1: { name: "keyword.map.go" }, 2: { name: "punctuation.definition.begin.bracket.square.go" } }, comment: "map types", end: "(?:(\\])((?:(?:(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?(?!(?:[\\[\\]\\*]+)?\\b(?:func|struct|map)\\b)[\\w\\.\\[\\]\\*]+)?)", endCaptures: { 1: { name: "punctuation.definition.end.bracket.square.go" }, 2: { patterns: [{ include: "#type-declarations-without-brackets" }, { match: "\\[", name: "punctuation.definition.begin.bracket.square.go" }, { match: "\\]", name: "punctuation.definition.end.bracket.square.go" }, { match: "\\w+", name: "entity.name.type.go" }] } }, patterns: [{ include: "#type-declarations-without-brackets" }, { include: "#generic_types" }, { include: "#functions" }, { match: "\\[", name: "punctuation.definition.begin.bracket.square.go" }, { match: "\\]", name: "punctuation.definition.end.bracket.square.go" }, { match: "\\{", name: "punctuation.definition.begin.bracket.curly.go" }, { match: "\\}", name: "punctuation.definition.end.bracket.curly.go" }, { match: "\\(", name: "punctuation.definition.begin.bracket.round.go" }, { match: "\\)", name: "punctuation.definition.end.bracket.round.go" }, { match: "\\w+", name: "entity.name.type.go" }] }, multi_types: { begin: "(\\btype\\b)\\s*(\\()", beginCaptures: { 1: { name: "keyword.type.go" }, 2: { name: "punctuation.definition.begin.bracket.round.go" } }, comment: "multi type declaration", end: "\\)", endCaptures: { 0: { name: "punctuation.definition.end.bracket.round.go" } }, patterns: [{ include: "#struct_variables_types" }, { include: "#type-declarations-without-brackets" }, { include: "#parameter-variable-types" }, { match: "(?:\\w+)", name: "entity.name.type.go" }] }, numeric_literals: { captures: { 0: { patterns: [{ begin: "(?=.)", end: "(?:\\n|$)", patterns: [{ captures: { 1: { name: "constant.numeric.decimal.go", patterns: [{ match: "(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])", 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: "(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])", 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: "(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])", name: "punctuation.separator.constant.numeric.go" }] }, 10: { name: "keyword.other.unit.imaginary.go" }, 11: { name: "constant.numeric.decimal.go", patterns: [{ match: "(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])", 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: "(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])", 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: "(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])", 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: "(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])", 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: "(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])", 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: "(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])", 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: "(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])", 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: "(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])", 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: "(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])", 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: "(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])", 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: "(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])", name: "punctuation.separator.constant.numeric.go" }] }, 53: { name: "keyword.other.unit.imaginary.go" } }, match: "(?:(?:(?:(?:(?:\\G(?=[0-9.])(?!0[xXbBoO])([0-9](?:[0-9]|((?<=[0-9a-fA-F])_(?=[0-9a-fA-F])))*)((?:(?<=[0-9])\\.|\\.(?=[0-9])))([0-9](?:[0-9]|((?<=[0-9a-fA-F])_(?=[0-9a-fA-F])))*)?(?:(?<!_)([eE])(\\+?)(\\-?)((?:[0-9](?:[0-9]|(?:(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])))*)))?(i(?!\\w))?(?:\\n|$)|\\G(?=[0-9.])(?!0[xXbBoO])([0-9](?:[0-9]|((?<=[0-9a-fA-F])_(?=[0-9a-fA-F])))*)(?<!_)([eE])(\\+?)(\\-?)((?:[0-9](?:[0-9]|(?:(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])))*))(i(?!\\w))?(?:\\n|$))|\\G((?:(?<=[0-9])\\.|\\.(?=[0-9])))([0-9](?:[0-9]|((?<=[0-9a-fA-F])_(?=[0-9a-fA-F])))*)(?:(?<!_)([eE])(\\+?)(\\-?)((?:[0-9](?:[0-9]|(?:(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])))*)))?(i(?!\\w))?(?:\\n|$))|(\\G0[xX])_?([0-9a-fA-F](?:[0-9a-fA-F]|((?<=[0-9a-fA-F])_(?=[0-9a-fA-F])))*)((?:(?<=[0-9a-fA-F])\\.|\\.(?=[0-9a-fA-F])))([0-9a-fA-F](?:[0-9a-fA-F]|((?<=[0-9a-fA-F])_(?=[0-9a-fA-F])))*)?(?<!_)([pP])(\\+?)(\\-?)((?:[0-9](?:[0-9]|(?:(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])))*))(i(?!\\w))?(?:\\n|$))|(\\G0[xX])_?([0-9a-fA-F](?:[0-9a-fA-F]|((?<=[0-9a-fA-F])_(?=[0-9a-fA-F])))*)(?<!_)([pP])(\\+?)(\\-?)((?:[0-9](?:[0-9]|(?:(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])))*))(i(?!\\w))?(?:\\n|$))|(\\G0[xX])((?:(?<=[0-9a-fA-F])\\.|\\.(?=[0-9a-fA-F])))([0-9a-fA-F](?:[0-9a-fA-F]|((?<=[0-9a-fA-F])_(?=[0-9a-fA-F])))*)(?<!_)([pP])(\\+?)(\\-?)((?:[0-9](?:[0-9]|(?:(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])))*))(i(?!\\w))?(?:\\n|$))" }, { captures: { 1: { name: "constant.numeric.decimal.go", patterns: [{ match: "(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])", 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: "(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])", 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: "(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])", 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: "(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])", name: "punctuation.separator.constant.numeric.go" }] }, 14: { name: "punctuation.separator.constant.numeric.go" }, 15: { name: "keyword.other.unit.imaginary.go" } }, match: "(?:(?:(?:\\G(?=[0-9.])(?!0[xXbBoO])([0-9](?:[0-9]|((?<=[0-9a-fA-F])_(?=[0-9a-fA-F])))*)(i(?!\\w))?(?:\\n|$)|(\\G0[bB])_?([01](?:[01]|((?<=[0-9a-fA-F])_(?=[0-9a-fA-F])))*)(i(?!\\w))?(?:\\n|$))|(\\G0[oO]?)_?((?:[0-7]|((?<=[0-9a-fA-F])_(?=[0-9a-fA-F])))+)(i(?!\\w))?(?:\\n|$))|(\\G0[xX])_?([0-9a-fA-F](?:[0-9a-fA-F]|((?<=[0-9a-fA-F])_(?=[0-9a-fA-F])))*)(i(?!\\w))?(?:\\n|$))" }, { match: "(?:(?:[0-9a-zA-Z_\\.])|(?<=[eEpP])[+-])+", name: "invalid.illegal.constant.numeric.go" }] }] } }, match: "(?<!\\w)\\.?\\d(?:(?:[0-9a-zA-Z_\\.])|(?<=[eEpP])[+-])*" }, operators: { comment: "Note that the order here is very important!", patterns: [{ match: "((?:\\*|\\&)+)(?:(?!\\d)(?=(?:[\\w\\[\\]])|(?:\\<\\-)))", name: "keyword.operator.address.go" }, { match: "<\\-", name: "keyword.operator.channel.go" }, { match: "\\-\\-", name: "keyword.operator.decrement.go" }, { match: "\\+\\+", name: "keyword.operator.increment.go" }, { match: "(==|!=|<=|>=|<(?!<)|>(?!>))", name: "keyword.operator.comparison.go" }, { match: "(&&|\\|\\||!)", name: "keyword.operator.logical.go" }, { match: "(=|\\+=|\\-=|\\|=|\\^=|\\*=|/=|:=|%=|<<=|>>=|&\\^=|&=)", name: "keyword.operator.assignment.go" }, { match: "(\\+|\\-|\\*|/|%)", name: "keyword.operator.arithmetic.go" }, { match: "(&(?!\\^)|\\||\\^|&\\^|<<|>>|\\~)", name: "keyword.operator.arithmetic.bitwise.go" }, { match: "\\.\\.\\.", name: "keyword.operator.ellipsis.go" }] }, other_struct_interface_expressions: { comment: "struct and interface expression in-line (before curly bracket)", patterns: [{ comment: "after control variables must be added exactly here, do not move it! (changing may not affect tests, so be careful!)", include: "#after_control_variables" }, { captures: { 1: { patterns: [{ include: "#type-declarations" }, { match: "\\w+", name: "entity.name.type.go" }] }, 2: { patterns: [{ begin: "\\[", beginCaptures: { 0: { name: "punctuation.definition.begin.bracket.square.go" } }, end: "\\]", endCaptures: { 0: { name: "punctuation.definition.end.bracket.square.go" } }, patterns: [{ include: "#type-declarations" }, { match: "\\w+", name: "entity.name.type.go" }, { include: "$self" }] }] } }, match: "(\\b[\\w\\.]+)(\\[(?:[^\\]]+)?\\])?(?=\\{)(?<!\\bstruct\\b|\\binterface\\b)" }] }, other_variables: { comment: "all other variables", match: "\\w+", name: "variable.other.go" }, package_name: { patterns: [{ begin: "\\b(package)\\s+", beginCaptures: { 1: { name: "keyword.package.go" } }, comment: "package name", end: "(?!\\G)", patterns: [{ match: "\\d\\w*", name: "invalid.illegal.identifier.go" }, { match: "\\w+", name: "entity.name.type.package.go" }] }] }, "parameter-variable-types": { comment: "function and generic parameter types", patterns: [{ match: "\\{", name: "punctuation.definition.begin.bracket.curly.go" }, { match: "\\}", name: "punctuation.definition.end.bracket.curly.go" }, { begin: "(?:([\\w\\.\\*]+)?(\\[))", beginCaptures: { 1: { patterns: [{ include: "#type-declarations" }, { match: "(?:\\w+)", name: "entity.name.type.go" }] }, 2: { name: "punctuation.definition.begin.bracket.square.go" } }, end: "\\]", endCaptures: { 0: { name: "punctuation.definition.end.bracket.square.go" } }, patterns: [{ include: "#generic_param_types" }] }, { begin: "\\(", beginCaptures: { 0: { name: "punctuation.definition.begin.bracket.round.go" } }, end: "\\)", endCaptures: { 0: { name: "punctuation.definition.end.bracket.round.go" } }, patterns: [{ include: "#function_param_types" }] }] }, property_variables: { captures: { 1: { patterns: [{ include: "#type-declarations" }, { match: "\\w+", name: "variable.other.property.go" }] }, 2: { patterns: [{ include: "#type-declarations" }, { match: "\\w+", name: "variable.other.go" }, { include: "$self" }] }, 3: { patterns: [{ include: "#type-declarations" }, { match: "\\w+", name: "variable.other.property.field.go" }, { include: "$self" }] }, 4: { patterns: [{ captures: { 1: { patterns: [{ include: "#type-declarations" }, { match: "\\w+", name: "variable.other.go" }] }, 2: { patterns: [{ include: "#type-declarations" }, { match: "\\w+", name: "variable.other.property.field.go" }] } }, match: "([\\w\\.\\*\\&\\[\\]]+)(\\.\\w+)" }, { include: "$self" }] } }, comment: "Property variables in struct | parameter field in struct initialization", match: "(?:(?:((?:\\b[\\w\\.]+)(?:\\:(?!\\=))))(?:(?:\\s*([\\w\\.\\*\\&\\[\\]]+)(\\.\\w+)(?![\\w\\.\\*\\&\\[\\]]*(?:\\{|\\()))((?:\\s*(?:\\<|\\>|\\<\\=|\\>\\=|\\=\\=|\\!\\=|\\|\\||\\&\\&|\\+|/|\\-|\\*|\\%|\\||\\&)\\s*(?:[\\w\\.\\*\\&\\[\\]]+)(?:\\.\\w+)(?![\\w\\.\\*\\&\\[\\]]*(?:\\{|\\()))*))?)" }, raw_string_literals: { begin: "`", beginCaptures: { 0: { name: "punctuation.definition.string.begin.go" } }, comment: "Raw string literals", end: "`", endCaptures: { 0: { name: "punctuation.definition.string.end.go" } }, name: "string.quoted.raw.go", patterns: [{ include: "#string_placeholder" }] }, runes: { patterns: [{ begin: "'", beginCaptures: { 0: { name: "punctuation.definition.string.begin.go" } }, end: "'", endCaptures: { 0: { name: "punctuation.definition.string.end.go" } }, name: "string.quoted.rune.go", patterns: [{ match: `\\G(\\\\([0-7]{3}|[abfnrtv\\\\'"]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})|.)(?=')`, name: "constant.other.rune.go" }, { match: "[^']+", name: "invalid.illegal.unknown-rune.go" }] }] }, single_type: { patterns: [{ captures: { 1: { name: "keyword.type.go" }, 2: { patterns: [{ include: "#type-declarations" }, { match: "\\w+", name: "entity.name.type.go" }] }, 3: { patterns: [{ begin: "\\(", beginCaptures: { 0: { name: "punctuation.definition.begin.bracket.round.go" } }, end: "\\)", endCaptures: { 0: { name: "punctuation.definition.end.bracket.round.go" } }, patterns: [{ include: "#function_param_types" }, { include: "$self" }] }, { include: "#type-declarations" }, { include: "#generic_types" }, { match: "\\w+", name: "entity.name.type.go" }] } }, comment: "single type declaration", match: "(?:(?:^\\s*)(\\btype\\b)(?:\\s*)([\\w\\.\\*]+)(?:\\s+)(?!(?:[\\[\\]\\*]+)?\\b(?:struct|interface)\\b)([\\s\\S]+))" }, { begin: "(?:(?:^|\\s+)(\\btype\\b)(?:\\s*)([\\w\\.\\*]+)(?=\\[))", beginCaptures: { 1: { name: "keyword.type.go" }, 2: { patterns: [{ include: "#type-declarations-without-brackets" }, { match: "\\w+", name: "entity.name.type.go" }] } }, comment: "single type declaration with generics", end: "(?:(?<=\\])((?:\\s+)(?:(?:(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?(?:(?!(?:[\\[\\]\\*]+)?(?:\\bstruct\\b|\\binterface\\b|\\bfunc\\b))[\\w\\.\\-\\*\\[\\]]+))?)", endCaptures: { 1: { patterns: [{ include: "#type-declarations-without-brackets" }, { match: "\\[", name: "punctuation.definition.begin.bracket.square.go" }, { match: "\\]", name: "punctuation.definition.end.bracket.square.go" }, { match: "\\w+", name: "entity.name.type.go" }] } }, patterns: [{ include: "#struct_variables_types" }, { include: "#type-declarations-without-brackets" }, { include: "#parameter-variable-types" }, { match: "\\[", name: "punctuation.definition.begin.bracket.square.go" }, { match: "\\]", name: "punctuation.definition.end.bracket.square.go" }, { match: "\\{", name: "punctuation.definition.begin.bracket.curly.go" }, { match: "\\}", name: "punctuation.definition.end.bracket.curly.go" }, { match: "\\(", name: "punctuation.definition.begin.bracket.round.go" }, { match: "\\)", name: "punctuation.definition.end.bracket.round.go" }, { match: "\\w+", name: "entity.name.type.go" }] }] }, slice_index_variables: { captures: { 1: { patterns: [{ include: "#type-declarations" }, { match: "\\w+", name: "variable.other.go" }] } }, comment: "slice index and capacity variables, to not scope them as property variables", match: "(?<=\\w\\[)((?:(?:\\b[\\w\\.\\*\\+/\\-\\*\\%\\<\\>\\|\\&]+\\:)|(?:\\:\\b[\\w\\.\\*\\+/\\-\\*\\%\\<\\>\\|\\&]+))(?:\\b[\\w\\.\\*\\+/\\-\\*\\%\\<\\>\\|\\&]+)?(?:\\:\\b[\\w\\.\\*\\+/\\-\\*\\%\\<\\>\\|\\&]+)?)(?=\\])" }, statements: { patterns: [{ include: "#package_name" }, { include: "#import" }, { include: "#syntax_errors" }, { include: "#group-functions" }, { include: "#group-types" }, { include: "#group-variables" }] }, storage_types: { patterns: [{ match: "\\bbool\\b", name: "storage.type.boolean.go" }, { match: "\\bbyte\\b", name: "storage.type.byte.go" }, { match: "\\berror\\b", name: "storage.type.error.go" }, { match: "\\b(complex(64|128)|float(32|64)|u?int(8|16|32|64)?)\\b", name: "storage.type.numeric.go" }, { match: "\\brune\\b", name: "storage.type.rune.go" }, { match: "\\bstring\\b", name: "storage.type.string.go" }, { match: "\\buintptr\\b", name: "storage.type.uintptr.go" }, { match: "\\bany\\b", name: "entity.name.type.any.go" }] }, string_escaped_char: { patterns: [{ match: `\\\\([0-7]{3}|[abfnrtv\\\\'"]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})`, name: "constant.character.escape.go" }, { match: `\\\\[^0-7xuUabfnrtv\\'"]`, name: "invalid.illegal.unknown-escape.go" }] }, string_literals: { patterns: [{ begin: '"', beginCaptures: { 0: { name: "punctuation.definition.string.begin.go" } }, comment: "Interpreted string literals", end: '"', 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: "%(\\[\\d+\\])?([\\+#\\-0\\x20]{,2}((\\d+|\\*)?(\\.?(\\d+|\\*|(\\[\\d+\\])\\*?)?(\\[\\d+\\])?)?))?[vT%tbcdoqxXUbeEfFgGspw]", name: "constant.other.placeholder.go" }] }, struct_interface_declaration: { captures: { 1: { name: "keyword.type.go" }, 2: { patterns: [{ include: "#type-declarations" }, { match: "\\w+", name: "entity.name.type.go" }] } }, comment: "struct, interface type declarations (related to: struct_variables_types, interface_variables_types)", match: "(?:(?:^\\s*)(\\btype\\b)(?:\\s*)([\\w\\.]+))" }, struct_variable_types_fields_multi: { patterns: [{ begin: "(?:(\\w+(?:\\,\\s*\\w+)*)(?:\\s+)(?:(?:[\\[\\]\\*])+)?(\\bstruct\\b)(?:\\s*)(\\{))", beginCaptures: { 1: { patterns: [{ include: "#type-declarations" }, { match: "\\w+", name: "variable.other.property.go" }] }, 2: { name: "keyword.struct.go" }, 3: { name: "punctuation.definition.begin.bracket.curly.go" } }, comment: "Struct variable for struct in struct types", end: "\\}", endCaptures: { 0: { name: "punctuation.definition.end.bracket.curly.go" } }, patterns: [{ include: "#struct_variables_types_fields" }, { include: "$self" }] }] }, struct_variables_types: { patterns: [{ begin: "(\\bstruct\\b)\\s*(\\{)", beginCaptures: { 1: { name: "keyword.struct.go" }, 2: { name: "punctuation.definition.begin.bracket.curly.go" } }, comment: "Struct variable type", end: "\\}", endCaptures: { 0: { name: "punctuation.definition.end.bracket.curly.go" } }, patterns: [{ include: "#struct_variables_types_fields" }, { include: "$self" }] }] }, struct_variables_types_fields: { comment: "Struct variable type fields", patterns: [{ include: "#struct_variable_types_fields_multi" }, { captures: { 1: { patterns: [{ include: "#type-declarations" }, { match: "(?:\\w+)", name: "entity.name.type.go" }] } }, comment: "one line - single type", match: "(?:(?<=\\{)\\s*((?:(?:\\s*(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?(?:[\\w\\.\\*\\[\\]]+))\\s*(?=\\}))" }, { captures: { 1: { patterns: [{ include: "#type-declarations" }, { match: "(?:\\w+)", name: "variable.other.property.go" }] }, 2: { patterns: [{ include: "#type-declarations" }, { match: "(?:\\w+)", name: "entity.name.type.go" }] } }, comment: "one line - property variables and types", match: "(?:(?<=\\{)\\s*((?:(?:\\w+\\,\\s*)+)?(?:\\w+\\s+))((?:(?:\\s*(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?(?:[\\w\\.\\*\\[\\]]+))\\s*(?=\\}))" }, { captures: { 1: { patterns: [{ captures: { 1: { patterns: [{ include: "#type-declarations" }, { match: "(?:\\w+)", name: "variable.other.property.go" }] }, 2: { patterns: [{ include: "#type-declarations" }, { match: "(?:\\w+)", name: "entity.name.type.go" }] } }, match: "(?:((?:(?:\\w+\\,\\s*)+)?(?:\\w+\\s+))?((?:(?:\\s*(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?(?:[\\w\\.\\*\\[\\]]+)(?:\\;)?))" }] } }, comment: "one line with semicolon(;) without formatting gofmt - single type | property variables and types", match: "(?:(?<=\\{)((?:\\s*(?:(?:(?:\\w+\\,\\s*)+)?(?:\\w+\\s+))?(?:(?:(?:\\s*(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?(?:[\\w\\.\\*\\[\\]\\(\\)\\{\\}]+)(?:\\;)?))+)\\s*(?=\\}))" }, { captures: { 1: { patterns: [{ include: "#type-declarations" }, { match: "(?:\\w+)", name: "entity.name.type.go" }] } }, comment: "one type only", match: '(?:((?:(?:\\s*(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?(?<!\\,\\s*)(?:[\\w\\.\\*]+)\\s*(?:(?:(?:".*")|(?:\\`.*\\`))\\s*)?(?:/(?:/|\\*).*)?)$)' }, { captures: { 1: { patterns: [{ include: "#type-declarations" }, { match: "(?:\\w+)", name: "variable.other.property.go" }] }, 2: { patterns: [{ include: "#type-declarations-without-brackets" }, { include: "#parameter-variable-types" }, { match: "(?:\\w+)", name: "entity.name.type.go" }] } }, comment: "property variables and types", match: "(?:((?:(?:\\w+\\,\\s*)+)?(?:\\w+\\s+))([\\s\\S]+))" }] }, support_functions: { captures: { 1: { name: "entity.name.function.support.go" }, 2: { patterns: [{ include: "#type-declarations" }, { match: "\\d\\w*", name: "invalid.illegal.identifier.go" }, { match: "\\w+", name: "entity.name.function.support.go" }] }, 3: { patterns: [{ include: "#type-declarations-without-brackets" }, { match: "\\[", name: "punctuation.definition.begin.bracket.square.go" }, { match: "\\]", name: "punctuation.definition.end.bracket.square.go" }, { match: "\\{", name: "punctuation.definition.begin.bracket.curly.go" }, { match: "\\}", name: "punctuation.definition.end.bracket.curly.go" }, { match: "\\w+", name: "entity.name.type.go" }] } }, comment: "Support Functions", match: `(?:(?:((?<=\\.)\\b\\w+)|(\\b\\w+))(\\[(?:(?:[\\w\\.\\*\\[\\]\\{\\}"\\']+)(?:(?:\\,\\s*(?:[\\w\\.\\*\\[\\]\\{\\}]+))*))?\\])?(?=\\())` }, switch_select_case_variables: { captures: { 1: { name: "keyword.control.go" }, 2: { patterns: [{ include: "#type-declarations" }, { include: "#support_functions" }, { include: "#variable_assignment" }, { match: "\\w+", name: "variable.other.go" }] } }, comment: "variables after case control keyword in switch/select expression, to not scope them as property variables", match: "(?:(?:^\\s*(\\bcase\\b))(?:\\s+)([\\s\\S]+(?:\\:)\\s*(?:/(?:/|\\*).*)?)$)" }, switch_types: { begin: "(?<=\\bswitch\\b)(?:\\s*)(?:(\\w+\\s*\\:\\=)?\\s*([\\w\\.\\*\\(\\)\\[\\]]+))(\\.\\(\\btype\\b\\)\\s*)(\\{)", beginCaptures: { 1: { patterns: [{ include: "#operators" }, { match: "\\w+", name: "variable.other.assignment.go" }] }, 2: { patterns: [{ include: "#support_functions" }, { include: "#type-declarations" }, { match: "\\w+", name: "variable.other.go" }] }, 3: { patterns: [{ include: "#delimiters" }, { include: "#brackets" }, { match: "\\btype\\b", name: "keyword.type.go" }] }, 4: { name: "punctuation.definition.begin.bracket.curly.go" } }, comment: "switch type assertions, only highlights types after case keyword", end: "(?:\\})", endCaptures: { 0: { name: "punctuation.definition.end.bracket.curly.go" } }, patterns: [{ captures: { 1: { name: "keyword.control.go" }, 2: { patterns: [{ include: "#type-declarations" }, { match: "\\w+", name: "entity.name.type.go" }] }, 3: { name: "punctuation.other.colon.go" }, 4: { patterns: [{ include: "#comments" }] } }, comment: "types after case keyword with single line", match: "(?:^\\s*(\\bcase\\b))(?:\\s+)([\\w\\.\\,\\*\\=\\<\\>\\!\\s]+)(:)(\\s*/(?:/|\\*)\\s*.*)?$" }, { begin: "\\bcase\\b", beginCaptures: { 0: { name: "keyword.control.go" } }, comment: "types after case keyword with multi lines", end: "\\:", endCaptures: { 0: { name: "punctuation.other.colon.go" } }, patterns: [{ include: "#type-declarations" }, { match: "\\w+", name: "entity.name.type.go" }] }, { include: "$self" }] }, syntax_errors: { patterns: [{ captures: { 1: { name: "invalid.illegal.slice.go" } }, comment: "Syntax error using slices", match: "\\[\\](\\s+)" }, { comment: "Syntax error numeric literals", match: "\\b0[0-7]*[89]\\d*\\b", name: "invalid.illegal.numeric.go" }] }, terminators: { comment: "Terminators", match: ";", name: "punctuation.terminator.go" }, "type-declarations": { comment: "includes all 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": { comment: "includes all type declarations without brackets (in some cases, brackets need to be captured manually)", 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: "(?:\\w+)", name: "entity.name.type.go" }] } }, comment: "struct/interface types in-line (type assertion) | switch type keyword", match: "(?:(?<=\\.\\()(?:(\\btype\\b)|((?:(?:\\s*(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?[\\w\\.\\[\\]\\*]+))(?=\\)))" }, var_const_assignment: { comment: "variable assignment with var and const keyword", patterns: [{ captures: { 1: { patterns: [{ include: "#delimiters" }, { match: "\\w+", name: "variable.other.assignment.go" }] }, 2: { patterns: [{ include: "#type-declarations-without-brackets" }, { include: "#generic_types" }, { match: "\\(", name: "punctuation.definition.begin.bracket.round.go" }, { match: "\\)", name: "punctuation.definition.end.bracket.round.go" }, { match: "\\[", name: "punctuation.definition.begin.bracket.square.go" }, { match: "\\]", name: "punctuation.definition.end.bracket.square.go" }, { match: "\\w+", name: "entity.name.type.go" }] } }, comment: "var and const with single type assignment", match: "(?:(?<=\\bvar\\b|\\bconst\\b)(?:\\s*)(\\b[\\w\\.]+(?:\\,\\s*[\\w\\.]+)*)(?:\\s*)((?:(?:(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+(?:\\([^\\)]+\\))?)?(?!(?:[\\[\\]\\*]+)?\\b(?:struct|func|map)\\b)(?:[\\w\\.\\[\\]\\*]+(?:\\,\\s*[\\w\\.\\[\\]\\*]+)*)?(?:\\s*)(?:\\=)?)?)" }, { begin: "(?:(?<=\\bvar\\b|\\bconst\\b)(?:\\s*)(\\())", beginCaptures: { 1: { name: "punctuation.definition.begin.bracket.round.go" } }, comment: "var and const with multi type assignment", end: "\\)", endCaptures: { 0: { name: "punctuation.definition.end.bracket.round.go" } }, patterns: [{ captures: { 1: { patterns: [{ include: "#delimiters" }, { match: "\\w+", name: "variable.other.assignment.go" }] }, 2: { patterns: [{ include: "#type-declarations-without-brackets" }, { include: "#generic_types" }, { match: "\\(", name: "punctuation.definition.begin.bracket.round.go" }, { match: "\\)", name: "punctuation.definition.end.bracket.round.go" }, { match: "\\[", name: "punctuation.definition.begin.bracket.square.go" }, { match: "\\]", name: "punctuation.definition.end.bracket.square.go" }, { match: "\\w+", name: "entity.name.type.go" }] } }, match: "(?:(?:^\\s*)(\\b[\\w\\.]+(?:\\,\\s*[\\w\\.]+)*)(?:\\s*)((?:(?:(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+(?:\\([^\\)]+\\))?)?(?!(?:[\\[\\]\\*]+)?\\b(?:struct|func|map)\\b)(?:[\\w\\.\\[\\]\\*]+(?:\\,\\s*[\\w\\.\\[\\]\\*]+)*)?(?:\\s*)(?:\\=)?)?)" }, { include: "$self" }] }] }, variable_assignment: { comment: "variable assignment", patterns: [{ captures: { 0: { patterns: [{ include: "#delimiters" }, { match: "\\d\\w*", name: "invalid.illegal.identifier.go" }, { match: "\\w+", name: "variable.other.assignment.go" }] } }, comment: "variable assignment with :=", match: "\\b\\w+(?:\\,\\s*\\w+)*(?=\\s*:=)" }, { captures: { 0: { patterns: [{ include: "#delimiters" }, { include: "#operators" }, { match: "\\d\\w*", name: "invalid.illegal.identifier.go" }, { match: "\\w+", name: "variable.other.assignment.go" }] } }, comment: "variable assignment with =", match: "\\b[\\w\\.\\*]+(?:\\,\\s*[\\w\\.\\*]+)*(?=\\s*=(?!=))" }] } }, scopeName: "source.go" });
|
|
2
|
+
var t = [
|
|
3
|
+
e
|
|
4
|
+
];
|
|
5
|
+
export {
|
|
6
|
+
t as default
|
|
7
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as w, A as U, B as z, C as Yt, D as Ht, E as Zt, M as qt, F as p, G as jt, H as mt, I as M, J as et, K as wt, L as Jt, N as Qt, O as nt, P as S, Q as Wt, R as D, T as Ot, U as Xt, V as tr, W as rr, X as N, Y as V, Z as er, _ as nr, $ as ir, a0 as or, a1 as ur, a2 as k, a3 as H, a4 as sr, a5 as At, a6 as Ct, a7 as ar, a8 as it, a9 as cr } from "./index-
|
|
1
|
+
import { S as w, A as U, B as z, C as Yt, D as Ht, E as Zt, M as qt, F as p, G as jt, H as mt, I as M, J as et, K as wt, L as Jt, N as Qt, O as nt, P as S, Q as Wt, R as D, T as Ot, U as Xt, V as tr, W as rr, X as N, Y as V, Z as er, _ as nr, $ as ir, a0 as or, a1 as ur, a2 as k, a3 as H, a4 as sr, a5 as At, a6 as Ct, a7 as ar, a8 as it, a9 as cr } from "./index-DvRFVEGL.js";
|
|
2
2
|
var fr = "[object Symbol]";
|
|
3
3
|
function Z(t) {
|
|
4
4
|
return typeof t == "symbol" || S(t) && Wt(t) == fr;
|
|
@@ -2,7 +2,7 @@ import e from "./ruby-CZZKXaz8-BxaDEkRP.js";
|
|
|
2
2
|
import n from "./javascript-DqVBMyXe-DqVBMyXe.js";
|
|
3
3
|
import t from "./sass-LqXmC1Fh-LqXmC1Fh.js";
|
|
4
4
|
import { a } from "./coffee-CRlSxcc3-CY091_1T.js";
|
|
5
|
-
import s from "./markdown-
|
|
5
|
+
import s from "./markdown-BTiqg07I-BTiqg07I.js";
|
|
6
6
|
import r from "./css-CAzixsid-CEpuX1HY.js";
|
|
7
7
|
const m = Object.freeze({ displayName: "Ruby Haml", fileTypes: ["haml", "html.haml"], foldingStartMarker: "^\\s*([-%#\\:\\.\\w\\=].*)\\s$", foldingStopMarker: "^\\s*$", name: "haml", patterns: [{ begin: "^(\\s*)==", contentName: "string.quoted.double.ruby", end: "$\\n*", patterns: [{ include: "#interpolated_ruby" }] }, { begin: "^(\\s*):ruby", end: "^(?!\\1\\s+|$\\n*)", name: "source.ruby.embedded.filter.haml", patterns: [{ include: "source.ruby" }] }, { captures: { 1: { name: "punctuation.definition.prolog.haml" } }, match: "^(!!!)($|\\s.*)", name: "meta.prolog.haml" }, { begin: "^(\\s*):javascript", end: "^(?!\\1\\s+|$\\n*)", name: "js.haml", patterns: [{ include: "source.js" }] }, { begin: "^(\\s*)%script", end: "^(?!\\1\\s+|$\\n*)", name: "js.inline.haml", patterns: [{ include: "source.js" }] }, { begin: "^(\\s*):ruby$", end: "^(?!\\1\\s+|$\\n*)", name: "source.ruby.embedded.filter.haml", patterns: [{ include: "source.ruby" }] }, { captures: { 1: { name: "punctuation.section.comment.haml" } }, match: "^(\\s*)(\\/\\[[^\\]].*?$\\n?)", name: "comment.line.slash.haml" }, { begin: "^(\\s*)(\\-\\#|\\/|\\-\\s*\\/\\*+)", beginCaptures: { 2: { name: "punctuation.section.comment.haml" } }, end: "^(?!\\1\\s+|\\n)", name: "comment.block.haml", patterns: [{ include: "text.haml" }] }, { begin: "^\\s*(?:((%)([-\\w:]+))|(?=\\.|#))", captures: { 1: { name: "meta.tag.haml" }, 2: { name: "punctuation.definition.tag.haml" }, 3: { name: "entity.name.tag.haml" } }, end: "$|(?!\\.|#|\\{|\\(|\\[|&|=|-|~|!=|&=|/)", patterns: [{ begin: "==", contentName: "string.quoted.double.ruby", end: "$\\n?", patterns: [{ include: "#interpolated_ruby" }] }, { captures: { 1: { name: "entity.other.attribute-name.class" } }, match: "(\\.[\\w\\-\\:]+)", name: "meta.selector.css" }, { captures: { 1: { name: "entity.other.attribute-name.id" } }, match: "(#[\\w-]+)", name: "meta.selector.css" }, { begin: "(?<!\\#)\\{(?=.*(,|(do)|\\{|\\}|\\||(\\#.*)|\\R)\\s*)", end: "\\s*\\}(?!\\s*\\,)(?!\\s*\\|)(?!\\#\\{.*\\})", name: "meta.section.attributes.haml", patterns: [{ include: "source.ruby" }, { include: "#continuation" }, { include: "#rubyline" }] }, { begin: "\\(", end: "\\)", name: "meta.section.attributes.plain.haml", patterns: [{ match: "([\\w-]+)", name: "constant.other.symbol.ruby" }, { match: "\\=", name: "punctuation" }, { include: "#variables" }, { begin: '"', end: '"', name: "string.quoted.double.ruby", patterns: [{ match: "\\\\(x\\h{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)", name: "constant.character.escape.ruby" }, { include: "#interpolated_ruby" }] }, { include: "#interpolated_ruby" }] }, { begin: "\\[(?=.+(,|\\[|\\]|\\||(\\#.*))\\s*)", end: "\\s*\\](?!.*(?!\\#\\[)\\])", name: "meta.section.object.haml", patterns: [{ include: "source.ruby" }, { include: "#continuation" }, { include: "#rubyline" }] }, { include: "#interpolated_ruby_line" }, { include: "#rubyline" }, { match: "/", name: "punctuation.terminator.tag.haml" }] }, { begin: "^(\\s*):(ruby|opal)$", end: "^(?!\\1\\s+|$\\n*)", name: "source.ruby.embedded.filter.haml", patterns: [{ include: "source.ruby" }] }, { begin: "^(\\s*):ruby$", end: "^(?!\\1\\s+|$\\n*)", name: "source.ruby.embedded.filter.haml", patterns: [{ include: "source.ruby" }] }, { begin: "^(\\s*):(style|sass)$", end: "^(?=\\1\\s+|$\\n*)", name: "source.sass.embedded.filter.haml", patterns: [{ include: "source.sass" }] }, { begin: "^(\\s*):coffee(script)?", end: "^(?!\\1\\s+|$\\n*)", name: "source.coffee.embedded.filter.haml", patterns: [{ include: "source.coffee" }] }, { begin: "^(\\s*):plain$", end: "^(?=\\1\\s+|$\\n*)", name: "text.plain.embedded.filter.haml", patterns: [{ include: "text.plain" }] }, { begin: "^(\\s*)(:ruby)", beginCaptures: { 2: { name: "keyword.control.filter.haml" } }, end: "(?m:(?<=\\n)(?!\\1\\s+|$\\n*))", name: "source.ruby.embedded.filter.haml", patterns: [{ include: "source.ruby" }] }, { begin: "^(\\s*)(:sass)", beginCaptures: { 2: { name: "keyword.control.filter.haml" } }, end: "^(?!\\1\\s+|$\\n*)", name: "source.embedded.filter.sass", patterns: [{ include: "source.sass" }] }, { begin: "^(\\s*):(styles|sass)$", end: "^(?=\\1\\s+|$\\n*)", name: "source.sass.embedded.filter.haml", patterns: [{ include: "source.sass" }] }, { begin: "^(\\s*):plain$", end: "^(?=\\1\\s+|$\\n*)", name: "text.plain.embedded.filter.haml", patterns: [{ include: "text.plain" }] }, { captures: { 1: { name: "meta.escape.haml" } }, match: "^\\s*(\\.)" }, { begin: "^\\s*(?==|-|~|!=|&=)", end: "$", patterns: [{ include: "#interpolated_ruby_line" }, { include: "#rubyline" }] }, { begin: "^(\\s*)(:php)", captures: { 2: { name: "entity.name.tag.haml" } }, end: "^(?!\\1\\s+|$\\n*)", name: "meta.embedded.php", patterns: [{ include: "text.html.php#language" }] }, { begin: "^(\\s*)(:markdown)", captures: { 2: { name: "entity.name.tag.haml" } }, end: "^(?!\\1\\s+|$\\n*)", name: "meta.embedded.markdown", patterns: [{ include: "text.html.markdown" }] }, { begin: "^(\\s*)(:(css|styles?))$", captures: { 2: { name: "entity.name.tag.haml" } }, end: "^(?!\\1\\s+|$\\n*)", name: "meta.embedded.css", patterns: [{ include: "source.css" }] }, { begin: "^(\\s*)(:sass)$", captures: { 2: { name: "entity.name.tag.haml" } }, end: "^(?!\\1\\s+|$\\n*)", name: "meta.embedded.sass", patterns: [{ include: "source.sass" }] }, { begin: "^(\\s*)(:scss)$", captures: { 2: { name: "entity.name.tag.haml" } }, end: "^(?!\\1\\s+|$\\n*)", name: "meta.embedded.scss", patterns: [{ include: "source.scss" }] }], repository: { continuation: { captures: { 1: { name: "punctuation.separator.continuation.haml" } }, match: "(\\|)\\s*\\n" }, interpolated_ruby: { patterns: [{ captures: { 0: { name: "punctuation.section.embedded.ruby" }, 1: { name: "source.ruby.embedded.source.empty" } }, match: "#\\{(\\})", name: "source.ruby.embedded.source" }, { begin: "#\\{", captures: { 0: { name: "punctuation.section.embedded.ruby" } }, end: "(\\})", name: "source.ruby.embedded.source", patterns: [{ include: "#nest_curly_and_self" }, { include: "source.ruby" }] }, { include: "#variables" }] }, interpolated_ruby_line: { begin: "!?==", contentName: "string.source.ruby.embedded.haml", end: "$", name: "meta.line.ruby.interpolated.haml", patterns: [{ include: "#interpolated_ruby" }, { include: "source.ruby#escaped_char" }] }, nest_curly_and_self: { patterns: [{ begin: "\\{", captures: { 0: { name: "punctuation.section.scope.ruby" } }, end: "\\}", patterns: [{ include: "#nest_curly_and_self" }, { include: "source.ruby" }] }] }, rubyline: { begin: "(&|!)?(=|-|~)", contentName: "source.ruby.embedded.haml", end: "((do|\\{)( \\|[.*]+\\|)?)$|$|^(?!.*\\|\\s*)$\\n?", endCaptures: { 1: { name: "source.ruby.embedded.html" }, 2: { name: "keyword.control.ruby.start-block" } }, name: "meta.line.ruby.haml", patterns: [{ captures: { 1: { name: "keyword.control.php" } }, match: "\\s+((elseif|foreach|switch|declare|default|use))(?=\\s|\\()" }, { captures: { 1: { name: "keyword.control.import.include.php" } }, match: "\\s+(require_once|include_once)(?=\\s|\\()" }, { match: "\\s+(catch|try|throw|exception|finally|die)(?=\\s|\\(|\\n*)", name: "keyword.control.exception.php" }, { captures: { 1: { name: "storage.type.function.php" } }, match: "\\s+(function\\s*)((?=\\())" }, { captures: { 1: { name: "keyword.control.php" } }, match: "\\s+(use\\s*)((?=\\())" }, { match: "(\\||,|<|do|\\{)\\s*(\\#.*)?$\\n*", name: "source.ruby", patterns: [{ include: "#rubyline" }] }, { comment: "Hack to let ruby comments work in this context properly", match: "#.*$", name: "comment.line.number-sign.ruby" }, { include: "source.ruby" }, { include: "#continuation" }] }, variables: { patterns: [{ captures: { 1: { name: "punctuation.definition.variable.ruby" } }, match: "(#@)[a-zA-Z_]\\w*", name: "variable.other.readwrite.instance.ruby" }, { captures: { 1: { name: "punctuation.definition.variable.ruby" } }, match: "(#@@)[a-zA-Z_]\\w*", name: "variable.other.readwrite.class.ruby" }, { captures: { 1: { name: "punctuation.definition.variable.ruby" } }, match: "(#\\$)[a-zA-Z_]\\w*", name: "variable.other.readwrite.global.ruby" }] } }, scopeName: "text.haml", embeddedLangs: ["ruby", "javascript", "sass", "coffee", "markdown", "css"] });
|
|
8
8
|
var b = [
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import t from "./shellscript-CUUTQKn5-CUUTQKn5.js";
|
|
2
|
+
import e from "./json-B12k4-6m-B12k4-6m.js";
|
|
3
|
+
import n from "./xml-CfRpfi_B-BH3JRQfc.js";
|
|
4
|
+
import a from "./graphql-CT32SSoq-1pBWfpcR.js";
|
|
5
|
+
const s = Object.freeze({ displayName: "HTTP", fileTypes: ["http", "rest"], name: "http", patterns: [{ begin: "^\\s*(?=curl)", end: "^\\s*(\\#{3,}.*?)?\\s*$", endCaptures: { 0: { name: "comment.line.sharp.http" } }, name: "http.request.curl", patterns: [{ include: "source.shell" }] }, { begin: "\\s*(?=(\\[|{[^{]))", end: "^\\s*(\\#{3,}.*?)?\\s*$", endCaptures: { 0: { name: "comment.line.sharp.http" } }, name: "http.request.body.json", patterns: [{ include: "source.json" }] }, { begin: "^\\s*(?=<\\S)", end: "^\\s*(\\#{3,}.*?)?\\s*$", endCaptures: { 0: { name: "comment.line.sharp.http" } }, name: "http.request.body.xml", patterns: [{ include: "text.xml" }] }, { begin: "\\s*(?=(query|mutation))", end: "^\\s*(\\#{3,}.*?)?\\s*$", endCaptures: { 0: { name: "comment.line.sharp.http" } }, name: "http.request.body.graphql", patterns: [{ include: "source.graphql" }] }, { begin: "\\s*(?=(query|mutation))", end: "^\\{\\s*$", name: "http.request.body.graphql", patterns: [{ include: "source.graphql" }] }, { include: "#metadata" }, { include: "#comments" }, { captures: { 1: { name: "keyword.other.http" }, 2: { name: "variable.other.http" }, 3: { name: "string.other.http" } }, match: "^\\s*(@)([^\\s=]+)\\s*=\\s*(.*?)\\s*$", name: "http.filevariable" }, { captures: { 1: { name: "keyword.operator.http" }, 2: { name: "variable.other.http" }, 3: { name: "string.other.http" } }, match: "^\\s*(\\?|&)([^=\\s]+)=(.*)$", name: "http.query" }, { captures: { 1: { name: "entity.name.tag.http" }, 2: { name: "keyword.other.http" }, 3: { name: "string.other.http" } }, match: "^([\\w\\-]+)\\s*(\\:)\\s*([^/].*?)\\s*$", name: "http.headers" }, { include: "#request-line" }, { include: "#response-line" }], repository: { comments: { patterns: [{ match: "^\\s*\\#{1,}.*$", name: "comment.line.sharp.http" }, { match: "^\\s*\\/{2,}.*$", name: "comment.line.double-slash.http" }] }, metadata: { patterns: [{ captures: { 1: { name: "entity.other.attribute-name" }, 2: { name: "punctuation.definition.block.tag.metadata" }, 3: { name: "entity.name.type.http" } }, match: "^\\s*\\#{1,}\\s+(?:((@)name)\\s+([^\\s\\.]+))$", name: "comment.line.sharp.http" }, { captures: { 1: { name: "entity.other.attribute-name" }, 2: { name: "punctuation.definition.block.tag.metadata" }, 3: { name: "entity.name.type.http" } }, match: "^\\s*\\/{2,}\\s+(?:((@)name)\\s+([^\\s\\.]+))$", name: "comment.line.double-slash.http" }, { captures: { 1: { name: "entity.other.attribute-name" }, 2: { name: "punctuation.definition.block.tag.metadata" } }, match: "^\\s*\\#{1,}\\s+((@)note)\\s*$", name: "comment.line.sharp.http" }, { captures: { 1: { name: "entity.other.attribute-name" }, 2: { name: "punctuation.definition.block.tag.metadata" } }, match: "^\\s*\\/{2,}\\s+((@)note)\\s*$", name: "comment.line.double-slash.http" }, { captures: { 1: { name: "entity.other.attribute-name" }, 2: { name: "punctuation.definition.block.tag.metadata" }, 3: { name: "variable.other.http" }, 4: { name: "string.other.http" } }, match: "^\\s*\\#{1,}\\s+(?:((@)prompt)\\s+([^\\s]+)(?:\\s+(.*))?\\s*)$", name: "comment.line.sharp.http" }, { captures: { 1: { name: "entity.other.attribute-name" }, 2: { name: "punctuation.definition.block.tag.metadata" }, 3: { name: "variable.other.http" }, 4: { name: "string.other.http" } }, match: "^\\s*\\/{2,}\\s+(?:((@)prompt)\\s+([^\\s]+)(?:\\s+(.*))?\\s*)$", name: "comment.line.double-slash.http" }] }, protocol: { patterns: [{ captures: { 1: { name: "keyword.other.http" }, 2: { name: "constant.numeric.http" } }, match: "(HTTP)/(\\d+.\\d+)", name: "http.version" }] }, "request-line": { captures: { 1: { name: "keyword.control.http" }, 2: { name: "const.language.http" }, 3: { patterns: [{ include: "#protocol" }] } }, match: "(?i)^(?:(get|post|put|delete|patch|head|options|connect|trace|lock|unlock|propfind|proppatch|copy|move|mkcol|mkcalendar|acl|search)\\s+)?\\s*(.+?)(?:\\s+(HTTP\\/\\S+))?$", name: "http.requestline" }, "response-line": { captures: { 1: { patterns: [{ include: "#protocol" }] }, 2: { name: "constant.numeric.http" }, 3: { name: "string.other.http" } }, match: "(?i)^\\s*(HTTP\\/\\S+)\\s([1-5][0-9][0-9])\\s(.*)$", name: "http.responseLine" } }, scopeName: "source.http", embeddedLangs: ["shellscript", "json", "xml", "graphql"] });
|
|
6
|
+
var h = [
|
|
7
|
+
...t,
|
|
8
|
+
...e,
|
|
9
|
+
...n,
|
|
10
|
+
...a,
|
|
11
|
+
s
|
|
12
|
+
];
|
|
13
|
+
export {
|
|
14
|
+
h as default
|
|
15
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { d as E, Z as j } from "./graph-
|
|
2
|
-
import { m as J, A } from "./layout-
|
|
3
|
-
import { a as U } from "./clone-
|
|
4
|
-
import { h as Z, m as H, y as W, o as q, d as z, t as B, f as O, u as K, g as Q, p as V, x as Y, R, E as T } from "./edges-d417c7a0-
|
|
5
|
-
import { l as i, c as D, p as N, h as G } from "./index-
|
|
6
|
-
import { U as _ } from "./createText-423428c9-
|
|
1
|
+
import { d as E, Z as j } from "./graph-BIq67vWs-LA_m-7g5.js";
|
|
2
|
+
import { m as J, A } from "./layout-Cz0dAJah-C2Ql7ZSU.js";
|
|
3
|
+
import { a as U } from "./clone-BoeTe_OS-BEC7l3rJ.js";
|
|
4
|
+
import { h as Z, m as H, y as W, o as q, d as z, t as B, f as O, u as K, g as Q, p as V, x as Y, R, E as T } from "./edges-d417c7a0-DEJA2PwU-BNRQat2t.js";
|
|
5
|
+
import { l as i, c as D, p as N, h as G } from "./index-DvRFVEGL.js";
|
|
6
|
+
import { U as _ } from "./createText-423428c9-Q0HfccbL-BLtEGSzf.js";
|
|
7
7
|
function y(r) {
|
|
8
8
|
var e = {
|
|
9
9
|
options: {
|