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