@danielx/civet 0.5.33 → 0.5.35

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/browser.js CHANGED
@@ -660,6 +660,7 @@ ${input.slice(result.pos)}
660
660
  FromClause,
661
661
  TypeAndImportSpecifier,
662
662
  ImportSpecifier,
663
+ ImportAsToken,
663
664
  ModuleExportName,
664
665
  ModuleSpecifier,
665
666
  UnprocessedModuleSpecifier,
@@ -882,6 +883,9 @@ ${input.slice(result.pos)}
882
883
  TypeBinaryOp,
883
884
  FunctionType,
884
885
  TypeArguments,
886
+ InlineTypeArguments,
887
+ InlineTypeArgument,
888
+ InlineTypeArgumentDelimiter,
885
889
  CompactTypeArguments,
886
890
  TypeArgument,
887
891
  TypeArgumentDelimiter,
@@ -925,6 +929,7 @@ ${input.slice(result.pos)}
925
929
  CoffeeLineContinuationEnabled,
926
930
  CoffeeNotEnabled,
927
931
  CoffeeOfEnabled,
932
+ CoffeePrototypeEnabled,
928
933
  Reset,
929
934
  Init,
930
935
  Indent,
@@ -1349,12 +1354,13 @@ ${input.slice(result.pos)}
1349
1354
  }
1350
1355
  }
1351
1356
  var Arguments$0 = ExplicitArguments;
1352
- var Arguments$1 = $TS($S(ApplicationStart, InsertOpenParen, $Q(_), ArgumentList, InsertCloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
1353
- var open = $2;
1354
- var ws = $3;
1355
- var args = $4;
1356
- var close = $5;
1357
- return [open, module.insertTrimmingSpace(ws, ""), args, close];
1357
+ var Arguments$1 = $TS($S($E($S(InlineTypeArguments, $N($S(__, ImplementsToken)))), ApplicationStart, InsertOpenParen, $Q(_), ArgumentList, InsertCloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
1358
+ var ta = $1;
1359
+ var open = $3;
1360
+ var ws = $4;
1361
+ var args = $5;
1362
+ var close = $6;
1363
+ return [ta?.[0], open, module.insertTrimmingSpace(ws, ""), args, close];
1358
1364
  });
1359
1365
  function Arguments(state) {
1360
1366
  let eventData;
@@ -3261,9 +3267,9 @@ ${input.slice(result.pos)}
3261
3267
  children
3262
3268
  };
3263
3269
  });
