@nola-lang/parser 0.1.4 → 0.1.5

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/index.js CHANGED
@@ -4964,10 +4964,9 @@ var NolaErrors = ParseErrorEnum`nola`({
4964
4964
  NolaAskReserved: "NOLA1003: `ask` is a reserved word in .tsi files and cannot be used as an identifier.",
4965
4965
  NolaReservedConstruct: "NOLA1004: this Nola construct is reserved for a future Nola version.",
4966
4966
  NolaExpectedPromptTemplate: "NOLA1005: expected a template literal prompt after `..`.",
4967
- NolaLegacyMarker: "NOLA1007: the `function name``()` form was removed \u2014 declare the function with `infer function`.",
4968
- // NOLA1008 (marker substitution) is retired since emit 11 — the number is not reused.
4967
+ NolaMarkerOutsideInfer: "NOLA1007: an instruction marker is only legal on an `infer function`.",
4969
4968
  NolaIncompleteScopeAccess: "NOLA1015: incomplete scope access \u2014 write `${.member}`.",
4970
- NolaExpectedProviderName: "NOLA1009: expected a provider name after `ask with` \u2014 for a dynamic provider use `.withProvider(...)` on the intent.",
4969
+ NolaExpectedProviderName: "NOLA1009: expected a model name after `ask with` \u2014 for a dynamic model use `.withModel(...)` on the intent.",
4971
4970
  NolaContextualOutsideInfer: "NOLA1010: `.` context parameters are only allowed on infer function parameters.",
4972
4971
  NolaContextualParamReserved: "NOLA1011: `.` on this parameter form is reserved for a future Nola version \u2014 use a plain identifier parameter.",
4973
4972
  NolaIncompleteContextualParam: "NOLA1012: incomplete `.` context parameter \u2014 write `.name`.",
@@ -5163,9 +5162,8 @@ var nola_default = (superClass) => class NolaParserMixin extends superClass {
5163
5162
  super.checkReservedWord(word, startLoc, checkKeywords, isBinding);
5164
5163
  }
5165
5164
  // An instruction marker (template) may sit between the function name and `(`,
5166
- // but ONLY on an `infer` function. On anything else it is the removed MVP
5167
- // form (NOLA1007). `${}` inside a marker is NOLA1008. `infer` on generators
5168
- // and methods is reserved (NOLA1004).
5165
+ // but ONLY on an `infer` function on anything else it is NOLA1007.
5166
+ // `infer` on generators and methods is reserved (NOLA1004).
5169
5167
  parseFunctionParams(node, isConstructor) {
5170
5168
  const inMethod = this.nolaInMethod;
5171
5169
  this.nolaInMethod = false;
@@ -5183,7 +5181,7 @@ var nola_default = (superClass) => class NolaParserMixin extends superClass {
5183
5181
  const markerStart = this.state.start;
5184
5182
  const tmpl = this.parseTemplate(false);
5185
5183
  if (!infer) {
5186
- this.raise(NolaErrors.NolaLegacyMarker, markerStart);
5184
+ this.raise(NolaErrors.NolaMarkerOutsideInfer, markerStart);
5187
5185
  } else {
5188
5186
  const instruction = tmpl.quasis.map((q) => q.value.cooked ?? q.value.raw).join("");
5189
5187
  n.nolaMarker = {