@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.
@@ -54063,7 +54063,7 @@ const TOe = (t, e, n) => {
54063
54063
  for (const s of n) {
54064
54064
  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);
54065
54065
  if (o && u && a) {
54066
- if (s.precedingTokenOptions && !s.precedingTokenOptions.some((f) => oj(t, f, "lookback")) || s.lookAheadOptions && !s.lookAheadOptions.some((f) => oj(t, f, "lookahead")))
54066
+ if (s.precedingTokenOptions && !s.precedingTokenOptions.some((f) => oj(t, f, "lookback", s.lookbackFromOffendingSymbol ? e == null ? void 0 : e.tokenIndex : void 0)) || s.lookAheadOptions && !s.lookAheadOptions.some((f) => oj(t, f, "lookahead", s.lookbackFromOffendingSymbol ? e == null ? void 0 : e.tokenIndex : void 0)))
54067
54067
  continue;
54068
54068
  return s.errorMessage.replace("${currentToken}", (e == null ? void 0 : e.text) || i.text || "");
54069
54069
  }
@@ -54071,11 +54071,18 @@ const TOe = (t, e, n) => {
54071
54071
  return "";
54072
54072
  };
54073
54073
  ny.checkCustomErrorMessage = TOe;
54074
- const oj = (t, e, n) => {
54074
+ const oj = (t, e, n, r) => {
54075
54075
  try {
54076
- for (let r = 0; r < e.length; r++) {
54077
- const i = n === "lookahead" ? r + 2 : -1 * (r + 1), s = t.inputStream.LA(i);
54078
- if (e[r] >= -1 && s !== e[r] || e[r] < -1 && s === -1 * e[r])
54076
+ for (let i = 0; i < e.length; i++) {
54077
+ let s;
54078
+ if (typeof r == "number") {
54079
+ const o = n === "lookahead" ? i + 1 : -1 * (i + 1);
54080
+ s = t.inputStream.get(r + o).type;
54081
+ } else {
54082
+ const o = n === "lookahead" ? i + 2 : -1 * (i + 1);
54083
+ s = t.inputStream.LA(o);
54084
+ }
54085
+ if (e[i] >= -1 && s !== e[i] || e[i] < -1 && s === -1 * e[i])
54079
54086
  return !1;
54080
54087
  }
54081
54088
  return !0;
@@ -54133,6 +54140,12 @@ var eZ = {};
54133
54140
  [e.MalloyParser.RUN],
54134
54141
  [e.MalloyParser.SOURCE]
54135
54142
  ]
54143
+ },
54144
+ {
54145
+ errorMessage: "'aggregate:' entries must include a name (ex: `some_name is count()`)",
54146
+ precedingTokenOptions: [[e.MalloyParser.AGGREGATE]],
54147
+ lookAheadOptions: [[-e.MalloyParser.IS]],
54148
+ lookbackFromOffendingSymbol: !0
54136
54149
  }
54137
54150
  ];
54138
54151
  class i {