@danielx/civet 0.6.89 → 0.6.90

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
@@ -1900,7 +1900,7 @@ var Civet = (() => {
1900
1900
  return;
1901
1901
  case "IfStatement":
1902
1902
  insertReturn(exp.then);
1903
- if (exp.else)
1903
+ if (exp.else && exp.else.length !== 0)
1904
1904
  insertReturn(exp.else[2]);
1905
1905
  else
1906
1906
  exp.children.push(["", {
@@ -2193,7 +2193,8 @@ var Civet = (() => {
2193
2193
  }
2194
2194
  const { decl, bindings } = condition.declaration;
2195
2195
  const binding = bindings[0];
2196
- const { pattern, suffix, initializer, splices, thisAssignments } = binding;
2196
+ let { pattern, suffix, initializer, splices, thisAssignments } = binding;
2197
+ const nullCheck = suffix?.optional && !suffix.t && !suffix.nonnull;
2197
2198
  let ref = prependStatementExpressionBlock(initializer, parent);
2198
2199
  if (ref) {
2199
2200
  Object.assign(condition, {
@@ -2207,11 +2208,16 @@ var Civet = (() => {
2207
2208
  ref = makeRef();
2208
2209
  const grandparent = condition.parent?.parent;
2209
2210
  const children = (
2210
- // Check that the declaration is a plain assignment (no pattern-matching) and the immediate grandchild of an `if` or `while`
2211
+ // Wrap declaration that is a plain assignment (no pattern-matching) and the immediate grandchild of an `if` or `while`
2212
+ // to satisfy eslint's no-cond-assign rule
2211
2213
  // More complex conditions (triggered by pattern matching or `until`/`unless`) don't need double parens
2212
- // @ts-ignore Just because pattern might not have a type at runtime doesn't mean it's unsafe
2213
- pattern.type === "Identifier" && (grandparent?.type === "IfStatement" || grandparent?.type === "WhileStatement") ? ["(", ref, initializer, ")"] : [ref, initializer]
2214
+ pattern.type === "Identifier" && (grandparent?.type === "IfStatement" || grandparent?.type === "IterationStatement") && !nullCheck ? ["(", ref, initializer, ")"] : [ref, initializer]
2214
2215
  );
2216
+ if (nullCheck) {
2217
+ children.unshift("(");
2218
+ children.push(") != null");
2219
+ suffix = void 0;
2220
+ }
2215
2221
  Object.assign(condition, {
2216
2222
  type: "AssignmentExpression",
2217
2223
  children,
@@ -5081,6 +5087,7 @@ ${input.slice(result.pos)}
5081
5087
  MemberBracketContent,
5082
5088
  SliceParameters,
5083
5089
  AccessStart,
5090
+ ImplicitAccessStart,
5084
5091
  PropertyAccessModifier,
5085
5092
  PropertyAccess,
5086
5093
  PropertyGlob,
@@ -5215,6 +5222,7 @@ ${input.slice(result.pos)}
5215
5222
  BinaryOp,
5216
5223
  _BinaryOp,
5217
5224
  BinaryOpSymbol,
5225
+ ActualIn,
5218
5226
  CoffeeOfOp,
5219
5227
  NotOp,
5220
5228
  Xor,
@@ -5927,7 +5935,7 @@ ${input.slice(result.pos)}
5927
5935
  var $R4 = $R(new RegExp("[ \\t]", "suy"));
5928
5936
  var $R5 = $R(new RegExp("(?=['\"`])", "suy"));
5929
5937
  var $R6 = $R(new RegExp("(?=[\\/?])", "suy"));
5930
- var $R7 = $R(new RegExp("(?=[\\/\\[{?.!@'\u2019:])", "suy"));
5938
+ var $R7 = $R(new RegExp("(?=[\\/\\[{?.!@#'\u2019:])", "suy"));
5931
5939
  var $R8 = $R(new RegExp("[)}]", "suy"));
5932
5940
  var $R9 = $R(new RegExp("\\+\\+|--|[\\+-]\\S", "suy"));
5933
5941
  var $R10 = $R(new RegExp("[&]", "suy"));
@@ -5989,29 +5997,30 @@ ${input.slice(result.pos)}
5989
5997
  var $R66 = $R(new RegExp("[ \\t]+", "suy"));
5990
5998
  var $R67 = $R(new RegExp("(?=\\s|\\/|#)", "suy"));
5991
5999
  var $R68 = $R(new RegExp("(?!\\p{ID_Continue})", "suy"));
5992
- var $R69 = $R(new RegExp("['\u2019]s", "suy"));
5993
- var $R70 = $R(new RegExp("\\s", "suy"));
5994
- var $R71 = $R(new RegExp("(?=[<])", "suy"));
5995
- var $R72 = $R(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy"));
5996
- var $R73 = $R(new RegExp("[!+-]", "suy"));
5997
- var $R74 = $R(new RegExp("[\\s>]|\\/>", "suy"));
5998
- var $R75 = $R(new RegExp("(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+", "suy"));
5999
- var $R76 = $R(new RegExp(`"[^"]*"|'[^']*'`, "suy"));
6000
- var $R77 = $R(new RegExp("[<>]", "suy"));
6001
- var $R78 = $R(new RegExp("[!~+-](?!\\s|[!~+-]*&)", "suy"));
6002
- var $R79 = $R(new RegExp("(?:-[^-]|[^-]*)*", "suy"));
6003
- var $R80 = $R(new RegExp("[^{}<>\\r\\n]+", "suy"));
6004
- var $R81 = $R(new RegExp("[+-]?", "suy"));
6005
- var $R82 = $R(new RegExp("(?=if|unless)", "suy"));
6006
- var $R83 = $R(new RegExp("#![^\\r\\n]*", "suy"));
6007
- var $R84 = $R(new RegExp("[\\t ]*", "suy"));
6008
- var $R85 = $R(new RegExp("[ \\t]*", "suy"));
6009
- var $R86 = $R(new RegExp("[\\s]*", "suy"));
6010
- var $R87 = $R(new RegExp("\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([a-zA-Z0-9.+-]*))?", "suy"));
6011
- var $R88 = $R(new RegExp("\\/\\/\\/[^\\r\\n]*", "suy"));
6012
- var $R89 = $R(new RegExp("(?=[ \\t\\r\\n\\/#]|$)", "suy"));
6013
- var $R90 = $R(new RegExp("\\r\\n|\\n|\\r|$", "suy"));
6014
- var $R91 = $R(new RegExp("[^]*", "suy"));
6000
+ var $R69 = $R(new RegExp("[=:]", "suy"));
6001
+ var $R70 = $R(new RegExp("['\u2019]s", "suy"));
6002
+ var $R71 = $R(new RegExp("\\s", "suy"));
6003
+ var $R72 = $R(new RegExp("(?=[<])", "suy"));
6004
+ var $R73 = $R(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy"));
6005
+ var $R74 = $R(new RegExp("[!+-]", "suy"));
6006
+ var $R75 = $R(new RegExp("[\\s>]|\\/>", "suy"));
6007
+ var $R76 = $R(new RegExp("(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+", "suy"));
6008
+ var $R77 = $R(new RegExp(`"[^"]*"|'[^']*'`, "suy"));
6009
+ var $R78 = $R(new RegExp("[<>]", "suy"));
6010
+ var $R79 = $R(new RegExp("[!~+-](?!\\s|[!~+-]*&)", "suy"));
6011
+ var $R80 = $R(new RegExp("(?:-[^-]|[^-]*)*", "suy"));
6012
+ var $R81 = $R(new RegExp("[^{}<>\\r\\n]+", "suy"));
6013
+ var $R82 = $R(new RegExp("[+-]?", "suy"));
6014
+ var $R83 = $R(new RegExp("(?=if|unless)", "suy"));
6015
+ var $R84 = $R(new RegExp("#![^\\r\\n]*", "suy"));
6016
+ var $R85 = $R(new RegExp("[\\t ]*", "suy"));
6017
+ var $R86 = $R(new RegExp("[ \\t]*", "suy"));
6018
+ var $R87 = $R(new RegExp("[\\s]*", "suy"));
6019
+ var $R88 = $R(new RegExp("\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([a-zA-Z0-9.+-]*))?", "suy"));
6020
+ var $R89 = $R(new RegExp("\\/\\/\\/[^\\r\\n]*", "suy"));
6021
+ var $R90 = $R(new RegExp("(?=[ \\t\\r\\n\\/#]|$)", "suy"));
6022
+ var $R91 = $R(new RegExp("\\r\\n|\\n|\\r|$", "suy"));
6023
+ var $R92 = $R(new RegExp("[^]*", "suy"));
6015
6024
  var Program$0 = $TS($S(Reset, Init, $E(EOS), TopLevelStatements, __), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
6016
6025
  var statements = $4;
6017
6026
  processProgram({
@@ -7127,7 +7136,8 @@ ${input.slice(result.pos)}
7127
7136
  return $EVENT_C(ctx, state, "FieldDefinition", FieldDefinition$$);
7128
7137
  }
7129
7138
  var ThisLiteral$0 = This;
7130
- var ThisLiteral$1 = $TS($S(AtThis, $TEXT($S($E(Hash), IdentifierName))), function($skip, $loc, $0, $1, $2) {
7139
+ var ThisLiteral$1 = HashThis;
7140
+ var ThisLiteral$2 = $TS($S(AtThis, $TEXT($S($E(Hash), IdentifierName))), function($skip, $loc, $0, $1, $2) {
7131
7141
  var at = $1;
7132
7142
  var id = $2;
7133
7143
  return {
@@ -7140,20 +7150,20 @@ ${input.slice(result.pos)}
7140
7150
  thisShorthand: true
7141
7151
  };
7142
7152
  });
7143
- var ThisLiteral$2 = AtThis;
7144
- var ThisLiteral$3 = HashThis;
7153
+ var ThisLiteral$3 = AtThis;
7145
7154
  var ThisLiteral$$ = [ThisLiteral$0, ThisLiteral$1, ThisLiteral$2, ThisLiteral$3];
7146
7155
  function ThisLiteral(ctx, state) {
7147
7156
  return $EVENT_C(ctx, state, "ThisLiteral", ThisLiteral$$);
7148
7157
  }
7149
- var HashThis$0 = $TS($S(LengthShorthand, $E($S($Y($S($P(_), $C($S(Not, __, In), In))), $EXPECT($L0, 'HashThis ""')))), function($skip, $loc, $0, $1, $2) {
7150
- var id = $1;
7151
- var beforeIn = $2;
7152
- if (beforeIn != null)
7158
+ var HashThis$0 = $TS($S($E(AtThis), LengthShorthand, $E($S($Y($S(_, $E($S(Not, __)), ActualIn)), $EXPECT($L0, 'HashThis ""')))), function($skip, $loc, $0, $1, $2, $3) {
7159
+ var at = $1;
7160
+ var id = $2;
7161
+ var beforeIn = $3;
7162
+ if (beforeIn != null && at == null)
7153
7163
  return ['"', id.name, '"'];
7154
7164
  return {
7155
7165
  type: "MemberExpression",
7156
- children: ["this", {
7166
+ children: [at ?? "this", {
7157
7167
  type: "PropertyAccess",
7158
7168
  name: id.name,
7159
7169
  children: [".", id]
@@ -7161,7 +7171,7 @@ ${input.slice(result.pos)}
7161
7171
  thisShorthand: true
7162
7172
  };
7163
7173
  });
7164
- var HashThis$1 = $TS($S(PrivateIdentifier, $Y($S($P(_), $C($S(Not, __, In), In)))), function($skip, $loc, $0, $1, $2) {
7174
+ var HashThis$1 = $TS($S(PrivateIdentifier, $Y($S(_, $E($S(Not, __)), ActualIn))), function($skip, $loc, $0, $1, $2) {
7165
7175
  var id = $1;
7166
7176
  return id;
7167
7177
  });
@@ -7332,7 +7342,7 @@ ${input.slice(result.pos)}
7332
7342
  function MemberBase(ctx, state) {
7333
7343
  return $EVENT_C(ctx, state, "MemberBase", MemberBase$$);
7334
7344
  }
7335
- var MemberExpressionRest$0 = $TS($S($EXPECT($R7, "MemberExpressionRest /(?=[\\/\\[{?.!@'\u2019:])/"), $Q(InlineComment), MemberExpressionRestBody), function($skip, $loc, $0, $1, $2, $3) {
7345
+ var MemberExpressionRest$0 = $TS($S($EXPECT($R7, "MemberExpressionRest /(?=[\\/\\[{?.!@#'\u2019:])/"), $Q(InlineComment), MemberExpressionRestBody), function($skip, $loc, $0, $1, $2, $3) {
7336
7346
  var comments = $2;
7337
7347
  var body = $3;
7338
7348
  if (Array.isArray(body))
@@ -7465,16 +7475,27 @@ ${input.slice(result.pos)}
7465
7475
  var AccessStart$0 = $TS($S($E(PropertyAccessModifier), Dot, $N(Dot)), function($skip, $loc, $0, $1, $2, $3) {
7466
7476
  var modifier = $1;
7467
7477
  var dot = $2;
7468
- let children = modifier ? [modifier, dot] : [dot];
7469
7478
  return {
7470
7479
  type: "AccessStart",
7471
- children,
7480
+ children: modifier ? [modifier, dot] : [dot],
7472
7481
  optional: modifier?.token === "?"
7473
7482
  };
7474
7483
  });
7475
7484
  function AccessStart(ctx, state) {
7476
7485
  return $EVENT(ctx, state, "AccessStart", AccessStart$0);
7477
7486
  }
7487
+ var ImplicitAccessStart$0 = $TS($S($E(PropertyAccessModifier), InsertDot, $N(Dot)), function($skip, $loc, $0, $1, $2, $3) {
7488
+ var modifier = $1;
7489
+ var dot = $2;
7490
+ return {
7491
+ type: "AccessStart",
7492
+ children: modifier ? [modifier, dot] : [dot],
7493
+ optional: modifier?.token === "?"
7494
+ };
7495
+ });
7496
+ function ImplicitAccessStart(ctx, state) {
7497
+ return $EVENT(ctx, state, "ImplicitAccessStart", ImplicitAccessStart$0);
7498
+ }
7478
7499
  var PropertyAccessModifier$0 = QuestionMark;
7479
7500
  var PropertyAccessModifier$1 = NonNullAssertion;
7480
7501
  var PropertyAccessModifier$$ = [PropertyAccessModifier$0, PropertyAccessModifier$1];
@@ -7516,15 +7537,24 @@ ${input.slice(result.pos)}
7516
7537
  var dot = $1;
7517
7538
  var comments = $2;
7518
7539
  var id = $3;
7519
- const children = [dot, ...comments, ...id.children];
7520
7540
  return {
7521
7541
  type: "PropertyAccess",
7522
7542
  name: id.name,
7523
7543
  dot,
7524
- children
7544
+ children: [dot, ...comments, ...id.children]
7525
7545
  };
7526
7546
  });
7527
- var PropertyAccess$3 = $TS($S(CoffeePrototypeEnabled, DoubleColon, $E(IdentifierName)), function($skip, $loc, $0, $1, $2, $3) {
7547
+ var PropertyAccess$3 = $TS($S(ImplicitAccessStart, $C(PrivateIdentifier, LengthShorthand)), function($skip, $loc, $0, $1, $2) {
7548
+ var dot = $1;
7549
+ var id = $2;
7550
+ return {
7551
+ type: "PropertyAccess",
7552
+ name: id.name,
7553
+ dot,
7554
+ children: [dot, ...id.children]
7555
+ };
7556
+ });
7557
+ var PropertyAccess$4 = $TS($S(CoffeePrototypeEnabled, DoubleColon, $E(IdentifierName)), function($skip, $loc, $0, $1, $2, $3) {
7528
7558
  var p = $2;
7529
7559
  var id = $3;
7530
7560
  if (id) {
@@ -7545,7 +7575,7 @@ ${input.slice(result.pos)}
7545
7575
  };
7546
7576
  }
7547
7577
  });
7548
- var PropertyAccess$$ = [PropertyAccess$0, PropertyAccess$1, PropertyAccess$2, PropertyAccess$3];
7578
+ var PropertyAccess$$ = [PropertyAccess$0, PropertyAccess$1, PropertyAccess$2, PropertyAccess$3, PropertyAccess$4];
7549
7579
  function PropertyAccess(ctx, state) {
7550
7580
  return $EVENT_C(ctx, state, "PropertyAccess", PropertyAccess$$);
7551
7581
  }
@@ -9237,7 +9267,7 @@ ${input.slice(result.pos)}
9237
9267
  var ArrayElementExpression$1 = $T($S(ImplicitObjectLiteral, $Y(ArrayElementDelimiter)), function(value) {
9238
9268
  return value[0];
9239
9269
  });
9240
- var ArrayElementExpression$2 = $TS($S($E(ExtendedExpression), __, DotDotDot, $Y(ArrayElementDelimiter)), function($skip, $loc, $0, $1, $2, $3, $4) {
9270
+ var ArrayElementExpression$2 = $TS($S(ExtendedExpression, $E(_), DotDotDot, $Y(ArrayElementDelimiter)), function($skip, $loc, $0, $1, $2, $3, $4) {
9241
9271
  var exp = $1;
9242
9272
  var ws = $2;
9243
9273
  var dots = $3;
@@ -9246,7 +9276,7 @@ ${input.slice(result.pos)}
9246
9276
  }
9247
9277
  return {
9248
9278
  type: "SpreadElement",
9249
- children: [...ws, dots, exp],
9279
+ children: [ws, dots, exp],
9250
9280
  names: exp.names
9251
9281
  };
9252
9282
  });
@@ -10256,6 +10286,16 @@ ${input.slice(result.pos)}
10256
10286
  function BinaryOpSymbol(ctx, state) {
10257
10287
  return $EVENT_C(ctx, state, "BinaryOpSymbol", BinaryOpSymbol$$);
10258
10288
  }
10289
+ var ActualIn$0 = $T($S(CoffeeOfEnabled, Of), function(value) {
10290
+ return value[1];
10291
+ });
10292
+ var ActualIn$1 = $T($S($N(CoffeeOfEnabled), In), function(value) {
10293
+ return value[1];
10294
+ });
10295
+ var ActualIn$$ = [ActualIn$0, ActualIn$1];
10296
+ function ActualIn(ctx, state) {
10297
+ return $EVENT_C(ctx, state, "ActualIn", ActualIn$$);
10298
+ }
10259
10299
  var CoffeeOfOp$0 = $T($S(Of), function(value) {
10260
10300
  return "in";
10261
10301
  });
@@ -12569,7 +12609,7 @@ ${input.slice(result.pos)}
12569
12609
  function CoffeeSubstitutionStart(ctx, state) {
12570
12610
  return $EVENT(ctx, state, "CoffeeSubstitutionStart", CoffeeSubstitutionStart$0);
12571
12611
  }
12572
- var Colon$0 = $TS($S($EXPECT($L15, 'Colon ":"'), $N($EXPECT($L3, 'Colon "="'))), function($skip, $loc, $0, $1, $2) {
12612
+ var Colon$0 = $TS($S($EXPECT($L15, 'Colon ":"'), $N($EXPECT($R69, "Colon /[=:]/"))), function($skip, $loc, $0, $1, $2) {
12573
12613
  return { $loc, token: $1 };
12574
12614
  });
12575
12615
  function Colon(ctx, state) {
@@ -12614,7 +12654,7 @@ ${input.slice(result.pos)}
12614
12654
  var Dot$0 = $TV($EXPECT($L7, 'Dot "."'), function($skip, $loc, $0, $1) {
12615
12655
  return { $loc, token: $1 };
12616
12656
  });
12617
- var Dot$1 = $TS($S($EXPECT($R69, "Dot /['\u2019]s/"), _), function($skip, $loc, $0, $1, $2) {
12657
+ var Dot$1 = $TS($S($EXPECT($R70, "Dot /['\u2019]s/"), _), function($skip, $loc, $0, $1, $2) {
12618
12658
  var ws = $2;
12619
12659
  return [
12620
12660
  { $loc, token: "." },
@@ -12735,7 +12775,7 @@ ${input.slice(result.pos)}
12735
12775
  function If(ctx, state) {
12736
12776
  return $EVENT(ctx, state, "If", If$0);
12737
12777
  }
12738
- var Import$0 = $TS($S($EXPECT($L20, 'Import "import"'), $Y($EXPECT($R70, "Import /\\s/"))), function($skip, $loc, $0, $1, $2) {
12778
+ var Import$0 = $TS($S($EXPECT($L20, 'Import "import"'), $Y($EXPECT($R71, "Import /\\s/"))), function($skip, $loc, $0, $1, $2) {
12739
12779
  return { $loc, token: $1 };
12740
12780
  });
12741
12781
  function Import(ctx, state) {
@@ -13075,7 +13115,7 @@ ${input.slice(result.pos)}
13075
13115
  function JSXImplicitFragment(ctx, state) {
13076
13116
  return $EVENT(ctx, state, "JSXImplicitFragment", JSXImplicitFragment$0);
13077
13117
  }
13078
- var JSXTag$0 = $T($S($EXPECT($R71, "JSXTag /(?=[<])/"), _JSXTag), function(value) {
13118
+ var JSXTag$0 = $T($S($EXPECT($R72, "JSXTag /(?=[<])/"), _JSXTag), function(value) {
13079
13119
  return value[1];
13080
13120
  });
13081
13121
  function JSXTag(ctx, state) {
@@ -13222,7 +13262,7 @@ ${input.slice(result.pos)}
13222
13262
  function JSXElementName(ctx, state) {
13223
13263
  return $EVENT_C(ctx, state, "JSXElementName", JSXElementName$$);
13224
13264
  }
13225
- var JSXIdentifierName$0 = $R$0($EXPECT($R72, "JSXIdentifierName /(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*/"));
13265
+ var JSXIdentifierName$0 = $R$0($EXPECT($R73, "JSXIdentifierName /(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*/"));
13226
13266
  function JSXIdentifierName(ctx, state) {
13227
13267
  return $EVENT(ctx, state, "JSXIdentifierName", JSXIdentifierName$0);
13228
13268
  }
@@ -13401,7 +13441,7 @@ ${input.slice(result.pos)}
13401
13441
  class: $2
13402
13442
  };
13403
13443
  });
13404
- var JSXAttribute$7 = $TS($S($TEXT($EXPECT($R73, "JSXAttribute /[!+-]/")), JSXAttributeName, $Y(JSXAttributeSpace)), function($skip, $loc, $0, $1, $2, $3) {
13444
+ var JSXAttribute$7 = $TS($S($TEXT($EXPECT($R74, "JSXAttribute /[!+-]/")), JSXAttributeName, $Y(JSXAttributeSpace)), function($skip, $loc, $0, $1, $2, $3) {
13405
13445
  var toggle = $1;
13406
13446
  var id = $2;
13407
13447
  const value = toggle === "+" ? "true" : "false";
@@ -13411,11 +13451,11 @@ ${input.slice(result.pos)}
13411
13451
  function JSXAttribute(ctx, state) {
13412
13452
  return $EVENT_C(ctx, state, "JSXAttribute", JSXAttribute$$);
13413
13453
  }
13414
- var JSXAttributeSpace$0 = $R$0($EXPECT($R74, "JSXAttributeSpace /[\\s>]|\\/>/"));
13454
+ var JSXAttributeSpace$0 = $R$0($EXPECT($R75, "JSXAttributeSpace /[\\s>]|\\/>/"));
13415
13455
  function JSXAttributeSpace(ctx, state) {
13416
13456
  return $EVENT(ctx, state, "JSXAttributeSpace", JSXAttributeSpace$0);
13417
13457
  }
13418
- var JSXShorthandString$0 = $TR($EXPECT($R75, "JSXShorthandString /(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13458
+ var JSXShorthandString$0 = $TR($EXPECT($R76, "JSXShorthandString /(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13419
13459
  return quoteString($0);
13420
13460
  });
13421
13461
  var JSXShorthandString$1 = $TS($S(TemplateLiteral), function($skip, $loc, $0, $1) {
@@ -13449,7 +13489,7 @@ ${input.slice(result.pos)}
13449
13489
  }
13450
13490
  return [open, value, close];
13451
13491
  });
13452
- var JSXAttributeValue$4 = $R$0($EXPECT($R76, `JSXAttributeValue /"[^"]*"|'[^']*'/`));
13492
+ var JSXAttributeValue$4 = $R$0($EXPECT($R77, `JSXAttributeValue /"[^"]*"|'[^']*'/`));
13453
13493
  var JSXAttributeValue$$ = [JSXAttributeValue$0, JSXAttributeValue$1, JSXAttributeValue$2, JSXAttributeValue$3, JSXAttributeValue$4];
13454
13494
  function JSXAttributeValue(ctx, state) {
13455
13495
  return $EVENT_C(ctx, state, "JSXAttributeValue", JSXAttributeValue$$);
@@ -13462,7 +13502,7 @@ ${input.slice(result.pos)}
13462
13502
  function InlineJSXAttributeValue(ctx, state) {
13463
13503
  return $EVENT(ctx, state, "InlineJSXAttributeValue", InlineJSXAttributeValue$0);
13464
13504
  }
13465
- var InlineJSXBinaryOpRHS$0 = $TS($S($N($EXPECT($R77, "InlineJSXBinaryOpRHS /[<>]/")), BinaryOp, InlineJSXUnaryExpression), function($skip, $loc, $0, $1, $2, $3) {
13505
+ var InlineJSXBinaryOpRHS$0 = $TS($S($N($EXPECT($R78, "InlineJSXBinaryOpRHS /[<>]/")), BinaryOp, InlineJSXUnaryExpression), function($skip, $loc, $0, $1, $2, $3) {
13466
13506
  var op = $2;
13467
13507
  var rhs = $3;
13468
13508
  return [[], op, [], rhs];
@@ -13479,7 +13519,7 @@ ${input.slice(result.pos)}
13479
13519
  function InlineJSXUnaryExpression(ctx, state) {
13480
13520
  return $EVENT(ctx, state, "InlineJSXUnaryExpression", InlineJSXUnaryExpression$0);
13481
13521
  }
13482
- var InlineJSXUnaryOp$0 = $TR($EXPECT($R78, "InlineJSXUnaryOp /[!~+-](?!\\s|[!~+-]*&)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13522
+ var InlineJSXUnaryOp$0 = $TR($EXPECT($R79, "InlineJSXUnaryOp /[!~+-](?!\\s|[!~+-]*&)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13483
13523
  return { $loc, token: $0 };
13484
13524
  });
13485
13525
  function InlineJSXUnaryOp(ctx, state) {
@@ -13695,13 +13735,13 @@ ${input.slice(result.pos)}
13695
13735
  function JSXComment(ctx, state) {
13696
13736
  return $EVENT(ctx, state, "JSXComment", JSXComment$0);
13697
13737
  }
13698
- var JSXCommentContent$0 = $TR($EXPECT($R79, "JSXCommentContent /(?:-[^-]|[^-]*)*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13738
+ var JSXCommentContent$0 = $TR($EXPECT($R80, "JSXCommentContent /(?:-[^-]|[^-]*)*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13699
13739
  return { $loc, token: $0.replace(/\*\//g, "* /") };
13700
13740
  });
13701
13741
  function JSXCommentContent(ctx, state) {
13702
13742
  return $EVENT(ctx, state, "JSXCommentContent", JSXCommentContent$0);
13703
13743
  }
13704
- var JSXText$0 = $TR($EXPECT($R80, "JSXText /[^{}<>\\r\\n]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13744
+ var JSXText$0 = $TR($EXPECT($R81, "JSXText /[^{}<>\\r\\n]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13705
13745
  return {
13706
13746
  type: "JSXText",
13707
13747
  token: $0,
@@ -14122,7 +14162,7 @@ ${input.slice(result.pos)}
14122
14162
  function TypeProperty(ctx, state) {
14123
14163
  return $EVENT(ctx, state, "TypeProperty", TypeProperty$0);
14124
14164
  }
14125
- var TypeIndexSignature$0 = $S($E($S($R$0($EXPECT($R81, "TypeIndexSignature /[+-]?/")), Readonly, NotDedented)), OpenBracket, TypeIndex, CloseBracket, $E($S(__, $R$0($EXPECT($R17, "TypeIndexSignature /[+-]/")), $Y($S($E(_), QuestionMark)))));
14165
+ var TypeIndexSignature$0 = $S($E($S($R$0($EXPECT($R82, "TypeIndexSignature /[+-]?/")), Readonly, NotDedented)), OpenBracket, TypeIndex, CloseBracket, $E($S(__, $R$0($EXPECT($R17, "TypeIndexSignature /[+-]/")), $Y($S($E(_), QuestionMark)))));
14126
14166
  function TypeIndexSignature(ctx, state) {
14127
14167
  return $EVENT(ctx, state, "TypeIndexSignature", TypeIndexSignature$0);
14128
14168
  }
@@ -14142,11 +14182,13 @@ ${input.slice(result.pos)}
14142
14182
  return { "type": "TypeSuffix", "ts": true, "optional": optional, "children": value };
14143
14183
  });
14144
14184
  var TypeSuffix$2 = $TS($S(NonNullAssertion, $E(_), $E($S(Colon, MaybeIndentedType))), function($skip, $loc, $0, $1, $2, $3) {
14185
+ var nonnull = $1;
14145
14186
  var ct = $3;
14146
14187
  const [colon, t] = ct ?? [];
14147
14188
  return {
14148
14189
  type: "TypeSuffix",
14149
14190
  ts: true,
14191
+ nonnull,
14150
14192
  t,
14151
14193
  children: [$1, $2, colon, t]
14152
14194
  };
@@ -14416,7 +14458,7 @@ ${input.slice(result.pos)}
14416
14458
  function NestedType(ctx, state) {
14417
14459
  return $EVENT(ctx, state, "NestedType", NestedType$0);
14418
14460
  }
14419
- var TypeConditional$0 = $TS($S($E(_), $EXPECT($R82, "TypeConditional /(?=if|unless)/"), TypeIfThenElse), function($skip, $loc, $0, $1, $2, $3) {
14461
+ var TypeConditional$0 = $TS($S($E(_), $EXPECT($R83, "TypeConditional /(?=if|unless)/"), TypeIfThenElse), function($skip, $loc, $0, $1, $2, $3) {
14420
14462
  return [$1, expressionizeTypeIf($3)];
14421
14463
  });
14422
14464
  var TypeConditional$1 = $TS($S(TypeCondition, NotDedented, QuestionMark, Type, __, Colon, Type), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
@@ -14616,15 +14658,15 @@ ${input.slice(result.pos)}
14616
14658
  function ThisType(ctx, state) {
14617
14659
  return $EVENT(ctx, state, "ThisType", ThisType$0);
14618
14660
  }
14619
- var Shebang$0 = $S($R$0($EXPECT($R83, "Shebang /#![^\\r\\n]*/")), EOL);
14661
+ var Shebang$0 = $S($R$0($EXPECT($R84, "Shebang /#![^\\r\\n]*/")), EOL);
14620
14662
  function Shebang(ctx, state) {
14621
14663
  return $EVENT(ctx, state, "Shebang", Shebang$0);
14622
14664
  }
14623
- var CivetPrologue$0 = $T($S($EXPECT($R84, "CivetPrologue /[\\t ]*/"), DoubleQuote, CivetPrologueContent, DoubleQuote, SimpleStatementDelimiter, $EXPECT($R85, "CivetPrologue /[ \\t]*/"), $C(EOL, $Y(RestOfLine))), function(value) {
14665
+ var CivetPrologue$0 = $T($S($EXPECT($R85, "CivetPrologue /[\\t ]*/"), DoubleQuote, CivetPrologueContent, DoubleQuote, SimpleStatementDelimiter, $EXPECT($R86, "CivetPrologue /[ \\t]*/"), $C(EOL, $Y(RestOfLine))), function(value) {
14624
14666
  var content = value[2];
14625
14667
  return content;
14626
14668
  });
14627
- var CivetPrologue$1 = $T($S($EXPECT($R84, "CivetPrologue /[\\t ]*/"), SingleQuote, CivetPrologueContent, SingleQuote, SimpleStatementDelimiter, $EXPECT($R85, "CivetPrologue /[ \\t]*/"), $C(EOL, $Y(RestOfLine))), function(value) {
14669
+ var CivetPrologue$1 = $T($S($EXPECT($R85, "CivetPrologue /[\\t ]*/"), SingleQuote, CivetPrologueContent, SingleQuote, SimpleStatementDelimiter, $EXPECT($R86, "CivetPrologue /[ \\t]*/"), $C(EOL, $Y(RestOfLine))), function(value) {
14628
14670
  var content = value[2];
14629
14671
  return content;
14630
14672
  });
@@ -14632,7 +14674,7 @@ ${input.slice(result.pos)}
14632
14674
  function CivetPrologue(ctx, state) {
14633
14675
  return $EVENT_C(ctx, state, "CivetPrologue", CivetPrologue$$);
14634
14676
  }
14635
- var CivetPrologueContent$0 = $TS($S($EXPECT($L226, 'CivetPrologueContent "civet"'), NonIdContinue, $Q(CivetOption), $EXPECT($R86, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3, $4) {
14677
+ var CivetPrologueContent$0 = $TS($S($EXPECT($L226, 'CivetPrologueContent "civet"'), NonIdContinue, $Q(CivetOption), $EXPECT($R87, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3, $4) {
14636
14678
  var options = $3;
14637
14679
  return {
14638
14680
  type: "CivetPrologue",
@@ -14643,7 +14685,7 @@ ${input.slice(result.pos)}
14643
14685
  function CivetPrologueContent(ctx, state) {
14644
14686
  return $EVENT(ctx, state, "CivetPrologueContent", CivetPrologueContent$0);
14645
14687
  }
14646
- var CivetOption$0 = $TR($EXPECT($R87, "CivetOption /\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([a-zA-Z0-9.+-]*))?/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14688
+ var CivetOption$0 = $TR($EXPECT($R88, "CivetOption /\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([a-zA-Z0-9.+-]*))?/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14647
14689
  const optionName = $2.replace(/-+([a-z]?)/g, (_2, l) => {
14648
14690
  if (l)
14649
14691
  return l.toUpperCase();
@@ -14660,11 +14702,11 @@ ${input.slice(result.pos)}
14660
14702
  function CivetOption(ctx, state) {
14661
14703
  return $EVENT(ctx, state, "CivetOption", CivetOption$0);
14662
14704
  }
14663
- var UnknownPrologue$0 = $S($R$0($EXPECT($R84, "UnknownPrologue /[\\t ]*/")), StringLiteral, $TEXT(SimpleStatementDelimiter), EOS);
14705
+ var UnknownPrologue$0 = $S($R$0($EXPECT($R85, "UnknownPrologue /[\\t ]*/")), StringLiteral, $TEXT(SimpleStatementDelimiter), EOS);
14664
14706
  function UnknownPrologue(ctx, state) {
14665
14707
  return $EVENT(ctx, state, "UnknownPrologue", UnknownPrologue$0);
14666
14708
  }
14667
- var TripleSlashDirective$0 = $S($R$0($EXPECT($R88, "TripleSlashDirective /\\/\\/\\/[^\\r\\n]*/")), $E(EOS));
14709
+ var TripleSlashDirective$0 = $S($R$0($EXPECT($R89, "TripleSlashDirective /\\/\\/\\/[^\\r\\n]*/")), $E(EOS));
14668
14710
  function TripleSlashDirective(ctx, state) {
14669
14711
  return $EVENT(ctx, state, "TripleSlashDirective", TripleSlashDirective$0);
14670
14712
  }
@@ -14680,13 +14722,13 @@ ${input.slice(result.pos)}
14680
14722
  function PrologueString(ctx, state) {
14681
14723
  return $EVENT_C(ctx, state, "PrologueString", PrologueString$$);
14682
14724
  }
14683
- var EOS$0 = $T($S($EXPECT($R89, "EOS /(?=[ \\t\\r\\n\\/#]|$)/"), $P(RestOfLine)), function(value) {
14725
+ var EOS$0 = $T($S($EXPECT($R90, "EOS /(?=[ \\t\\r\\n\\/#]|$)/"), $P(RestOfLine)), function(value) {
14684
14726
  return value[1];
14685
14727
  });
14686
14728
  function EOS(ctx, state) {
14687
14729
  return $EVENT(ctx, state, "EOS", EOS$0);
14688
14730
  }
14689
- var EOL$0 = $TR($EXPECT($R90, "EOL /\\r\\n|\\n|\\r|$/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14731
+ var EOL$0 = $TR($EXPECT($R91, "EOL /\\r\\n|\\n|\\r|$/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14690
14732
  return { $loc, token: $0 };
14691
14733
  });
14692
14734
  function EOL(ctx, state) {
@@ -15258,11 +15300,11 @@ ${input.slice(result.pos)}
15258
15300
  function Prologue(ctx, state) {
15259
15301
  return $EVENT(ctx, state, "Prologue", Prologue$0);
15260
15302
  }
15261
- var ProloguePrefix$0 = $S(Prologue, $R$0($EXPECT($R91, "ProloguePrefix /[^]*/")));
15303
+ var ProloguePrefix$0 = $S(Prologue, $R$0($EXPECT($R92, "ProloguePrefix /[^]*/")));
15262
15304
  function ProloguePrefix(ctx, state) {
15263
15305
  return $EVENT(ctx, state, "ProloguePrefix", ProloguePrefix$0);
15264
15306
  }
15265
- var Indent$0 = $TR($EXPECT($R85, "Indent /[ \\t]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
15307
+ var Indent$0 = $TR($EXPECT($R86, "Indent /[ \\t]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
15266
15308
  const level = getIndentLevel($0, module.config.tab);
15267
15309
  return {
15268
15310
  $loc,
@@ -15486,6 +15528,7 @@ ${input.slice(result.pos)}
15486
15528
  exports.MemberBracketContent = MemberBracketContent;
15487
15529
  exports.SliceParameters = SliceParameters;
15488
15530
  exports.AccessStart = AccessStart;
15531
+ exports.ImplicitAccessStart = ImplicitAccessStart;
15489
15532
  exports.PropertyAccessModifier = PropertyAccessModifier;
15490
15533
  exports.PropertyAccess = PropertyAccess;
15491
15534
  exports.PropertyGlob = PropertyGlob;
@@ -15620,6 +15663,7 @@ ${input.slice(result.pos)}
15620
15663
  exports.BinaryOp = BinaryOp;
15621
15664
  exports._BinaryOp = _BinaryOp;
15622
15665
  exports.BinaryOpSymbol = BinaryOpSymbol;
15666
+ exports.ActualIn = ActualIn;
15623
15667
  exports.CoffeeOfOp = CoffeeOfOp;
15624
15668
  exports.NotOp = NotOp;
15625
15669
  exports.Xor = Xor;