@malloydata/render 0.0.236-dev250219154103 → 0.0.236-dev250221002909

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.
@@ -52958,7 +52958,7 @@ const N6e = (t, e, n) => {
52958
52958
  for (const s of n) {
52959
52959
  const o = !s.currentToken || i.type === s.currentToken, u = !s.offendingSymbol || (e == null ? void 0 : e.type) === s.offendingSymbol, a = !s.ruleContextOptions || s.ruleContextOptions.includes(r);
52960
52960
  if (o && u && a) {
52961
- if (s.precedingTokenOptions && !s.precedingTokenOptions.some((f) => SU(t, f, "lookback")) || s.lookAheadOptions && !s.lookAheadOptions.some((f) => SU(t, f, "lookahead")))
52961
+ if (s.precedingTokenOptions && !s.precedingTokenOptions.some((f) => SU(t, f, "lookback", s.lookbackFromOffendingSymbol ? e == null ? void 0 : e.tokenIndex : void 0)) || s.lookAheadOptions && !s.lookAheadOptions.some((f) => SU(t, f, "lookahead", s.lookbackFromOffendingSymbol ? e == null ? void 0 : e.tokenIndex : void 0)))
52962
52962
  continue;
52963
52963
  return s.errorMessage.replace("${currentToken}", (e == null ? void 0 : e.text) || i.text || "");
52964
52964
  }
@@ -52966,11 +52966,18 @@ const N6e = (t, e, n) => {
52966
52966
  return "";
52967
52967
  };
52968
52968
  h3.checkCustomErrorMessage = N6e;
52969
- const SU = (t, e, n) => {
52969
+ const SU = (t, e, n, r) => {
52970
52970
  try {
52971
- for (let r = 0; r < e.length; r++) {
52972
- const i = n === "lookahead" ? r + 2 : -1 * (r + 1), s = t.inputStream.LA(i);
52973
- if (e[r] >= -1 && s !== e[r] || e[r] < -1 && s === -1 * e[r])
52971
+ for (let i = 0; i < e.length; i++) {
52972
+ let s;
52973
+ if (typeof r == "number") {
52974
+ const o = n === "lookahead" ? i + 1 : -1 * (i + 1);
52975
+ s = t.inputStream.get(r + o).type;
52976
+ } else {
52977
+ const o = n === "lookahead" ? i + 2 : -1 * (i + 1);
52978
+ s = t.inputStream.LA(o);
52979
+ }
52980
+ if (e[i] >= -1 && s !== e[i] || e[i] < -1 && s === -1 * e[i])
52974
52981
  return !1;
52975
52982
  }
52976
52983
  return !0;
@@ -53028,6 +53035,12 @@ var ZJ = {};
53028
53035
  [e.MalloyParser.RUN],
53029
53036
  [e.MalloyParser.SOURCE]
53030
53037
  ]
53038
+ },
53039
+ {
53040
+ errorMessage: "'aggregate:' entries must include a name (ex: `some_name is count()`)",
53041
+ precedingTokenOptions: [[e.MalloyParser.AGGREGATE]],
53042
+ lookAheadOptions: [[-e.MalloyParser.IS]],
53043
+ lookbackFromOffendingSymbol: !0
53031
53044
  }
53032
53045
  ];
53033
53046
  class i {