@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/main.mjs CHANGED
@@ -3132,6 +3132,7 @@ var lib_exports = {};
3132
3132
  __export(lib_exports, {
3133
3133
  addPostfixStatement: () => addPostfixStatement,
3134
3134
  adjustBindingElements: () => adjustBindingElements,
3135
+ adjustIndexAccess: () => adjustIndexAccess,
3135
3136
  attachPostfixStatementAsExpression: () => attachPostfixStatementAsExpression,
3136
3137
  blockWithPrefix: () => blockWithPrefix,
3137
3138
  convertObjectToJSXAttributes: () => convertObjectToJSXAttributes,
@@ -3195,6 +3196,21 @@ function addPostfixStatement(statement, ws, post) {
3195
3196
  }
3196
3197
  return post;
3197
3198
  }
3199
+ function adjustIndexAccess(dot) {
3200
+ if (dot.optional) {
3201
+ return {
3202
+ ...dot,
3203
+ children: [...dot.children, "["]
3204
+ };
3205
+ } else {
3206
+ dot = replaceNodes(
3207
+ deepCopy(dot),
3208
+ (node) => node.token === ".",
3209
+ (node) => ({ ...node, token: "[" })
3210
+ );
3211
+ }
3212
+ return dot;
3213
+ }
3198
3214
  function negateCondition(condition) {
3199
3215
  let { expression } = condition;
3200
3216
  const children = condition.children.slice();
@@ -3706,108 +3722,231 @@ function processAssignments(statements) {
3706
3722
  if (pre.length)
3707
3723
  exp.children.unshift(...pre);
3708
3724
  if (post.length)
3709
- return exp.children.push(...post);
3710
- return;
3711
- });
3712
- replaceNodesRecursive(statements, (n) => n.type === "AssignmentExpression" && n.names === null, (exp) => {
3713
- let { lhs: $1, exp: $2 } = exp, tail = [], i = 0, len = $1.length;
3714
- let block;
3715
- if (exp.parent.type === "BlockStatement" && !$1.at(-1)?.at(-1)?.special) {
3716
- block = makeBlockFragment();
3717
- let ref4;
3718
- if (ref4 = prependStatementExpressionBlock([null, null, $2], block)) {
3719
- const ref = ref4;
3720
- exp.children = exp.children.map(function(c) {
3721
- if (c === $2)
3722
- return ref;
3723
- else
3725
+ exp.children.push(...post);
3726
+ if (exp.type === "UpdateExpression") {
3727
+ const { assigned } = exp;
3728
+ const ref = makeRef();
3729
+ const newMemberExp = unchainOptionalMemberExpression(assigned, ref, (children) => {
3730
+ return exp.children.map((c) => {
3731
+ if (c === assigned) {
3732
+ return children;
3733
+ } else {
3724
3734
  return c;
3735
+ }
3725
3736
  });
3726
- $2 = ref;
3727
- } else {
3728
- block = void 0;
3737
+ });
3738
+ if (newMemberExp !== assigned) {
3739
+ if (newMemberExp.usesRef) {
3740
+ newMemberExp.hoistDec = {
3741
+ type: "Declaration",
3742
+ children: ["let ", ref],
3743
+ names: []
3744
+ };
3745
+ }
3746
+ return replaceNode(exp, newMemberExp);
3729
3747
  }
3748
+ ;
3749
+ return;
3730
3750
  }
3731
- if ($1.some((left) => left[left.length - 1].special)) {
3732
- if ($1.length !== 1)
3733
- throw new Error("Only one assignment with id= is allowed");
3734
- const [, lhs, , op] = $1[0];
3735
- const { call, omitLhs } = op;
3736
- const index2 = exp.children.indexOf($2);
3737
- if (index2 < 0)
3738
- throw new Error("Assertion error: exp not in AssignmentExpression");
3739
- exp.children.splice(
3740
- index2,
3741
- 1,
3742
- exp.exp = $2 = [call, "(", lhs, ", ", $2, ")"]
3743
- );
3744
- if (omitLhs) {
3745
- return $2;
3751
+ ;
3752
+ return;
3753
+ });
3754
+ replaceNodesRecursive(
3755
+ statements,
3756
+ (n) => n.type === "AssignmentExpression" && n.names === null,
3757
+ (exp) => {
3758
+ let { lhs: $1, exp: $2 } = exp, tail = [], i = 0, len = $1.length;
3759
+ let block;
3760
+ if (exp.parent.type === "BlockStatement" && !$1.at(-1)?.at(-1)?.special) {
3761
+ block = makeBlockFragment();
3762
+ let ref4;
3763
+ if (ref4 = prependStatementExpressionBlock([null, null, $2], block)) {
3764
+ const ref = ref4;
3765
+ exp.children = exp.children.map(function(c) {
3766
+ if (c === $2)
3767
+ return ref;
3768
+ else
3769
+ return c;
3770
+ });
3771
+ $2 = ref;
3772
+ } else {
3773
+ block = void 0;
3774
+ }
3746
3775
  }
3747
- }
3748
- let wrapped = false;
3749
- while (i < len) {
3750
- const lastAssignment = $1[i++];
3751
- const [, lhs, , op] = lastAssignment;
3752
- if (op.token !== "=")
3753
- continue;
3754
- if (lhs.type === "ObjectExpression" || lhs.type === "ObjectBindingPattern") {
3755
- if (!wrapped) {
3756
- wrapped = true;
3757
- lhs.children.splice(0, 0, "(");
3758
- tail.push(")");
3776
+ if ($1.some((left) => left[left.length - 1].special)) {
3777
+ if ($1.length !== 1)
3778
+ throw new Error("Only one assignment with id= is allowed");
3779
+ const [, lhs, , op] = $1[0];
3780
+ const { call, omitLhs } = op;
3781
+ const index2 = exp.children.indexOf($2);
3782
+ if (index2 < 0)
3783
+ throw new Error("Assertion error: exp not in AssignmentExpression");
3784
+ exp.children.splice(
3785
+ index2,
3786
+ 1,
3787
+ exp.exp = $2 = [call, "(", lhs, ", ", $2, ")"]
3788
+ );
3789
+ if (omitLhs) {
3790
+ return $2;
3759
3791
  }
3760
3792
  }
3761
- }
3762
- i = len - 1;
3763
- while (i >= 0) {
3764
- const lastAssignment = $1[i];
3765
- if (lastAssignment[3].token === "=") {
3766
- const lhs = lastAssignment[1];
3767
- if (lhs.type === "MemberExpression") {
3768
- const members = lhs.children;
3769
- const lastMember = members[members.length - 1];
3770
- if (lastMember.type === "SliceExpression") {
3771
- const { start, end, children: c } = lastMember;
3772
- c[0].token = ".splice(";
3773
- c[1] = start;
3774
- c[2] = ", ";
3775
- if (end) {
3776
- c[3] = [end, " - ", start];
3777
- } else {
3778
- c[3] = ["1/0"];
3779
- }
3780
- c[4] = [", ...", $2];
3781
- c[5] = ")";
3782
- lastAssignment.pop();
3783
- if (isWhitespaceOrEmpty(lastAssignment[2]))
3793
+ let wrapped = false;
3794
+ while (i < len) {
3795
+ const lastAssignment = $1[i++];
3796
+ const [, lhs, , op] = lastAssignment;
3797
+ if (op.token !== "=")
3798
+ continue;
3799
+ if (lhs.type === "ObjectExpression" || lhs.type === "ObjectBindingPattern") {
3800
+ if (!wrapped) {
3801
+ wrapped = true;
3802
+ lhs.children.splice(0, 0, "(");
3803
+ tail.push(")");
3804
+ }
3805
+ }
3806
+ }
3807
+ i = len - 1;
3808
+ while (i >= 0) {
3809
+ const lastAssignment = $1[i];
3810
+ if (lastAssignment[3].token === "=") {
3811
+ const lhs = lastAssignment[1];
3812
+ if (lhs.type === "MemberExpression") {
3813
+ const members = lhs.children;
3814
+ const lastMember = members[members.length - 1];
3815
+ if (lastMember.type === "SliceExpression") {
3816
+ const { start, end, children: c } = lastMember;
3817
+ c[0].token = ".splice(";
3818
+ c[1] = start;
3819
+ c[2] = ", ";
3820
+ if (end) {
3821
+ c[3] = [end, " - ", start];
3822
+ } else {
3823
+ c[3] = ["1/0"];
3824
+ }
3825
+ c[4] = [", ...", $2];
3826
+ c[5] = ")";
3784
3827
  lastAssignment.pop();
3785
- if ($1.length > 1) {
3786
- throw new Error("Not implemented yet! TODO: Handle multiple splice assignments");
3828
+ if (isWhitespaceOrEmpty(lastAssignment[2]))
3829
+ lastAssignment.pop();
3830
+ if ($1.length > 1) {
3831
+ throw new Error("Not implemented yet! TODO: Handle multiple splice assignments");
3832
+ }
3833
+ exp.children = [$1];
3834
+ exp.names = [];
3835
+ return exp;
3787
3836
  }
3788
- exp.children = [$1];
3789
- exp.names = [];
3790
- return exp;
3837
+ } else if (lhs.type === "ObjectBindingPattern" || lhs.type === "ArrayBindingPattern") {
3838
+ processBindingPatternLHS(lhs, tail);
3791
3839
  }
3792
- } else if (lhs.type === "ObjectBindingPattern" || lhs.type === "ArrayBindingPattern") {
3793
- processBindingPatternLHS(lhs, tail);
3794
3840
  }
3841
+ i--;
3795
3842
  }
3796
- i--;
3843
+ i = len - 1;
3844
+ const optionalChainRef = makeRef();
3845
+ while (i >= 0) {
3846
+ const assignment = $1[i];
3847
+ const [ws1, lhs, ws2, op] = assignment;
3848
+ if (lhs.type === "MemberExpression" || lhs.type === "CallExpression") {
3849
+ const newMemberExp = unchainOptionalMemberExpression(lhs, optionalChainRef, (children) => {
3850
+ const assigns = $1.splice(i + 1, len - 1 - i);
3851
+ $1.pop();
3852
+ return [ws1, ...children, ws2, op, ...assigns, $2];
3853
+ });
3854
+ if (newMemberExp !== lhs) {
3855
+ if (newMemberExp.usesRef) {
3856
+ exp.hoistDec = {
3857
+ type: "Declaration",
3858
+ children: ["let ", optionalChainRef],
3859
+ names: []
3860
+ };
3861
+ }
3862
+ replaceNode($2, newMemberExp);
3863
+ newMemberExp.parent = exp;
3864
+ $2 = newMemberExp;
3865
+ }
3866
+ }
3867
+ i--;
3868
+ }
3869
+ exp.names = $1.flatMap(([, l]) => l.names || []);
3870
+ const index = exp.children.indexOf($2);
3871
+ if (index < 0)
3872
+ throw new Error("Assertion error: exp not in AssignmentExpression");
3873
+ exp.children.splice(index + 1, 0, ...tail);
3874
+ if (block) {
3875
+ block.parent = exp.parent;
3876
+ block.expressions.push(["", exp]);
3877
+ exp.parent = block;
3878
+ return block;
3879
+ }
3880
+ return exp;
3797
3881
  }
3798
- exp.names = $1.flatMap(([, l]) => l.names || []);
3799
- const index = exp.children.indexOf($2);
3800
- if (index < 0)
3801
- throw new Error("Assertion error: exp not in AssignmentExpression");
3802
- exp.children.splice(index + 1, 0, ...tail);
3803
- if (block) {
3804
- block.parent = exp.parent;
3805
- block.expressions.push(["", exp]);
3806
- exp.parent = block;
3807
- return block;
3882
+ );
3883
+ }
3884
+ function unchainOptionalMemberExpression(exp, ref, innerExp) {
3885
+ let j = 0;
3886
+ const { children } = exp;
3887
+ let usesRef = false;
3888
+ const conditions = [];
3889
+ while (j < children.length) {
3890
+ const child = children[j];
3891
+ const type = child?.type;
3892
+ let hasOptional = false;
3893
+ switch (type) {
3894
+ case "PropertyAccess": {
3895
+ if (child.dot?.optional) {
3896
+ hasOptional = true;
3897
+ child.dot.children.shift();
3898
+ child.dot.optional = false;
3899
+ }
3900
+ ;
3901
+ break;
3902
+ }
3903
+ case "Call":
3904
+ case "Index": {
3905
+ if (child.optional) {
3906
+ hasOptional = true;
3907
+ child.children.shift();
3908
+ child.optional = void 0;
3909
+ }
3910
+ ;
3911
+ break;
3912
+ }
3913
+ }
3914
+ if (hasOptional) {
3915
+ let base;
3916
+ if (j > 1 || needsRef(children[0])) {
3917
+ usesRef = true;
3918
+ base = makeLeftHandSideExpression({
3919
+ type: "AssignmentExpression",
3920
+ children: [ref, " = ", children.splice(0, j)]
3921
+ });
3922
+ base.parent = child;
3923
+ children.unshift(ref);
3924
+ j = 0;
3925
+ } else {
3926
+ base = children[0];
3927
+ }
3928
+ conditions.push([base, " != null"]);
3808
3929
  }
3930
+ j++;
3931
+ }
3932
+ let ref5;
3933
+ if (ref5 = conditions.length) {
3934
+ const l = ref5;
3935
+ const cs = conditions.map((c, i) => {
3936
+ if (i === l - 1) {
3937
+ return c;
3938
+ } else {
3939
+ return [c, " && "];
3940
+ }
3941
+ });
3942
+ return {
3943
+ ...exp,
3944
+ children: [...cs, " ? ", innerExp(children), " : void 0"],
3945
+ usesRef
3946
+ };
3947
+ } else {
3809
3948
  return exp;
3810
- });
3949
+ }
3811
3950
  }
3812
3951
  function attachPostfixStatementAsExpression(exp, post) {
3813
3952
  const postfixStatement = post[1];
@@ -3873,11 +4012,11 @@ function processStatementExpressions(statements) {
3873
4012
  if (!(exp.children[0] === exp.statement)) {
3874
4013
  ws = exp.children[0];
3875
4014
  }
3876
- let ref5;
4015
+ let ref6;
3877
4016
  switch (statement.type) {
3878
4017
  case "IfStatement": {
3879
- if (ref5 = expressionizeIfStatement(statement)) {
3880
- const expression = ref5;
4018
+ if (ref6 = expressionizeIfStatement(statement)) {
4019
+ const expression = ref6;
3881
4020
  exp.statement = expression;
3882
4021
  exp.children = [exp.statement];
3883
4022
  } else {
@@ -3901,6 +4040,40 @@ function processStatementExpressions(statements) {
3901
4040
  return;
3902
4041
  });
3903
4042
  }
4043
+ function processNegativeIndexAccess(statements) {
4044
+ gatherRecursiveAll(statements, (n) => n.type === "NegativeIndex").forEach((exp) => {
4045
+ const { parent } = exp;
4046
+ const index = parent.children.indexOf(exp);
4047
+ let ref, subexp;
4048
+ if (index === 1) {
4049
+ const child = parent.children[0];
4050
+ ref = maybeRef(child);
4051
+ if (ref !== child) {
4052
+ subexp = parent.children.splice(0, 1);
4053
+ }
4054
+ } else if (index > 1) {
4055
+ ref = makeRef();
4056
+ subexp = parent.children.splice(0, index);
4057
+ } else {
4058
+ throw new Error("Invalid parse tree for negative index access");
4059
+ }
4060
+ if (subexp) {
4061
+ exp.hoistDec = {
4062
+ type: "Declaration",
4063
+ children: ["let ", ref],
4064
+ names: []
4065
+ };
4066
+ parent.children.unshift(makeLeftHandSideExpression({
4067
+ type: "AssignmentExpression",
4068
+ children: [ref, " = ", subexp]
4069
+ }));
4070
+ }
4071
+ return exp.len.children = [
4072
+ ref,
4073
+ ".length"
4074
+ ];
4075
+ });
4076
+ }
3904
4077
  function processProgram(root, config, m, ReservedWord) {
3905
4078
  assert.equal(m.forbidBracedApplication.length, 1, "forbidBracedApplication");
3906
4079
  assert.equal(m.forbidClassImplicitCall.length, 1, "forbidClassImplicitCall");
@@ -3910,6 +4083,7 @@ function processProgram(root, config, m, ReservedWord) {
3910
4083
  assert.equal(m.JSXTagStack.length, 1, "JSXTagStack");
3911
4084
  addParentPointers(root);
3912
4085
  const { expressions: statements } = root;
4086
+ processNegativeIndexAccess(statements);
3913
4087
  processTypes(statements);
3914
4088
  processDeclarationConditions(statements, m.getRef);
3915
4089
  processPipelineExpressions(statements);
@@ -4147,9 +4321,9 @@ var init_lib = __esm({
4147
4321
  }
4148
4322
  });
4149
4323
 
4150
- // ../Hera/dist/machine.js
4324
+ // node_modules/@danielx/hera/dist/machine.js
4151
4325
  var require_machine = __commonJS({
4152
- "../Hera/dist/machine.js"(exports, module) {
4326
+ "node_modules/@danielx/hera/dist/machine.js"(exports, module) {
4153
4327
  "use strict";
4154
4328
  var __defProp2 = Object.defineProperty;
4155
4329
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
@@ -4620,6 +4794,8 @@ var require_parser = __commonJS({
4620
4794
  $TV,
4621
4795
  $Y,
4622
4796
  Parser,
4797
+ ParserContext,
4798
+ ParserOptions,
4623
4799
  Validator
4624
4800
  } = require_machine();
4625
4801
  var grammar = {
@@ -5124,6 +5300,7 @@ var require_parser = __commonJS({
5124
5300
  OpenBracket,
5125
5301
  OpenParen,
5126
5302
  Operator,
5303
+ Override,
5127
5304
  Own,
5128
5305
  Public,
5129
5306
  Private,
@@ -5521,59 +5698,60 @@ var require_parser = __commonJS({
5521
5698
  var $L170 = $L("of");
5522
5699
  var $L171 = $L("[");
5523
5700
  var $L172 = $L("operator");
5524
- var $L173 = $L("own");
5525
- var $L174 = $L("public");
5526
- var $L175 = $L("private");
5527
- var $L176 = $L("protected");
5528
- var $L177 = $L("||>");
5529
- var $L178 = $L("|\u25B7");
5530
- var $L179 = $L("|>=");
5531
- var $L180 = $L("\u25B7=");
5532
- var $L181 = $L("|>");
5533
- var $L182 = $L("\u25B7");
5534
- var $L183 = $L("readonly");
5535
- var $L184 = $L("return");
5536
- var $L185 = $L("satisfies");
5537
- var $L186 = $L("'");
5538
- var $L187 = $L("static");
5539
- var $L188 = $L("${");
5540
- var $L189 = $L("super");
5541
- var $L190 = $L("switch");
5542
- var $L191 = $L("target");
5543
- var $L192 = $L("then");
5544
- var $L193 = $L("this");
5545
- var $L194 = $L("throw");
5546
- var $L195 = $L('"""');
5547
- var $L196 = $L("'''");
5548
- var $L197 = $L("///");
5549
- var $L198 = $L("```");
5550
- var $L199 = $L("try");
5551
- var $L200 = $L("typeof");
5552
- var $L201 = $L("unless");
5553
- var $L202 = $L("until");
5554
- var $L203 = $L("using");
5555
- var $L204 = $L("var");
5556
- var $L205 = $L("void");
5557
- var $L206 = $L("when");
5558
- var $L207 = $L("while");
5559
- var $L208 = $L("yield");
5560
- var $L209 = $L("/>");
5561
- var $L210 = $L("</");
5562
- var $L211 = $L("<>");
5563
- var $L212 = $L("</>");
5564
- var $L213 = $L("<!--");
5565
- var $L214 = $L("-->");
5566
- var $L215 = $L("type");
5567
- var $L216 = $L("enum");
5568
- var $L217 = $L("interface");
5569
- var $L218 = $L("global");
5570
- var $L219 = $L("module");
5571
- var $L220 = $L("namespace");
5572
- var $L221 = $L("asserts");
5573
- var $L222 = $L("keyof");
5574
- var $L223 = $L("???");
5575
- var $L224 = $L("[]");
5576
- var $L225 = $L("civet");
5701
+ var $L173 = $L("override");
5702
+ var $L174 = $L("own");
5703
+ var $L175 = $L("public");
5704
+ var $L176 = $L("private");
5705
+ var $L177 = $L("protected");
5706
+ var $L178 = $L("||>");
5707
+ var $L179 = $L("|\u25B7");
5708
+ var $L180 = $L("|>=");
5709
+ var $L181 = $L("\u25B7=");
5710
+ var $L182 = $L("|>");
5711
+ var $L183 = $L("\u25B7");
5712
+ var $L184 = $L("readonly");
5713
+ var $L185 = $L("return");
5714
+ var $L186 = $L("satisfies");
5715
+ var $L187 = $L("'");
5716
+ var $L188 = $L("static");
5717
+ var $L189 = $L("${");
5718
+ var $L190 = $L("super");
5719
+ var $L191 = $L("switch");
5720
+ var $L192 = $L("target");
5721
+ var $L193 = $L("then");
5722
+ var $L194 = $L("this");
5723
+ var $L195 = $L("throw");
5724
+ var $L196 = $L('"""');
5725
+ var $L197 = $L("'''");
5726
+ var $L198 = $L("///");
5727
+ var $L199 = $L("```");
5728
+ var $L200 = $L("try");
5729
+ var $L201 = $L("typeof");
5730
+ var $L202 = $L("unless");
5731
+ var $L203 = $L("until");
5732
+ var $L204 = $L("using");
5733
+ var $L205 = $L("var");
5734
+ var $L206 = $L("void");
5735
+ var $L207 = $L("when");
5736
+ var $L208 = $L("while");
5737
+ var $L209 = $L("yield");
5738
+ var $L210 = $L("/>");
5739
+ var $L211 = $L("</");
5740
+ var $L212 = $L("<>");
5741
+ var $L213 = $L("</>");
5742
+ var $L214 = $L("<!--");
5743
+ var $L215 = $L("-->");
5744
+ var $L216 = $L("type");
5745
+ var $L217 = $L("enum");
5746
+ var $L218 = $L("interface");
5747
+ var $L219 = $L("global");
5748
+ var $L220 = $L("module");
5749
+ var $L221 = $L("namespace");
5750
+ var $L222 = $L("asserts");
5751
+ var $L223 = $L("keyof");
5752
+ var $L224 = $L("???");
5753
+ var $L225 = $L("[]");
5754
+ var $L226 = $L("civet");
5577
5755
  var $R0 = $R(new RegExp("(?=async|debugger|if|unless|do|for|loop|until|while|switch|throw|try)", "suy"));
5578
5756
  var $R1 = $R(new RegExp("(as|of|satisfies|then|when|implements|xor|xnor)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
5579
5757
  var $R2 = $R(new RegExp("[0-9]", "suy"));
@@ -5590,7 +5768,7 @@ var require_parser = __commonJS({
5590
5768
  var $R13 = $R(new RegExp("(?=\\p{ID_Start}|[_$])", "suy"));
5591
5769
  var $R14 = $R(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$])*", "suy"));
5592
5770
  var $R15 = $R(new RegExp("(?=\\[)", "suy"));
5593
- var $R16 = $R(new RegExp("[!+-]", "suy"));
5771
+ var $R16 = $R(new RegExp("[!+-]?", "suy"));
5594
5772
  var $R17 = $R(new RegExp("[+-]", "suy"));
5595
5773
  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"));
5596
5774
  var $R19 = $R(new RegExp("!\\^\\^?", "suy"));
@@ -5647,24 +5825,25 @@ var require_parser = __commonJS({
5647
5825
  var $R70 = $R(new RegExp("\\s", "suy"));
5648
5826
  var $R71 = $R(new RegExp("(?=[<])", "suy"));
5649
5827
  var $R72 = $R(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy"));
5650
- var $R73 = $R(new RegExp("[\\s>]|\\/>", "suy"));
5651
- var $R74 = $R(new RegExp("(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+", "suy"));
5652
- var $R75 = $R(new RegExp(`"[^"]*"|'[^']*'`, "suy"));
5653
- var $R76 = $R(new RegExp("[<>]", "suy"));
5654
- var $R77 = $R(new RegExp("[!~+-](?!\\s|[!~+-]*&)", "suy"));
5655
- var $R78 = $R(new RegExp("(?:-[^-]|[^-]*)*", "suy"));
5656
- var $R79 = $R(new RegExp("[^{}<>\\r\\n]+", "suy"));
5657
- var $R80 = $R(new RegExp("[+-]?", "suy"));
5658
- var $R81 = $R(new RegExp("(?=if|unless)", "suy"));
5659
- var $R82 = $R(new RegExp("#![^\\r\\n]*", "suy"));
5660
- var $R83 = $R(new RegExp("[\\t ]*", "suy"));
5661
- var $R84 = $R(new RegExp("[ \\t]*", "suy"));
5662
- var $R85 = $R(new RegExp("[\\s]*", "suy"));
5663
- var $R86 = $R(new RegExp("\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([a-zA-Z0-9.+-]*))?", "suy"));
5664
- var $R87 = $R(new RegExp("\\/\\/\\/[^\\r\\n]*", "suy"));
5665
- var $R88 = $R(new RegExp("(?=[ \\t\\r\\n\\/#]|$)", "suy"));
5666
- var $R89 = $R(new RegExp("\\r\\n|\\n|\\r|$", "suy"));
5667
- var $R90 = $R(new RegExp("[^]*", "suy"));
5828
+ var $R73 = $R(new RegExp("[!+-]", "suy"));
5829
+ var $R74 = $R(new RegExp("[\\s>]|\\/>", "suy"));
5830
+ var $R75 = $R(new RegExp("(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+", "suy"));
5831
+ var $R76 = $R(new RegExp(`"[^"]*"|'[^']*'`, "suy"));
5832
+ var $R77 = $R(new RegExp("[<>]", "suy"));
5833
+ var $R78 = $R(new RegExp("[!~+-](?!\\s|[!~+-]*&)", "suy"));
5834
+ var $R79 = $R(new RegExp("(?:-[^-]|[^-]*)*", "suy"));
5835
+ var $R80 = $R(new RegExp("[^{}<>\\r\\n]+", "suy"));
5836
+ var $R81 = $R(new RegExp("[+-]?", "suy"));
5837
+ var $R82 = $R(new RegExp("(?=if|unless)", "suy"));
5838
+ var $R83 = $R(new RegExp("#![^\\r\\n]*", "suy"));
5839
+ var $R84 = $R(new RegExp("[\\t ]*", "suy"));
5840
+ var $R85 = $R(new RegExp("[ \\t]*", "suy"));
5841
+ var $R86 = $R(new RegExp("[\\s]*", "suy"));
5842
+ var $R87 = $R(new RegExp("\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([a-zA-Z0-9.+-]*))?", "suy"));
5843
+ var $R88 = $R(new RegExp("\\/\\/\\/[^\\r\\n]*", "suy"));
5844
+ var $R89 = $R(new RegExp("(?=[ \\t\\r\\n\\/#]|$)", "suy"));
5845
+ var $R90 = $R(new RegExp("\\r\\n|\\n|\\r|$", "suy"));
5846
+ var $R91 = $R(new RegExp("[^]*", "suy"));
5668
5847
  var Program$0 = $TS($S(Reset, Init, $E(EOS), TopLevelStatements, __), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
5669
5848
  var statements = $4;
5670
5849
  processProgram({
@@ -6657,9 +6836,9 @@ var require_parser = __commonJS({
6657
6836
  function NestedClassElement(ctx, state) {
6658
6837
  return $EVENT(ctx, state, "NestedClassElement", NestedClassElement$0);
6659
6838
  }
6660
- var ClassElement$0 = $TS($S($E(Decorators), $E(AccessModifier), $E($S(Static, $E(_))), ClassElementDefinition), function($skip, $loc, $0, $1, $2, $3, $4) {
6839
+ 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) {
6661
6840
  var decorators = $1;
6662
- var definition = $4;
6841
+ var definition = $5;
6663
6842
  if (definition.type === "MultiMethodDefinition") {
6664
6843
  return {
6665
6844
  ...definition,
@@ -6673,7 +6852,7 @@ var require_parser = __commonJS({
6673
6852
  }
6674
6853
  return {
6675
6854
  ...definition,
6676
- children: [decorators, $2, $3, ...definition.children]
6855
+ children: [decorators, $2, $3, $4, ...definition.children]
6677
6856
  };
6678
6857
  });
6679
6858
  var ClassElement$1 = $TS($S(Static, BracedBlock), function($skip, $loc, $0, $1, $2) {
@@ -6715,7 +6894,7 @@ var require_parser = __commonJS({
6715
6894
  function NestedClassSignatureElement(ctx, state) {
6716
6895
  return $EVENT(ctx, state, "NestedClassSignatureElement", NestedClassSignatureElement$0);
6717
6896
  }
6718
- var ClassSignatureElement$0 = $S($E(Decorators), $E(AccessModifier), $E($S(Static, $E(_))), $C(MethodSignature, FieldDefinition));
6897
+ var ClassSignatureElement$0 = $S($E(Decorators), $E(AccessModifier), $E($S(Static, $E(_))), $E($S(Override, $E(_))), $C(MethodSignature, FieldDefinition));
6719
6898
  var ClassSignatureElement$1 = $S(Static, ClassSignatureBody);
6720
6899
  var ClassSignatureElement$$ = [ClassSignatureElement$0, ClassSignatureElement$1];
6721
6900
  function ClassSignatureElement(ctx, state) {
@@ -6913,18 +7092,28 @@ var require_parser = __commonJS({
6913
7092
  return literal;
6914
7093
  });
6915
7094
  var CallExpressionRest$3 = $TS($S($E(OptionalShorthand), ArgumentsWithTrailingMemberExpressions), function($skip, $loc, $0, $1, $2) {
6916
- if (!$1)
6917
- return $2;
6918
- return [$1, ...$2];
7095
+ var optional = $1;
7096
+ var argsWithTrailing = $2;
7097
+ if (!optional)
7098
+ return argsWithTrailing;
7099
+ const call = argsWithTrailing[0];
7100
+ return [{
7101
+ ...call,
7102
+ children: [optional, ...call.children],
7103
+ optional
7104
+ }, ...argsWithTrailing.slice(1)];
6919
7105
  });
6920
7106
  var CallExpressionRest$$ = [CallExpressionRest$0, CallExpressionRest$1, CallExpressionRest$2, CallExpressionRest$3];
6921
7107
  function CallExpressionRest(ctx, state) {
6922
7108
  return $EVENT_C(ctx, state, "CallExpressionRest", CallExpressionRest$$);
6923
7109
  }
6924
7110
  var OptionalShorthand$0 = $TS($S($EXPECT($R6, "OptionalShorthand /(?=[\\/?])/"), $Q(InlineComment), QuestionMark, OptionalDot), function($skip, $loc, $0, $1, $2, $3, $4) {
7111
+ var comments = $2;
7112
+ var q = $3;
7113
+ var d = $4;
6925
7114
  return {
6926
7115
  type: "Optional",
6927
- children: $0
7116
+ children: [...comments, q, d]
6928
7117
  };
6929
7118
  });
6930
7119
  function OptionalShorthand(ctx, state) {
@@ -6995,7 +7184,11 @@ var require_parser = __commonJS({
6995
7184
  if (dot.type === "Optional" && content.type === "SliceExpression") {
6996
7185
  return [...dot.children.slice(0, -1), ...comments, content];
6997
7186
  }
6998
- return [dot, ...comments, content];
7187
+ return {
7188
+ ...content,
7189
+ children: [dot, ...comments, ...content.children],
7190
+ optional: dot
7191
+ };
6999
7192
  }
7000
7193
  return [...comments, content];
7001
7194
  });
@@ -7099,9 +7292,14 @@ var require_parser = __commonJS({
7099
7292
  return $EVENT_C(ctx, state, "SliceParameters", SliceParameters$$);
7100
7293
  }
7101
7294
  var AccessStart$0 = $TS($S($E(PropertyAccessModifier), Dot, $N(Dot)), function($skip, $loc, $0, $1, $2, $3) {
7102
- if ($1)
7103
- return [$1, $2];
7104
- return $2;
7295
+ var modifier = $1;
7296
+ var dot = $2;
7297
+ let children = modifier ? [modifier, dot] : [dot];
7298
+ return {
7299
+ type: "AccessStart",
7300
+ children,
7301
+ optional: modifier?.token === "?"
7302
+ };
7105
7303
  });
7106
7304
  function AccessStart(ctx, state) {
7107
7305
  return $EVENT(ctx, state, "AccessStart", AccessStart$0);
@@ -7115,19 +7313,10 @@ var require_parser = __commonJS({
7115
7313
  var PropertyAccess$0 = $TS($S(AccessStart, $C(TemplateLiteral, StringLiteral, IntegerLiteral)), function($skip, $loc, $0, $1, $2) {
7116
7314
  var dot = $1;
7117
7315
  var literal = $2;
7118
- if (gatherRecursive(dot, (node) => node.token === "?").length) {
7119
- dot = [...dot, "["];
7120
- } else {
7121
- dot = replaceNodes(
7122
- deepCopy(dot),
7123
- (node) => node.token === ".",
7124
- (node) => ({ ...node, token: "[" })
7125
- );
7126
- }
7127
7316
  return {
7128
7317
  type: "Index",
7129
7318
  children: [
7130
- dot,
7319
+ adjustIndexAccess(dot),
7131
7320
  literal,
7132
7321
  "]"
7133
7322
  ]
@@ -7137,20 +7326,30 @@ var require_parser = __commonJS({
7137
7326
  var dot = $1;
7138
7327
  var neg = $2;
7139
7328
  var num = $3;
7140
- return [
7141
- { type: "PropertyAccess", children: [dot, "at"] },
7142
- // not including `name` so that `{x.-1}` doesn't use it
7143
- { type: "Call", children: ["(", neg, num, ")"] }
7329
+ const len = {
7330
+ children: []
7331
+ }, children = [
7332
+ adjustIndexAccess(dot),
7333
+ len,
7334
+ neg,
7335
+ num,
7336
+ "]"
7144
7337
  ];
7338
+ return {
7339
+ type: "NegativeIndex",
7340
+ children,
7341
+ len
7342
+ };
7145
7343
  });
7146
7344
  var PropertyAccess$2 = $TS($S(AccessStart, $Q(InlineComment), $C(IdentifierName, PrivateIdentifier, LengthShorthand)), function($skip, $loc, $0, $1, $2, $3) {
7147
- var access = $1;
7345
+ var dot = $1;
7148
7346
  var comments = $2;
7149
7347
  var id = $3;
7150
- const children = [access, ...comments, ...id.children];
7348
+ const children = [dot, ...comments, ...id.children];
7151
7349
  return {
7152
7350
  type: "PropertyAccess",
7153
7351
  name: id.name,
7352
+ dot,
7154
7353
  children
7155
7354
  };
7156
7355
  });
@@ -7158,16 +7357,20 @@ var require_parser = __commonJS({
7158
7357
  var p = $2;
7159
7358
  var id = $3;
7160
7359
  if (id) {
7360
+ const dot = { token: ".prototype.", $loc: p.$loc };
7161
7361
  return {
7162
7362
  type: "PropertyAccess",
7163
7363
  name: id.name,
7164
- children: [{ token: ".prototype.", $loc: p.$loc }, id]
7364
+ dot,
7365
+ children: [dot, id]
7165
7366
  };
7166
7367
  } else {
7368
+ const dot = { token: ".prototype", $loc: p.$loc };
7167
7369
  return {
7168
7370
  type: "PropertyAccess",
7169
7371
  name: "prototype",
7170
- children: [{ token: ".prototype", $loc: p.$loc }]
7372
+ dot,
7373
+ children: [dot]
7171
7374
  };
7172
7375
  }
7173
7376
  });
@@ -9086,17 +9289,26 @@ var require_parser = __commonJS({
9086
9289
  children: [ws, ...prop.children]
9087
9290
  };
9088
9291
  });
9089
- var PropertyDefinition$1 = $TS($S($E(_), $TEXT($EXPECT($R16, "PropertyDefinition /[!+-]/")), PropertyName), function($skip, $loc, $0, $1, $2, $3) {
9292
+ var PropertyDefinition$1 = $TS($S($E(_), $TEXT($EXPECT($R16, "PropertyDefinition /[!+-]?/")), PropertyName, $Y(ObjectPropertyDelimiter)), function($skip, $loc, $0, $1, $2, $3, $4) {
9090
9293
  var ws = $1;
9091
9294
  var toggle = $2;
9092
9295
  var id = $3;
9093
- const value = toggle === "+" ? "true" : "false";
9296
+ if (toggle) {
9297
+ const value = toggle === "+" ? "true" : "false";
9298
+ return {
9299
+ type: "Property",
9300
+ children: [ws, id, ": ", value],
9301
+ name: id,
9302
+ names: id.names,
9303
+ value
9304
+ };
9305
+ }
9094
9306
  return {
9095
9307
  type: "Property",
9096
- children: [ws, id, ": ", value],
9308
+ children: [ws, id],
9097
9309
  name: id,
9098
9310
  names: id.names,
9099
- value
9311
+ value: id
9100
9312
  };
9101
9313
  });
9102
9314
  var PropertyDefinition$2 = $TS($S($E(_), MethodDefinition), function($skip, $loc, $0, $1, $2) {
@@ -12409,37 +12621,43 @@ var require_parser = __commonJS({
12409
12621
  function Operator(ctx, state) {
12410
12622
  return $EVENT(ctx, state, "Operator", Operator$0);
12411
12623
  }
12412
- var Own$0 = $TS($S($EXPECT($L173, 'Own "own"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12624
+ var Override$0 = $TS($S($EXPECT($L173, 'Override "override"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12625
+ return { $loc, token: $1, ts: true };
12626
+ });
12627
+ function Override(ctx, state) {
12628
+ return $EVENT(ctx, state, "Override", Override$0);
12629
+ }
12630
+ var Own$0 = $TS($S($EXPECT($L174, 'Own "own"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12413
12631
  return { $loc, token: $1 };
12414
12632
  });
12415
12633
  function Own(ctx, state) {
12416
12634
  return $EVENT(ctx, state, "Own", Own$0);
12417
12635
  }
12418
- var Public$0 = $TS($S($EXPECT($L174, 'Public "public"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12636
+ var Public$0 = $TS($S($EXPECT($L175, 'Public "public"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12419
12637
  return { $loc, token: $1 };
12420
12638
  });
12421
12639
  function Public(ctx, state) {
12422
12640
  return $EVENT(ctx, state, "Public", Public$0);
12423
12641
  }
12424
- var Private$0 = $TS($S($EXPECT($L175, 'Private "private"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12642
+ var Private$0 = $TS($S($EXPECT($L176, 'Private "private"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12425
12643
  return { $loc, token: $1 };
12426
12644
  });
12427
12645
  function Private(ctx, state) {
12428
12646
  return $EVENT(ctx, state, "Private", Private$0);
12429
12647
  }
12430
- var Protected$0 = $TS($S($EXPECT($L176, 'Protected "protected"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12648
+ var Protected$0 = $TS($S($EXPECT($L177, 'Protected "protected"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12431
12649
  return { $loc, token: $1 };
12432
12650
  });
12433
12651
  function Protected(ctx, state) {
12434
12652
  return $EVENT(ctx, state, "Protected", Protected$0);
12435
12653
  }
12436
- var Pipe$0 = $TV($C($EXPECT($L177, 'Pipe "||>"'), $EXPECT($L178, 'Pipe "|\u25B7"')), function($skip, $loc, $0, $1) {
12654
+ var Pipe$0 = $TV($C($EXPECT($L178, 'Pipe "||>"'), $EXPECT($L179, 'Pipe "|\u25B7"')), function($skip, $loc, $0, $1) {
12437
12655
  return { $loc, token: "||>" };
12438
12656
  });
12439
- var Pipe$1 = $TV($C($EXPECT($L179, 'Pipe "|>="'), $EXPECT($L180, 'Pipe "\u25B7="')), function($skip, $loc, $0, $1) {
12657
+ var Pipe$1 = $TV($C($EXPECT($L180, 'Pipe "|>="'), $EXPECT($L181, 'Pipe "\u25B7="')), function($skip, $loc, $0, $1) {
12440
12658
  return { $loc, token: "|>=" };
12441
12659
  });
12442
- var Pipe$2 = $TV($C($EXPECT($L181, 'Pipe "|>"'), $EXPECT($L182, 'Pipe "\u25B7"')), function($skip, $loc, $0, $1) {
12660
+ var Pipe$2 = $TV($C($EXPECT($L182, 'Pipe "|>"'), $EXPECT($L183, 'Pipe "\u25B7"')), function($skip, $loc, $0, $1) {
12443
12661
  return { $loc, token: "|>" };
12444
12662
  });
12445
12663
  var Pipe$$ = [Pipe$0, Pipe$1, Pipe$2];
@@ -12452,19 +12670,19 @@ var require_parser = __commonJS({
12452
12670
  function QuestionMark(ctx, state) {
12453
12671
  return $EVENT(ctx, state, "QuestionMark", QuestionMark$0);
12454
12672
  }
12455
- var Readonly$0 = $TS($S($EXPECT($L183, 'Readonly "readonly"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12673
+ var Readonly$0 = $TS($S($EXPECT($L184, 'Readonly "readonly"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12456
12674
  return { $loc, token: $1, ts: true };
12457
12675
  });
12458
12676
  function Readonly(ctx, state) {
12459
12677
  return $EVENT(ctx, state, "Readonly", Readonly$0);
12460
12678
  }
12461
- var Return$0 = $TS($S($EXPECT($L184, 'Return "return"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12679
+ var Return$0 = $TS($S($EXPECT($L185, 'Return "return"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12462
12680
  return { $loc, token: $1 };
12463
12681
  });
12464
12682
  function Return(ctx, state) {
12465
12683
  return $EVENT(ctx, state, "Return", Return$0);
12466
12684
  }
12467
- var Satisfies$0 = $TS($S($EXPECT($L185, 'Satisfies "satisfies"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12685
+ var Satisfies$0 = $TS($S($EXPECT($L186, 'Satisfies "satisfies"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12468
12686
  return { $loc, token: $1 };
12469
12687
  });
12470
12688
  function Satisfies(ctx, state) {
@@ -12476,7 +12694,7 @@ var require_parser = __commonJS({
12476
12694
  function Semicolon(ctx, state) {
12477
12695
  return $EVENT(ctx, state, "Semicolon", Semicolon$0);
12478
12696
  }
12479
- var SingleQuote$0 = $TV($EXPECT($L186, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
12697
+ var SingleQuote$0 = $TV($EXPECT($L187, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
12480
12698
  return { $loc, token: $1 };
12481
12699
  });
12482
12700
  function SingleQuote(ctx, state) {
@@ -12488,7 +12706,7 @@ var require_parser = __commonJS({
12488
12706
  function Star(ctx, state) {
12489
12707
  return $EVENT(ctx, state, "Star", Star$0);
12490
12708
  }
12491
- var Static$0 = $TS($S($EXPECT($L187, 'Static "static"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12709
+ var Static$0 = $TS($S($EXPECT($L188, 'Static "static"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12492
12710
  return { $loc, token: $1 };
12493
12711
  });
12494
12712
  var Static$1 = $TS($S($EXPECT($L129, 'Static "@"'), $N($C($EXPECT($L4, 'Static "("'), $EXPECT($L129, 'Static "@"')))), function($skip, $loc, $0, $1, $2) {
@@ -12498,127 +12716,127 @@ var require_parser = __commonJS({
12498
12716
  function Static(ctx, state) {
12499
12717
  return $EVENT_C(ctx, state, "Static", Static$$);
12500
12718
  }
12501
- var SubstitutionStart$0 = $TV($EXPECT($L188, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
12719
+ var SubstitutionStart$0 = $TV($EXPECT($L189, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
12502
12720
  return { $loc, token: $1 };
12503
12721
  });
12504
12722
  function SubstitutionStart(ctx, state) {
12505
12723
  return $EVENT(ctx, state, "SubstitutionStart", SubstitutionStart$0);
12506
12724
  }
12507
- var Super$0 = $TS($S($EXPECT($L189, 'Super "super"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12725
+ var Super$0 = $TS($S($EXPECT($L190, 'Super "super"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12508
12726
  return { $loc, token: $1 };
12509
12727
  });
12510
12728
  function Super(ctx, state) {
12511
12729
  return $EVENT(ctx, state, "Super", Super$0);
12512
12730
  }
12513
- var Switch$0 = $TS($S($EXPECT($L190, 'Switch "switch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12731
+ var Switch$0 = $TS($S($EXPECT($L191, 'Switch "switch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12514
12732
  return { $loc, token: $1 };
12515
12733
  });
12516
12734
  function Switch(ctx, state) {
12517
12735
  return $EVENT(ctx, state, "Switch", Switch$0);
12518
12736
  }
12519
- var Target$0 = $TS($S($EXPECT($L191, 'Target "target"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12737
+ var Target$0 = $TS($S($EXPECT($L192, 'Target "target"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12520
12738
  return { $loc, token: $1 };
12521
12739
  });
12522
12740
  function Target(ctx, state) {
12523
12741
  return $EVENT(ctx, state, "Target", Target$0);
12524
12742
  }
12525
- var Then$0 = $TS($S(__, $EXPECT($L192, 'Then "then"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
12743
+ var Then$0 = $TS($S(__, $EXPECT($L193, 'Then "then"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
12526
12744
  return { $loc, token: "" };
12527
12745
  });
12528
12746
  function Then(ctx, state) {
12529
12747
  return $EVENT(ctx, state, "Then", Then$0);
12530
12748
  }
12531
- var This$0 = $TS($S($EXPECT($L193, 'This "this"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12749
+ var This$0 = $TS($S($EXPECT($L194, 'This "this"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12532
12750
  return { $loc, token: $1 };
12533
12751
  });
12534
12752
  function This(ctx, state) {
12535
12753
  return $EVENT(ctx, state, "This", This$0);
12536
12754
  }
12537
- var Throw$0 = $TS($S($EXPECT($L194, 'Throw "throw"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12755
+ var Throw$0 = $TS($S($EXPECT($L195, 'Throw "throw"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12538
12756
  return { $loc, token: $1 };
12539
12757
  });
12540
12758
  function Throw(ctx, state) {
12541
12759
  return $EVENT(ctx, state, "Throw", Throw$0);
12542
12760
  }
12543
- var TripleDoubleQuote$0 = $TV($EXPECT($L195, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
12761
+ var TripleDoubleQuote$0 = $TV($EXPECT($L196, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
12544
12762
  return { $loc, token: "`" };
12545
12763
  });
12546
12764
  function TripleDoubleQuote(ctx, state) {
12547
12765
  return $EVENT(ctx, state, "TripleDoubleQuote", TripleDoubleQuote$0);
12548
12766
  }
12549
- var TripleSingleQuote$0 = $TV($EXPECT($L196, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
12767
+ var TripleSingleQuote$0 = $TV($EXPECT($L197, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
12550
12768
  return { $loc, token: "`" };
12551
12769
  });
12552
12770
  function TripleSingleQuote(ctx, state) {
12553
12771
  return $EVENT(ctx, state, "TripleSingleQuote", TripleSingleQuote$0);
12554
12772
  }
12555
- var TripleSlash$0 = $TV($EXPECT($L197, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
12773
+ var TripleSlash$0 = $TV($EXPECT($L198, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
12556
12774
  return { $loc, token: "/" };
12557
12775
  });
12558
12776
  function TripleSlash(ctx, state) {
12559
12777
  return $EVENT(ctx, state, "TripleSlash", TripleSlash$0);
12560
12778
  }
12561
- var TripleTick$0 = $TV($EXPECT($L198, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
12779
+ var TripleTick$0 = $TV($EXPECT($L199, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
12562
12780
  return { $loc, token: "`" };
12563
12781
  });
12564
12782
  function TripleTick(ctx, state) {
12565
12783
  return $EVENT(ctx, state, "TripleTick", TripleTick$0);
12566
12784
  }
12567
- var Try$0 = $TS($S($EXPECT($L199, 'Try "try"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12785
+ var Try$0 = $TS($S($EXPECT($L200, 'Try "try"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12568
12786
  return { $loc, token: $1 };
12569
12787
  });
12570
12788
  function Try(ctx, state) {
12571
12789
  return $EVENT(ctx, state, "Try", Try$0);
12572
12790
  }
12573
- var Typeof$0 = $TS($S($EXPECT($L200, 'Typeof "typeof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12791
+ var Typeof$0 = $TS($S($EXPECT($L201, 'Typeof "typeof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12574
12792
  return { $loc, token: $1 };
12575
12793
  });
12576
12794
  function Typeof(ctx, state) {
12577
12795
  return $EVENT(ctx, state, "Typeof", Typeof$0);
12578
12796
  }
12579
- var Unless$0 = $TS($S($EXPECT($L201, 'Unless "unless"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12797
+ var Unless$0 = $TS($S($EXPECT($L202, 'Unless "unless"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12580
12798
  return { $loc, token: $1, negated: true };
12581
12799
  });
12582
12800
  function Unless(ctx, state) {
12583
12801
  return $EVENT(ctx, state, "Unless", Unless$0);
12584
12802
  }
12585
- var Until$0 = $TS($S($EXPECT($L202, 'Until "until"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12803
+ var Until$0 = $TS($S($EXPECT($L203, 'Until "until"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12586
12804
  return { $loc, token: $1 };
12587
12805
  });
12588
12806
  function Until(ctx, state) {
12589
12807
  return $EVENT(ctx, state, "Until", Until$0);
12590
12808
  }
12591
- var Using$0 = $TS($S($EXPECT($L203, 'Using "using"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12809
+ var Using$0 = $TS($S($EXPECT($L204, 'Using "using"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12592
12810
  return { $loc, token: $1 };
12593
12811
  });
12594
12812
  function Using(ctx, state) {
12595
12813
  return $EVENT(ctx, state, "Using", Using$0);
12596
12814
  }
12597
- var Var$0 = $TS($S($EXPECT($L204, 'Var "var"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12815
+ var Var$0 = $TS($S($EXPECT($L205, 'Var "var"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12598
12816
  return { $loc, token: $1 };
12599
12817
  });
12600
12818
  function Var(ctx, state) {
12601
12819
  return $EVENT(ctx, state, "Var", Var$0);
12602
12820
  }
12603
- var Void$0 = $TS($S($EXPECT($L205, 'Void "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12821
+ var Void$0 = $TS($S($EXPECT($L206, 'Void "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12604
12822
  return { $loc, token: $1 };
12605
12823
  });
12606
12824
  function Void(ctx, state) {
12607
12825
  return $EVENT(ctx, state, "Void", Void$0);
12608
12826
  }
12609
- var When$0 = $TS($S($EXPECT($L206, 'When "when"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12827
+ var When$0 = $TS($S($EXPECT($L207, 'When "when"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12610
12828
  return { $loc, token: "case" };
12611
12829
  });
12612
12830
  function When(ctx, state) {
12613
12831
  return $EVENT(ctx, state, "When", When$0);
12614
12832
  }
12615
- var While$0 = $TS($S($EXPECT($L207, 'While "while"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12833
+ var While$0 = $TS($S($EXPECT($L208, 'While "while"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12616
12834
  return { $loc, token: $1 };
12617
12835
  });
12618
12836
  function While(ctx, state) {
12619
12837
  return $EVENT(ctx, state, "While", While$0);
12620
12838
  }
12621
- var Yield$0 = $TS($S($EXPECT($L208, 'Yield "yield"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12839
+ var Yield$0 = $TS($S($EXPECT($L209, 'Yield "yield"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12622
12840
  return { $loc, token: $1, type: "Yield" };
12623
12841
  });
12624
12842
  function Yield(ctx, state) {
@@ -12697,7 +12915,7 @@ var require_parser = __commonJS({
12697
12915
  function JSXElement(ctx, state) {
12698
12916
  return $EVENT_C(ctx, state, "JSXElement", JSXElement$$);
12699
12917
  }
12700
- 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) {
12918
+ 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) {
12701
12919
  return { type: "JSXElement", children: $0, tag: $2 };
12702
12920
  });
12703
12921
  function JSXSelfClosingElement(ctx, state) {
@@ -12731,7 +12949,7 @@ var require_parser = __commonJS({
12731
12949
  function JSXOptionalClosingElement(ctx, state) {
12732
12950
  return $EVENT_C(ctx, state, "JSXOptionalClosingElement", JSXOptionalClosingElement$$);
12733
12951
  }
12734
- var JSXClosingElement$0 = $S($EXPECT($L210, 'JSXClosingElement "</"'), $E(Whitespace), JSXElementName, $E(Whitespace), $EXPECT($L45, 'JSXClosingElement ">"'));
12952
+ var JSXClosingElement$0 = $S($EXPECT($L211, 'JSXClosingElement "</"'), $E(Whitespace), JSXElementName, $E(Whitespace), $EXPECT($L45, 'JSXClosingElement ">"'));
12735
12953
  function JSXClosingElement(ctx, state) {
12736
12954
  return $EVENT(ctx, state, "JSXClosingElement", JSXClosingElement$0);
12737
12955
  }
@@ -12752,7 +12970,7 @@ var require_parser = __commonJS({
12752
12970
  ];
12753
12971
  return { type: "JSXFragment", children: parts, jsxChildren: children.jsxChildren };
12754
12972
  });
12755
- var JSXFragment$1 = $TS($S(CoffeeJSXEnabled, $EXPECT($L211, 'JSXFragment "<>"'), $E(JSXChildren), $E(Whitespace), JSXClosingFragment), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
12973
+ var JSXFragment$1 = $TS($S(CoffeeJSXEnabled, $EXPECT($L212, 'JSXFragment "<>"'), $E(JSXChildren), $E(Whitespace), JSXClosingFragment), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
12756
12974
  var children = $3;
12757
12975
  $0 = $0.slice(1);
12758
12976
  return {
@@ -12765,7 +12983,7 @@ var require_parser = __commonJS({
12765
12983
  function JSXFragment(ctx, state) {
12766
12984
  return $EVENT_C(ctx, state, "JSXFragment", JSXFragment$$);
12767
12985
  }
12768
- var PushJSXOpeningFragment$0 = $TV($EXPECT($L211, 'PushJSXOpeningFragment "<>"'), function($skip, $loc, $0, $1) {
12986
+ var PushJSXOpeningFragment$0 = $TV($EXPECT($L212, 'PushJSXOpeningFragment "<>"'), function($skip, $loc, $0, $1) {
12769
12987
  module.JSXTagStack.push("");
12770
12988
  return $1;
12771
12989
  });
@@ -12782,7 +13000,7 @@ var require_parser = __commonJS({
12782
13000
  function JSXOptionalClosingFragment(ctx, state) {
12783
13001
  return $EVENT_C(ctx, state, "JSXOptionalClosingFragment", JSXOptionalClosingFragment$$);
12784
13002
  }
12785
- var JSXClosingFragment$0 = $EXPECT($L212, 'JSXClosingFragment "</>"');
13003
+ var JSXClosingFragment$0 = $EXPECT($L213, 'JSXClosingFragment "</>"');
12786
13004
  function JSXClosingFragment(ctx, state) {
12787
13005
  return $EVENT(ctx, state, "JSXClosingFragment", JSXClosingFragment$0);
12788
13006
  }
@@ -12973,7 +13191,7 @@ var require_parser = __commonJS({
12973
13191
  class: $2
12974
13192
  };
12975
13193
  });
12976
- var JSXAttribute$7 = $TS($S($TEXT($EXPECT($R16, "JSXAttribute /[!+-]/")), JSXAttributeName, $Y(JSXAttributeSpace)), function($skip, $loc, $0, $1, $2, $3) {
13194
+ var JSXAttribute$7 = $TS($S($TEXT($EXPECT($R73, "JSXAttribute /[!+-]/")), JSXAttributeName, $Y(JSXAttributeSpace)), function($skip, $loc, $0, $1, $2, $3) {
12977
13195
  var toggle = $1;
12978
13196
  var id = $2;
12979
13197
  const value = toggle === "+" ? "true" : "false";
@@ -12983,11 +13201,11 @@ var require_parser = __commonJS({
12983
13201
  function JSXAttribute(ctx, state) {
12984
13202
  return $EVENT_C(ctx, state, "JSXAttribute", JSXAttribute$$);
12985
13203
  }
12986
- var JSXAttributeSpace$0 = $R$0($EXPECT($R73, "JSXAttributeSpace /[\\s>]|\\/>/"));
13204
+ var JSXAttributeSpace$0 = $R$0($EXPECT($R74, "JSXAttributeSpace /[\\s>]|\\/>/"));
12987
13205
  function JSXAttributeSpace(ctx, state) {
12988
13206
  return $EVENT(ctx, state, "JSXAttributeSpace", JSXAttributeSpace$0);
12989
13207
  }
12990
- var JSXShorthandString$0 = $TR($EXPECT($R74, "JSXShorthandString /(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13208
+ var JSXShorthandString$0 = $TR($EXPECT($R75, "JSXShorthandString /(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
12991
13209
  return quoteString($0);
12992
13210
  });
12993
13211
  var JSXShorthandString$1 = $TS($S(TemplateLiteral), function($skip, $loc, $0, $1) {
@@ -13021,7 +13239,7 @@ var require_parser = __commonJS({
13021
13239
  }
13022
13240
  return [open, value, close];
13023
13241
  });
13024
- var JSXAttributeValue$4 = $R$0($EXPECT($R75, `JSXAttributeValue /"[^"]*"|'[^']*'/`));
13242
+ var JSXAttributeValue$4 = $R$0($EXPECT($R76, `JSXAttributeValue /"[^"]*"|'[^']*'/`));
13025
13243
  var JSXAttributeValue$$ = [JSXAttributeValue$0, JSXAttributeValue$1, JSXAttributeValue$2, JSXAttributeValue$3, JSXAttributeValue$4];
13026
13244
  function JSXAttributeValue(ctx, state) {
13027
13245
  return $EVENT_C(ctx, state, "JSXAttributeValue", JSXAttributeValue$$);
@@ -13034,7 +13252,7 @@ var require_parser = __commonJS({
13034
13252
  function InlineJSXAttributeValue(ctx, state) {
13035
13253
  return $EVENT(ctx, state, "InlineJSXAttributeValue", InlineJSXAttributeValue$0);
13036
13254
  }
13037
- var InlineJSXBinaryOpRHS$0 = $TS($S($N($EXPECT($R76, "InlineJSXBinaryOpRHS /[<>]/")), BinaryOp, InlineJSXUnaryExpression), function($skip, $loc, $0, $1, $2, $3) {
13255
+ var InlineJSXBinaryOpRHS$0 = $TS($S($N($EXPECT($R77, "InlineJSXBinaryOpRHS /[<>]/")), BinaryOp, InlineJSXUnaryExpression), function($skip, $loc, $0, $1, $2, $3) {
13038
13256
  var op = $2;
13039
13257
  var rhs = $3;
13040
13258
  return [[], op, [], rhs];
@@ -13051,7 +13269,7 @@ var require_parser = __commonJS({
13051
13269
  function InlineJSXUnaryExpression(ctx, state) {
13052
13270
  return $EVENT(ctx, state, "InlineJSXUnaryExpression", InlineJSXUnaryExpression$0);
13053
13271
  }
13054
- var InlineJSXUnaryOp$0 = $TR($EXPECT($R77, "InlineJSXUnaryOp /[!~+-](?!\\s|[!~+-]*&)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13272
+ var InlineJSXUnaryOp$0 = $TR($EXPECT($R78, "InlineJSXUnaryOp /[!~+-](?!\\s|[!~+-]*&)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13055
13273
  return { $loc, token: $0 };
13056
13274
  });
13057
13275
  function InlineJSXUnaryOp(ctx, state) {
@@ -13261,19 +13479,19 @@ var require_parser = __commonJS({
13261
13479
  function JSXChild(ctx, state) {
13262
13480
  return $EVENT_C(ctx, state, "JSXChild", JSXChild$$);
13263
13481
  }
13264
- var JSXComment$0 = $TS($S($EXPECT($L213, 'JSXComment "<!--"'), JSXCommentContent, $EXPECT($L214, 'JSXComment "-->"')), function($skip, $loc, $0, $1, $2, $3) {
13482
+ var JSXComment$0 = $TS($S($EXPECT($L214, 'JSXComment "<!--"'), JSXCommentContent, $EXPECT($L215, 'JSXComment "-->"')), function($skip, $loc, $0, $1, $2, $3) {
13265
13483
  return ["{/*", $2, "*/}"];
13266
13484
  });
13267
13485
  function JSXComment(ctx, state) {
13268
13486
  return $EVENT(ctx, state, "JSXComment", JSXComment$0);
13269
13487
  }
13270
- var JSXCommentContent$0 = $TR($EXPECT($R78, "JSXCommentContent /(?:-[^-]|[^-]*)*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13488
+ var JSXCommentContent$0 = $TR($EXPECT($R79, "JSXCommentContent /(?:-[^-]|[^-]*)*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13271
13489
  return { $loc, token: $0.replace(/\*\//g, "* /") };
13272
13490
  });
13273
13491
  function JSXCommentContent(ctx, state) {
13274
13492
  return $EVENT(ctx, state, "JSXCommentContent", JSXCommentContent$0);
13275
13493
  }
13276
- var JSXText$0 = $TR($EXPECT($R79, "JSXText /[^{}<>\\r\\n]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13494
+ var JSXText$0 = $TR($EXPECT($R80, "JSXText /[^{}<>\\r\\n]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13277
13495
  return {
13278
13496
  type: "JSXText",
13279
13497
  token: $0,
@@ -13448,37 +13666,37 @@ var require_parser = __commonJS({
13448
13666
  function InterfaceExtendsTarget(ctx, state) {
13449
13667
  return $EVENT(ctx, state, "InterfaceExtendsTarget", InterfaceExtendsTarget$0);
13450
13668
  }
13451
- var TypeKeyword$0 = $TS($S($EXPECT($L215, 'TypeKeyword "type"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13669
+ var TypeKeyword$0 = $TS($S($EXPECT($L216, 'TypeKeyword "type"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13452
13670
  return { $loc, token: $1 };
13453
13671
  });
13454
13672
  function TypeKeyword(ctx, state) {
13455
13673
  return $EVENT(ctx, state, "TypeKeyword", TypeKeyword$0);
13456
13674
  }
13457
- var Enum$0 = $TS($S($EXPECT($L216, 'Enum "enum"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13675
+ var Enum$0 = $TS($S($EXPECT($L217, 'Enum "enum"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13458
13676
  return { $loc, token: $1 };
13459
13677
  });
13460
13678
  function Enum(ctx, state) {
13461
13679
  return $EVENT(ctx, state, "Enum", Enum$0);
13462
13680
  }
13463
- var Interface$0 = $TS($S($EXPECT($L217, 'Interface "interface"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13681
+ var Interface$0 = $TS($S($EXPECT($L218, 'Interface "interface"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13464
13682
  return { $loc, token: $1 };
13465
13683
  });
13466
13684
  function Interface(ctx, state) {
13467
13685
  return $EVENT(ctx, state, "Interface", Interface$0);
13468
13686
  }
13469
- var Global$0 = $TS($S($EXPECT($L218, 'Global "global"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13687
+ var Global$0 = $TS($S($EXPECT($L219, 'Global "global"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13470
13688
  return { $loc, token: $1 };
13471
13689
  });
13472
13690
  function Global(ctx, state) {
13473
13691
  return $EVENT(ctx, state, "Global", Global$0);
13474
13692
  }
13475
- var Module$0 = $TS($S($EXPECT($L219, 'Module "module"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13693
+ var Module$0 = $TS($S($EXPECT($L220, 'Module "module"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13476
13694
  return { $loc, token: $1 };
13477
13695
  });
13478
13696
  function Module(ctx, state) {
13479
13697
  return $EVENT(ctx, state, "Module", Module$0);
13480
13698
  }
13481
- var Namespace$0 = $TS($S($EXPECT($L220, 'Namespace "namespace"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13699
+ var Namespace$0 = $TS($S($EXPECT($L221, 'Namespace "namespace"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13482
13700
  return { $loc, token: $1 };
13483
13701
  });
13484
13702
  function Namespace(ctx, state) {
@@ -13694,7 +13912,7 @@ var require_parser = __commonJS({
13694
13912
  function TypeProperty(ctx, state) {
13695
13913
  return $EVENT(ctx, state, "TypeProperty", TypeProperty$0);
13696
13914
  }
13697
- 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)))));
13915
+ 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)))));
13698
13916
  function TypeIndexSignature(ctx, state) {
13699
13917
  return $EVENT(ctx, state, "TypeIndexSignature", TypeIndexSignature$0);
13700
13918
  }
@@ -13752,7 +13970,7 @@ var require_parser = __commonJS({
13752
13970
  function ReturnTypeSuffix(ctx, state) {
13753
13971
  return $EVENT(ctx, state, "ReturnTypeSuffix", ReturnTypeSuffix$0);
13754
13972
  }
13755
- var ReturnType$0 = $TS($S($E($S(__, $EXPECT($L221, 'ReturnType "asserts"'), NonIdContinue)), TypePredicate), function($skip, $loc, $0, $1, $2) {
13973
+ var ReturnType$0 = $TS($S($E($S(__, $EXPECT($L222, 'ReturnType "asserts"'), NonIdContinue)), TypePredicate), function($skip, $loc, $0, $1, $2) {
13756
13974
  var asserts = $1;
13757
13975
  var t = $2;
13758
13976
  if (asserts) {
@@ -13831,8 +14049,8 @@ var require_parser = __commonJS({
13831
14049
  function TypeUnarySuffix(ctx, state) {
13832
14050
  return $EVENT_C(ctx, state, "TypeUnarySuffix", TypeUnarySuffix$$);
13833
14051
  }
13834
- var TypeUnaryOp$0 = $S($EXPECT($L222, 'TypeUnaryOp "keyof"'), NonIdContinue);
13835
- var TypeUnaryOp$1 = $S($EXPECT($L183, 'TypeUnaryOp "readonly"'), NonIdContinue);
14052
+ var TypeUnaryOp$0 = $S($EXPECT($L223, 'TypeUnaryOp "keyof"'), NonIdContinue);
14053
+ var TypeUnaryOp$1 = $S($EXPECT($L184, 'TypeUnaryOp "readonly"'), NonIdContinue);
13836
14054
  var TypeUnaryOp$$ = [TypeUnaryOp$0, TypeUnaryOp$1];
13837
14055
  function TypeUnaryOp(ctx, state) {
13838
14056
  return $EVENT_C(ctx, state, "TypeUnaryOp", TypeUnaryOp$$);
@@ -13862,7 +14080,7 @@ var require_parser = __commonJS({
13862
14080
  function TypeIndexedAccess(ctx, state) {
13863
14081
  return $EVENT_C(ctx, state, "TypeIndexedAccess", TypeIndexedAccess$$);
13864
14082
  }
13865
- var UnknownAlias$0 = $TV($EXPECT($L223, 'UnknownAlias "???"'), function($skip, $loc, $0, $1) {
14083
+ var UnknownAlias$0 = $TV($EXPECT($L224, 'UnknownAlias "???"'), function($skip, $loc, $0, $1) {
13866
14084
  return { $loc, token: "unknown" };
13867
14085
  });
13868
14086
  function UnknownAlias(ctx, state) {
@@ -13988,7 +14206,7 @@ var require_parser = __commonJS({
13988
14206
  function NestedType(ctx, state) {
13989
14207
  return $EVENT(ctx, state, "NestedType", NestedType$0);
13990
14208
  }
13991
- var TypeConditional$0 = $TS($S($E(_), $EXPECT($R81, "TypeConditional /(?=if|unless)/"), TypeIfThenElse), function($skip, $loc, $0, $1, $2, $3) {
14209
+ var TypeConditional$0 = $TS($S($E(_), $EXPECT($R82, "TypeConditional /(?=if|unless)/"), TypeIfThenElse), function($skip, $loc, $0, $1, $2, $3) {
13992
14210
  return [$1, expressionizeTypeIf($3)];
13993
14211
  });
13994
14212
  var TypeConditional$1 = $TS($S(TypeCondition, NotDedented, QuestionMark, Type, __, Colon, Type), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
@@ -14068,13 +14286,20 @@ var require_parser = __commonJS({
14068
14286
  }
14069
14287
  var TypeLiteral$0 = TypeTemplateLiteral;
14070
14288
  var TypeLiteral$1 = Literal;
14071
- var TypeLiteral$2 = $TS($S($EXPECT($L205, 'TypeLiteral "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
14289
+ var TypeLiteral$2 = $TS($S($EXPECT($R17, "TypeLiteral /[+-]/"), NumericLiteral), function($skip, $loc, $0, $1, $2) {
14290
+ var sign = $1;
14291
+ var num = $2;
14292
+ if (sign[0] === "+")
14293
+ return num;
14294
+ return $0;
14295
+ });
14296
+ var TypeLiteral$3 = $TS($S($EXPECT($L206, 'TypeLiteral "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
14072
14297
  return { type: "VoidType", $loc, token: $1 };
14073
14298
  });
14074
- var TypeLiteral$3 = $TV($EXPECT($L224, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
14299
+ var TypeLiteral$4 = $TV($EXPECT($L225, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
14075
14300
  return { $loc, token: "[]" };
14076
14301
  });
14077
- var TypeLiteral$$ = [TypeLiteral$0, TypeLiteral$1, TypeLiteral$2, TypeLiteral$3];
14302
+ var TypeLiteral$$ = [TypeLiteral$0, TypeLiteral$1, TypeLiteral$2, TypeLiteral$3, TypeLiteral$4];
14078
14303
  function TypeLiteral(ctx, state) {
14079
14304
  return $EVENT_C(ctx, state, "TypeLiteral", TypeLiteral$$);
14080
14305
  }
@@ -14181,15 +14406,15 @@ var require_parser = __commonJS({
14181
14406
  function ThisType(ctx, state) {
14182
14407
  return $EVENT(ctx, state, "ThisType", ThisType$0);
14183
14408
  }
14184
- var Shebang$0 = $S($R$0($EXPECT($R82, "Shebang /#![^\\r\\n]*/")), EOL);
14409
+ var Shebang$0 = $S($R$0($EXPECT($R83, "Shebang /#![^\\r\\n]*/")), EOL);
14185
14410
  function Shebang(ctx, state) {
14186
14411
  return $EVENT(ctx, state, "Shebang", Shebang$0);
14187
14412
  }
14188
- var CivetPrologue$0 = $T($S($EXPECT($R83, "CivetPrologue /[\\t ]*/"), DoubleQuote, CivetPrologueContent, DoubleQuote, SimpleStatementDelimiter, $EXPECT($R84, "CivetPrologue /[ \\t]*/"), $C(EOL, $Y(RestOfLine))), function(value) {
14413
+ var CivetPrologue$0 = $T($S($EXPECT($R84, "CivetPrologue /[\\t ]*/"), DoubleQuote, CivetPrologueContent, DoubleQuote, SimpleStatementDelimiter, $EXPECT($R85, "CivetPrologue /[ \\t]*/"), $C(EOL, $Y(RestOfLine))), function(value) {
14189
14414
  var content = value[2];
14190
14415
  return content;
14191
14416
  });
14192
- var CivetPrologue$1 = $T($S($EXPECT($R83, "CivetPrologue /[\\t ]*/"), SingleQuote, CivetPrologueContent, SingleQuote, SimpleStatementDelimiter, $EXPECT($R84, "CivetPrologue /[ \\t]*/"), $C(EOL, $Y(RestOfLine))), function(value) {
14417
+ var CivetPrologue$1 = $T($S($EXPECT($R84, "CivetPrologue /[\\t ]*/"), SingleQuote, CivetPrologueContent, SingleQuote, SimpleStatementDelimiter, $EXPECT($R85, "CivetPrologue /[ \\t]*/"), $C(EOL, $Y(RestOfLine))), function(value) {
14193
14418
  var content = value[2];
14194
14419
  return content;
14195
14420
  });
@@ -14197,7 +14422,7 @@ var require_parser = __commonJS({
14197
14422
  function CivetPrologue(ctx, state) {
14198
14423
  return $EVENT_C(ctx, state, "CivetPrologue", CivetPrologue$$);
14199
14424
  }
14200
- var CivetPrologueContent$0 = $TS($S($EXPECT($L225, 'CivetPrologueContent "civet"'), NonIdContinue, $Q(CivetOption), $EXPECT($R85, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3, $4) {
14425
+ var CivetPrologueContent$0 = $TS($S($EXPECT($L226, 'CivetPrologueContent "civet"'), NonIdContinue, $Q(CivetOption), $EXPECT($R86, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3, $4) {
14201
14426
  var options = $3;
14202
14427
  return {
14203
14428
  type: "CivetPrologue",
@@ -14208,7 +14433,7 @@ var require_parser = __commonJS({
14208
14433
  function CivetPrologueContent(ctx, state) {
14209
14434
  return $EVENT(ctx, state, "CivetPrologueContent", CivetPrologueContent$0);
14210
14435
  }
14211
- 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) {
14436
+ 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) {
14212
14437
  const optionName = $2.replace(/-+([a-z]?)/g, (_2, l) => {
14213
14438
  if (l)
14214
14439
  return l.toUpperCase();
@@ -14225,11 +14450,11 @@ var require_parser = __commonJS({
14225
14450
  function CivetOption(ctx, state) {
14226
14451
  return $EVENT(ctx, state, "CivetOption", CivetOption$0);
14227
14452
  }
14228
- var UnknownPrologue$0 = $S($R$0($EXPECT($R83, "UnknownPrologue /[\\t ]*/")), StringLiteral, $TEXT(SimpleStatementDelimiter), EOS);
14453
+ var UnknownPrologue$0 = $S($R$0($EXPECT($R84, "UnknownPrologue /[\\t ]*/")), StringLiteral, $TEXT(SimpleStatementDelimiter), EOS);
14229
14454
  function UnknownPrologue(ctx, state) {
14230
14455
  return $EVENT(ctx, state, "UnknownPrologue", UnknownPrologue$0);
14231
14456
  }
14232
- var TripleSlashDirective$0 = $S($R$0($EXPECT($R87, "TripleSlashDirective /\\/\\/\\/[^\\r\\n]*/")), $E(EOS));
14457
+ var TripleSlashDirective$0 = $S($R$0($EXPECT($R88, "TripleSlashDirective /\\/\\/\\/[^\\r\\n]*/")), $E(EOS));
14233
14458
  function TripleSlashDirective(ctx, state) {
14234
14459
  return $EVENT(ctx, state, "TripleSlashDirective", TripleSlashDirective$0);
14235
14460
  }
@@ -14245,13 +14470,13 @@ var require_parser = __commonJS({
14245
14470
  function PrologueString(ctx, state) {
14246
14471
  return $EVENT_C(ctx, state, "PrologueString", PrologueString$$);
14247
14472
  }
14248
- var EOS$0 = $T($S($EXPECT($R88, "EOS /(?=[ \\t\\r\\n\\/#]|$)/"), $P(RestOfLine)), function(value) {
14473
+ var EOS$0 = $T($S($EXPECT($R89, "EOS /(?=[ \\t\\r\\n\\/#]|$)/"), $P(RestOfLine)), function(value) {
14249
14474
  return value[1];
14250
14475
  });
14251
14476
  function EOS(ctx, state) {
14252
14477
  return $EVENT(ctx, state, "EOS", EOS$0);
14253
14478
  }
14254
- var EOL$0 = $TR($EXPECT($R89, "EOL /\\r\\n|\\n|\\r|$/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14479
+ var EOL$0 = $TR($EXPECT($R90, "EOL /\\r\\n|\\n|\\r|$/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14255
14480
  return { $loc, token: $0 };
14256
14481
  });
14257
14482
  function EOL(ctx, state) {
@@ -14783,9 +15008,9 @@ var require_parser = __commonJS({
14783
15008
  }
14784
15009
  }
14785
15010
  });
14786
- if (typeof parse2 !== "undefined") {
14787
- Object.assign(module.config, parse2.config);
14788
- parse2.config = module.config;
15011
+ if (typeof parse !== "undefined") {
15012
+ Object.assign(module.config, parse.config);
15013
+ parse.config = module.config;
14789
15014
  } else {
14790
15015
  Object.assign(module.config, exports.parse.config);
14791
15016
  exports.parse.config = module.config;
@@ -14823,11 +15048,11 @@ var require_parser = __commonJS({
14823
15048
  function Prologue(ctx, state) {
14824
15049
  return $EVENT(ctx, state, "Prologue", Prologue$0);
14825
15050
  }
14826
- var ProloguePrefix$0 = $S(Prologue, $R$0($EXPECT($R90, "ProloguePrefix /[^]*/")));
15051
+ var ProloguePrefix$0 = $S(Prologue, $R$0($EXPECT($R91, "ProloguePrefix /[^]*/")));
14827
15052
  function ProloguePrefix(ctx, state) {
14828
15053
  return $EVENT(ctx, state, "ProloguePrefix", ProloguePrefix$0);
14829
15054
  }
14830
- var Indent$0 = $TR($EXPECT($R84, "Indent /[ \\t]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
15055
+ var Indent$0 = $TR($EXPECT($R85, "Indent /[ \\t]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14831
15056
  const level = getIndentLevel($0, module.config.tab);
14832
15057
  return {
14833
15058
  $loc,
@@ -14936,7 +15161,7 @@ var require_parser = __commonJS({
14936
15161
  };
14937
15162
  }();
14938
15163
  exports.default = parser;
14939
- var parse2 = exports.parse = parser.parse;
15164
+ exports.parse = parser.parse;
14940
15165
  exports.Program = Program;
14941
15166
  exports.TopLevelStatements = TopLevelStatements;
14942
15167
  exports.NestedTopLevelStatements = NestedTopLevelStatements;
@@ -15438,6 +15663,7 @@ var require_parser = __commonJS({
15438
15663
  exports.OpenBracket = OpenBracket;
15439
15664
  exports.OpenParen = OpenParen;
15440
15665
  exports.Operator = Operator;
15666
+ exports.Override = Override;
15441
15667
  exports.Own = Own;
15442
15668
  exports.Public = Public;
15443
15669
  exports.Private = Private;