@drawcall/charta 0.1.28 → 0.1.30
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/grammar.d.ts.map +1 -1
- package/dist/grammar.js +23 -29
- package/package.json +1 -1
package/dist/grammar.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grammar.d.ts","sourceRoot":"","sources":["../src/grammar.ts"],"names":[],"mappings":"AAOA,UAAU,YAAY;IACpB,KAAK,EAAE,GAAG,CAAC;IACX,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,UAAU,YAAY;IACpB,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAC1C,IAAI,EAAE,MAAM,YAAY,GAAG,SAAS,CAAC;IACrC,IAAI,EAAE,MAAM,GAAG,CAAC;IAChB,WAAW,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,MAAM,CAAC;IACtC,GAAG,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC;CACrC;AAED,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,KAAK,GAAG,CAAC;CAC5D;AAED,KAAK,aAAa,GAAG,MAAM,GAAG;IAAE,OAAO,EAAE,GAAG,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,OAAO,CAAA;CAAE,CAAC;AAEnF,UAAU,OAAO;IACf,KAAK,EAAE,YAAY,GAAG,SAAS,CAAC;IAChC,WAAW,EAAE,WAAW,EAAE,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,QAAA,MAAM,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"grammar.d.ts","sourceRoot":"","sources":["../src/grammar.ts"],"names":[],"mappings":"AAOA,UAAU,YAAY;IACpB,KAAK,EAAE,GAAG,CAAC;IACX,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,UAAU,YAAY;IACpB,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAC1C,IAAI,EAAE,MAAM,YAAY,GAAG,SAAS,CAAC;IACrC,IAAI,EAAE,MAAM,GAAG,CAAC;IAChB,WAAW,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,MAAM,CAAC;IACtC,GAAG,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC;CACrC;AAED,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,KAAK,GAAG,CAAC;CAC5D;AAED,KAAK,aAAa,GAAG,MAAM,GAAG;IAAE,OAAO,EAAE,GAAG,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,OAAO,CAAA;CAAE,CAAC;AAEnF,UAAU,OAAO;IACf,KAAK,EAAE,YAAY,GAAG,SAAS,CAAC;IAChC,WAAW,EAAE,WAAW,EAAE,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,QAAA,MAAM,OAAO,EAAE,OAiEd,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
package/dist/grammar.js
CHANGED
|
@@ -17,32 +17,30 @@ const grammar = {
|
|
|
17
17
|
{ "name": "Rows$ebnf$1", "symbols": [] },
|
|
18
18
|
{ "name": "Rows$ebnf$1$subexpression$1", "symbols": ["NL", "Row"] },
|
|
19
19
|
{ "name": "Rows$ebnf$1", "symbols": ["Rows$ebnf$1", "Rows$ebnf$1$subexpression$1"], "postprocess": (d) => d[0].concat([d[1]]) },
|
|
20
|
-
{ "name": "Rows", "symbols": ["Row", "Rows$ebnf$1"], "postprocess": ([
|
|
21
|
-
{ "name": "Row", "symbols": ["
|
|
20
|
+
{ "name": "Rows", "symbols": ["Row", "Rows$ebnf$1"], "postprocess": ([h, t]) => [h, ...t.map((x) => x[1])] },
|
|
21
|
+
{ "name": "Row", "symbols": ["CellList"], "postprocess": (d, loc) => { const r = d[0]; r.offset = loc; return r; } },
|
|
22
22
|
{ "name": "CellList$ebnf$1", "symbols": [] },
|
|
23
|
-
{ "name": "CellList$ebnf$1$subexpression$1", "symbols": ["
|
|
23
|
+
{ "name": "CellList$ebnf$1$subexpression$1", "symbols": [{ "literal": "|" }, "Cell"] },
|
|
24
24
|
{ "name": "CellList$ebnf$1", "symbols": ["CellList$ebnf$1", "CellList$ebnf$1$subexpression$1"], "postprocess": (d) => d[0].concat([d[1]]) },
|
|
25
|
-
{ "name": "CellList", "symbols": ["Cell", "CellList$ebnf$1"], "postprocess": ([
|
|
26
|
-
{ "name": "Cell
|
|
27
|
-
{ "name": "Cell
|
|
28
|
-
{ "name": "Cell", "symbols": ["Cell$ebnf$1"], "postprocess": (d) => d[0] || [] },
|
|
25
|
+
{ "name": "CellList", "symbols": ["Cell", "CellList$ebnf$1"], "postprocess": ([h, t]) => [h, ...t.map((x) => x[1])] },
|
|
26
|
+
{ "name": "Cell", "symbols": ["_", "CallList", "_"], "postprocess": (d) => d[1] },
|
|
27
|
+
{ "name": "Cell", "symbols": ["_"], "postprocess": () => [] },
|
|
29
28
|
{ "name": "CallList$ebnf$1", "symbols": [] },
|
|
30
29
|
{ "name": "CallList$ebnf$1$subexpression$1", "symbols": ["__", "Call"] },
|
|
31
30
|
{ "name": "CallList$ebnf$1", "symbols": ["CallList$ebnf$1", "CallList$ebnf$1$subexpression$1"], "postprocess": (d) => d[0].concat([d[1]]) },
|
|
32
|
-
{ "name": "CallList", "symbols": ["Call", "CallList$ebnf$1"], "postprocess": ([
|
|
31
|
+
{ "name": "CallList", "symbols": ["Call", "CallList$ebnf$1"], "postprocess": ([f, r]) => [f, ...r.map((x) => x[1])] },
|
|
33
32
|
{ "name": "Call", "symbols": ["Ident", { "literal": "(" }, "Args", { "literal": ")" }], "postprocess": (d, loc) => ({
|
|
34
33
|
name: d[0],
|
|
35
34
|
locationParams: d[2].pos,
|
|
36
35
|
keyParams: d[2].kv,
|
|
37
36
|
offset: loc
|
|
38
37
|
}) },
|
|
39
|
-
{ "name": "Args
|
|
40
|
-
{ "name": "Args
|
|
41
|
-
{ "name": "
|
|
42
|
-
{ "name": "
|
|
43
|
-
{ "name": "
|
|
44
|
-
{ "name": "
|
|
45
|
-
{ "name": "ArgItems", "symbols": ["Arg", "ArgItems$ebnf$1"], "postprocess": (d) => {
|
|
38
|
+
{ "name": "Args", "symbols": ["_", "ArgList", "_"], "postprocess": (d) => d[1] },
|
|
39
|
+
{ "name": "Args", "symbols": ["_"], "postprocess": () => ({ pos: [], kv: [] }) },
|
|
40
|
+
{ "name": "ArgList$ebnf$1", "symbols": [] },
|
|
41
|
+
{ "name": "ArgList$ebnf$1$subexpression$1", "symbols": ["COMMA", "Arg"] },
|
|
42
|
+
{ "name": "ArgList$ebnf$1", "symbols": ["ArgList$ebnf$1", "ArgList$ebnf$1$subexpression$1"], "postprocess": (d) => d[0].concat([d[1]]) },
|
|
43
|
+
{ "name": "ArgList", "symbols": ["Arg", "ArgList$ebnf$1"], "postprocess": (d) => {
|
|
46
44
|
const items = [d[0], ...d[1].map((x) => x[1])];
|
|
47
45
|
const pos = [];
|
|
48
46
|
const kv = [];
|
|
@@ -56,21 +54,17 @@ const grammar = {
|
|
|
56
54
|
} },
|
|
57
55
|
{ "name": "Arg", "symbols": ["Ident", "_", { "literal": "=" }, "_", "Value"], "postprocess": (d) => ({ kind: 'kv', key: d[0], value: d[4] }) },
|
|
58
56
|
{ "name": "Arg", "symbols": ["Value"], "postprocess": (d) => d[0] },
|
|
59
|
-
{ "name": "Value", "symbols": [{ "literal": "\"" }, "
|
|
60
|
-
{ "name": "Value", "symbols": ["
|
|
61
|
-
{ "name": "
|
|
62
|
-
{ "name": "
|
|
63
|
-
{ "name": "
|
|
64
|
-
{ "name": "
|
|
65
|
-
{ "name": "
|
|
66
|
-
{ "name": "
|
|
67
|
-
{ "name": "UnquotedChar", "symbols": [/[^ \t,()=|\n"]/] },
|
|
57
|
+
{ "name": "Value", "symbols": [{ "literal": "\"" }, "QuotedChars", { "literal": "\"" }], "postprocess": (d) => d[1] },
|
|
58
|
+
{ "name": "Value", "symbols": ["UnquotedChars"], "postprocess": (d) => d[0] },
|
|
59
|
+
{ "name": "QuotedChars$ebnf$1", "symbols": [] },
|
|
60
|
+
{ "name": "QuotedChars$ebnf$1", "symbols": ["QuotedChars$ebnf$1", /[^"]/], "postprocess": (d) => d[0].concat([d[1]]) },
|
|
61
|
+
{ "name": "QuotedChars", "symbols": ["QuotedChars$ebnf$1"], "postprocess": (d) => d[0].join("") },
|
|
62
|
+
{ "name": "UnquotedChars$ebnf$1", "symbols": [/[^ \t,()=|\n"]/] },
|
|
63
|
+
{ "name": "UnquotedChars$ebnf$1", "symbols": ["UnquotedChars$ebnf$1", /[^ \t,()=|\n"]/], "postprocess": (d) => d[0].concat([d[1]]) },
|
|
64
|
+
{ "name": "UnquotedChars", "symbols": ["UnquotedChars$ebnf$1"], "postprocess": (d) => d[0].join("") },
|
|
68
65
|
{ "name": "Ident$ebnf$1", "symbols": [] },
|
|
69
|
-
{ "name": "Ident$ebnf$1", "symbols": ["Ident$ebnf$1",
|
|
70
|
-
{ "name": "Ident", "symbols": [
|
|
71
|
-
{ "name": "IdentStart", "symbols": [/[a-z_\/]/] },
|
|
72
|
-
{ "name": "IdentRest", "symbols": [/[a-z0-9A-Z_\/-]/] },
|
|
73
|
-
{ "name": "PIPE", "symbols": ["_", { "literal": "|" }, "_"], "postprocess": () => null },
|
|
66
|
+
{ "name": "Ident$ebnf$1", "symbols": ["Ident$ebnf$1", /[a-z0-9A-Z_\/-]/], "postprocess": (d) => d[0].concat([d[1]]) },
|
|
67
|
+
{ "name": "Ident", "symbols": [/[a-z_\/]/, "Ident$ebnf$1"], "postprocess": ([s, r]) => s + r.join("") },
|
|
74
68
|
{ "name": "COMMA", "symbols": ["_", { "literal": "," }, "_"], "postprocess": () => null },
|
|
75
69
|
{ "name": "NL", "symbols": [{ "literal": "\n" }], "postprocess": () => null },
|
|
76
70
|
{ "name": "_$ebnf$1", "symbols": [] },
|