@danielx/civet 0.6.85 → 0.6.87

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
@@ -3142,6 +3142,7 @@ var Civet = (() => {
3142
3142
  __export(lib_exports, {
3143
3143
  addPostfixStatement: () => addPostfixStatement,
3144
3144
  adjustBindingElements: () => adjustBindingElements,
3145
+ adjustIndexAccess: () => adjustIndexAccess,
3145
3146
  attachPostfixStatementAsExpression: () => attachPostfixStatementAsExpression,
3146
3147
  blockWithPrefix: () => blockWithPrefix,
3147
3148
  convertObjectToJSXAttributes: () => convertObjectToJSXAttributes,
@@ -3205,6 +3206,21 @@ var Civet = (() => {
3205
3206
  }
3206
3207
  return post;
3207
3208
  }
3209
+ function adjustIndexAccess(dot) {
3210
+ if (dot.optional) {
3211
+ return {
3212
+ ...dot,
3213
+ children: [...dot.children, "["]
3214
+ };
3215
+ } else {
3216
+ dot = replaceNodes(
3217
+ deepCopy(dot),
3218
+ (node) => node.token === ".",
3219
+ (node) => ({ ...node, token: "[" })
3220
+ );
3221
+ }
3222
+ return dot;
3223
+ }
3208
3224
  function negateCondition(condition) {
3209
3225
  let { expression } = condition;
3210
3226
  const children = condition.children.slice();
@@ -3716,108 +3732,231 @@ var Civet = (() => {
3716
3732
  if (pre.length)
3717
3733
  exp.children.unshift(...pre);
3718
3734
  if (post.length)
3719
- return exp.children.push(...post);
3720
- return;
3721
- });
3722
- replaceNodesRecursive(statements, (n) => n.type === "AssignmentExpression" && n.names === null, (exp) => {
3723
- let { lhs: $1, exp: $2 } = exp, tail = [], i = 0, len = $1.length;
3724
- let block;
3725
- if (exp.parent.type === "BlockStatement" && !$1.at(-1)?.at(-1)?.special) {
3726
- block = makeBlockFragment();
3727
- let ref4;
3728
- if (ref4 = prependStatementExpressionBlock([null, null, $2], block)) {
3729
- const ref = ref4;
3730
- exp.children = exp.children.map(function(c) {
3731
- if (c === $2)
3732
- return ref;
3733
- else
3735
+ exp.children.push(...post);
3736
+ if (exp.type === "UpdateExpression") {
3737
+ const { assigned } = exp;
3738
+ const ref = makeRef();
3739
+ const newMemberExp = unchainOptionalMemberExpression(assigned, ref, (children) => {
3740
+ return exp.children.map((c) => {
3741
+ if (c === assigned) {
3742
+ return children;
3743
+ } else {
3734
3744
  return c;
3745
+ }
3735
3746
  });
3736
- $2 = ref;
3737
- } else {
3738
- block = void 0;
3747
+ });
3748
+ if (newMemberExp !== assigned) {
3749
+ if (newMemberExp.usesRef) {
3750
+ newMemberExp.hoistDec = {
3751
+ type: "Declaration",
3752
+ children: ["let ", ref],
3753
+ names: []
3754
+ };
3755
+ }
3756
+ return replaceNode(exp, newMemberExp);
3739
3757
  }
3758
+ ;
3759
+ return;
3740
3760
  }
3741
- if ($1.some((left) => left[left.length - 1].special)) {
3742
- if ($1.length !== 1)
3743
- throw new Error("Only one assignment with id= is allowed");
3744
- const [, lhs, , op] = $1[0];
3745
- const { call, omitLhs } = op;
3746
- const index2 = exp.children.indexOf($2);
3747
- if (index2 < 0)
3748
- throw new Error("Assertion error: exp not in AssignmentExpression");
3749
- exp.children.splice(
3750
- index2,
3751
- 1,
3752
- exp.exp = $2 = [call, "(", lhs, ", ", $2, ")"]
3753
- );
3754
- if (omitLhs) {
3755
- return $2;
3761
+ ;
3762
+ return;
3763
+ });
3764
+ replaceNodesRecursive(
3765
+ statements,
3766
+ (n) => n.type === "AssignmentExpression" && n.names === null,
3767
+ (exp) => {
3768
+ let { lhs: $1, exp: $2 } = exp, tail = [], i = 0, len = $1.length;
3769
+ let block;
3770
+ if (exp.parent.type === "BlockStatement" && !$1.at(-1)?.at(-1)?.special) {
3771
+ block = makeBlockFragment();
3772
+ let ref4;
3773
+ if (ref4 = prependStatementExpressionBlock([null, null, $2], block)) {
3774
+ const ref = ref4;
3775
+ exp.children = exp.children.map(function(c) {
3776
+ if (c === $2)
3777
+ return ref;
3778
+ else
3779
+ return c;
3780
+ });
3781
+ $2 = ref;
3782
+ } else {
3783
+ block = void 0;
3784
+ }
3756
3785
  }
3757
- }
3758
- let wrapped = false;
3759
- while (i < len) {
3760
- const lastAssignment = $1[i++];
3761
- const [, lhs, , op] = lastAssignment;
3762
- if (op.token !== "=")
3763
- continue;
3764
- if (lhs.type === "ObjectExpression" || lhs.type === "ObjectBindingPattern") {
3765
- if (!wrapped) {
3766
- wrapped = true;
3767
- lhs.children.splice(0, 0, "(");
3768
- tail.push(")");
3786
+ if ($1.some((left) => left[left.length - 1].special)) {
3787
+ if ($1.length !== 1)
3788
+ throw new Error("Only one assignment with id= is allowed");
3789
+ const [, lhs, , op] = $1[0];
3790
+ const { call, omitLhs } = op;
3791
+ const index2 = exp.children.indexOf($2);
3792
+ if (index2 < 0)
3793
+ throw new Error("Assertion error: exp not in AssignmentExpression");
3794
+ exp.children.splice(
3795
+ index2,
3796
+ 1,
3797
+ exp.exp = $2 = [call, "(", lhs, ", ", $2, ")"]
3798
+ );
3799
+ if (omitLhs) {
3800
+ return $2;
3769
3801
  }
3770
3802
  }
3771
- }
3772
- i = len - 1;
3773
- while (i >= 0) {
3774
- const lastAssignment = $1[i];
3775
- if (lastAssignment[3].token === "=") {
3776
- const lhs = lastAssignment[1];
3777
- if (lhs.type === "MemberExpression") {
3778
- const members = lhs.children;
3779
- const lastMember = members[members.length - 1];
3780
- if (lastMember.type === "SliceExpression") {
3781
- const { start, end, children: c } = lastMember;
3782
- c[0].token = ".splice(";
3783
- c[1] = start;
3784
- c[2] = ", ";
3785
- if (end) {
3786
- c[3] = [end, " - ", start];
3787
- } else {
3788
- c[3] = ["1/0"];
3789
- }
3790
- c[4] = [", ...", $2];
3791
- c[5] = ")";
3792
- lastAssignment.pop();
3793
- if (isWhitespaceOrEmpty(lastAssignment[2]))
3803
+ let wrapped = false;
3804
+ while (i < len) {
3805
+ const lastAssignment = $1[i++];
3806
+ const [, lhs, , op] = lastAssignment;
3807
+ if (op.token !== "=")
3808
+ continue;
3809
+ if (lhs.type === "ObjectExpression" || lhs.type === "ObjectBindingPattern") {
3810
+ if (!wrapped) {
3811
+ wrapped = true;
3812
+ lhs.children.splice(0, 0, "(");
3813
+ tail.push(")");
3814
+ }
3815
+ }
3816
+ }
3817
+ i = len - 1;
3818
+ while (i >= 0) {
3819
+ const lastAssignment = $1[i];
3820
+ if (lastAssignment[3].token === "=") {
3821
+ const lhs = lastAssignment[1];
3822
+ if (lhs.type === "MemberExpression") {
3823
+ const members = lhs.children;
3824
+ const lastMember = members[members.length - 1];
3825
+ if (lastMember.type === "SliceExpression") {
3826
+ const { start, end, children: c } = lastMember;
3827
+ c[0].token = ".splice(";
3828
+ c[1] = start;
3829
+ c[2] = ", ";
3830
+ if (end) {
3831
+ c[3] = [end, " - ", start];
3832
+ } else {
3833
+ c[3] = ["1/0"];
3834
+ }
3835
+ c[4] = [", ...", $2];
3836
+ c[5] = ")";
3794
3837
  lastAssignment.pop();
3795
- if ($1.length > 1) {
3796
- throw new Error("Not implemented yet! TODO: Handle multiple splice assignments");
3838
+ if (isWhitespaceOrEmpty(lastAssignment[2]))
3839
+ lastAssignment.pop();
3840
+ if ($1.length > 1) {
3841
+ throw new Error("Not implemented yet! TODO: Handle multiple splice assignments");
3842
+ }
3843
+ exp.children = [$1];
3844
+ exp.names = [];
3845
+ return exp;
3797
3846
  }
3798
- exp.children = [$1];
3799
- exp.names = [];
3800
- return exp;
3847
+ } else if (lhs.type === "ObjectBindingPattern" || lhs.type === "ArrayBindingPattern") {
3848
+ processBindingPatternLHS(lhs, tail);
3801
3849
  }
3802
- } else if (lhs.type === "ObjectBindingPattern" || lhs.type === "ArrayBindingPattern") {
3803
- processBindingPatternLHS(lhs, tail);
3804
3850
  }
3851
+ i--;
3805
3852
  }
3806
- i--;
3853
+ i = len - 1;
3854
+ const optionalChainRef = makeRef();
3855
+ while (i >= 0) {
3856
+ const assignment = $1[i];
3857
+ const [ws1, lhs, ws2, op] = assignment;
3858
+ if (lhs.type === "MemberExpression" || lhs.type === "CallExpression") {
3859
+ const newMemberExp = unchainOptionalMemberExpression(lhs, optionalChainRef, (children) => {
3860
+ const assigns = $1.splice(i + 1, len - 1 - i);
3861
+ $1.pop();
3862
+ return [ws1, ...children, ws2, op, ...assigns, $2];
3863
+ });
3864
+ if (newMemberExp !== lhs) {
3865
+ if (newMemberExp.usesRef) {
3866
+ exp.hoistDec = {
3867
+ type: "Declaration",
3868
+ children: ["let ", optionalChainRef],
3869
+ names: []
3870
+ };
3871
+ }
3872
+ replaceNode($2, newMemberExp);
3873
+ newMemberExp.parent = exp;
3874
+ $2 = newMemberExp;
3875
+ }
3876
+ }
3877
+ i--;
3878
+ }
3879
+ exp.names = $1.flatMap(([, l]) => l.names || []);
3880
+ const index = exp.children.indexOf($2);
3881
+ if (index < 0)
3882
+ throw new Error("Assertion error: exp not in AssignmentExpression");
3883
+ exp.children.splice(index + 1, 0, ...tail);
3884
+ if (block) {
3885
+ block.parent = exp.parent;
3886
+ block.expressions.push(["", exp]);
3887
+ exp.parent = block;
3888
+ return block;
3889
+ }
3890
+ return exp;
3807
3891
  }
3808
- exp.names = $1.flatMap(([, l]) => l.names || []);
3809
- const index = exp.children.indexOf($2);
3810
- if (index < 0)
3811
- throw new Error("Assertion error: exp not in AssignmentExpression");
3812
- exp.children.splice(index + 1, 0, ...tail);
3813
- if (block) {
3814
- block.parent = exp.parent;
3815
- block.expressions.push(["", exp]);
3816
- exp.parent = block;
3817
- return block;
3892
+ );
3893
+ }
3894
+ function unchainOptionalMemberExpression(exp, ref, innerExp) {
3895
+ let j = 0;
3896
+ const { children } = exp;
3897
+ let usesRef = false;
3898
+ const conditions = [];
3899
+ while (j < children.length) {
3900
+ const child = children[j];
3901
+ const type = child?.type;
3902
+ let hasOptional = false;
3903
+ switch (type) {
3904
+ case "PropertyAccess": {
3905
+ if (child.dot?.optional) {
3906
+ hasOptional = true;
3907
+ child.dot.children.shift();
3908
+ child.dot.optional = false;
3909
+ }
3910
+ ;
3911
+ break;
3912
+ }
3913
+ case "Call":
3914
+ case "Index": {
3915
+ if (child.optional) {
3916
+ hasOptional = true;
3917
+ child.children.shift();
3918
+ child.optional = void 0;
3919
+ }
3920
+ ;
3921
+ break;
3922
+ }
3923
+ }
3924
+ if (hasOptional) {
3925
+ let base;
3926
+ if (j > 1 || needsRef(children[0])) {
3927
+ usesRef = true;
3928
+ base = makeLeftHandSideExpression({
3929
+ type: "AssignmentExpression",
3930
+ children: [ref, " = ", children.splice(0, j)]
3931
+ });
3932
+ base.parent = child;
3933
+ children.unshift(ref);
3934
+ j = 0;
3935
+ } else {
3936
+ base = children[0];
3937
+ }
3938
+ conditions.push([base, " != null"]);
3818
3939
  }
3940
+ j++;
3941
+ }
3942
+ let ref5;
3943
+ if (ref5 = conditions.length) {
3944
+ const l = ref5;
3945
+ const cs = conditions.map((c, i) => {
3946
+ if (i === l - 1) {
3947
+ return c;
3948
+ } else {
3949
+ return [c, " && "];
3950
+ }
3951
+ });
3952
+ return {
3953
+ ...exp,
3954
+ children: [...cs, " ? ", innerExp(children), " : void 0"],
3955
+ usesRef
3956
+ };
3957
+ } else {
3819
3958
  return exp;
3820
- });
3959
+ }
3821
3960
  }
3822
3961
  function attachPostfixStatementAsExpression(exp, post) {
3823
3962
  const postfixStatement = post[1];
@@ -3883,11 +4022,11 @@ var Civet = (() => {
3883
4022
  if (!(exp.children[0] === exp.statement)) {
3884
4023
  ws = exp.children[0];
3885
4024
  }
3886
- let ref5;
4025
+ let ref6;
3887
4026
  switch (statement.type) {
3888
4027
  case "IfStatement": {
3889
- if (ref5 = expressionizeIfStatement(statement)) {
3890
- const expression = ref5;
4028
+ if (ref6 = expressionizeIfStatement(statement)) {
4029
+ const expression = ref6;
3891
4030
  exp.statement = expression;
3892
4031
  exp.children = [exp.statement];
3893
4032
  } else {
@@ -3911,6 +4050,40 @@ var Civet = (() => {
3911
4050
  return;
3912
4051
  });
3913
4052
  }
4053
+ function processNegativeIndexAccess(statements) {
4054
+ gatherRecursiveAll(statements, (n) => n.type === "NegativeIndex").forEach((exp) => {
4055
+ const { parent } = exp;
4056
+ const index = parent.children.indexOf(exp);
4057
+ let ref, subexp;
4058
+ if (index === 1) {
4059
+ const child = parent.children[0];
4060
+ ref = maybeRef(child);
4061
+ if (ref !== child) {
4062
+ subexp = parent.children.splice(0, 1);
4063
+ }
4064
+ } else if (index > 1) {
4065
+ ref = makeRef();
4066
+ subexp = parent.children.splice(0, index);
4067
+ } else {
4068
+ throw new Error("Invalid parse tree for negative index access");
4069
+ }
4070
+ if (subexp) {
4071
+ exp.hoistDec = {
4072
+ type: "Declaration",
4073
+ children: ["let ", ref],
4074
+ names: []
4075
+ };
4076
+ parent.children.unshift(makeLeftHandSideExpression({
4077
+ type: "AssignmentExpression",
4078
+ children: [ref, " = ", subexp]
4079
+ }));
4080
+ }
4081
+ return exp.len.children = [
4082
+ ref,
4083
+ ".length"
4084
+ ];
4085
+ });
4086
+ }
3914
4087
  function processProgram(root, config, m, ReservedWord) {
3915
4088
  assert.equal(m.forbidBracedApplication.length, 1, "forbidBracedApplication");
3916
4089
  assert.equal(m.forbidClassImplicitCall.length, 1, "forbidClassImplicitCall");
@@ -3920,6 +4093,7 @@ var Civet = (() => {
3920
4093
  assert.equal(m.JSXTagStack.length, 1, "JSXTagStack");
3921
4094
  addParentPointers(root);
3922
4095
  const { expressions: statements } = root;
4096
+ processNegativeIndexAccess(statements);
3923
4097
  processTypes(statements);
3924
4098
  processDeclarationConditions(statements, m.getRef);
3925
4099
  processPipelineExpressions(statements);
@@ -4157,9 +4331,9 @@ var Civet = (() => {
4157
4331
  }
4158
4332
  });
4159
4333
 
4160
- // ../Hera/dist/machine.js
4334
+ // node_modules/@danielx/hera/dist/machine.js
4161
4335
  var require_machine = __commonJS({
4162
- "../Hera/dist/machine.js"(exports, module) {
4336
+ "node_modules/@danielx/hera/dist/machine.js"(exports, module) {
4163
4337
  "use strict";
4164
4338
  var __defProp2 = Object.defineProperty;
4165
4339
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
@@ -4630,6 +4804,8 @@ ${input.slice(result.pos)}
4630
4804
  $TV,
4631
4805
  $Y,
4632
4806
  Parser,
4807
+ ParserContext,
4808
+ ParserOptions,
4633
4809
  Validator
4634
4810
  } = require_machine();
4635
4811
  var grammar = {
@@ -5134,6 +5310,7 @@ ${input.slice(result.pos)}
5134
5310
  OpenBracket,
5135
5311
  OpenParen,
5136
5312
  Operator,
5313
+ Override,
5137
5314
  Own,
5138
5315
  Public,
5139
5316
  Private,
@@ -5531,59 +5708,60 @@ ${input.slice(result.pos)}
5531
5708
  var $L170 = $L("of");
5532
5709
  var $L171 = $L("[");
5533
5710
  var $L172 = $L("operator");
5534
- var $L173 = $L("own");
5535
- var $L174 = $L("public");
5536
- var $L175 = $L("private");
5537
- var $L176 = $L("protected");
5538
- var $L177 = $L("||>");
5539
- var $L178 = $L("|\u25B7");
5540
- var $L179 = $L("|>=");
5541
- var $L180 = $L("\u25B7=");
5542
- var $L181 = $L("|>");
5543
- var $L182 = $L("\u25B7");
5544
- var $L183 = $L("readonly");
5545
- var $L184 = $L("return");
5546
- var $L185 = $L("satisfies");
5547
- var $L186 = $L("'");
5548
- var $L187 = $L("static");
5549
- var $L188 = $L("${");
5550
- var $L189 = $L("super");
5551
- var $L190 = $L("switch");
5552
- var $L191 = $L("target");
5553
- var $L192 = $L("then");
5554
- var $L193 = $L("this");
5555
- var $L194 = $L("throw");
5556
- var $L195 = $L('"""');
5557
- var $L196 = $L("'''");
5558
- var $L197 = $L("///");
5559
- var $L198 = $L("```");
5560
- var $L199 = $L("try");
5561
- var $L200 = $L("typeof");
5562
- var $L201 = $L("unless");
5563
- var $L202 = $L("until");
5564
- var $L203 = $L("using");
5565
- var $L204 = $L("var");
5566
- var $L205 = $L("void");
5567
- var $L206 = $L("when");
5568
- var $L207 = $L("while");
5569
- var $L208 = $L("yield");
5570
- var $L209 = $L("/>");
5571
- var $L210 = $L("</");
5572
- var $L211 = $L("<>");
5573
- var $L212 = $L("</>");
5574
- var $L213 = $L("<!--");
5575
- var $L214 = $L("-->");
5576
- var $L215 = $L("type");
5577
- var $L216 = $L("enum");
5578
- var $L217 = $L("interface");
5579
- var $L218 = $L("global");
5580
- var $L219 = $L("module");
5581
- var $L220 = $L("namespace");
5582
- var $L221 = $L("asserts");
5583
- var $L222 = $L("keyof");
5584
- var $L223 = $L("???");
5585
- var $L224 = $L("[]");
5586
- var $L225 = $L("civet");
5711
+ var $L173 = $L("override");
5712
+ var $L174 = $L("own");
5713
+ var $L175 = $L("public");
5714
+ var $L176 = $L("private");
5715
+ var $L177 = $L("protected");
5716
+ var $L178 = $L("||>");
5717
+ var $L179 = $L("|\u25B7");
5718
+ var $L180 = $L("|>=");
5719
+ var $L181 = $L("\u25B7=");
5720
+ var $L182 = $L("|>");
5721
+ var $L183 = $L("\u25B7");
5722
+ var $L184 = $L("readonly");
5723
+ var $L185 = $L("return");
5724
+ var $L186 = $L("satisfies");
5725
+ var $L187 = $L("'");
5726
+ var $L188 = $L("static");
5727
+ var $L189 = $L("${");
5728
+ var $L190 = $L("super");
5729
+ var $L191 = $L("switch");
5730
+ var $L192 = $L("target");
5731
+ var $L193 = $L("then");
5732
+ var $L194 = $L("this");
5733
+ var $L195 = $L("throw");
5734
+ var $L196 = $L('"""');
5735
+ var $L197 = $L("'''");
5736
+ var $L198 = $L("///");
5737
+ var $L199 = $L("```");
5738
+ var $L200 = $L("try");
5739
+ var $L201 = $L("typeof");
5740
+ var $L202 = $L("unless");
5741
+ var $L203 = $L("until");
5742
+ var $L204 = $L("using");
5743
+ var $L205 = $L("var");
5744
+ var $L206 = $L("void");
5745
+ var $L207 = $L("when");
5746
+ var $L208 = $L("while");
5747
+ var $L209 = $L("yield");
5748
+ var $L210 = $L("/>");
5749
+ var $L211 = $L("</");
5750
+ var $L212 = $L("<>");
5751
+ var $L213 = $L("</>");
5752
+ var $L214 = $L("<!--");
5753
+ var $L215 = $L("-->");
5754
+ var $L216 = $L("type");
5755
+ var $L217 = $L("enum");
5756
+ var $L218 = $L("interface");
5757
+ var $L219 = $L("global");
5758
+ var $L220 = $L("module");
5759
+ var $L221 = $L("namespace");
5760
+ var $L222 = $L("asserts");
5761
+ var $L223 = $L("keyof");
5762
+ var $L224 = $L("???");
5763
+ var $L225 = $L("[]");
5764
+ var $L226 = $L("civet");
5587
5765
  var $R0 = $R(new RegExp("(?=async|debugger|if|unless|do|for|loop|until|while|switch|throw|try)", "suy"));
5588
5766
  var $R1 = $R(new RegExp("(as|of|satisfies|then|when|implements|xor|xnor)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
5589
5767
  var $R2 = $R(new RegExp("[0-9]", "suy"));
@@ -5600,7 +5778,7 @@ ${input.slice(result.pos)}
5600
5778
  var $R13 = $R(new RegExp("(?=\\p{ID_Start}|[_$])", "suy"));
5601
5779
  var $R14 = $R(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$])*", "suy"));
5602
5780
  var $R15 = $R(new RegExp("(?=\\[)", "suy"));
5603
- var $R16 = $R(new RegExp("[!+-]", "suy"));
5781
+ var $R16 = $R(new RegExp("[!+-]?", "suy"));
5604
5782
  var $R17 = $R(new RegExp("[+-]", "suy"));
5605
5783
  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"));
5606
5784
  var $R19 = $R(new RegExp("!\\^\\^?", "suy"));
@@ -5657,24 +5835,25 @@ ${input.slice(result.pos)}
5657
5835
  var $R70 = $R(new RegExp("\\s", "suy"));
5658
5836
  var $R71 = $R(new RegExp("(?=[<])", "suy"));
5659
5837
  var $R72 = $R(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy"));
5660
- var $R73 = $R(new RegExp("[\\s>]|\\/>", "suy"));
5661
- var $R74 = $R(new RegExp("(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+", "suy"));
5662
- var $R75 = $R(new RegExp(`"[^"]*"|'[^']*'`, "suy"));
5663
- var $R76 = $R(new RegExp("[<>]", "suy"));
5664
- var $R77 = $R(new RegExp("[!~+-](?!\\s|[!~+-]*&)", "suy"));
5665
- var $R78 = $R(new RegExp("(?:-[^-]|[^-]*)*", "suy"));
5666
- var $R79 = $R(new RegExp("[^{}<>\\r\\n]+", "suy"));
5667
- var $R80 = $R(new RegExp("[+-]?", "suy"));
5668
- var $R81 = $R(new RegExp("(?=if|unless)", "suy"));
5669
- var $R82 = $R(new RegExp("#![^\\r\\n]*", "suy"));
5670
- var $R83 = $R(new RegExp("[\\t ]*", "suy"));
5671
- var $R84 = $R(new RegExp("[ \\t]*", "suy"));
5672
- var $R85 = $R(new RegExp("[\\s]*", "suy"));
5673
- var $R86 = $R(new RegExp("\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([a-zA-Z0-9.+-]*))?", "suy"));
5674
- var $R87 = $R(new RegExp("\\/\\/\\/[^\\r\\n]*", "suy"));
5675
- var $R88 = $R(new RegExp("(?=[ \\t\\r\\n\\/#]|$)", "suy"));
5676
- var $R89 = $R(new RegExp("\\r\\n|\\n|\\r|$", "suy"));
5677
- var $R90 = $R(new RegExp("[^]*", "suy"));
5838
+ var $R73 = $R(new RegExp("[!+-]", "suy"));
5839
+ var $R74 = $R(new RegExp("[\\s>]|\\/>", "suy"));
5840
+ var $R75 = $R(new RegExp("(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+", "suy"));
5841
+ var $R76 = $R(new RegExp(`"[^"]*"|'[^']*'`, "suy"));
5842
+ var $R77 = $R(new RegExp("[<>]", "suy"));
5843
+ var $R78 = $R(new RegExp("[!~+-](?!\\s|[!~+-]*&)", "suy"));
5844
+ var $R79 = $R(new RegExp("(?:-[^-]|[^-]*)*", "suy"));
5845
+ var $R80 = $R(new RegExp("[^{}<>\\r\\n]+", "suy"));
5846
+ var $R81 = $R(new RegExp("[+-]?", "suy"));
5847
+ var $R82 = $R(new RegExp("(?=if|unless)", "suy"));
5848
+ var $R83 = $R(new RegExp("#![^\\r\\n]*", "suy"));
5849
+ var $R84 = $R(new RegExp("[\\t ]*", "suy"));
5850
+ var $R85 = $R(new RegExp("[ \\t]*", "suy"));
5851
+ var $R86 = $R(new RegExp("[\\s]*", "suy"));
5852
+ var $R87 = $R(new RegExp("\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([a-zA-Z0-9.+-]*))?", "suy"));
5853
+ var $R88 = $R(new RegExp("\\/\\/\\/[^\\r\\n]*", "suy"));
5854
+ var $R89 = $R(new RegExp("(?=[ \\t\\r\\n\\/#]|$)", "suy"));
5855
+ var $R90 = $R(new RegExp("\\r\\n|\\n|\\r|$", "suy"));
5856
+ var $R91 = $R(new RegExp("[^]*", "suy"));
5678
5857
  var Program$0 = $TS($S(Reset, Init, $E(EOS), TopLevelStatements, __), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
5679
5858
  var statements = $4;
5680
5859
  processProgram({
@@ -6667,9 +6846,9 @@ ${input.slice(result.pos)}
6667
6846
  function NestedClassElement(ctx, state) {
6668
6847
  return $EVENT(ctx, state, "NestedClassElement", NestedClassElement$0);
6669
6848
  }
6670
- var ClassElement$0 = $TS($S($E(Decorators), $E(AccessModifier), $E($S(Static, $E(_))), ClassElementDefinition), function($skip, $loc, $0, $1, $2, $3, $4) {
6849
+ var ClassElement$0 = $TS($S($E(Decorators), $E(AccessModifier), $E($S(Static, $E(_))), $E($S(Override, $E(_))), ClassElementDefinition), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
6671
6850
  var decorators = $1;
6672
- var definition = $4;
6851
+ var definition = $5;
6673
6852
  if (definition.type === "MultiMethodDefinition") {
6674
6853
  return {
6675
6854
  ...definition,
@@ -6683,7 +6862,7 @@ ${input.slice(result.pos)}
6683
6862
  }
6684
6863
  return {
6685
6864
  ...definition,
6686
- children: [decorators, $2, $3, ...definition.children]
6865
+ children: [decorators, $2, $3, $4, ...definition.children]
6687
6866
  };
6688
6867
  });
6689
6868
  var ClassElement$1 = $TS($S(Static, BracedBlock), function($skip, $loc, $0, $1, $2) {
@@ -6725,7 +6904,7 @@ ${input.slice(result.pos)}
6725
6904
  function NestedClassSignatureElement(ctx, state) {
6726
6905
  return $EVENT(ctx, state, "NestedClassSignatureElement", NestedClassSignatureElement$0);
6727
6906
  }
6728
- var ClassSignatureElement$0 = $S($E(Decorators), $E(AccessModifier), $E($S(Static, $E(_))), $C(MethodSignature, FieldDefinition));
6907
+ var ClassSignatureElement$0 = $S($E(Decorators), $E(AccessModifier), $E($S(Static, $E(_))), $E($S(Override, $E(_))), $C(MethodSignature, FieldDefinition));
6729
6908
  var ClassSignatureElement$1 = $S(Static, ClassSignatureBody);
6730
6909
  var ClassSignatureElement$$ = [ClassSignatureElement$0, ClassSignatureElement$1];
6731
6910
  function ClassSignatureElement(ctx, state) {
@@ -6923,18 +7102,28 @@ ${input.slice(result.pos)}
6923
7102
  return literal;
6924
7103
  });
6925
7104
  var CallExpressionRest$3 = $TS($S($E(OptionalShorthand), ArgumentsWithTrailingMemberExpressions), function($skip, $loc, $0, $1, $2) {
6926
- if (!$1)
6927
- return $2;
6928
- return [$1, ...$2];
7105
+ var optional = $1;
7106
+ var argsWithTrailing = $2;
7107
+ if (!optional)
7108
+ return argsWithTrailing;
7109
+ const call = argsWithTrailing[0];
7110
+ return [{
7111
+ ...call,
7112
+ children: [optional, ...call.children],
7113
+ optional
7114
+ }, ...argsWithTrailing.slice(1)];
6929
7115
  });
6930
7116
  var CallExpressionRest$$ = [CallExpressionRest$0, CallExpressionRest$1, CallExpressionRest$2, CallExpressionRest$3];
6931
7117
  function CallExpressionRest(ctx, state) {
6932
7118
  return $EVENT_C(ctx, state, "CallExpressionRest", CallExpressionRest$$);
6933
7119
  }
6934
7120
  var OptionalShorthand$0 = $TS($S($EXPECT($R6, "OptionalShorthand /(?=[\\/?])/"), $Q(InlineComment), QuestionMark, OptionalDot), function($skip, $loc, $0, $1, $2, $3, $4) {
7121
+ var comments = $2;
7122
+ var q = $3;
7123
+ var d = $4;
6935
7124
  return {
6936
7125
  type: "Optional",
6937
- children: $0
7126
+ children: [...comments, q, d]
6938
7127
  };
6939
7128
  });
6940
7129
  function OptionalShorthand(ctx, state) {
@@ -7005,7 +7194,11 @@ ${input.slice(result.pos)}
7005
7194
  if (dot.type === "Optional" && content.type === "SliceExpression") {
7006
7195
  return [...dot.children.slice(0, -1), ...comments, content];
7007
7196
  }
7008
- return [dot, ...comments, content];
7197
+ return {
7198
+ ...content,
7199
+ children: [dot, ...comments, ...content.children],
7200
+ optional: dot
7201
+ };
7009
7202
  }
7010
7203
  return [...comments, content];
7011
7204
  });
@@ -7109,9 +7302,14 @@ ${input.slice(result.pos)}
7109
7302
  return $EVENT_C(ctx, state, "SliceParameters", SliceParameters$$);
7110
7303
  }
7111
7304
  var AccessStart$0 = $TS($S($E(PropertyAccessModifier), Dot, $N(Dot)), function($skip, $loc, $0, $1, $2, $3) {
7112
- if ($1)
7113
- return [$1, $2];
7114
- return $2;
7305
+ var modifier = $1;
7306
+ var dot = $2;
7307
+ let children = modifier ? [modifier, dot] : [dot];
7308
+ return {
7309
+ type: "AccessStart",
7310
+ children,
7311
+ optional: modifier?.token === "?"
7312
+ };
7115
7313
  });
7116
7314
  function AccessStart(ctx, state) {
7117
7315
  return $EVENT(ctx, state, "AccessStart", AccessStart$0);
@@ -7125,19 +7323,10 @@ ${input.slice(result.pos)}
7125
7323
  var PropertyAccess$0 = $TS($S(AccessStart, $C(TemplateLiteral, StringLiteral, IntegerLiteral)), function($skip, $loc, $0, $1, $2) {
7126
7324
  var dot = $1;
7127
7325
  var literal = $2;
7128
- if (gatherRecursive(dot, (node) => node.token === "?").length) {
7129
- dot = [...dot, "["];
7130
- } else {
7131
- dot = replaceNodes(
7132
- deepCopy(dot),
7133
- (node) => node.token === ".",
7134
- (node) => ({ ...node, token: "[" })
7135
- );
7136
- }
7137
7326
  return {
7138
7327
  type: "Index",
7139
7328
  children: [
7140
- dot,
7329
+ adjustIndexAccess(dot),
7141
7330
  literal,
7142
7331
  "]"
7143
7332
  ]
@@ -7147,20 +7336,30 @@ ${input.slice(result.pos)}
7147
7336
  var dot = $1;
7148
7337
  var neg = $2;
7149
7338
  var num = $3;
7150
- return [
7151
- { type: "PropertyAccess", children: [dot, "at"] },
7152
- // not including `name` so that `{x.-1}` doesn't use it
7153
- { type: "Call", children: ["(", neg, num, ")"] }
7339
+ const len = {
7340
+ children: []
7341
+ }, children = [
7342
+ adjustIndexAccess(dot),
7343
+ len,
7344
+ neg,
7345
+ num,
7346
+ "]"
7154
7347
  ];
7348
+ return {
7349
+ type: "NegativeIndex",
7350
+ children,
7351
+ len
7352
+ };
7155
7353
  });
7156
7354
  var PropertyAccess$2 = $TS($S(AccessStart, $Q(InlineComment), $C(IdentifierName, PrivateIdentifier, LengthShorthand)), function($skip, $loc, $0, $1, $2, $3) {
7157
- var access = $1;
7355
+ var dot = $1;
7158
7356
  var comments = $2;
7159
7357
  var id = $3;
7160
- const children = [access, ...comments, ...id.children];
7358
+ const children = [dot, ...comments, ...id.children];
7161
7359
  return {
7162
7360
  type: "PropertyAccess",
7163
7361
  name: id.name,
7362
+ dot,
7164
7363
  children
7165
7364
  };
7166
7365
  });
@@ -7168,16 +7367,20 @@ ${input.slice(result.pos)}
7168
7367
  var p = $2;
7169
7368
  var id = $3;
7170
7369
  if (id) {
7370
+ const dot = { token: ".prototype.", $loc: p.$loc };
7171
7371
  return {
7172
7372
  type: "PropertyAccess",
7173
7373
  name: id.name,
7174
- children: [{ token: ".prototype.", $loc: p.$loc }, id]
7374
+ dot,
7375
+ children: [dot, id]
7175
7376
  };
7176
7377
  } else {
7378
+ const dot = { token: ".prototype", $loc: p.$loc };
7177
7379
  return {
7178
7380
  type: "PropertyAccess",
7179
7381
  name: "prototype",
7180
- children: [{ token: ".prototype", $loc: p.$loc }]
7382
+ dot,
7383
+ children: [dot]
7181
7384
  };
7182
7385
  }
7183
7386
  });
@@ -9096,17 +9299,26 @@ ${input.slice(result.pos)}
9096
9299
  children: [ws, ...prop.children]
9097
9300
  };
9098
9301
  });
9099
- var PropertyDefinition$1 = $TS($S($E(_), $TEXT($EXPECT($R16, "PropertyDefinition /[!+-]/")), PropertyName), function($skip, $loc, $0, $1, $2, $3) {
9302
+ var PropertyDefinition$1 = $TS($S($E(_), $TEXT($EXPECT($R16, "PropertyDefinition /[!+-]?/")), PropertyName, $Y(ObjectPropertyDelimiter)), function($skip, $loc, $0, $1, $2, $3, $4) {
9100
9303
  var ws = $1;
9101
9304
  var toggle = $2;
9102
9305
  var id = $3;
9103
- const value = toggle === "+" ? "true" : "false";
9306
+ if (toggle) {
9307
+ const value = toggle === "+" ? "true" : "false";
9308
+ return {
9309
+ type: "Property",
9310
+ children: [ws, id, ": ", value],
9311
+ name: id,
9312
+ names: id.names,
9313
+ value
9314
+ };
9315
+ }
9104
9316
  return {
9105
9317
  type: "Property",
9106
- children: [ws, id, ": ", value],
9318
+ children: [ws, id],
9107
9319
  name: id,
9108
9320
  names: id.names,
9109
- value
9321
+ value: id
9110
9322
  };
9111
9323
  });
9112
9324
  var PropertyDefinition$2 = $TS($S($E(_), MethodDefinition), function($skip, $loc, $0, $1, $2) {
@@ -12419,37 +12631,43 @@ ${input.slice(result.pos)}
12419
12631
  function Operator(ctx, state) {
12420
12632
  return $EVENT(ctx, state, "Operator", Operator$0);
12421
12633
  }
12422
- var Own$0 = $TS($S($EXPECT($L173, 'Own "own"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12634
+ var Override$0 = $TS($S($EXPECT($L173, 'Override "override"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12635
+ return { $loc, token: $1, ts: true };
12636
+ });
12637
+ function Override(ctx, state) {
12638
+ return $EVENT(ctx, state, "Override", Override$0);
12639
+ }
12640
+ var Own$0 = $TS($S($EXPECT($L174, 'Own "own"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12423
12641
  return { $loc, token: $1 };
12424
12642
  });
12425
12643
  function Own(ctx, state) {
12426
12644
  return $EVENT(ctx, state, "Own", Own$0);
12427
12645
  }
12428
- var Public$0 = $TS($S($EXPECT($L174, 'Public "public"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12646
+ var Public$0 = $TS($S($EXPECT($L175, 'Public "public"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12429
12647
  return { $loc, token: $1 };
12430
12648
  });
12431
12649
  function Public(ctx, state) {
12432
12650
  return $EVENT(ctx, state, "Public", Public$0);
12433
12651
  }
12434
- var Private$0 = $TS($S($EXPECT($L175, 'Private "private"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12652
+ var Private$0 = $TS($S($EXPECT($L176, 'Private "private"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12435
12653
  return { $loc, token: $1 };
12436
12654
  });
12437
12655
  function Private(ctx, state) {
12438
12656
  return $EVENT(ctx, state, "Private", Private$0);
12439
12657
  }
12440
- var Protected$0 = $TS($S($EXPECT($L176, 'Protected "protected"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12658
+ var Protected$0 = $TS($S($EXPECT($L177, 'Protected "protected"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12441
12659
  return { $loc, token: $1 };
12442
12660
  });
12443
12661
  function Protected(ctx, state) {
12444
12662
  return $EVENT(ctx, state, "Protected", Protected$0);
12445
12663
  }
12446
- var Pipe$0 = $TV($C($EXPECT($L177, 'Pipe "||>"'), $EXPECT($L178, 'Pipe "|\u25B7"')), function($skip, $loc, $0, $1) {
12664
+ var Pipe$0 = $TV($C($EXPECT($L178, 'Pipe "||>"'), $EXPECT($L179, 'Pipe "|\u25B7"')), function($skip, $loc, $0, $1) {
12447
12665
  return { $loc, token: "||>" };
12448
12666
  });
12449
- var Pipe$1 = $TV($C($EXPECT($L179, 'Pipe "|>="'), $EXPECT($L180, 'Pipe "\u25B7="')), function($skip, $loc, $0, $1) {
12667
+ var Pipe$1 = $TV($C($EXPECT($L180, 'Pipe "|>="'), $EXPECT($L181, 'Pipe "\u25B7="')), function($skip, $loc, $0, $1) {
12450
12668
  return { $loc, token: "|>=" };
12451
12669
  });
12452
- var Pipe$2 = $TV($C($EXPECT($L181, 'Pipe "|>"'), $EXPECT($L182, 'Pipe "\u25B7"')), function($skip, $loc, $0, $1) {
12670
+ var Pipe$2 = $TV($C($EXPECT($L182, 'Pipe "|>"'), $EXPECT($L183, 'Pipe "\u25B7"')), function($skip, $loc, $0, $1) {
12453
12671
  return { $loc, token: "|>" };
12454
12672
  });
12455
12673
  var Pipe$$ = [Pipe$0, Pipe$1, Pipe$2];
@@ -12462,19 +12680,19 @@ ${input.slice(result.pos)}
12462
12680
  function QuestionMark(ctx, state) {
12463
12681
  return $EVENT(ctx, state, "QuestionMark", QuestionMark$0);
12464
12682
  }
12465
- var Readonly$0 = $TS($S($EXPECT($L183, 'Readonly "readonly"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12683
+ var Readonly$0 = $TS($S($EXPECT($L184, 'Readonly "readonly"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12466
12684
  return { $loc, token: $1, ts: true };
12467
12685
  });
12468
12686
  function Readonly(ctx, state) {
12469
12687
  return $EVENT(ctx, state, "Readonly", Readonly$0);
12470
12688
  }
12471
- var Return$0 = $TS($S($EXPECT($L184, 'Return "return"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12689
+ var Return$0 = $TS($S($EXPECT($L185, 'Return "return"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12472
12690
  return { $loc, token: $1 };
12473
12691
  });
12474
12692
  function Return(ctx, state) {
12475
12693
  return $EVENT(ctx, state, "Return", Return$0);
12476
12694
  }
12477
- var Satisfies$0 = $TS($S($EXPECT($L185, 'Satisfies "satisfies"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12695
+ var Satisfies$0 = $TS($S($EXPECT($L186, 'Satisfies "satisfies"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12478
12696
  return { $loc, token: $1 };
12479
12697
  });
12480
12698
  function Satisfies(ctx, state) {
@@ -12486,7 +12704,7 @@ ${input.slice(result.pos)}
12486
12704
  function Semicolon(ctx, state) {
12487
12705
  return $EVENT(ctx, state, "Semicolon", Semicolon$0);
12488
12706
  }
12489
- var SingleQuote$0 = $TV($EXPECT($L186, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
12707
+ var SingleQuote$0 = $TV($EXPECT($L187, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
12490
12708
  return { $loc, token: $1 };
12491
12709
  });
12492
12710
  function SingleQuote(ctx, state) {
@@ -12498,7 +12716,7 @@ ${input.slice(result.pos)}
12498
12716
  function Star(ctx, state) {
12499
12717
  return $EVENT(ctx, state, "Star", Star$0);
12500
12718
  }
12501
- var Static$0 = $TS($S($EXPECT($L187, 'Static "static"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12719
+ var Static$0 = $TS($S($EXPECT($L188, 'Static "static"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12502
12720
  return { $loc, token: $1 };
12503
12721
  });
12504
12722
  var Static$1 = $TS($S($EXPECT($L129, 'Static "@"'), $N($C($EXPECT($L4, 'Static "("'), $EXPECT($L129, 'Static "@"')))), function($skip, $loc, $0, $1, $2) {
@@ -12508,127 +12726,127 @@ ${input.slice(result.pos)}
12508
12726
  function Static(ctx, state) {
12509
12727
  return $EVENT_C(ctx, state, "Static", Static$$);
12510
12728
  }
12511
- var SubstitutionStart$0 = $TV($EXPECT($L188, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
12729
+ var SubstitutionStart$0 = $TV($EXPECT($L189, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
12512
12730
  return { $loc, token: $1 };
12513
12731
  });
12514
12732
  function SubstitutionStart(ctx, state) {
12515
12733
  return $EVENT(ctx, state, "SubstitutionStart", SubstitutionStart$0);
12516
12734
  }
12517
- var Super$0 = $TS($S($EXPECT($L189, 'Super "super"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12735
+ var Super$0 = $TS($S($EXPECT($L190, 'Super "super"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12518
12736
  return { $loc, token: $1 };
12519
12737
  });
12520
12738
  function Super(ctx, state) {
12521
12739
  return $EVENT(ctx, state, "Super", Super$0);
12522
12740
  }
12523
- var Switch$0 = $TS($S($EXPECT($L190, 'Switch "switch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12741
+ var Switch$0 = $TS($S($EXPECT($L191, 'Switch "switch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12524
12742
  return { $loc, token: $1 };
12525
12743
  });
12526
12744
  function Switch(ctx, state) {
12527
12745
  return $EVENT(ctx, state, "Switch", Switch$0);
12528
12746
  }
12529
- var Target$0 = $TS($S($EXPECT($L191, 'Target "target"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12747
+ var Target$0 = $TS($S($EXPECT($L192, 'Target "target"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12530
12748
  return { $loc, token: $1 };
12531
12749
  });
12532
12750
  function Target(ctx, state) {
12533
12751
  return $EVENT(ctx, state, "Target", Target$0);
12534
12752
  }
12535
- var Then$0 = $TS($S(__, $EXPECT($L192, 'Then "then"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
12753
+ var Then$0 = $TS($S(__, $EXPECT($L193, 'Then "then"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
12536
12754
  return { $loc, token: "" };
12537
12755
  });
12538
12756
  function Then(ctx, state) {
12539
12757
  return $EVENT(ctx, state, "Then", Then$0);
12540
12758
  }
12541
- var This$0 = $TS($S($EXPECT($L193, 'This "this"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12759
+ var This$0 = $TS($S($EXPECT($L194, 'This "this"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12542
12760
  return { $loc, token: $1 };
12543
12761
  });
12544
12762
  function This(ctx, state) {
12545
12763
  return $EVENT(ctx, state, "This", This$0);
12546
12764
  }
12547
- var Throw$0 = $TS($S($EXPECT($L194, 'Throw "throw"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12765
+ var Throw$0 = $TS($S($EXPECT($L195, 'Throw "throw"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12548
12766
  return { $loc, token: $1 };
12549
12767
  });
12550
12768
  function Throw(ctx, state) {
12551
12769
  return $EVENT(ctx, state, "Throw", Throw$0);
12552
12770
  }
12553
- var TripleDoubleQuote$0 = $TV($EXPECT($L195, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
12771
+ var TripleDoubleQuote$0 = $TV($EXPECT($L196, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
12554
12772
  return { $loc, token: "`" };
12555
12773
  });
12556
12774
  function TripleDoubleQuote(ctx, state) {
12557
12775
  return $EVENT(ctx, state, "TripleDoubleQuote", TripleDoubleQuote$0);
12558
12776
  }
12559
- var TripleSingleQuote$0 = $TV($EXPECT($L196, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
12777
+ var TripleSingleQuote$0 = $TV($EXPECT($L197, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
12560
12778
  return { $loc, token: "`" };
12561
12779
  });
12562
12780
  function TripleSingleQuote(ctx, state) {
12563
12781
  return $EVENT(ctx, state, "TripleSingleQuote", TripleSingleQuote$0);
12564
12782
  }
12565
- var TripleSlash$0 = $TV($EXPECT($L197, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
12783
+ var TripleSlash$0 = $TV($EXPECT($L198, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
12566
12784
  return { $loc, token: "/" };
12567
12785
  });
12568
12786
  function TripleSlash(ctx, state) {
12569
12787
  return $EVENT(ctx, state, "TripleSlash", TripleSlash$0);
12570
12788
  }
12571
- var TripleTick$0 = $TV($EXPECT($L198, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
12789
+ var TripleTick$0 = $TV($EXPECT($L199, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
12572
12790
  return { $loc, token: "`" };
12573
12791
  });
12574
12792
  function TripleTick(ctx, state) {
12575
12793
  return $EVENT(ctx, state, "TripleTick", TripleTick$0);
12576
12794
  }
12577
- var Try$0 = $TS($S($EXPECT($L199, 'Try "try"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12795
+ var Try$0 = $TS($S($EXPECT($L200, 'Try "try"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12578
12796
  return { $loc, token: $1 };
12579
12797
  });
12580
12798
  function Try(ctx, state) {
12581
12799
  return $EVENT(ctx, state, "Try", Try$0);
12582
12800
  }
12583
- var Typeof$0 = $TS($S($EXPECT($L200, 'Typeof "typeof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12801
+ var Typeof$0 = $TS($S($EXPECT($L201, 'Typeof "typeof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12584
12802
  return { $loc, token: $1 };
12585
12803
  });
12586
12804
  function Typeof(ctx, state) {
12587
12805
  return $EVENT(ctx, state, "Typeof", Typeof$0);
12588
12806
  }
12589
- var Unless$0 = $TS($S($EXPECT($L201, 'Unless "unless"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12807
+ var Unless$0 = $TS($S($EXPECT($L202, 'Unless "unless"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12590
12808
  return { $loc, token: $1, negated: true };
12591
12809
  });
12592
12810
  function Unless(ctx, state) {
12593
12811
  return $EVENT(ctx, state, "Unless", Unless$0);
12594
12812
  }
12595
- var Until$0 = $TS($S($EXPECT($L202, 'Until "until"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12813
+ var Until$0 = $TS($S($EXPECT($L203, 'Until "until"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12596
12814
  return { $loc, token: $1 };
12597
12815
  });
12598
12816
  function Until(ctx, state) {
12599
12817
  return $EVENT(ctx, state, "Until", Until$0);
12600
12818
  }
12601
- var Using$0 = $TS($S($EXPECT($L203, 'Using "using"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12819
+ var Using$0 = $TS($S($EXPECT($L204, 'Using "using"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12602
12820
  return { $loc, token: $1 };
12603
12821
  });
12604
12822
  function Using(ctx, state) {
12605
12823
  return $EVENT(ctx, state, "Using", Using$0);
12606
12824
  }
12607
- var Var$0 = $TS($S($EXPECT($L204, 'Var "var"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12825
+ var Var$0 = $TS($S($EXPECT($L205, 'Var "var"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12608
12826
  return { $loc, token: $1 };
12609
12827
  });
12610
12828
  function Var(ctx, state) {
12611
12829
  return $EVENT(ctx, state, "Var", Var$0);
12612
12830
  }
12613
- var Void$0 = $TS($S($EXPECT($L205, 'Void "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12831
+ var Void$0 = $TS($S($EXPECT($L206, 'Void "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12614
12832
  return { $loc, token: $1 };
12615
12833
  });
12616
12834
  function Void(ctx, state) {
12617
12835
  return $EVENT(ctx, state, "Void", Void$0);
12618
12836
  }
12619
- var When$0 = $TS($S($EXPECT($L206, 'When "when"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12837
+ var When$0 = $TS($S($EXPECT($L207, 'When "when"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12620
12838
  return { $loc, token: "case" };
12621
12839
  });
12622
12840
  function When(ctx, state) {
12623
12841
  return $EVENT(ctx, state, "When", When$0);
12624
12842
  }
12625
- var While$0 = $TS($S($EXPECT($L207, 'While "while"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12843
+ var While$0 = $TS($S($EXPECT($L208, 'While "while"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12626
12844
  return { $loc, token: $1 };
12627
12845
  });
12628
12846
  function While(ctx, state) {
12629
12847
  return $EVENT(ctx, state, "While", While$0);
12630
12848
  }
12631
- var Yield$0 = $TS($S($EXPECT($L208, 'Yield "yield"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12849
+ var Yield$0 = $TS($S($EXPECT($L209, 'Yield "yield"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12632
12850
  return { $loc, token: $1, type: "Yield" };
12633
12851
  });
12634
12852
  function Yield(ctx, state) {
@@ -12707,7 +12925,7 @@ ${input.slice(result.pos)}
12707
12925
  function JSXElement(ctx, state) {
12708
12926
  return $EVENT_C(ctx, state, "JSXElement", JSXElement$$);
12709
12927
  }
12710
- var JSXSelfClosingElement$0 = $TS($S($EXPECT($L17, 'JSXSelfClosingElement "<"'), JSXElementName, $E(TypeArguments), $E(JSXAttributes), $E(Whitespace), $EXPECT($L209, 'JSXSelfClosingElement "/>"')), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
12928
+ var JSXSelfClosingElement$0 = $TS($S($EXPECT($L17, 'JSXSelfClosingElement "<"'), JSXElementName, $E(TypeArguments), $E(JSXAttributes), $E(Whitespace), $EXPECT($L210, 'JSXSelfClosingElement "/>"')), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
12711
12929
  return { type: "JSXElement", children: $0, tag: $2 };
12712
12930
  });
12713
12931
  function JSXSelfClosingElement(ctx, state) {
@@ -12741,7 +12959,7 @@ ${input.slice(result.pos)}
12741
12959
  function JSXOptionalClosingElement(ctx, state) {
12742
12960
  return $EVENT_C(ctx, state, "JSXOptionalClosingElement", JSXOptionalClosingElement$$);
12743
12961
  }
12744
- var JSXClosingElement$0 = $S($EXPECT($L210, 'JSXClosingElement "</"'), $E(Whitespace), JSXElementName, $E(Whitespace), $EXPECT($L45, 'JSXClosingElement ">"'));
12962
+ var JSXClosingElement$0 = $S($EXPECT($L211, 'JSXClosingElement "</"'), $E(Whitespace), JSXElementName, $E(Whitespace), $EXPECT($L45, 'JSXClosingElement ">"'));
12745
12963
  function JSXClosingElement(ctx, state) {
12746
12964
  return $EVENT(ctx, state, "JSXClosingElement", JSXClosingElement$0);
12747
12965
  }
@@ -12762,7 +12980,7 @@ ${input.slice(result.pos)}
12762
12980
  ];
12763
12981
  return { type: "JSXFragment", children: parts, jsxChildren: children.jsxChildren };
12764
12982
  });
12765
- var JSXFragment$1 = $TS($S(CoffeeJSXEnabled, $EXPECT($L211, 'JSXFragment "<>"'), $E(JSXChildren), $E(Whitespace), JSXClosingFragment), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
12983
+ var JSXFragment$1 = $TS($S(CoffeeJSXEnabled, $EXPECT($L212, 'JSXFragment "<>"'), $E(JSXChildren), $E(Whitespace), JSXClosingFragment), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
12766
12984
  var children = $3;
12767
12985
  $0 = $0.slice(1);
12768
12986
  return {
@@ -12775,7 +12993,7 @@ ${input.slice(result.pos)}
12775
12993
  function JSXFragment(ctx, state) {
12776
12994
  return $EVENT_C(ctx, state, "JSXFragment", JSXFragment$$);
12777
12995
  }
12778
- var PushJSXOpeningFragment$0 = $TV($EXPECT($L211, 'PushJSXOpeningFragment "<>"'), function($skip, $loc, $0, $1) {
12996
+ var PushJSXOpeningFragment$0 = $TV($EXPECT($L212, 'PushJSXOpeningFragment "<>"'), function($skip, $loc, $0, $1) {
12779
12997
  module.JSXTagStack.push("");
12780
12998
  return $1;
12781
12999
  });
@@ -12792,7 +13010,7 @@ ${input.slice(result.pos)}
12792
13010
  function JSXOptionalClosingFragment(ctx, state) {
12793
13011
  return $EVENT_C(ctx, state, "JSXOptionalClosingFragment", JSXOptionalClosingFragment$$);
12794
13012
  }
12795
- var JSXClosingFragment$0 = $EXPECT($L212, 'JSXClosingFragment "</>"');
13013
+ var JSXClosingFragment$0 = $EXPECT($L213, 'JSXClosingFragment "</>"');
12796
13014
  function JSXClosingFragment(ctx, state) {
12797
13015
  return $EVENT(ctx, state, "JSXClosingFragment", JSXClosingFragment$0);
12798
13016
  }
@@ -12983,7 +13201,7 @@ ${input.slice(result.pos)}
12983
13201
  class: $2
12984
13202
  };
12985
13203
  });
12986
- var JSXAttribute$7 = $TS($S($TEXT($EXPECT($R16, "JSXAttribute /[!+-]/")), JSXAttributeName, $Y(JSXAttributeSpace)), function($skip, $loc, $0, $1, $2, $3) {
13204
+ var JSXAttribute$7 = $TS($S($TEXT($EXPECT($R73, "JSXAttribute /[!+-]/")), JSXAttributeName, $Y(JSXAttributeSpace)), function($skip, $loc, $0, $1, $2, $3) {
12987
13205
  var toggle = $1;
12988
13206
  var id = $2;
12989
13207
  const value = toggle === "+" ? "true" : "false";
@@ -12993,11 +13211,11 @@ ${input.slice(result.pos)}
12993
13211
  function JSXAttribute(ctx, state) {
12994
13212
  return $EVENT_C(ctx, state, "JSXAttribute", JSXAttribute$$);
12995
13213
  }
12996
- var JSXAttributeSpace$0 = $R$0($EXPECT($R73, "JSXAttributeSpace /[\\s>]|\\/>/"));
13214
+ var JSXAttributeSpace$0 = $R$0($EXPECT($R74, "JSXAttributeSpace /[\\s>]|\\/>/"));
12997
13215
  function JSXAttributeSpace(ctx, state) {
12998
13216
  return $EVENT(ctx, state, "JSXAttributeSpace", JSXAttributeSpace$0);
12999
13217
  }
13000
- var JSXShorthandString$0 = $TR($EXPECT($R74, "JSXShorthandString /(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13218
+ var JSXShorthandString$0 = $TR($EXPECT($R75, "JSXShorthandString /(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13001
13219
  return quoteString($0);
13002
13220
  });
13003
13221
  var JSXShorthandString$1 = $TS($S(TemplateLiteral), function($skip, $loc, $0, $1) {
@@ -13031,7 +13249,7 @@ ${input.slice(result.pos)}
13031
13249
  }
13032
13250
  return [open, value, close];
13033
13251
  });
13034
- var JSXAttributeValue$4 = $R$0($EXPECT($R75, `JSXAttributeValue /"[^"]*"|'[^']*'/`));
13252
+ var JSXAttributeValue$4 = $R$0($EXPECT($R76, `JSXAttributeValue /"[^"]*"|'[^']*'/`));
13035
13253
  var JSXAttributeValue$$ = [JSXAttributeValue$0, JSXAttributeValue$1, JSXAttributeValue$2, JSXAttributeValue$3, JSXAttributeValue$4];
13036
13254
  function JSXAttributeValue(ctx, state) {
13037
13255
  return $EVENT_C(ctx, state, "JSXAttributeValue", JSXAttributeValue$$);
@@ -13044,7 +13262,7 @@ ${input.slice(result.pos)}
13044
13262
  function InlineJSXAttributeValue(ctx, state) {
13045
13263
  return $EVENT(ctx, state, "InlineJSXAttributeValue", InlineJSXAttributeValue$0);
13046
13264
  }
13047
- var InlineJSXBinaryOpRHS$0 = $TS($S($N($EXPECT($R76, "InlineJSXBinaryOpRHS /[<>]/")), BinaryOp, InlineJSXUnaryExpression), function($skip, $loc, $0, $1, $2, $3) {
13265
+ var InlineJSXBinaryOpRHS$0 = $TS($S($N($EXPECT($R77, "InlineJSXBinaryOpRHS /[<>]/")), BinaryOp, InlineJSXUnaryExpression), function($skip, $loc, $0, $1, $2, $3) {
13048
13266
  var op = $2;
13049
13267
  var rhs = $3;
13050
13268
  return [[], op, [], rhs];
@@ -13061,7 +13279,7 @@ ${input.slice(result.pos)}
13061
13279
  function InlineJSXUnaryExpression(ctx, state) {
13062
13280
  return $EVENT(ctx, state, "InlineJSXUnaryExpression", InlineJSXUnaryExpression$0);
13063
13281
  }
13064
- var InlineJSXUnaryOp$0 = $TR($EXPECT($R77, "InlineJSXUnaryOp /[!~+-](?!\\s|[!~+-]*&)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13282
+ var InlineJSXUnaryOp$0 = $TR($EXPECT($R78, "InlineJSXUnaryOp /[!~+-](?!\\s|[!~+-]*&)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13065
13283
  return { $loc, token: $0 };
13066
13284
  });
13067
13285
  function InlineJSXUnaryOp(ctx, state) {
@@ -13271,19 +13489,19 @@ ${input.slice(result.pos)}
13271
13489
  function JSXChild(ctx, state) {
13272
13490
  return $EVENT_C(ctx, state, "JSXChild", JSXChild$$);
13273
13491
  }
13274
- var JSXComment$0 = $TS($S($EXPECT($L213, 'JSXComment "<!--"'), JSXCommentContent, $EXPECT($L214, 'JSXComment "-->"')), function($skip, $loc, $0, $1, $2, $3) {
13492
+ var JSXComment$0 = $TS($S($EXPECT($L214, 'JSXComment "<!--"'), JSXCommentContent, $EXPECT($L215, 'JSXComment "-->"')), function($skip, $loc, $0, $1, $2, $3) {
13275
13493
  return ["{/*", $2, "*/}"];
13276
13494
  });
13277
13495
  function JSXComment(ctx, state) {
13278
13496
  return $EVENT(ctx, state, "JSXComment", JSXComment$0);
13279
13497
  }
13280
- var JSXCommentContent$0 = $TR($EXPECT($R78, "JSXCommentContent /(?:-[^-]|[^-]*)*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13498
+ var JSXCommentContent$0 = $TR($EXPECT($R79, "JSXCommentContent /(?:-[^-]|[^-]*)*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13281
13499
  return { $loc, token: $0.replace(/\*\//g, "* /") };
13282
13500
  });
13283
13501
  function JSXCommentContent(ctx, state) {
13284
13502
  return $EVENT(ctx, state, "JSXCommentContent", JSXCommentContent$0);
13285
13503
  }
13286
- var JSXText$0 = $TR($EXPECT($R79, "JSXText /[^{}<>\\r\\n]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13504
+ var JSXText$0 = $TR($EXPECT($R80, "JSXText /[^{}<>\\r\\n]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13287
13505
  return {
13288
13506
  type: "JSXText",
13289
13507
  token: $0,
@@ -13458,37 +13676,37 @@ ${input.slice(result.pos)}
13458
13676
  function InterfaceExtendsTarget(ctx, state) {
13459
13677
  return $EVENT(ctx, state, "InterfaceExtendsTarget", InterfaceExtendsTarget$0);
13460
13678
  }
13461
- var TypeKeyword$0 = $TS($S($EXPECT($L215, 'TypeKeyword "type"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13679
+ var TypeKeyword$0 = $TS($S($EXPECT($L216, 'TypeKeyword "type"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13462
13680
  return { $loc, token: $1 };
13463
13681
  });
13464
13682
  function TypeKeyword(ctx, state) {
13465
13683
  return $EVENT(ctx, state, "TypeKeyword", TypeKeyword$0);
13466
13684
  }
13467
- var Enum$0 = $TS($S($EXPECT($L216, 'Enum "enum"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13685
+ var Enum$0 = $TS($S($EXPECT($L217, 'Enum "enum"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13468
13686
  return { $loc, token: $1 };
13469
13687
  });
13470
13688
  function Enum(ctx, state) {
13471
13689
  return $EVENT(ctx, state, "Enum", Enum$0);
13472
13690
  }
13473
- var Interface$0 = $TS($S($EXPECT($L217, 'Interface "interface"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13691
+ var Interface$0 = $TS($S($EXPECT($L218, 'Interface "interface"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13474
13692
  return { $loc, token: $1 };
13475
13693
  });
13476
13694
  function Interface(ctx, state) {
13477
13695
  return $EVENT(ctx, state, "Interface", Interface$0);
13478
13696
  }
13479
- var Global$0 = $TS($S($EXPECT($L218, 'Global "global"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13697
+ var Global$0 = $TS($S($EXPECT($L219, 'Global "global"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13480
13698
  return { $loc, token: $1 };
13481
13699
  });
13482
13700
  function Global(ctx, state) {
13483
13701
  return $EVENT(ctx, state, "Global", Global$0);
13484
13702
  }
13485
- var Module$0 = $TS($S($EXPECT($L219, 'Module "module"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13703
+ var Module$0 = $TS($S($EXPECT($L220, 'Module "module"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13486
13704
  return { $loc, token: $1 };
13487
13705
  });
13488
13706
  function Module(ctx, state) {
13489
13707
  return $EVENT(ctx, state, "Module", Module$0);
13490
13708
  }
13491
- var Namespace$0 = $TS($S($EXPECT($L220, 'Namespace "namespace"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13709
+ var Namespace$0 = $TS($S($EXPECT($L221, 'Namespace "namespace"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13492
13710
  return { $loc, token: $1 };
13493
13711
  });
13494
13712
  function Namespace(ctx, state) {
@@ -13704,7 +13922,7 @@ ${input.slice(result.pos)}
13704
13922
  function TypeProperty(ctx, state) {
13705
13923
  return $EVENT(ctx, state, "TypeProperty", TypeProperty$0);
13706
13924
  }
13707
- 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)))));
13925
+ 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)))));
13708
13926
  function TypeIndexSignature(ctx, state) {
13709
13927
  return $EVENT(ctx, state, "TypeIndexSignature", TypeIndexSignature$0);
13710
13928
  }
@@ -13762,7 +13980,7 @@ ${input.slice(result.pos)}
13762
13980
  function ReturnTypeSuffix(ctx, state) {
13763
13981
  return $EVENT(ctx, state, "ReturnTypeSuffix", ReturnTypeSuffix$0);
13764
13982
  }
13765
- var ReturnType$0 = $TS($S($E($S(__, $EXPECT($L221, 'ReturnType "asserts"'), NonIdContinue)), TypePredicate), function($skip, $loc, $0, $1, $2) {
13983
+ var ReturnType$0 = $TS($S($E($S(__, $EXPECT($L222, 'ReturnType "asserts"'), NonIdContinue)), TypePredicate), function($skip, $loc, $0, $1, $2) {
13766
13984
  var asserts = $1;
13767
13985
  var t = $2;
13768
13986
  if (asserts) {
@@ -13841,8 +14059,8 @@ ${input.slice(result.pos)}
13841
14059
  function TypeUnarySuffix(ctx, state) {
13842
14060
  return $EVENT_C(ctx, state, "TypeUnarySuffix", TypeUnarySuffix$$);
13843
14061
  }
13844
- var TypeUnaryOp$0 = $S($EXPECT($L222, 'TypeUnaryOp "keyof"'), NonIdContinue);
13845
- var TypeUnaryOp$1 = $S($EXPECT($L183, 'TypeUnaryOp "readonly"'), NonIdContinue);
14062
+ var TypeUnaryOp$0 = $S($EXPECT($L223, 'TypeUnaryOp "keyof"'), NonIdContinue);
14063
+ var TypeUnaryOp$1 = $S($EXPECT($L184, 'TypeUnaryOp "readonly"'), NonIdContinue);
13846
14064
  var TypeUnaryOp$$ = [TypeUnaryOp$0, TypeUnaryOp$1];
13847
14065
  function TypeUnaryOp(ctx, state) {
13848
14066
  return $EVENT_C(ctx, state, "TypeUnaryOp", TypeUnaryOp$$);
@@ -13872,7 +14090,7 @@ ${input.slice(result.pos)}
13872
14090
  function TypeIndexedAccess(ctx, state) {
13873
14091
  return $EVENT_C(ctx, state, "TypeIndexedAccess", TypeIndexedAccess$$);
13874
14092
  }
13875
- var UnknownAlias$0 = $TV($EXPECT($L223, 'UnknownAlias "???"'), function($skip, $loc, $0, $1) {
14093
+ var UnknownAlias$0 = $TV($EXPECT($L224, 'UnknownAlias "???"'), function($skip, $loc, $0, $1) {
13876
14094
  return { $loc, token: "unknown" };
13877
14095
  });
13878
14096
  function UnknownAlias(ctx, state) {
@@ -13998,7 +14216,7 @@ ${input.slice(result.pos)}
13998
14216
  function NestedType(ctx, state) {
13999
14217
  return $EVENT(ctx, state, "NestedType", NestedType$0);
14000
14218
  }
14001
- var TypeConditional$0 = $TS($S($E(_), $EXPECT($R81, "TypeConditional /(?=if|unless)/"), TypeIfThenElse), function($skip, $loc, $0, $1, $2, $3) {
14219
+ var TypeConditional$0 = $TS($S($E(_), $EXPECT($R82, "TypeConditional /(?=if|unless)/"), TypeIfThenElse), function($skip, $loc, $0, $1, $2, $3) {
14002
14220
  return [$1, expressionizeTypeIf($3)];
14003
14221
  });
14004
14222
  var TypeConditional$1 = $TS($S(TypeCondition, NotDedented, QuestionMark, Type, __, Colon, Type), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
@@ -14078,13 +14296,20 @@ ${input.slice(result.pos)}
14078
14296
  }
14079
14297
  var TypeLiteral$0 = TypeTemplateLiteral;
14080
14298
  var TypeLiteral$1 = Literal;
14081
- var TypeLiteral$2 = $TS($S($EXPECT($L205, 'TypeLiteral "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
14299
+ var TypeLiteral$2 = $TS($S($EXPECT($R17, "TypeLiteral /[+-]/"), NumericLiteral), function($skip, $loc, $0, $1, $2) {
14300
+ var sign = $1;
14301
+ var num = $2;
14302
+ if (sign[0] === "+")
14303
+ return num;
14304
+ return $0;
14305
+ });
14306
+ var TypeLiteral$3 = $TS($S($EXPECT($L206, 'TypeLiteral "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
14082
14307
  return { type: "VoidType", $loc, token: $1 };
14083
14308
  });
14084
- var TypeLiteral$3 = $TV($EXPECT($L224, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
14309
+ var TypeLiteral$4 = $TV($EXPECT($L225, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
14085
14310
  return { $loc, token: "[]" };
14086
14311
  });
14087
- var TypeLiteral$$ = [TypeLiteral$0, TypeLiteral$1, TypeLiteral$2, TypeLiteral$3];
14312
+ var TypeLiteral$$ = [TypeLiteral$0, TypeLiteral$1, TypeLiteral$2, TypeLiteral$3, TypeLiteral$4];
14088
14313
  function TypeLiteral(ctx, state) {
14089
14314
  return $EVENT_C(ctx, state, "TypeLiteral", TypeLiteral$$);
14090
14315
  }
@@ -14191,15 +14416,15 @@ ${input.slice(result.pos)}
14191
14416
  function ThisType(ctx, state) {
14192
14417
  return $EVENT(ctx, state, "ThisType", ThisType$0);
14193
14418
  }
14194
- var Shebang$0 = $S($R$0($EXPECT($R82, "Shebang /#![^\\r\\n]*/")), EOL);
14419
+ var Shebang$0 = $S($R$0($EXPECT($R83, "Shebang /#![^\\r\\n]*/")), EOL);
14195
14420
  function Shebang(ctx, state) {
14196
14421
  return $EVENT(ctx, state, "Shebang", Shebang$0);
14197
14422
  }
14198
- var CivetPrologue$0 = $T($S($EXPECT($R83, "CivetPrologue /[\\t ]*/"), DoubleQuote, CivetPrologueContent, DoubleQuote, SimpleStatementDelimiter, $EXPECT($R84, "CivetPrologue /[ \\t]*/"), $C(EOL, $Y(RestOfLine))), function(value) {
14423
+ var CivetPrologue$0 = $T($S($EXPECT($R84, "CivetPrologue /[\\t ]*/"), DoubleQuote, CivetPrologueContent, DoubleQuote, SimpleStatementDelimiter, $EXPECT($R85, "CivetPrologue /[ \\t]*/"), $C(EOL, $Y(RestOfLine))), function(value) {
14199
14424
  var content = value[2];
14200
14425
  return content;
14201
14426
  });
14202
- var CivetPrologue$1 = $T($S($EXPECT($R83, "CivetPrologue /[\\t ]*/"), SingleQuote, CivetPrologueContent, SingleQuote, SimpleStatementDelimiter, $EXPECT($R84, "CivetPrologue /[ \\t]*/"), $C(EOL, $Y(RestOfLine))), function(value) {
14427
+ var CivetPrologue$1 = $T($S($EXPECT($R84, "CivetPrologue /[\\t ]*/"), SingleQuote, CivetPrologueContent, SingleQuote, SimpleStatementDelimiter, $EXPECT($R85, "CivetPrologue /[ \\t]*/"), $C(EOL, $Y(RestOfLine))), function(value) {
14203
14428
  var content = value[2];
14204
14429
  return content;
14205
14430
  });
@@ -14207,7 +14432,7 @@ ${input.slice(result.pos)}
14207
14432
  function CivetPrologue(ctx, state) {
14208
14433
  return $EVENT_C(ctx, state, "CivetPrologue", CivetPrologue$$);
14209
14434
  }
14210
- var CivetPrologueContent$0 = $TS($S($EXPECT($L225, 'CivetPrologueContent "civet"'), NonIdContinue, $Q(CivetOption), $EXPECT($R85, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3, $4) {
14435
+ var CivetPrologueContent$0 = $TS($S($EXPECT($L226, 'CivetPrologueContent "civet"'), NonIdContinue, $Q(CivetOption), $EXPECT($R86, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3, $4) {
14211
14436
  var options = $3;
14212
14437
  return {
14213
14438
  type: "CivetPrologue",
@@ -14218,7 +14443,7 @@ ${input.slice(result.pos)}
14218
14443
  function CivetPrologueContent(ctx, state) {
14219
14444
  return $EVENT(ctx, state, "CivetPrologueContent", CivetPrologueContent$0);
14220
14445
  }
14221
- 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) {
14446
+ 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) {
14222
14447
  const optionName = $2.replace(/-+([a-z]?)/g, (_2, l) => {
14223
14448
  if (l)
14224
14449
  return l.toUpperCase();
@@ -14235,11 +14460,11 @@ ${input.slice(result.pos)}
14235
14460
  function CivetOption(ctx, state) {
14236
14461
  return $EVENT(ctx, state, "CivetOption", CivetOption$0);
14237
14462
  }
14238
- var UnknownPrologue$0 = $S($R$0($EXPECT($R83, "UnknownPrologue /[\\t ]*/")), StringLiteral, $TEXT(SimpleStatementDelimiter), EOS);
14463
+ var UnknownPrologue$0 = $S($R$0($EXPECT($R84, "UnknownPrologue /[\\t ]*/")), StringLiteral, $TEXT(SimpleStatementDelimiter), EOS);
14239
14464
  function UnknownPrologue(ctx, state) {
14240
14465
  return $EVENT(ctx, state, "UnknownPrologue", UnknownPrologue$0);
14241
14466
  }
14242
- var TripleSlashDirective$0 = $S($R$0($EXPECT($R87, "TripleSlashDirective /\\/\\/\\/[^\\r\\n]*/")), $E(EOS));
14467
+ var TripleSlashDirective$0 = $S($R$0($EXPECT($R88, "TripleSlashDirective /\\/\\/\\/[^\\r\\n]*/")), $E(EOS));
14243
14468
  function TripleSlashDirective(ctx, state) {
14244
14469
  return $EVENT(ctx, state, "TripleSlashDirective", TripleSlashDirective$0);
14245
14470
  }
@@ -14255,13 +14480,13 @@ ${input.slice(result.pos)}
14255
14480
  function PrologueString(ctx, state) {
14256
14481
  return $EVENT_C(ctx, state, "PrologueString", PrologueString$$);
14257
14482
  }
14258
- var EOS$0 = $T($S($EXPECT($R88, "EOS /(?=[ \\t\\r\\n\\/#]|$)/"), $P(RestOfLine)), function(value) {
14483
+ var EOS$0 = $T($S($EXPECT($R89, "EOS /(?=[ \\t\\r\\n\\/#]|$)/"), $P(RestOfLine)), function(value) {
14259
14484
  return value[1];
14260
14485
  });
14261
14486
  function EOS(ctx, state) {
14262
14487
  return $EVENT(ctx, state, "EOS", EOS$0);
14263
14488
  }
14264
- var EOL$0 = $TR($EXPECT($R89, "EOL /\\r\\n|\\n|\\r|$/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14489
+ var EOL$0 = $TR($EXPECT($R90, "EOL /\\r\\n|\\n|\\r|$/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14265
14490
  return { $loc, token: $0 };
14266
14491
  });
14267
14492
  function EOL(ctx, state) {
@@ -14793,9 +15018,9 @@ ${input.slice(result.pos)}
14793
15018
  }
14794
15019
  }
14795
15020
  });
14796
- if (typeof parse2 !== "undefined") {
14797
- Object.assign(module.config, parse2.config);
14798
- parse2.config = module.config;
15021
+ if (typeof parse !== "undefined") {
15022
+ Object.assign(module.config, parse.config);
15023
+ parse.config = module.config;
14799
15024
  } else {
14800
15025
  Object.assign(module.config, exports.parse.config);
14801
15026
  exports.parse.config = module.config;
@@ -14833,11 +15058,11 @@ ${input.slice(result.pos)}
14833
15058
  function Prologue(ctx, state) {
14834
15059
  return $EVENT(ctx, state, "Prologue", Prologue$0);
14835
15060
  }
14836
- var ProloguePrefix$0 = $S(Prologue, $R$0($EXPECT($R90, "ProloguePrefix /[^]*/")));
15061
+ var ProloguePrefix$0 = $S(Prologue, $R$0($EXPECT($R91, "ProloguePrefix /[^]*/")));
14837
15062
  function ProloguePrefix(ctx, state) {
14838
15063
  return $EVENT(ctx, state, "ProloguePrefix", ProloguePrefix$0);
14839
15064
  }
14840
- var Indent$0 = $TR($EXPECT($R84, "Indent /[ \\t]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
15065
+ var Indent$0 = $TR($EXPECT($R85, "Indent /[ \\t]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14841
15066
  const level = getIndentLevel($0, module.config.tab);
14842
15067
  return {
14843
15068
  $loc,
@@ -14946,7 +15171,7 @@ ${input.slice(result.pos)}
14946
15171
  };
14947
15172
  }();
14948
15173
  exports.default = parser;
14949
- var parse2 = exports.parse = parser.parse;
15174
+ exports.parse = parser.parse;
14950
15175
  exports.Program = Program;
14951
15176
  exports.TopLevelStatements = TopLevelStatements;
14952
15177
  exports.NestedTopLevelStatements = NestedTopLevelStatements;
@@ -15448,6 +15673,7 @@ ${input.slice(result.pos)}
15448
15673
  exports.OpenBracket = OpenBracket;
15449
15674
  exports.OpenParen = OpenParen;
15450
15675
  exports.Operator = Operator;
15676
+ exports.Override = Override;
15451
15677
  exports.Own = Own;
15452
15678
  exports.Public = Public;
15453
15679
  exports.Private = Private;