@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.
@@ -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,OAuEd,CAAC;AAEF,eAAe,OAAO,CAAC"}
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": ([head, tail]) => [head, ...tail.map(([, row]) => row)] },
21
- { "name": "Row", "symbols": ["_", "CellList", "_"], "postprocess": (d, loc) => { const row = d[1]; row.offset = loc; return row; } },
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": ["PIPE", "Cell"] },
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": ([head, tail]) => [head, ...tail.map(([, cell]) => cell)] },
26
- { "name": "Cell$ebnf$1", "symbols": ["CallList"], "postprocess": id },
27
- { "name": "Cell$ebnf$1", "symbols": [], "postprocess": () => null },
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": ([first, rest]) => [first, ...rest.map(([, c]) => c)] },
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$ebnf$1", "symbols": ["ArgItems"], "postprocess": id },
40
- { "name": "Args$ebnf$1", "symbols": [], "postprocess": () => null },
41
- { "name": "Args", "symbols": ["_", "Args$ebnf$1", "_"], "postprocess": (d) => d[1] || { pos: [], kv: [] } },
42
- { "name": "ArgItems$ebnf$1", "symbols": [] },
43
- { "name": "ArgItems$ebnf$1$subexpression$1", "symbols": ["COMMA", "Arg"] },
44
- { "name": "ArgItems$ebnf$1", "symbols": ["ArgItems$ebnf$1", "ArgItems$ebnf$1$subexpression$1"], "postprocess": (d) => d[0].concat([d[1]]) },
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": "\"" }, "QuotedContent", { "literal": "\"" }], "postprocess": (d) => d[1] },
60
- { "name": "Value", "symbols": ["UnquotedValue"], "postprocess": (d) => d[0] },
61
- { "name": "QuotedContent$ebnf$1", "symbols": [] },
62
- { "name": "QuotedContent$ebnf$1", "symbols": ["QuotedContent$ebnf$1", /[^"]/], "postprocess": (d) => d[0].concat([d[1]]) },
63
- { "name": "QuotedContent", "symbols": ["QuotedContent$ebnf$1"], "postprocess": (d) => d[0].join("") },
64
- { "name": "UnquotedValue$ebnf$1", "symbols": ["UnquotedChar"] },
65
- { "name": "UnquotedValue$ebnf$1", "symbols": ["UnquotedValue$ebnf$1", "UnquotedChar"], "postprocess": (d) => d[0].concat([d[1]]) },
66
- { "name": "UnquotedValue", "symbols": ["UnquotedValue$ebnf$1"], "postprocess": (d) => d[0].join("") },
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", "IdentRest"], "postprocess": (d) => d[0].concat([d[1]]) },
70
- { "name": "Ident", "symbols": ["IdentStart", "Ident$ebnf$1"], "postprocess": ([s, r]) => s + r.join("") },
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": [] },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drawcall/charta",
3
- "version": "0.1.28",
3
+ "version": "0.1.30",
4
4
  "author": "Bela Bohlender",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "homepage": "https://drawcall.ai",