3264
- var PropertyAccess$1 = $TS($S(DoubleColon, $E(IdentifierName)), function($skip, $loc, $0, $1, $2) {
3265
- var p = $1;
3266
- var id = $2;
3270
+ var PropertyAccess$1 = $TS($S(CoffeePrototypeEnabled, DoubleColon, $E(IdentifierName)), function($skip, $loc, $0, $1, $2, $3) {
3271
+ var p = $2;
3272
+ var id = $3;
3267
3273
  if (id) {
3268
3274
  p.token = ".prototype.";
3269
3275
  return [p, id];
@@ -7500,7 +7506,7 @@ ${input.slice(result.pos)}
7500
7506
  declaration = {
7501
7507
  type: "Declaration",
7502
7508
  children: ["let ", ...startRefDec, ...endRefDec, counterRef, " = ", varRef2, " = ", startRef, ...ascDec],
7503
- names: []
7509
+ names: varRef2.names
7504
7510
  };
7505
7511
  blockPrefix.push(["", {
7506
7512
  type: "AssignmentExpression",
@@ -7631,11 +7637,12 @@ ${input.slice(result.pos)}
7631
7637
  var CoffeeForDeclaration$0 = $TS($S($E($S(__, $EXPECT($L78, fail, 'CoffeeForDeclaration "own"'), NonIdContinue)), ForBinding), function($skip, $loc, $0, $1, $2) {
7632
7638
  var own = $1;
7633
7639
  var binding = $2;
7634
- if (own) {
7635
- binding.own = true;
7636
- }
7637
- binding.type = "AssignmentExpression";
7638
- return binding;
7640
+ return {
7641
+ type: "AssignmentExpression",
7642
+ own: Boolean(own),
7643
+ children: [$2],
7644
+ names: $2.names
7645
+ };
7639
7646
  });
7640
7647
  function CoffeeForDeclaration(state) {
7641
7648
  let eventData;
@@ -8659,8 +8666,8 @@ ${input.slice(result.pos)}
8659
8666
  return result;
8660
8667
  }
8661
8668
  }
8662
- var NameSpaceImport$0 = $TS($S(Star, __, As, __, ImportedBinding), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
8663
- var binding = $5;
8669
+ var NameSpaceImport$0 = $TS($S(Star, ImportAsToken, __, ImportedBinding), function($skip, $loc, $0, $1, $2, $3, $4) {
8670
+ var binding = $4;
8664
8671
  return {
8665
8672
  type: "Declaration",
8666
8673
  children: $0,
@@ -8770,8 +8777,8 @@ ${input.slice(result.pos)}
8770
8777
  return result;
8771
8778
  }
8772
8779
  }
8773
- var ImportSpecifier$0 = $TS($S(__, ModuleExportName, __, As, __, ImportedBinding, ObjectPropertyDelimiter), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
8774
- var binding = $6;
8780
+ var ImportSpecifier$0 = $TS($S(__, ModuleExportName, ImportAsToken, __, ImportedBinding, ObjectPropertyDelimiter), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
8781
+ var binding = $5;
8775
8782
  return {
8776
8783
  binding,
8777
8784
  children: $0
@@ -8806,6 +8813,44 @@ ${input.slice(result.pos)}
8806
8813
  return result;
8807
8814
  }
8808
8815
  }
8816
+ var ImportAsToken$0 = $S(__, As);
8817
+ var ImportAsToken$1 = $TS($S(Loc, __, Colon, $E($EXPECT($L4, fail, 'ImportAsToken " "'))), function($skip, $loc, $0, $1, $2, $3, $4) {
8818
+ var l = $1;
8819
+ var ws = $2;
8820
+ var c = $3;
8821
+ const children = [
8822
+ ...ws,
8823
+ { ...c, token: "as " }
8824
+ ];
8825
+ if (!ws.length) {
8826
+ children.unshift({ $loc: l.$loc, token: " " });
8827
+ }
8828
+ return {
8829
+ children
8830
+ };
8831
+ });
8832
+ function ImportAsToken(state) {
8833
+ let eventData;
8834
+ if (state.events) {
8835
+ const result = state.events.enter?.("ImportAsToken", state);
8836
+ if (result) {
8837
+ if (result.cache)
8838
+ return result.cache;
8839
+ eventData = result.data;
8840
+ }
8841
+ }
8842
+ if (state.tokenize) {
8843
+ const result = $TOKEN("ImportAsToken", state, ImportAsToken$0(state) || ImportAsToken$1(state));
8844
+ if (state.events)
8845
+ state.events.exit?.("ImportAsToken", state, result, eventData);
8846
+ return result;
8847
+ } else {
8848
+ const result = ImportAsToken$0(state) || ImportAsToken$1(state);
8849
+ if (state.events)
8850
+ state.events.exit?.("ImportAsToken", state, result, eventData);
8851
+ return result;
8852
+ }
8853
+ }
8809
8854
  var ModuleExportName$0 = StringLiteral;
8810
8855
  var ModuleExportName$1 = IdentifierName;
8811
8856
  function ModuleExportName(state) {
@@ -14834,6 +14879,78 @@ ${input.slice(result.pos)}
14834
14879
  return result;
14835
14880
  }
14836
14881
  }
14882
+ var InlineTypeArguments$0 = $TS($S($Q(_), $EXPECT($L120, fail, 'InlineTypeArguments "<"'), $P(InlineTypeArgument), $Q(_), $EXPECT($L25, fail, 'InlineTypeArguments ">"')), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
14883
+ return { ts: true, children: $0 };
14884
+ });
14885
+ function InlineTypeArguments(state) {
14886
+ let eventData;
14887
+ if (state.events) {
14888
+ const result = state.events.enter?.("InlineTypeArguments", state);
14889
+ if (result) {
14890
+ if (result.cache)
14891
+ return result.cache;
14892
+ eventData = result.data;
14893
+ }
14894
+ }
14895
+ if (state.tokenize) {
14896
+ const result = $TOKEN("InlineTypeArguments", state, InlineTypeArguments$0(state));
14897
+ if (state.events)
14898
+ state.events.exit?.("InlineTypeArguments", state, result, eventData);
14899
+ return result;
14900
+ } else {
14901
+ const result = InlineTypeArguments$0(state);
14902
+ if (state.events)
14903
+ state.events.exit?.("InlineTypeArguments", state, result, eventData);
14904
+ return result;
14905
+ }
14906
+ }
14907
+ var InlineTypeArgument$0 = $S($Q(_), Type, InlineTypeArgumentDelimiter);
14908
+ function InlineTypeArgument(state) {
14909
+ let eventData;
14910
+ if (state.events) {
14911
+ const result = state.events.enter?.("InlineTypeArgument", state);
14912
+ if (result) {
14913
+ if (result.cache)
14914
+ return result.cache;
14915
+ eventData = result.data;
14916
+ }
14917
+ }
14918
+ if (state.tokenize) {
14919
+ const result = $TOKEN("InlineTypeArgument", state, InlineTypeArgument$0(state));
14920
+ if (state.events)
14921
+ state.events.exit?.("InlineTypeArgument", state, result, eventData);
14922
+ return result;
14923
+ } else {
14924
+ const result = InlineTypeArgument$0(state);
14925
+ if (state.events)
14926
+ state.events.exit?.("InlineTypeArgument", state, result, eventData);
14927
+ return result;
14928
+ }
14929
+ }
14930
+ var InlineTypeArgumentDelimiter$0 = $S($Q(_), Comma);
14931
+ var InlineTypeArgumentDelimiter$1 = $Y($S($Q(_), $EXPECT($L25, fail, 'InlineTypeArgumentDelimiter ">"')));
14932
+ function InlineTypeArgumentDelimiter(state) {
14933
+ let eventData;
14934
+ if (state.events) {
14935
+ const result = state.events.enter?.("InlineTypeArgumentDelimiter", state);
14936
+ if (result) {
14937
+ if (result.cache)
14938
+ return result.cache;
14939
+ eventData = result.data;
14940
+ }
14941
+ }
14942
+ if (state.tokenize) {
14943
+ const result = $TOKEN("InlineTypeArgumentDelimiter", state, InlineTypeArgumentDelimiter$0(state) || InlineTypeArgumentDelimiter$1(state));
14944
+ if (state.events)
14945
+ state.events.exit?.("InlineTypeArgumentDelimiter", state, result, eventData);
14946
+ return result;
14947
+ } else {
14948
+ const result = InlineTypeArgumentDelimiter$0(state) || InlineTypeArgumentDelimiter$1(state);
14949
+ if (state.events)
14950
+ state.events.exit?.("InlineTypeArgumentDelimiter", state, result, eventData);
14951
+ return result;
14952
+ }
14953
+ }
14837
14954
  var CompactTypeArguments$0 = $TS($S($EXPECT($L120, fail, 'CompactTypeArguments "<"'), $P(TypeArgument), __, $EXPECT($L25, fail, 'CompactTypeArguments ">"')), function($skip, $loc, $0, $1, $2, $3, $4) {
14838
14955
  return { ts: true, children: $0 };
14839
14956
  });
@@ -15943,6 +16060,33 @@ ${input.slice(result.pos)}
15943
16060
  return result;
15944
16061
  }
15945
16062
  }
16063
+ var CoffeePrototypeEnabled$0 = $TV($EXPECT($L0, fail, 'CoffeePrototypeEnabled ""'), function($skip, $loc, $0, $1) {
16064
+ if (module.config.coffeePrototype)
16065
+ return;
16066
+ return $skip;
16067
+ });
16068
+ function CoffeePrototypeEnabled(state) {
16069
+ let eventData;
16070
+ if (state.events) {
16071
+ const result = state.events.enter?.("CoffeePrototypeEnabled", state);
16072
+ if (result) {
16073
+ if (result.cache)
16074
+ return result.cache;
16075
+ eventData = result.data;
16076
+ }
16077
+ }
16078
+ if (state.tokenize) {
16079
+ const result = $TOKEN("CoffeePrototypeEnabled", state, CoffeePrototypeEnabled$0(state));
16080
+ if (state.events)
16081
+ state.events.exit?.("CoffeePrototypeEnabled", state, result, eventData);
16082
+ return result;
16083
+ } else {
16084
+ const result = CoffeePrototypeEnabled$0(state);
16085
+ if (state.events)
16086
+ state.events.exit?.("CoffeePrototypeEnabled", state, result, eventData);
16087
+ return result;
16088
+ }
16089
+ }
15946
16090
  var Reset$0 = $TV($EXPECT($L0, fail, 'Reset ""'), function($skip, $loc, $0, $1) {
15947
16091
  module.indentLevels = [{
15948
16092
  level: 0,
@@ -15973,6 +16117,7 @@ ${input.slice(result.pos)}
15973
16117
  coffeeLineContinuation: false,
15974
16118
  coffeeNot: false,
15975
16119
  coffeeOf: false,
16120
+ coffeePrototype: false,
15976
16121
  implicitReturns: true,
15977
16122
  react: false,
15978
16123
  solid: false,
@@ -16127,6 +16272,7 @@ ${input.slice(result.pos)}
16127
16272
  this.coffeeLineContinuation = true;
16128
16273
  this.coffeeNot = true;
16129
16274
  this.coffeeOf = true;
16275
+ this.coffeePrototype = true;
16130
16276
  } else {
16131
16277
  this.autoVar = false;
16132
16278
  this.coffeeBinaryExistential = false;
@@ -16141,6 +16287,7 @@ ${input.slice(result.pos)}
16141
16287
  this.coffeeLineContinuation = false;
16142
16288
  this.coffeeNot = false;
16143
16289
  this.coffeeOf = false;
16290
+ this.coffeePrototype = false;
16144
16291
  }
16145
16292
  }
16146
16293
  });
@@ -16278,7 +16425,7 @@ ${input.slice(result.pos)}
16278
16425
  id: "results"
16279
16426
  };
16280
16427
  insertPush(exp.block, resultsRef);
16281
- exp.children = ["(", resultsRef, "=>{", ...exp.children, "; return ", resultsRef, "})([])"];
16428
+ exp.children = ["(()=>{const ", resultsRef, "=[];", ...exp.children, "; return ", resultsRef, "})()"];
16282
16429
  }
16283
16430
  function wrapIterationReturningResults(statement, outerRef) {
16284
16431
  const resultsRef = {
@@ -17404,6 +17551,7 @@ ${input.slice(result.pos)}
17404
17551
  compile: () => compile,
17405
17552
  default: () => main_default,
17406
17553
  generate: () => generate_default,
17554
+ isCompileError: () => isCompileError,
17407
17555
  parse: () => parse,
17408
17556
  util: () => util_exports
17409
17557
  });
@@ -17887,6 +18035,11 @@ ${"//#"} sourceMappingURL=data:application/json;base64,${base64Encode2(JSON.stri
17887
18035
  };
17888
18036
  return events;
17889
18037
  };
17890
- var main_default = { parse, generate: generate_default, util: util_exports, compile };
18038
+ var isCompileError = function(err) {
18039
+ return err instanceof Error && [err.message, err.name, err.filename, err.line, err.column, err.offset].every(function(value) {
18040
+ return value !== void 0;
18041
+ });
18042
+ };
18043
+ var main_default = { parse, generate: generate_default, util: util_exports, compile, isCompileError };
17891
18044
  return __toCommonJS(main_exports);
17892
18045
  })();
package/dist/civet CHANGED
@@ -191,7 +191,9 @@ repl = function(options) {
191
191
  return "\u{1F431}> ";
192
192
  }
193
193
  }(),
194
- writer: options.compile && !options.ast ? function(obj) {
194
+ writer: options.ast ? function(obj) {
195
+ return JSON.stringify(obj, null, 2);
196
+ } : options.compile ? function(obj) {
195
197
  return obj != null ? obj.replace(/\n*$/, "") : void 0;
196
198
  } : void 0,
197
199
  eval: function(input, context, filename, callback) {
package/dist/main.js CHANGED
@@ -659,6 +659,7 @@ ${input.slice(result.pos)}
659
659
  FromClause,
660
660
  TypeAndImportSpecifier,
661
661
  ImportSpecifier,
662
+ ImportAsToken,
662
663
  ModuleExportName,
663
664
  ModuleSpecifier,
664
665
  UnprocessedModuleSpecifier,
@@ -881,6 +882,9 @@ ${input.slice(result.pos)}
881
882
  TypeBinaryOp,
882
883
  FunctionType,
883
884
  TypeArguments,
885
+ InlineTypeArguments,
886
+ InlineTypeArgument,
887
+ InlineTypeArgumentDelimiter,
884
888
  CompactTypeArguments,
885
889
  TypeArgument,
886
890
  TypeArgumentDelimiter,
@@ -924,6 +928,7 @@ ${input.slice(result.pos)}
924
928
  CoffeeLineContinuationEnabled,
925
929
  CoffeeNotEnabled,
926
930
  CoffeeOfEnabled,
931
+ CoffeePrototypeEnabled,
927
932
  Reset,
928
933
  Init,
929
934
  Indent,
@@ -1348,12 +1353,13 @@ ${input.slice(result.pos)}
1348
1353
  }
1349
1354
  }
1350
1355
  var Arguments$0 = ExplicitArguments;
1351
- var Arguments$1 = $TS($S(ApplicationStart, InsertOpenParen, $Q(_), ArgumentList, InsertCloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
1352
- var open = $2;
1353
- var ws = $3;
1354
- var args = $4;
1355
- var close = $5;
1356
- return [open, module2.insertTrimmingSpace(ws, ""), args, close];
1356
+ var Arguments$1 = $TS($S($E($S(InlineTypeArguments, $N($S(__, ImplementsToken)))), ApplicationStart, InsertOpenParen, $Q(_), ArgumentList, InsertCloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
1357
+ var ta = $1;
1358
+ var open = $3;
1359
+ var ws = $4;
1360
+ var args = $5;
1361
+ var close = $6;
1362
+ return [ta?.[0], open, module2.insertTrimmingSpace(ws, ""), args, close];
1357
1363
  });
1358
1364
  function Arguments(state) {
1359
1365
  let eventData;
@@ -3260,9 +3266,9 @@ ${input.slice(result.pos)}
3260
3266
  children
3261
3267
  };
3262
3268
  });
3263
- var PropertyAccess$1 = $TS($S(DoubleColon, $E(IdentifierName)), function($skip, $loc, $0, $1, $2) {
3264
- var p = $1;
3265
- var id = $2;
3269
+ var PropertyAccess$1 = $TS($S(CoffeePrototypeEnabled, DoubleColon, $E(IdentifierName)), function($skip, $loc, $0, $1, $2, $3) {
3270
+ var p = $2;
3271
+ var id = $3;
3266
3272
  if (id) {
3267
3273
  p.token = ".prototype.";
3268
3274
  return [p, id];
@@ -7499,7 +7505,7 @@ ${input.slice(result.pos)}
7499
7505
  declaration = {
7500
7506
  type: "Declaration",
7501
7507
  children: ["let ", ...startRefDec, ...endRefDec, counterRef, " = ", varRef2, " = ", startRef, ...ascDec],
7502
- names: []
7508
+ names: varRef2.names
7503
7509
  };
7504
7510
  blockPrefix.push(["", {
7505
7511
  type: "AssignmentExpression",
@@ -7630,11 +7636,12 @@ ${input.slice(result.pos)}
7630
7636
  var CoffeeForDeclaration$0 = $TS($S($E($S(__, $EXPECT($L78, fail, 'CoffeeForDeclaration "own"'), NonIdContinue)), ForBinding), function($skip, $loc, $0, $1, $2) {
7631
7637
  var own = $1;
7632
7638
  var binding = $2;
7633
- if (own) {
7634
- binding.own = true;
7635
- }
7636
- binding.type = "AssignmentExpression";
7637
- return binding;
7639
+ return {
7640
+ type: "AssignmentExpression",
7641
+ own: Boolean(own),
7642
+ children: [$2],
7643
+ names: $2.names
7644
+ };
7638
7645
  });
7639
7646
  function CoffeeForDeclaration(state) {
7640
7647
  let eventData;
@@ -8658,8 +8665,8 @@ ${input.slice(result.pos)}
8658
8665
  return result;
8659
8666
  }
8660
8667
  }
8661
- var NameSpaceImport$0 = $TS($S(Star, __, As, __, ImportedBinding), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
8662
- var binding = $5;
8668
+ var NameSpaceImport$0 = $TS($S(Star, ImportAsToken, __, ImportedBinding), function($skip, $loc, $0, $1, $2, $3, $4) {
8669
+ var binding = $4;
8663
8670
  return {
8664
8671
  type: "Declaration",
8665
8672
  children: $0,
@@ -8769,8 +8776,8 @@ ${input.slice(result.pos)}
8769
8776
  return result;
8770
8777
  }
8771
8778
  }
8772
- var ImportSpecifier$0 = $TS($S(__, ModuleExportName, __, As, __, ImportedBinding, ObjectPropertyDelimiter), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
8773
- var binding = $6;
8779
+ var ImportSpecifier$0 = $TS($S(__, ModuleExportName, ImportAsToken, __, ImportedBinding, ObjectPropertyDelimiter), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
8780
+ var binding = $5;
8774
8781
  return {
8775
8782
  binding,
8776
8783
  children: $0
@@ -8805,6 +8812,44 @@ ${input.slice(result.pos)}
8805
8812
  return result;
8806
8813
  }
8807
8814
  }
8815
+ var ImportAsToken$0 = $S(__, As);
8816
+ var ImportAsToken$1 = $TS($S(Loc, __, Colon, $E($EXPECT($L4, fail, 'ImportAsToken " "'))), function($skip, $loc, $0, $1, $2, $3, $4) {
8817
+ var l = $1;
8818
+ var ws = $2;
8819
+ var c = $3;
8820
+ const children = [
8821
+ ...ws,
8822
+ { ...c, token: "as " }
8823
+ ];
8824
+ if (!ws.length) {
8825
+ children.unshift({ $loc: l.$loc, token: " " });
8826
+ }
8827
+ return {
8828
+ children
8829
+ };
8830
+ });
8831
+ function ImportAsToken(state) {
8832
+ let eventData;
8833
+ if (state.events) {
8834
+ const result = state.events.enter?.("ImportAsToken", state);
8835
+ if (result) {
8836
+ if (result.cache)
8837
+ return result.cache;
8838
+ eventData = result.data;
8839
+ }
8840
+ }
8841
+ if (state.tokenize) {
8842
+ const result = $TOKEN("ImportAsToken", state, ImportAsToken$0(state) || ImportAsToken$1(state));
8843
+ if (state.events)
8844
+ state.events.exit?.("ImportAsToken", state, result, eventData);
8845
+ return result;
8846
+ } else {
8847
+ const result = ImportAsToken$0(state) || ImportAsToken$1(state);
8848
+ if (state.events)
8849
+ state.events.exit?.("ImportAsToken", state, result, eventData);
8850
+ return result;
8851
+ }
8852
+ }
8808
8853
  var ModuleExportName$0 = StringLiteral;
8809
8854
  var ModuleExportName$1 = IdentifierName;
8810
8855
  function ModuleExportName(state) {
@@ -14833,6 +14878,78 @@ ${input.slice(result.pos)}
14833
14878
  return result;
14834
14879
  }
14835
14880
  }
14881
+ var InlineTypeArguments$0 = $TS($S($Q(_), $EXPECT($L120, fail, 'InlineTypeArguments "<"'), $P(InlineTypeArgument), $Q(_), $EXPECT($L25, fail, 'InlineTypeArguments ">"')), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
14882
+ return { ts: true, children: $0 };
14883
+ });
14884
+ function InlineTypeArguments(state) {
14885
+ let eventData;
14886
+ if (state.events) {
14887
+ const result = state.events.enter?.("InlineTypeArguments", state);
14888
+ if (result) {
14889
+ if (result.cache)
14890
+ return result.cache;
14891
+ eventData = result.data;
14892
+ }
14893
+ }
14894
+ if (state.tokenize) {
14895
+ const result = $TOKEN("InlineTypeArguments", state, InlineTypeArguments$0(state));
14896
+ if (state.events)
14897
+ state.events.exit?.("InlineTypeArguments", state, result, eventData);
14898
+ return result;
14899
+ } else {
14900
+ const result = InlineTypeArguments$0(state);
14901
+ if (state.events)
14902
+ state.events.exit?.("InlineTypeArguments", state, result, eventData);
14903
+ return result;
14904
+ }
14905
+ }
14906
+ var InlineTypeArgument$0 = $S($Q(_), Type, InlineTypeArgumentDelimiter);
14907
+ function InlineTypeArgument(state) {
14908
+ let eventData;
14909
+ if (state.events) {
14910
+ const result = state.events.enter?.("InlineTypeArgument", state);
14911
+ if (result) {
14912
+ if (result.cache)
14913
+ return result.cache;
14914
+ eventData = result.data;
14915
+ }
14916
+ }
14917
+ if (state.tokenize) {
14918
+ const result = $TOKEN("InlineTypeArgument", state, InlineTypeArgument$0(state));
14919
+ if (state.events)
14920
+ state.events.exit?.("InlineTypeArgument", state, result, eventData);
14921
+ return result;
14922
+ } else {
14923
+ const result = InlineTypeArgument$0(state);
14924
+ if (state.events)
14925
+ state.events.exit?.("InlineTypeArgument", state, result, eventData);
14926
+ return result;
14927
+ }
14928
+ }
14929
+ var InlineTypeArgumentDelimiter$0 = $S($Q(_), Comma);
14930
+ var InlineTypeArgumentDelimiter$1 = $Y($S($Q(_), $EXPECT($L25, fail, 'InlineTypeArgumentDelimiter ">"')));
14931
+ function InlineTypeArgumentDelimiter(state) {
14932
+ let eventData;
14933
+ if (state.events) {
14934
+ const result = state.events.enter?.("InlineTypeArgumentDelimiter", state);
14935
+ if (result) {
14936
+ if (result.cache)
14937
+ return result.cache;
14938
+ eventData = result.data;
14939
+ }
14940
+ }
14941
+ if (state.tokenize) {
14942
+ const result = $TOKEN("InlineTypeArgumentDelimiter", state, InlineTypeArgumentDelimiter$0(state) || InlineTypeArgumentDelimiter$1(state));
14943
+ if (state.events)
14944
+ state.events.exit?.("InlineTypeArgumentDelimiter", state, result, eventData);
14945
+ return result;
14946
+ } else {
14947
+ const result = InlineTypeArgumentDelimiter$0(state) || InlineTypeArgumentDelimiter$1(state);
14948
+ if (state.events)
14949
+ state.events.exit?.("InlineTypeArgumentDelimiter", state, result, eventData);
14950
+ return result;
14951
+ }
14952
+ }
14836
14953
  var CompactTypeArguments$0 = $TS($S($EXPECT($L120, fail, 'CompactTypeArguments "<"'), $P(TypeArgument), __, $EXPECT($L25, fail, 'CompactTypeArguments ">"')), function($skip, $loc, $0, $1, $2, $3, $4) {
14837
14954
  return { ts: true, children: $0 };
14838
14955
  });
@@ -15942,6 +16059,33 @@ ${input.slice(result.pos)}
15942
16059
  return result;
15943
16060
  }
15944
16061
  }
16062
+ var CoffeePrototypeEnabled$0 = $TV($EXPECT($L0, fail, 'CoffeePrototypeEnabled ""'), function($skip, $loc, $0, $1) {
16063
+ if (module2.config.coffeePrototype)
16064
+ return;
16065
+ return $skip;
16066
+ });
16067
+ function CoffeePrototypeEnabled(state) {
16068
+ let eventData;
16069
+ if (state.events) {
16070
+ const result = state.events.enter?.("CoffeePrototypeEnabled", state);
16071
+ if (result) {
16072
+ if (result.cache)
16073
+ return result.cache;
16074
+ eventData = result.data;
16075
+ }
16076
+ }
16077
+ if (state.tokenize) {
16078
+ const result = $TOKEN("CoffeePrototypeEnabled", state, CoffeePrototypeEnabled$0(state));
16079
+ if (state.events)
16080
+ state.events.exit?.("CoffeePrototypeEnabled", state, result, eventData);
16081
+ return result;
16082
+ } else {
16083
+ const result = CoffeePrototypeEnabled$0(state);
16084
+ if (state.events)
16085
+ state.events.exit?.("CoffeePrototypeEnabled", state, result, eventData);
16086
+ return result;
16087
+ }
16088
+ }
15945
16089
  var Reset$0 = $TV($EXPECT($L0, fail, 'Reset ""'), function($skip, $loc, $0, $1) {
15946
16090
  module2.indentLevels = [{
15947
16091
  level: 0,
@@ -15972,6 +16116,7 @@ ${input.slice(result.pos)}
15972
16116
  coffeeLineContinuation: false,
15973
16117
  coffeeNot: false,
15974
16118
  coffeeOf: false,
16119
+ coffeePrototype: false,
15975
16120
  implicitReturns: true,
15976
16121
  react: false,
15977
16122
  solid: false,
@@ -16126,6 +16271,7 @@ ${input.slice(result.pos)}
16126
16271
  this.coffeeLineContinuation = true;
16127
16272
  this.coffeeNot = true;
16128
16273
  this.coffeeOf = true;
16274
+ this.coffeePrototype = true;
16129
16275
  } else {
16130
16276
  this.autoVar = false;
16131
16277
  this.coffeeBinaryExistential = false;
@@ -16140,6 +16286,7 @@ ${input.slice(result.pos)}
16140
16286
  this.coffeeLineContinuation = false;
16141
16287
  this.coffeeNot = false;
16142
16288
  this.coffeeOf = false;
16289
+ this.coffeePrototype = false;
16143
16290
  }
16144
16291
  }
16145
16292
  });
@@ -16277,7 +16424,7 @@ ${input.slice(result.pos)}
16277
16424
  id: "results"
16278
16425
  };
16279
16426
  insertPush(exp.block, resultsRef);
16280
- exp.children = ["(", resultsRef, "=>{", ...exp.children, "; return ", resultsRef, "})([])"];
16427
+ exp.children = ["(()=>{const ", resultsRef, "=[];", ...exp.children, "; return ", resultsRef, "})()"];
16281
16428
  }
16282
16429
  function wrapIterationReturningResults(statement, outerRef) {
16283
16430
  const resultsRef = {
@@ -17403,6 +17550,7 @@ __export(main_exports, {
17403
17550
  compile: () => compile,
17404
17551
  default: () => main_default,
17405
17552
  generate: () => generate_default,
17553
+ isCompileError: () => isCompileError,
17406
17554
  parse: () => parse,
17407
17555
  util: () => util_exports
17408
17556
  });
@@ -17887,11 +18035,17 @@ makeCache = function() {
17887
18035
  };
17888
18036
  return events;
17889
18037
  };
17890
- var main_default = { parse, generate: generate_default, util: util_exports, compile };
18038
+ var isCompileError = function(err) {
18039
+ return err instanceof Error && [err.message, err.name, err.filename, err.line, err.column, err.offset].every(function(value) {
18040
+ return value !== void 0;
18041
+ });
18042
+ };
18043
+ var main_default = { parse, generate: generate_default, util: util_exports, compile, isCompileError };
17891
18044
  // Annotate the CommonJS export names for ESM import in node:
17892
18045
  0 && (module.exports = {
17893
18046
  compile,
17894
18047
  generate,
18048
+ isCompileError,
17895
18049
  parse,
17896
18050
  util
17897
18051
  });