@danielx/civet 0.6.84 → 0.6.86

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/main.js CHANGED
@@ -2113,7 +2113,7 @@ function prependStatementExpressionBlock(initializer, statement) {
2113
2113
  ws = exp[0];
2114
2114
  exp = exp[1];
2115
2115
  }
2116
- if (!(exp.type === "StatementExpression")) {
2116
+ if (!(exp?.type === "StatementExpression")) {
2117
2117
  return;
2118
2118
  }
2119
2119
  const pre = [];
@@ -2131,7 +2131,8 @@ function prependStatementExpressionBlock(initializer, statement) {
2131
2131
  assignResults(blockStatement, (resultNode) => {
2132
2132
  return makeNode({
2133
2133
  type: "AssignmentExpression",
2134
- children: [ref, " = ", resultNode]
2134
+ children: [ref, " = ", resultNode],
2135
+ parent: statement2
2135
2136
  });
2136
2137
  });
2137
2138
  const refDec = {
@@ -2149,7 +2150,8 @@ function prependStatementExpressionBlock(initializer, statement) {
2149
2150
  assignResults(blockStatement, (resultNode) => {
2150
2151
  return makeNode({
2151
2152
  type: "AssignmentExpression",
2152
- children: [ref, " = ", resultNode]
2153
+ children: [ref, " = ", resultNode],
2154
+ parent: statement
2153
2155
  });
2154
2156
  });
2155
2157
  const refDec = {
@@ -3132,6 +3134,7 @@ var lib_exports = {};
3132
3134
  __export(lib_exports, {
3133
3135
  addPostfixStatement: () => addPostfixStatement,
3134
3136
  adjustBindingElements: () => adjustBindingElements,
3137
+ adjustIndexAccess: () => adjustIndexAccess,
3135
3138
  attachPostfixStatementAsExpression: () => attachPostfixStatementAsExpression,
3136
3139
  blockWithPrefix: () => blockWithPrefix,
3137
3140
  convertObjectToJSXAttributes: () => convertObjectToJSXAttributes,
@@ -3195,6 +3198,18 @@ function addPostfixStatement(statement, ws, post) {
3195
3198
  }
3196
3199
  return post;
3197
3200
  }
3201
+ function adjustIndexAccess(dot) {
3202
+ if (gatherRecursive(dot, (node) => node.token === "?").length) {
3203
+ dot = [...dot, "["];
3204
+ } else {
3205
+ dot = replaceNodes(
3206
+ deepCopy(dot),
3207
+ (node) => node.token === ".",
3208
+ (node) => ({ ...node, token: "[" })
3209
+ );
3210
+ }
3211
+ return dot;
3212
+ }
3198
3213
  function negateCondition(condition) {
3199
3214
  let { expression } = condition;
3200
3215
  const children = condition.children.slice();
@@ -3222,6 +3237,7 @@ function isExpression(node) {
3222
3237
  case "BlockStatement":
3223
3238
  case "DebuggerStatement":
3224
3239
  case "Declaration":
3240
+ case "ForStatement":
3225
3241
  case "IfStatement":
3226
3242
  case "IterationStatement":
3227
3243
  case "ReturnStatement":
@@ -3900,6 +3916,40 @@ function processStatementExpressions(statements) {
3900
3916
  return;
3901
3917
  });
3902
3918
  }
3919
+ function processNegativeIndexAccess(statements) {
3920
+ gatherRecursiveAll(statements, (n) => n.type === "NegativeIndex").forEach((exp) => {
3921
+ const { parent } = exp;
3922
+ const index = parent.children.indexOf(exp);
3923
+ let ref, subexp;
3924
+ if (index === 1) {
3925
+ const child = parent.children[0];
3926
+ ref = maybeRef(child);
3927
+ if (ref !== child) {
3928
+ subexp = parent.children.splice(0, 1);
3929
+ }
3930
+ } else if (index > 1) {
3931
+ ref = makeRef();
3932
+ subexp = parent.children.splice(0, index);
3933
+ } else {
3934
+ throw new Error("Invalid parse tree for negative index access");
3935
+ }
3936
+ if (subexp) {
3937
+ exp.hoistDec = {
3938
+ type: "Declaration",
3939
+ children: ["let ", ref],
3940
+ names: []
3941
+ };
3942
+ parent.children.unshift(makeLeftHandSideExpression({
3943
+ type: "AssignmentExpression",
3944
+ children: [ref, " = ", subexp]
3945
+ }));
3946
+ }
3947
+ return exp.len.children = [
3948
+ ref,
3949
+ ".length"
3950
+ ];
3951
+ });
3952
+ }
3903
3953
  function processProgram(root, config, m, ReservedWord) {
3904
3954
  assert.equal(m.forbidBracedApplication.length, 1, "forbidBracedApplication");
3905
3955
  assert.equal(m.forbidClassImplicitCall.length, 1, "forbidClassImplicitCall");
@@ -3909,6 +3959,7 @@ function processProgram(root, config, m, ReservedWord) {
3909
3959
  assert.equal(m.JSXTagStack.length, 1, "JSXTagStack");
3910
3960
  addParentPointers(root);
3911
3961
  const { expressions: statements } = root;
3962
+ processNegativeIndexAccess(statements);
3912
3963
  processTypes(statements);
3913
3964
  processDeclarationConditions(statements, m.getRef);
3914
3965
  processPipelineExpressions(statements);
@@ -5589,7 +5640,7 @@ var require_parser = __commonJS({
5589
5640
  var $R13 = $R(new RegExp("(?=\\p{ID_Start}|[_$])", "suy"));
5590
5641
  var $R14 = $R(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$])*", "suy"));
5591
5642
  var $R15 = $R(new RegExp("(?=\\[)", "suy"));
5592
- var $R16 = $R(new RegExp("[!+-]", "suy"));
5643
+ var $R16 = $R(new RegExp("[!+-]?", "suy"));
5593
5644
  var $R17 = $R(new RegExp("[+-]", "suy"));
5594
5645
  var $R18 = $R(new RegExp("(?=\\p{ID_Start}|[_$^\xAB\xBB\u22D9\u2264\u2265\u2208\u220B\u2209\u220C\u2263\u2261\u2262\u2260=\u2016\u2047&|*\\/!?%<>\u29FA+-])", "suy"));
5595
5646
  var $R19 = $R(new RegExp("!\\^\\^?", "suy"));
@@ -5646,24 +5697,25 @@ var require_parser = __commonJS({
5646
5697
  var $R70 = $R(new RegExp("\\s", "suy"));
5647
5698
  var $R71 = $R(new RegExp("(?=[<])", "suy"));
5648
5699
  var $R72 = $R(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy"));
5649
- var $R73 = $R(new RegExp("[\\s>]|\\/>", "suy"));
5650
- var $R74 = $R(new RegExp("(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+", "suy"));
5651
- var $R75 = $R(new RegExp(`"[^"]*"|'[^']*'`, "suy"));
5652
- var $R76 = $R(new RegExp("[<>]", "suy"));
5653
- var $R77 = $R(new RegExp("[!~+-](?!\\s|[!~+-]*&)", "suy"));
5654
- var $R78 = $R(new RegExp("(?:-[^-]|[^-]*)*", "suy"));
5655
- var $R79 = $R(new RegExp("[^{}<>\\r\\n]+", "suy"));
5656
- var $R80 = $R(new RegExp("[+-]?", "suy"));
5657
- var $R81 = $R(new RegExp("(?=if|unless)", "suy"));
5658
- var $R82 = $R(new RegExp("#![^\\r\\n]*", "suy"));
5659
- var $R83 = $R(new RegExp("[\\t ]*", "suy"));
5660
- var $R84 = $R(new RegExp("[ \\t]*", "suy"));
5661
- var $R85 = $R(new RegExp("[\\s]*", "suy"));
5662
- var $R86 = $R(new RegExp("\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([a-zA-Z0-9.+-]*))?", "suy"));
5663
- var $R87 = $R(new RegExp("\\/\\/\\/[^\\r\\n]*", "suy"));
5664
- var $R88 = $R(new RegExp("(?=[ \\t\\r\\n\\/#]|$)", "suy"));
5665
- var $R89 = $R(new RegExp("\\r\\n|\\n|\\r|$", "suy"));
5666
- var $R90 = $R(new RegExp("[^]*", "suy"));
5700
+ var $R73 = $R(new RegExp("[!+-]", "suy"));
5701
+ var $R74 = $R(new RegExp("[\\s>]|\\/>", "suy"));
5702
+ var $R75 = $R(new RegExp("(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+", "suy"));
5703
+ var $R76 = $R(new RegExp(`"[^"]*"|'[^']*'`, "suy"));
5704
+ var $R77 = $R(new RegExp("[<>]", "suy"));
5705
+ var $R78 = $R(new RegExp("[!~+-](?!\\s|[!~+-]*&)", "suy"));
5706
+ var $R79 = $R(new RegExp("(?:-[^-]|[^-]*)*", "suy"));
5707
+ var $R80 = $R(new RegExp("[^{}<>\\r\\n]+", "suy"));
5708
+ var $R81 = $R(new RegExp("[+-]?", "suy"));
5709
+ var $R82 = $R(new RegExp("(?=if|unless)", "suy"));
5710
+ var $R83 = $R(new RegExp("#![^\\r\\n]*", "suy"));
5711
+ var $R84 = $R(new RegExp("[\\t ]*", "suy"));
5712
+ var $R85 = $R(new RegExp("[ \\t]*", "suy"));
5713
+ var $R86 = $R(new RegExp("[\\s]*", "suy"));
5714
+ var $R87 = $R(new RegExp("\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([a-zA-Z0-9.+-]*))?", "suy"));
5715
+ var $R88 = $R(new RegExp("\\/\\/\\/[^\\r\\n]*", "suy"));
5716
+ var $R89 = $R(new RegExp("(?=[ \\t\\r\\n\\/#]|$)", "suy"));
5717
+ var $R90 = $R(new RegExp("\\r\\n|\\n|\\r|$", "suy"));
5718
+ var $R91 = $R(new RegExp("[^]*", "suy"));
5667
5719
  var Program$0 = $TS($S(Reset, Init, $E(EOS), TopLevelStatements, __), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
5668
5720
  var statements = $4;
5669
5721
  processProgram({
@@ -6129,9 +6181,7 @@ var require_parser = __commonJS({
6129
6181
  return $EVENT_C(ctx, state, "UnaryWithoutParenthesizedAssignmentBody", UnaryWithoutParenthesizedAssignmentBody$$);
6130
6182
  }
6131
6183
  var UnaryPostfix$0 = QuestionMark;
6132
- var UnaryPostfix$1 = $T($P(TypePostfix), function(value) {
6133
- return { "ts": true, "children": value };
6134
- });
6184
+ var UnaryPostfix$1 = $P(TypePostfix);
6135
6185
  var UnaryPostfix$$ = [UnaryPostfix$0, UnaryPostfix$1];
6136
6186
  function UnaryPostfix(ctx, state) {
6137
6187
  return $EVENT_C(ctx, state, "UnaryPostfix", UnaryPostfix$$);
@@ -6139,7 +6189,7 @@ var require_parser = __commonJS({
6139
6189
  var TypePostfix$0 = $TS($S(_, NWTypePostfix), function($skip, $loc, $0, $1, $2) {
6140
6190
  var ws = $1;
6141
6191
  var postfix = $2;
6142
- return [ws, ...postfix];
6192
+ return [ws, postfix];
6143
6193
  });
6144
6194
  function TypePostfix(ctx, state) {
6145
6195
  return $EVENT(ctx, state, "TypePostfix", TypePostfix$0);
@@ -6154,18 +6204,26 @@ var require_parser = __commonJS({
6154
6204
  return $EVENT(ctx, state, "Tuple", Tuple$0);
6155
6205
  }
6156
6206
  var NWTypePostfix$0 = $TS($S(As, _, Tuple), function($skip, $loc, $0, $1, $2, $3) {
6157
- return [{ $loc: $1.$loc, token: "satisfies" }, $2, $3];
6207
+ return {
6208
+ ts: true,
6209
+ children: [{ $loc: $1.$loc, token: "satisfies" }, $2, $3]
6210
+ };
6158
6211
  });
6159
6212
  var NWTypePostfix$1 = $TS($S(As, $E(ExclamationPoint), Type), function($skip, $loc, $0, $1, $2, $3) {
6160
6213
  var as = $1;
6161
6214
  var ex = $2;
6162
6215
  var type = $3;
6216
+ let children;
6163
6217
  if (ex) {
6164
- return [{ $loc: ex.$loc, token: "as unknown " }, as, type];
6218
+ children = [{ $loc: ex.$loc, token: "as unknown " }, as, type];
6219
+ } else {
6220
+ children = [as, type];
6165
6221
  }
6166
- return [as, type];
6222
+ return { ts: true, children };
6223
+ });
6224
+ var NWTypePostfix$2 = $TS($S(Satisfies, Type), function($skip, $loc, $0, $1, $2) {
6225
+ return { ts: true, children: $0 };
6167
6226
  });
6168
- var NWTypePostfix$2 = $S(Satisfies, Type);
6169
6227
  var NWTypePostfix$$ = [NWTypePostfix$0, NWTypePostfix$1, NWTypePostfix$2];
6170
6228
  function NWTypePostfix(ctx, state) {
6171
6229
  return $EVENT_C(ctx, state, "NWTypePostfix", NWTypePostfix$$);
@@ -7108,19 +7166,10 @@ var require_parser = __commonJS({
7108
7166
  var PropertyAccess$0 = $TS($S(AccessStart, $C(TemplateLiteral, StringLiteral, IntegerLiteral)), function($skip, $loc, $0, $1, $2) {
7109
7167
  var dot = $1;
7110
7168
  var literal = $2;
7111
- if (gatherRecursive(dot, (node) => node.token === "?").length) {
7112
- dot = [...dot, "["];
7113
- } else {
7114
- dot = replaceNodes(
7115
- deepCopy(dot),
7116
- (node) => node.token === ".",
7117
- (node) => ({ ...node, token: "[" })
7118
- );
7119
- }
7120
7169
  return {
7121
7170
  type: "Index",
7122
7171
  children: [
7123
- dot,
7172
+ adjustIndexAccess(dot),
7124
7173
  literal,
7125
7174
  "]"
7126
7175
  ]
@@ -7130,11 +7179,20 @@ var require_parser = __commonJS({
7130
7179
  var dot = $1;
7131
7180
  var neg = $2;
7132
7181
  var num = $3;
7133
- return [
7134
- { type: "PropertyAccess", children: [dot, "at"] },
7135
- // not including `name` so that `{x.-1}` doesn't use it
7136
- { type: "Call", children: ["(", neg, num, ")"] }
7182
+ const len = {
7183
+ children: []
7184
+ }, children = [
7185
+ adjustIndexAccess(dot),
7186
+ len,
7187
+ neg,
7188
+ num,
7189
+ "]"
7137
7190
  ];
7191
+ return {
7192
+ type: "NegativeIndex",
7193
+ children,
7194
+ len
7195
+ };
7138
7196
  });
7139
7197
  var PropertyAccess$2 = $TS($S(AccessStart, $Q(InlineComment), $C(IdentifierName, PrivateIdentifier, LengthShorthand)), function($skip, $loc, $0, $1, $2, $3) {
7140
7198
  var access = $1;
@@ -9079,17 +9137,26 @@ var require_parser = __commonJS({
9079
9137
  children: [ws, ...prop.children]
9080
9138
  };
9081
9139
  });
9082
- var PropertyDefinition$1 = $TS($S($E(_), $TEXT($EXPECT($R16, "PropertyDefinition /[!+-]/")), PropertyName), function($skip, $loc, $0, $1, $2, $3) {
9140
+ var PropertyDefinition$1 = $TS($S($E(_), $TEXT($EXPECT($R16, "PropertyDefinition /[!+-]?/")), PropertyName, $Y(ObjectPropertyDelimiter)), function($skip, $loc, $0, $1, $2, $3, $4) {
9083
9141
  var ws = $1;
9084
9142
  var toggle = $2;
9085
9143
  var id = $3;
9086
- const value = toggle === "+" ? "true" : "false";
9144
+ if (toggle) {
9145
+ const value = toggle === "+" ? "true" : "false";
9146
+ return {
9147
+ type: "Property",
9148
+ children: [ws, id, ": ", value],
9149
+ name: id,
9150
+ names: id.names,
9151
+ value
9152
+ };
9153
+ }
9087
9154
  return {
9088
9155
  type: "Property",
9089
- children: [ws, id, ": ", value],
9156
+ children: [ws, id],
9090
9157
  name: id,
9091
9158
  names: id.names,
9092
- value
9159
+ value: id
9093
9160
  };
9094
9161
  });
9095
9162
  var PropertyDefinition$2 = $TS($S($E(_), MethodDefinition), function($skip, $loc, $0, $1, $2) {
@@ -12966,7 +13033,7 @@ var require_parser = __commonJS({
12966
13033
  class: $2
12967
13034
  };
12968
13035
  });
12969
- var JSXAttribute$7 = $TS($S($TEXT($EXPECT($R16, "JSXAttribute /[!+-]/")), JSXAttributeName, $Y(JSXAttributeSpace)), function($skip, $loc, $0, $1, $2, $3) {
13036
+ var JSXAttribute$7 = $TS($S($TEXT($EXPECT($R73, "JSXAttribute /[!+-]/")), JSXAttributeName, $Y(JSXAttributeSpace)), function($skip, $loc, $0, $1, $2, $3) {
12970
13037
  var toggle = $1;
12971
13038
  var id = $2;
12972
13039
  const value = toggle === "+" ? "true" : "false";
@@ -12976,11 +13043,11 @@ var require_parser = __commonJS({
12976
13043
  function JSXAttribute(ctx, state) {
12977
13044
  return $EVENT_C(ctx, state, "JSXAttribute", JSXAttribute$$);
12978
13045
  }
12979
- var JSXAttributeSpace$0 = $R$0($EXPECT($R73, "JSXAttributeSpace /[\\s>]|\\/>/"));
13046
+ var JSXAttributeSpace$0 = $R$0($EXPECT($R74, "JSXAttributeSpace /[\\s>]|\\/>/"));
12980
13047
  function JSXAttributeSpace(ctx, state) {
12981
13048
  return $EVENT(ctx, state, "JSXAttributeSpace", JSXAttributeSpace$0);
12982
13049
  }
12983
- var JSXShorthandString$0 = $TR($EXPECT($R74, "JSXShorthandString /(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13050
+ var JSXShorthandString$0 = $TR($EXPECT($R75, "JSXShorthandString /(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
12984
13051
  return quoteString($0);
12985
13052
  });
12986
13053
  var JSXShorthandString$1 = $TS($S(TemplateLiteral), function($skip, $loc, $0, $1) {
@@ -13014,7 +13081,7 @@ var require_parser = __commonJS({
13014
13081
  }
13015
13082
  return [open, value, close];
13016
13083
  });
13017
- var JSXAttributeValue$4 = $R$0($EXPECT($R75, `JSXAttributeValue /"[^"]*"|'[^']*'/`));
13084
+ var JSXAttributeValue$4 = $R$0($EXPECT($R76, `JSXAttributeValue /"[^"]*"|'[^']*'/`));
13018
13085
  var JSXAttributeValue$$ = [JSXAttributeValue$0, JSXAttributeValue$1, JSXAttributeValue$2, JSXAttributeValue$3, JSXAttributeValue$4];
13019
13086
  function JSXAttributeValue(ctx, state) {
13020
13087
  return $EVENT_C(ctx, state, "JSXAttributeValue", JSXAttributeValue$$);
@@ -13027,7 +13094,7 @@ var require_parser = __commonJS({
13027
13094
  function InlineJSXAttributeValue(ctx, state) {
13028
13095
  return $EVENT(ctx, state, "InlineJSXAttributeValue", InlineJSXAttributeValue$0);
13029
13096
  }
13030
- var InlineJSXBinaryOpRHS$0 = $TS($S($N($EXPECT($R76, "InlineJSXBinaryOpRHS /[<>]/")), BinaryOp, InlineJSXUnaryExpression), function($skip, $loc, $0, $1, $2, $3) {
13097
+ var InlineJSXBinaryOpRHS$0 = $TS($S($N($EXPECT($R77, "InlineJSXBinaryOpRHS /[<>]/")), BinaryOp, InlineJSXUnaryExpression), function($skip, $loc, $0, $1, $2, $3) {
13031
13098
  var op = $2;
13032
13099
  var rhs = $3;
13033
13100
  return [[], op, [], rhs];
@@ -13044,7 +13111,7 @@ var require_parser = __commonJS({
13044
13111
  function InlineJSXUnaryExpression(ctx, state) {
13045
13112
  return $EVENT(ctx, state, "InlineJSXUnaryExpression", InlineJSXUnaryExpression$0);
13046
13113
  }
13047
- var InlineJSXUnaryOp$0 = $TR($EXPECT($R77, "InlineJSXUnaryOp /[!~+-](?!\\s|[!~+-]*&)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13114
+ var InlineJSXUnaryOp$0 = $TR($EXPECT($R78, "InlineJSXUnaryOp /[!~+-](?!\\s|[!~+-]*&)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13048
13115
  return { $loc, token: $0 };
13049
13116
  });
13050
13117
  function InlineJSXUnaryOp(ctx, state) {
@@ -13260,13 +13327,13 @@ var require_parser = __commonJS({
13260
13327
  function JSXComment(ctx, state) {
13261
13328
  return $EVENT(ctx, state, "JSXComment", JSXComment$0);
13262
13329
  }
13263
- var JSXCommentContent$0 = $TR($EXPECT($R78, "JSXCommentContent /(?:-[^-]|[^-]*)*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13330
+ var JSXCommentContent$0 = $TR($EXPECT($R79, "JSXCommentContent /(?:-[^-]|[^-]*)*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13264
13331
  return { $loc, token: $0.replace(/\*\//g, "* /") };
13265
13332
  });
13266
13333
  function JSXCommentContent(ctx, state) {
13267
13334
  return $EVENT(ctx, state, "JSXCommentContent", JSXCommentContent$0);
13268
13335
  }
13269
- var JSXText$0 = $TR($EXPECT($R79, "JSXText /[^{}<>\\r\\n]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13336
+ var JSXText$0 = $TR($EXPECT($R80, "JSXText /[^{}<>\\r\\n]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13270
13337
  return {
13271
13338
  type: "JSXText",
13272
13339
  token: $0,
@@ -13687,7 +13754,7 @@ var require_parser = __commonJS({
13687
13754
  function TypeProperty(ctx, state) {
13688
13755
  return $EVENT(ctx, state, "TypeProperty", TypeProperty$0);
13689
13756
  }
13690
- var TypeIndexSignature$0 = $S($E($S($R$0($EXPECT($R80, "TypeIndexSignature /[+-]?/")), Readonly, NotDedented)), OpenBracket, TypeIndex, CloseBracket, $E($S(__, $R$0($EXPECT($R17, "TypeIndexSignature /[+-]/")), $Y($S($E(_), QuestionMark)))));
13757
+ 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)))));
13691
13758
  function TypeIndexSignature(ctx, state) {
13692
13759
  return $EVENT(ctx, state, "TypeIndexSignature", TypeIndexSignature$0);
13693
13760
  }
@@ -13981,7 +14048,7 @@ var require_parser = __commonJS({
13981
14048
  function NestedType(ctx, state) {
13982
14049
  return $EVENT(ctx, state, "NestedType", NestedType$0);
13983
14050
  }
13984
- var TypeConditional$0 = $TS($S($E(_), $EXPECT($R81, "TypeConditional /(?=if|unless)/"), TypeIfThenElse), function($skip, $loc, $0, $1, $2, $3) {
14051
+ var TypeConditional$0 = $TS($S($E(_), $EXPECT($R82, "TypeConditional /(?=if|unless)/"), TypeIfThenElse), function($skip, $loc, $0, $1, $2, $3) {
13985
14052
  return [$1, expressionizeTypeIf($3)];
13986
14053
  });
13987
14054
  var TypeConditional$1 = $TS($S(TypeCondition, NotDedented, QuestionMark, Type, __, Colon, Type), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
@@ -14174,15 +14241,15 @@ var require_parser = __commonJS({
14174
14241
  function ThisType(ctx, state) {
14175
14242
  return $EVENT(ctx, state, "ThisType", ThisType$0);
14176
14243
  }
14177
- var Shebang$0 = $S($R$0($EXPECT($R82, "Shebang /#![^\\r\\n]*/")), EOL);
14244
+ var Shebang$0 = $S($R$0($EXPECT($R83, "Shebang /#![^\\r\\n]*/")), EOL);
14178
14245
  function Shebang(ctx, state) {
14179
14246
  return $EVENT(ctx, state, "Shebang", Shebang$0);
14180
14247
  }
14181
- var CivetPrologue$0 = $T($S($EXPECT($R83, "CivetPrologue /[\\t ]*/"), DoubleQuote, CivetPrologueContent, DoubleQuote, SimpleStatementDelimiter, $EXPECT($R84, "CivetPrologue /[ \\t]*/"), $C(EOL, $Y(RestOfLine))), function(value) {
14248
+ var CivetPrologue$0 = $T($S($EXPECT($R84, "CivetPrologue /[\\t ]*/"), DoubleQuote, CivetPrologueContent, DoubleQuote, SimpleStatementDelimiter, $EXPECT($R85, "CivetPrologue /[ \\t]*/"), $C(EOL, $Y(RestOfLine))), function(value) {
14182
14249
  var content = value[2];
14183
14250
  return content;
14184
14251
  });
14185
- var CivetPrologue$1 = $T($S($EXPECT($R83, "CivetPrologue /[\\t ]*/"), SingleQuote, CivetPrologueContent, SingleQuote, SimpleStatementDelimiter, $EXPECT($R84, "CivetPrologue /[ \\t]*/"), $C(EOL, $Y(RestOfLine))), function(value) {
14252
+ var CivetPrologue$1 = $T($S($EXPECT($R84, "CivetPrologue /[\\t ]*/"), SingleQuote, CivetPrologueContent, SingleQuote, SimpleStatementDelimiter, $EXPECT($R85, "CivetPrologue /[ \\t]*/"), $C(EOL, $Y(RestOfLine))), function(value) {
14186
14253
  var content = value[2];
14187
14254
  return content;
14188
14255
  });
@@ -14190,7 +14257,7 @@ var require_parser = __commonJS({
14190
14257
  function CivetPrologue(ctx, state) {
14191
14258
  return $EVENT_C(ctx, state, "CivetPrologue", CivetPrologue$$);
14192
14259
  }
14193
- var CivetPrologueContent$0 = $TS($S($EXPECT($L225, 'CivetPrologueContent "civet"'), NonIdContinue, $Q(CivetOption), $EXPECT($R85, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3, $4) {
14260
+ var CivetPrologueContent$0 = $TS($S($EXPECT($L225, 'CivetPrologueContent "civet"'), NonIdContinue, $Q(CivetOption), $EXPECT($R86, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3, $4) {
14194
14261
  var options = $3;
14195
14262
  return {
14196
14263
  type: "CivetPrologue",
@@ -14201,7 +14268,7 @@ var require_parser = __commonJS({
14201
14268
  function CivetPrologueContent(ctx, state) {
14202
14269
  return $EVENT(ctx, state, "CivetPrologueContent", CivetPrologueContent$0);
14203
14270
  }
14204
- var CivetOption$0 = $TR($EXPECT($R86, "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) {
14271
+ 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) {
14205
14272
  const optionName = $2.replace(/-+([a-z]?)/g, (_2, l) => {
14206
14273
  if (l)
14207
14274
  return l.toUpperCase();
@@ -14218,11 +14285,11 @@ var require_parser = __commonJS({
14218
14285
  function CivetOption(ctx, state) {
14219
14286
  return $EVENT(ctx, state, "CivetOption", CivetOption$0);
14220
14287
  }
14221
- var UnknownPrologue$0 = $S($R$0($EXPECT($R83, "UnknownPrologue /[\\t ]*/")), StringLiteral, $TEXT(SimpleStatementDelimiter), EOS);
14288
+ var UnknownPrologue$0 = $S($R$0($EXPECT($R84, "UnknownPrologue /[\\t ]*/")), StringLiteral, $TEXT(SimpleStatementDelimiter), EOS);
14222
14289
  function UnknownPrologue(ctx, state) {
14223
14290
  return $EVENT(ctx, state, "UnknownPrologue", UnknownPrologue$0);
14224
14291
  }
14225
- var TripleSlashDirective$0 = $S($R$0($EXPECT($R87, "TripleSlashDirective /\\/\\/\\/[^\\r\\n]*/")), $E(EOS));
14292
+ var TripleSlashDirective$0 = $S($R$0($EXPECT($R88, "TripleSlashDirective /\\/\\/\\/[^\\r\\n]*/")), $E(EOS));
14226
14293
  function TripleSlashDirective(ctx, state) {
14227
14294
  return $EVENT(ctx, state, "TripleSlashDirective", TripleSlashDirective$0);
14228
14295
  }
@@ -14238,13 +14305,13 @@ var require_parser = __commonJS({
14238
14305
  function PrologueString(ctx, state) {
14239
14306
  return $EVENT_C(ctx, state, "PrologueString", PrologueString$$);
14240
14307
  }
14241
- var EOS$0 = $T($S($EXPECT($R88, "EOS /(?=[ \\t\\r\\n\\/#]|$)/"), $P(RestOfLine)), function(value) {
14308
+ var EOS$0 = $T($S($EXPECT($R89, "EOS /(?=[ \\t\\r\\n\\/#]|$)/"), $P(RestOfLine)), function(value) {
14242
14309
  return value[1];
14243
14310
  });
14244
14311
  function EOS(ctx, state) {
14245
14312
  return $EVENT(ctx, state, "EOS", EOS$0);
14246
14313
  }
14247
- var EOL$0 = $TR($EXPECT($R89, "EOL /\\r\\n|\\n|\\r|$/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14314
+ var EOL$0 = $TR($EXPECT($R90, "EOL /\\r\\n|\\n|\\r|$/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14248
14315
  return { $loc, token: $0 };
14249
14316
  });
14250
14317
  function EOL(ctx, state) {
@@ -14816,11 +14883,11 @@ var require_parser = __commonJS({
14816
14883
  function Prologue(ctx, state) {
14817
14884
  return $EVENT(ctx, state, "Prologue", Prologue$0);
14818
14885
  }
14819
- var ProloguePrefix$0 = $S(Prologue, $R$0($EXPECT($R90, "ProloguePrefix /[^]*/")));
14886
+ var ProloguePrefix$0 = $S(Prologue, $R$0($EXPECT($R91, "ProloguePrefix /[^]*/")));
14820
14887
  function ProloguePrefix(ctx, state) {
14821
14888
  return $EVENT(ctx, state, "ProloguePrefix", ProloguePrefix$0);
14822
14889
  }
14823
- var Indent$0 = $TR($EXPECT($R84, "Indent /[ \\t]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14890
+ var Indent$0 = $TR($EXPECT($R85, "Indent /[ \\t]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14824
14891
  const level = getIndentLevel($0, module2.config.tab);
14825
14892
  return {
14826
14893
  $loc,