@danielx/civet 0.6.86 → 0.6.87

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/browser.js CHANGED
@@ -3207,8 +3207,11 @@ var Civet = (() => {
3207
3207
  return post;
3208
3208
  }
3209
3209
  function adjustIndexAccess(dot) {
3210
- if (gatherRecursive(dot, (node) => node.token === "?").length) {
3211
- dot = [...dot, "["];
3210
+ if (dot.optional) {
3211
+ return {
3212
+ ...dot,
3213
+ children: [...dot.children, "["]
3214
+ };
3212
3215
  } else {
3213
3216
  dot = replaceNodes(
3214
3217
  deepCopy(dot),
@@ -3729,108 +3732,231 @@ var Civet = (() => {
3729
3732
  if (pre.length)
3730
3733
  exp.children.unshift(...pre);
3731
3734
  if (post.length)
3732
- return exp.children.push(...post);
3733
- return;
3734
- });
3735
- replaceNodesRecursive(statements, (n) => n.type === "AssignmentExpression" && n.names === null, (exp) => {
3736
- let { lhs: $1, exp: $2 } = exp, tail = [], i = 0, len = $1.length;
3737
- let block;
3738
- if (exp.parent.type === "BlockStatement" && !$1.at(-1)?.at(-1)?.special) {
3739
- block = makeBlockFragment();
3740
- let ref4;
3741
- if (ref4 = prependStatementExpressionBlock([null, null, $2], block)) {
3742
- const ref = ref4;
3743
- exp.children = exp.children.map(function(c) {
3744
- if (c === $2)
3745
- return ref;
3746
- else
3735
+ exp.children.push(...post);
3736
+ if (exp.type === "UpdateExpression") {
3737
+ const { assigned } = exp;
3738
+ const ref = makeRef();
3739
+ const newMemberExp = unchainOptionalMemberExpression(assigned, ref, (children) => {
3740
+ return exp.children.map((c) => {
3741
+ if (c === assigned) {
3742
+ return children;
3743
+ } else {
3747
3744
  return c;
3745
+ }
3748
3746
  });
3749
- $2 = ref;
3750
- } else {
3751
- block = void 0;
3747
+ });
3748
+ if (newMemberExp !== assigned) {
3749
+ if (newMemberExp.usesRef) {
3750
+ newMemberExp.hoistDec = {
3751
+ type: "Declaration",
3752
+ children: ["let ", ref],
3753
+ names: []
3754
+ };
3755
+ }
3756
+ return replaceNode(exp, newMemberExp);
3752
3757
  }
3758
+ ;
3759
+ return;
3753
3760
  }
3754
- if ($1.some((left) => left[left.length - 1].special)) {
3755
- if ($1.length !== 1)
3756
- throw new Error("Only one assignment with id= is allowed");
3757
- const [, lhs, , op] = $1[0];
3758
- const { call, omitLhs } = op;
3759
- const index2 = exp.children.indexOf($2);
3760
- if (index2 < 0)
3761
- throw new Error("Assertion error: exp not in AssignmentExpression");
3762
- exp.children.splice(
3763
- index2,
3764
- 1,
3765
- exp.exp = $2 = [call, "(", lhs, ", ", $2, ")"]
3766
- );
3767
- if (omitLhs) {
3768
- return $2;
3761
+ ;
3762
+ return;
3763
+ });
3764
+ replaceNodesRecursive(
3765
+ statements,
3766
+ (n) => n.type === "AssignmentExpression" && n.names === null,
3767
+ (exp) => {
3768
+ let { lhs: $1, exp: $2 } = exp, tail = [], i = 0, len = $1.length;
3769
+ let block;
3770
+ if (exp.parent.type === "BlockStatement" && !$1.at(-1)?.at(-1)?.special) {
3771
+ block = makeBlockFragment();
3772
+ let ref4;
3773
+ if (ref4 = prependStatementExpressionBlock([null, null, $2], block)) {
3774
+ const ref = ref4;
3775
+ exp.children = exp.children.map(function(c) {
3776
+ if (c === $2)
3777
+ return ref;
3778
+ else
3779
+ return c;
3780
+ });
3781
+ $2 = ref;
3782
+ } else {
3783
+ block = void 0;
3784
+ }
3769
3785
  }
3770
- }
3771
- let wrapped = false;
3772
- while (i < len) {
3773
- const lastAssignment = $1[i++];
3774
- const [, lhs, , op] = lastAssignment;
3775
- if (op.token !== "=")
3776
- continue;
3777
- if (lhs.type === "ObjectExpression" || lhs.type === "ObjectBindingPattern") {
3778
- if (!wrapped) {
3779
- wrapped = true;
3780
- lhs.children.splice(0, 0, "(");
3781
- tail.push(")");
3786
+ if ($1.some((left) => left[left.length - 1].special)) {
3787
+ if ($1.length !== 1)
3788
+ throw new Error("Only one assignment with id= is allowed");
3789
+ const [, lhs, , op] = $1[0];
3790
+ const { call, omitLhs } = op;
3791
+ const index2 = exp.children.indexOf($2);
3792
+ if (index2 < 0)
3793
+ throw new Error("Assertion error: exp not in AssignmentExpression");
3794
+ exp.children.splice(
3795
+ index2,
3796
+ 1,
3797
+ exp.exp = $2 = [call, "(", lhs, ", ", $2, ")"]
3798
+ );
3799
+ if (omitLhs) {
3800
+ return $2;
3782
3801
  }
3783
3802
  }
3784
- }
3785
- i = len - 1;
3786
- while (i >= 0) {
3787
- const lastAssignment = $1[i];
3788
- if (lastAssignment[3].token === "=") {
3789
- const lhs = lastAssignment[1];
3790
- if (lhs.type === "MemberExpression") {
3791
- const members = lhs.children;
3792
- const lastMember = members[members.length - 1];
3793
- if (lastMember.type === "SliceExpression") {
3794
- const { start, end, children: c } = lastMember;
3795
- c[0].token = ".splice(";
3796
- c[1] = start;
3797
- c[2] = ", ";
3798
- if (end) {
3799
- c[3] = [end, " - ", start];
3800
- } else {
3801
- c[3] = ["1/0"];
3802
- }
3803
- c[4] = [", ...", $2];
3804
- c[5] = ")";
3805
- lastAssignment.pop();
3806
- if (isWhitespaceOrEmpty(lastAssignment[2]))
3803
+ let wrapped = false;
3804
+ while (i < len) {
3805
+ const lastAssignment = $1[i++];
3806
+ const [, lhs, , op] = lastAssignment;
3807
+ if (op.token !== "=")
3808
+ continue;
3809
+ if (lhs.type === "ObjectExpression" || lhs.type === "ObjectBindingPattern") {
3810
+ if (!wrapped) {
3811
+ wrapped = true;
3812
+ lhs.children.splice(0, 0, "(");
3813
+ tail.push(")");
3814
+ }
3815
+ }
3816
+ }
3817
+ i = len - 1;
3818
+ while (i >= 0) {
3819
+ const lastAssignment = $1[i];
3820
+ if (lastAssignment[3].token === "=") {
3821
+ const lhs = lastAssignment[1];
3822
+ if (lhs.type === "MemberExpression") {
3823
+ const members = lhs.children;
3824
+ const lastMember = members[members.length - 1];
3825
+ if (lastMember.type === "SliceExpression") {
3826
+ const { start, end, children: c } = lastMember;
3827
+ c[0].token = ".splice(";
3828
+ c[1] = start;
3829
+ c[2] = ", ";
3830
+ if (end) {
3831
+ c[3] = [end, " - ", start];
3832
+ } else {
3833
+ c[3] = ["1/0"];
3834
+ }
3835
+ c[4] = [", ...", $2];
3836
+ c[5] = ")";
3807
3837
  lastAssignment.pop();
3808
- if ($1.length > 1) {
3809
- throw new Error("Not implemented yet! TODO: Handle multiple splice assignments");
3838
+ if (isWhitespaceOrEmpty(lastAssignment[2]))
3839
+ lastAssignment.pop();
3840
+ if ($1.length > 1) {
3841
+ throw new Error("Not implemented yet! TODO: Handle multiple splice assignments");
3842
+ }
3843
+ exp.children = [$1];
3844
+ exp.names = [];
3845
+ return exp;
3810
3846
  }
3811
- exp.children = [$1];
3812
- exp.names = [];
3813
- return exp;
3847
+ } else if (lhs.type === "ObjectBindingPattern" || lhs.type === "ArrayBindingPattern") {
3848
+ processBindingPatternLHS(lhs, tail);
3814
3849
  }
3815
- } else if (lhs.type === "ObjectBindingPattern" || lhs.type === "ArrayBindingPattern") {
3816
- processBindingPatternLHS(lhs, tail);
3817
3850
  }
3851
+ i--;
3818
3852
  }
3819
- i--;
3853
+ i = len - 1;
3854
+ const optionalChainRef = makeRef();
3855
+ while (i >= 0) {
3856
+ const assignment = $1[i];
3857
+ const [ws1, lhs, ws2, op] = assignment;
3858
+ if (lhs.type === "MemberExpression" || lhs.type === "CallExpression") {
3859
+ const newMemberExp = unchainOptionalMemberExpression(lhs, optionalChainRef, (children) => {
3860
+ const assigns = $1.splice(i + 1, len - 1 - i);
3861
+ $1.pop();
3862
+ return [ws1, ...children, ws2, op, ...assigns, $2];
3863
+ });
3864
+ if (newMemberExp !== lhs) {
3865
+ if (newMemberExp.usesRef) {
3866
+ exp.hoistDec = {
3867
+ type: "Declaration",
3868
+ children: ["let ", optionalChainRef],
3869
+ names: []
3870
+ };
3871
+ }
3872
+ replaceNode($2, newMemberExp);
3873
+ newMemberExp.parent = exp;
3874
+ $2 = newMemberExp;
3875
+ }
3876
+ }
3877
+ i--;
3878
+ }
3879
+ exp.names = $1.flatMap(([, l]) => l.names || []);
3880
+ const index = exp.children.indexOf($2);
3881
+ if (index < 0)
3882
+ throw new Error("Assertion error: exp not in AssignmentExpression");
3883
+ exp.children.splice(index + 1, 0, ...tail);
3884
+ if (block) {
3885
+ block.parent = exp.parent;
3886
+ block.expressions.push(["", exp]);
3887
+ exp.parent = block;
3888
+ return block;
3889
+ }
3890
+ return exp;
3820
3891
  }
3821
- exp.names = $1.flatMap(([, l]) => l.names || []);
3822
- const index = exp.children.indexOf($2);
3823
- if (index < 0)
3824
- throw new Error("Assertion error: exp not in AssignmentExpression");
3825
- exp.children.splice(index + 1, 0, ...tail);
3826
- if (block) {
3827
- block.parent = exp.parent;
3828
- block.expressions.push(["", exp]);
3829
- exp.parent = block;
3830
- return block;
3892
+ );
3893
+ }
3894
+ function unchainOptionalMemberExpression(exp, ref, innerExp) {
3895
+ let j = 0;
3896
+ const { children } = exp;
3897
+ let usesRef = false;
3898
+ const conditions = [];
3899
+ while (j < children.length) {
3900
+ const child = children[j];
3901
+ const type = child?.type;
3902
+ let hasOptional = false;
3903
+ switch (type) {
3904
+ case "PropertyAccess": {
3905
+ if (child.dot?.optional) {
3906
+ hasOptional = true;
3907
+ child.dot.children.shift();
3908
+ child.dot.optional = false;
3909
+ }
3910
+ ;
3911
+ break;
3912
+ }
3913
+ case "Call":
3914
+ case "Index": {
3915
+ if (child.optional) {
3916
+ hasOptional = true;
3917
+ child.children.shift();
3918
+ child.optional = void 0;
3919
+ }
3920
+ ;
3921
+ break;
3922
+ }
3831
3923
  }
3924
+ if (hasOptional) {
3925
+ let base;
3926
+ if (j > 1 || needsRef(children[0])) {
3927
+ usesRef = true;
3928
+ base = makeLeftHandSideExpression({
3929
+ type: "AssignmentExpression",
3930
+ children: [ref, " = ", children.splice(0, j)]
3931
+ });
3932
+ base.parent = child;
3933
+ children.unshift(ref);
3934
+ j = 0;
3935
+ } else {
3936
+ base = children[0];
3937
+ }
3938
+ conditions.push([base, " != null"]);
3939
+ }
3940
+ j++;
3941
+ }
3942
+ let ref5;
3943
+ if (ref5 = conditions.length) {
3944
+ const l = ref5;
3945
+ const cs = conditions.map((c, i) => {
3946
+ if (i === l - 1) {
3947
+ return c;
3948
+ } else {
3949
+ return [c, " && "];
3950
+ }
3951
+ });
3952
+ return {
3953
+ ...exp,
3954
+ children: [...cs, " ? ", innerExp(children), " : void 0"],
3955
+ usesRef
3956
+ };
3957
+ } else {
3832
3958
  return exp;
3833
- });
3959
+ }
3834
3960
  }
3835
3961
  function attachPostfixStatementAsExpression(exp, post) {
3836
3962
  const postfixStatement = post[1];
@@ -3896,11 +4022,11 @@ var Civet = (() => {
3896
4022
  if (!(exp.children[0] === exp.statement)) {
3897
4023
  ws = exp.children[0];
3898
4024
  }
3899
- let ref5;
4025
+ let ref6;
3900
4026
  switch (statement.type) {
3901
4027
  case "IfStatement": {
3902
- if (ref5 = expressionizeIfStatement(statement)) {
3903
- const expression = ref5;
4028
+ if (ref6 = expressionizeIfStatement(statement)) {
4029
+ const expression = ref6;
3904
4030
  exp.statement = expression;
3905
4031
  exp.children = [exp.statement];
3906
4032
  } else {
@@ -4205,9 +4331,9 @@ var Civet = (() => {
4205
4331
  }
4206
4332
  });
4207
4333
 
4208
- // ../Hera/dist/machine.js
4334
+ // node_modules/@danielx/hera/dist/machine.js
4209
4335
  var require_machine = __commonJS({
4210
- "../Hera/dist/machine.js"(exports, module) {
4336
+ "node_modules/@danielx/hera/dist/machine.js"(exports, module) {
4211
4337
  "use strict";
4212
4338
  var __defProp2 = Object.defineProperty;
4213
4339
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
@@ -4678,6 +4804,8 @@ ${input.slice(result.pos)}
4678
4804
  $TV,
4679
4805
  $Y,
4680
4806
  Parser,
4807
+ ParserContext,
4808
+ ParserOptions,
4681
4809
  Validator
4682
4810
  } = require_machine();
4683
4811
  var grammar = {
@@ -5182,6 +5310,7 @@ ${input.slice(result.pos)}
5182
5310
  OpenBracket,
5183
5311
  OpenParen,
5184
5312
  Operator,
5313
+ Override,
5185
5314
  Own,
5186
5315
  Public,
5187
5316
  Private,
@@ -5579,59 +5708,60 @@ ${input.slice(result.pos)}
5579
5708
  var $L170 = $L("of");
5580
5709
  var $L171 = $L("[");
5581
5710
  var $L172 = $L("operator");
5582
- var $L173 = $L("own");
5583
- var $L174 = $L("public");
5584
- var $L175 = $L("private");
5585
- var $L176 = $L("protected");
5586
- var $L177 = $L("||>");
5587
- var $L178 = $L("|\u25B7");
5588
- var $L179 = $L("|>=");
5589
- var $L180 = $L("\u25B7=");
5590
- var $L181 = $L("|>");
5591
- var $L182 = $L("\u25B7");
5592
- var $L183 = $L("readonly");
5593
- var $L184 = $L("return");
5594
- var $L185 = $L("satisfies");
5595
- var $L186 = $L("'");
5596
- var $L187 = $L("static");
5597
- var $L188 = $L("${");
5598
- var $L189 = $L("super");
5599
- var $L190 = $L("switch");
5600
- var $L191 = $L("target");
5601
- var $L192 = $L("then");
5602
- var $L193 = $L("this");
5603
- var $L194 = $L("throw");
5604
- var $L195 = $L('"""');
5605
- var $L196 = $L("'''");
5606
- var $L197 = $L("///");
5607
- var $L198 = $L("```");
5608
- var $L199 = $L("try");
5609
- var $L200 = $L("typeof");
5610
- var $L201 = $L("unless");
5611
- var $L202 = $L("until");
5612
- var $L203 = $L("using");
5613
- var $L204 = $L("var");
5614
- var $L205 = $L("void");
5615
- var $L206 = $L("when");
5616
- var $L207 = $L("while");
5617
- var $L208 = $L("yield");
5618
- var $L209 = $L("/>");
5619
- var $L210 = $L("</");
5620
- var $L211 = $L("<>");
5621
- var $L212 = $L("</>");
5622
- var $L213 = $L("<!--");
5623
- var $L214 = $L("-->");
5624
- var $L215 = $L("type");
5625
- var $L216 = $L("enum");
5626
- var $L217 = $L("interface");
5627
- var $L218 = $L("global");
5628
- var $L219 = $L("module");
5629
- var $L220 = $L("namespace");
5630
- var $L221 = $L("asserts");
5631
- var $L222 = $L("keyof");
5632
- var $L223 = $L("???");
5633
- var $L224 = $L("[]");
5634
- var $L225 = $L("civet");
5711
+ var $L173 = $L("override");
5712
+ var $L174 = $L("own");
5713
+ var $L175 = $L("public");
5714
+ var $L176 = $L("private");
5715
+ var $L177 = $L("protected");
5716
+ var $L178 = $L("||>");
5717
+ var $L179 = $L("|\u25B7");
5718
+ var $L180 = $L("|>=");
5719
+ var $L181 = $L("\u25B7=");
5720
+ var $L182 = $L("|>");
5721
+ var $L183 = $L("\u25B7");
5722
+ var $L184 = $L("readonly");
5723
+ var $L185 = $L("return");
5724
+ var $L186 = $L("satisfies");
5725
+ var $L187 = $L("'");
5726
+ var $L188 = $L("static");
5727
+ var $L189 = $L("${");
5728
+ var $L190 = $L("super");
5729
+ var $L191 = $L("switch");
5730
+ var $L192 = $L("target");
5731
+ var $L193 = $L("then");
5732
+ var $L194 = $L("this");
5733
+ var $L195 = $L("throw");
5734
+ var $L196 = $L('"""');
5735
+ var $L197 = $L("'''");
5736
+ var $L198 = $L("///");
5737
+ var $L199 = $L("```");
5738
+ var $L200 = $L("try");
5739
+ var $L201 = $L("typeof");
5740
+ var $L202 = $L("unless");
5741
+ var $L203 = $L("until");
5742
+ var $L204 = $L("using");
5743
+ var $L205 = $L("var");
5744
+ var $L206 = $L("void");
5745
+ var $L207 = $L("when");
5746
+ var $L208 = $L("while");
5747
+ var $L209 = $L("yield");
5748
+ var $L210 = $L("/>");
5749
+ var $L211 = $L("</");
5750
+ var $L212 = $L("<>");
5751
+ var $L213 = $L("</>");
5752
+ var $L214 = $L("<!--");
5753
+ var $L215 = $L("-->");
5754
+ var $L216 = $L("type");
5755
+ var $L217 = $L("enum");
5756
+ var $L218 = $L("interface");
5757
+ var $L219 = $L("global");
5758
+ var $L220 = $L("module");
5759
+ var $L221 = $L("namespace");
5760
+ var $L222 = $L("asserts");
5761
+ var $L223 = $L("keyof");
5762
+ var $L224 = $L("???");
5763
+ var $L225 = $L("[]");
5764
+ var $L226 = $L("civet");
5635
5765
  var $R0 = $R(new RegExp("(?=async|debugger|if|unless|do|for|loop|until|while|switch|throw|try)", "suy"));
5636
5766
  var $R1 = $R(new RegExp("(as|of|satisfies|then|when|implements|xor|xnor)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
5637
5767
  var $R2 = $R(new RegExp("[0-9]", "suy"));
@@ -6716,9 +6846,9 @@ ${input.slice(result.pos)}
6716
6846
  function NestedClassElement(ctx, state) {
6717
6847
  return $EVENT(ctx, state, "NestedClassElement", NestedClassElement$0);
6718
6848
  }
6719
- var ClassElement$0 = $TS($S($E(Decorators), $E(AccessModifier), $E($S(Static, $E(_))), ClassElementDefinition), function($skip, $loc, $0, $1, $2, $3, $4) {
6849
+ var ClassElement$0 = $TS($S($E(Decorators), $E(AccessModifier), $E($S(Static, $E(_))), $E($S(Override, $E(_))), ClassElementDefinition), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
6720
6850
  var decorators = $1;
6721
- var definition = $4;
6851
+ var definition = $5;
6722
6852
  if (definition.type === "MultiMethodDefinition") {
6723
6853
  return {
6724
6854
  ...definition,
@@ -6732,7 +6862,7 @@ ${input.slice(result.pos)}
6732
6862
  }
6733
6863
  return {
6734
6864
  ...definition,
6735
- children: [decorators, $2, $3, ...definition.children]
6865
+ children: [decorators, $2, $3, $4, ...definition.children]
6736
6866
  };
6737
6867
  });
6738
6868
  var ClassElement$1 = $TS($S(Static, BracedBlock), function($skip, $loc, $0, $1, $2) {
@@ -6774,7 +6904,7 @@ ${input.slice(result.pos)}
6774
6904
  function NestedClassSignatureElement(ctx, state) {
6775
6905
  return $EVENT(ctx, state, "NestedClassSignatureElement", NestedClassSignatureElement$0);
6776
6906
  }
6777
- var ClassSignatureElement$0 = $S($E(Decorators), $E(AccessModifier), $E($S(Static, $E(_))), $C(MethodSignature, FieldDefinition));
6907
+ var ClassSignatureElement$0 = $S($E(Decorators), $E(AccessModifier), $E($S(Static, $E(_))), $E($S(Override, $E(_))), $C(MethodSignature, FieldDefinition));
6778
6908
  var ClassSignatureElement$1 = $S(Static, ClassSignatureBody);
6779
6909
  var ClassSignatureElement$$ = [ClassSignatureElement$0, ClassSignatureElement$1];
6780
6910
  function ClassSignatureElement(ctx, state) {
@@ -6972,18 +7102,28 @@ ${input.slice(result.pos)}
6972
7102
  return literal;
6973
7103
  });
6974
7104
  var CallExpressionRest$3 = $TS($S($E(OptionalShorthand), ArgumentsWithTrailingMemberExpressions), function($skip, $loc, $0, $1, $2) {
6975
- if (!$1)
6976
- return $2;
6977
- return [$1, ...$2];
7105
+ var optional = $1;
7106
+ var argsWithTrailing = $2;
7107
+ if (!optional)
7108
+ return argsWithTrailing;
7109
+ const call = argsWithTrailing[0];
7110
+ return [{
7111
+ ...call,
7112
+ children: [optional, ...call.children],
7113
+ optional
7114
+ }, ...argsWithTrailing.slice(1)];
6978
7115
  });
6979
7116
  var CallExpressionRest$$ = [CallExpressionRest$0, CallExpressionRest$1, CallExpressionRest$2, CallExpressionRest$3];
6980
7117
  function CallExpressionRest(ctx, state) {
6981
7118
  return $EVENT_C(ctx, state, "CallExpressionRest", CallExpressionRest$$);
6982
7119
  }
6983
7120
  var OptionalShorthand$0 = $TS($S($EXPECT($R6, "OptionalShorthand /(?=[\\/?])/"), $Q(InlineComment), QuestionMark, OptionalDot), function($skip, $loc, $0, $1, $2, $3, $4) {
7121
+ var comments = $2;
7122
+ var q = $3;
7123
+ var d = $4;
6984
7124
  return {
6985
7125
  type: "Optional",
6986
- children: $0
7126
+ children: [...comments, q, d]
6987
7127
  };
6988
7128
  });
6989
7129
  function OptionalShorthand(ctx, state) {
@@ -7054,7 +7194,11 @@ ${input.slice(result.pos)}
7054
7194
  if (dot.type === "Optional" && content.type === "SliceExpression") {
7055
7195
  return [...dot.children.slice(0, -1), ...comments, content];
7056
7196
  }
7057
- return [dot, ...comments, content];
7197
+ return {
7198
+ ...content,
7199
+ children: [dot, ...comments, ...content.children],
7200
+ optional: dot
7201
+ };
7058
7202
  }
7059
7203
  return [...comments, content];
7060
7204
  });
@@ -7158,9 +7302,14 @@ ${input.slice(result.pos)}
7158
7302
  return $EVENT_C(ctx, state, "SliceParameters", SliceParameters$$);
7159
7303
  }
7160
7304
  var AccessStart$0 = $TS($S($E(PropertyAccessModifier), Dot, $N(Dot)), function($skip, $loc, $0, $1, $2, $3) {
7161
- if ($1)
7162
- return [$1, $2];
7163
- return $2;
7305
+ var modifier = $1;
7306
+ var dot = $2;
7307
+ let children = modifier ? [modifier, dot] : [dot];
7308
+ return {
7309
+ type: "AccessStart",
7310
+ children,
7311
+ optional: modifier?.token === "?"
7312
+ };
7164
7313
  });
7165
7314
  function AccessStart(ctx, state) {
7166
7315
  return $EVENT(ctx, state, "AccessStart", AccessStart$0);
@@ -7203,13 +7352,14 @@ ${input.slice(result.pos)}
7203
7352
  };
7204
7353
  });
7205
7354
  var PropertyAccess$2 = $TS($S(AccessStart, $Q(InlineComment), $C(IdentifierName, PrivateIdentifier, LengthShorthand)), function($skip, $loc, $0, $1, $2, $3) {
7206
- var access = $1;
7355
+ var dot = $1;
7207
7356
  var comments = $2;
7208
7357
  var id = $3;
7209
- const children = [access, ...comments, ...id.children];
7358
+ const children = [dot, ...comments, ...id.children];
7210
7359
  return {
7211
7360
  type: "PropertyAccess",
7212
7361
  name: id.name,
7362
+ dot,
7213
7363
  children
7214
7364
  };
7215
7365
  });
@@ -7217,16 +7367,20 @@ ${input.slice(result.pos)}
7217
7367
  var p = $2;
7218
7368
  var id = $3;
7219
7369
  if (id) {
7370
+ const dot = { token: ".prototype.", $loc: p.$loc };
7220
7371
  return {
7221
7372
  type: "PropertyAccess",
7222
7373
  name: id.name,
7223
- children: [{ token: ".prototype.", $loc: p.$loc }, id]
7374
+ dot,
7375
+ children: [dot, id]
7224
7376
  };
7225
7377
  } else {
7378
+ const dot = { token: ".prototype", $loc: p.$loc };
7226
7379
  return {
7227
7380
  type: "PropertyAccess",
7228
7381
  name: "prototype",
7229
- children: [{ token: ".prototype", $loc: p.$loc }]
7382
+ dot,
7383
+ children: [dot]
7230
7384
  };
7231
7385
  }
7232
7386
  });
@@ -12477,37 +12631,43 @@ ${input.slice(result.pos)}
12477
12631
  function Operator(ctx, state) {
12478
12632
  return $EVENT(ctx, state, "Operator", Operator$0);
12479
12633
  }
12480
- var Own$0 = $TS($S($EXPECT($L173, 'Own "own"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12634
+ var Override$0 = $TS($S($EXPECT($L173, 'Override "override"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12635
+ return { $loc, token: $1, ts: true };
12636
+ });
12637
+ function Override(ctx, state) {
12638
+ return $EVENT(ctx, state, "Override", Override$0);
12639
+ }
12640
+ var Own$0 = $TS($S($EXPECT($L174, 'Own "own"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12481
12641
  return { $loc, token: $1 };
12482
12642
  });
12483
12643
  function Own(ctx, state) {
12484
12644
  return $EVENT(ctx, state, "Own", Own$0);
12485
12645
  }
12486
- var Public$0 = $TS($S($EXPECT($L174, 'Public "public"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12646
+ var Public$0 = $TS($S($EXPECT($L175, 'Public "public"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12487
12647
  return { $loc, token: $1 };
12488
12648
  });
12489
12649
  function Public(ctx, state) {
12490
12650
  return $EVENT(ctx, state, "Public", Public$0);
12491
12651
  }
12492
- var Private$0 = $TS($S($EXPECT($L175, 'Private "private"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12652
+ var Private$0 = $TS($S($EXPECT($L176, 'Private "private"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12493
12653
  return { $loc, token: $1 };
12494
12654
  });
12495
12655
  function Private(ctx, state) {
12496
12656
  return $EVENT(ctx, state, "Private", Private$0);
12497
12657
  }
12498
- var Protected$0 = $TS($S($EXPECT($L176, 'Protected "protected"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12658
+ var Protected$0 = $TS($S($EXPECT($L177, 'Protected "protected"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12499
12659
  return { $loc, token: $1 };
12500
12660
  });
12501
12661
  function Protected(ctx, state) {
12502
12662
  return $EVENT(ctx, state, "Protected", Protected$0);
12503
12663
  }
12504
- var Pipe$0 = $TV($C($EXPECT($L177, 'Pipe "||>"'), $EXPECT($L178, 'Pipe "|\u25B7"')), function($skip, $loc, $0, $1) {
12664
+ var Pipe$0 = $TV($C($EXPECT($L178, 'Pipe "||>"'), $EXPECT($L179, 'Pipe "|\u25B7"')), function($skip, $loc, $0, $1) {
12505
12665
  return { $loc, token: "||>" };
12506
12666
  });
12507
- var Pipe$1 = $TV($C($EXPECT($L179, 'Pipe "|>="'), $EXPECT($L180, 'Pipe "\u25B7="')), function($skip, $loc, $0, $1) {
12667
+ var Pipe$1 = $TV($C($EXPECT($L180, 'Pipe "|>="'), $EXPECT($L181, 'Pipe "\u25B7="')), function($skip, $loc, $0, $1) {
12508
12668
  return { $loc, token: "|>=" };
12509
12669
  });
12510
- var Pipe$2 = $TV($C($EXPECT($L181, 'Pipe "|>"'), $EXPECT($L182, 'Pipe "\u25B7"')), function($skip, $loc, $0, $1) {
12670
+ var Pipe$2 = $TV($C($EXPECT($L182, 'Pipe "|>"'), $EXPECT($L183, 'Pipe "\u25B7"')), function($skip, $loc, $0, $1) {
12511
12671
  return { $loc, token: "|>" };
12512
12672
  });
12513
12673
  var Pipe$$ = [Pipe$0, Pipe$1, Pipe$2];
@@ -12520,19 +12680,19 @@ ${input.slice(result.pos)}
12520
12680
  function QuestionMark(ctx, state) {
12521
12681
  return $EVENT(ctx, state, "QuestionMark", QuestionMark$0);
12522
12682
  }
12523
- var Readonly$0 = $TS($S($EXPECT($L183, 'Readonly "readonly"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12683
+ var Readonly$0 = $TS($S($EXPECT($L184, 'Readonly "readonly"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12524
12684
  return { $loc, token: $1, ts: true };
12525
12685
  });
12526
12686
  function Readonly(ctx, state) {
12527
12687
  return $EVENT(ctx, state, "Readonly", Readonly$0);
12528
12688
  }
12529
- var Return$0 = $TS($S($EXPECT($L184, 'Return "return"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12689
+ var Return$0 = $TS($S($EXPECT($L185, 'Return "return"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12530
12690
  return { $loc, token: $1 };
12531
12691
  });
12532
12692
  function Return(ctx, state) {
12533
12693
  return $EVENT(ctx, state, "Return", Return$0);
12534
12694
  }
12535
- var Satisfies$0 = $TS($S($EXPECT($L185, 'Satisfies "satisfies"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12695
+ var Satisfies$0 = $TS($S($EXPECT($L186, 'Satisfies "satisfies"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12536
12696
  return { $loc, token: $1 };
12537
12697
  });
12538
12698
  function Satisfies(ctx, state) {
@@ -12544,7 +12704,7 @@ ${input.slice(result.pos)}
12544
12704
  function Semicolon(ctx, state) {
12545
12705
  return $EVENT(ctx, state, "Semicolon", Semicolon$0);
12546
12706
  }
12547
- var SingleQuote$0 = $TV($EXPECT($L186, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
12707
+ var SingleQuote$0 = $TV($EXPECT($L187, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
12548
12708
  return { $loc, token: $1 };
12549
12709
  });
12550
12710
  function SingleQuote(ctx, state) {
@@ -12556,7 +12716,7 @@ ${input.slice(result.pos)}
12556
12716
  function Star(ctx, state) {
12557
12717
  return $EVENT(ctx, state, "Star", Star$0);
12558
12718
  }
12559
- var Static$0 = $TS($S($EXPECT($L187, 'Static "static"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12719
+ var Static$0 = $TS($S($EXPECT($L188, 'Static "static"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12560
12720
  return { $loc, token: $1 };
12561
12721
  });
12562
12722
  var Static$1 = $TS($S($EXPECT($L129, 'Static "@"'), $N($C($EXPECT($L4, 'Static "("'), $EXPECT($L129, 'Static "@"')))), function($skip, $loc, $0, $1, $2) {
@@ -12566,127 +12726,127 @@ ${input.slice(result.pos)}
12566
12726
  function Static(ctx, state) {
12567
12727
  return $EVENT_C(ctx, state, "Static", Static$$);
12568
12728
  }
12569
- var SubstitutionStart$0 = $TV($EXPECT($L188, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
12729
+ var SubstitutionStart$0 = $TV($EXPECT($L189, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
12570
12730
  return { $loc, token: $1 };
12571
12731
  });
12572
12732
  function SubstitutionStart(ctx, state) {
12573
12733
  return $EVENT(ctx, state, "SubstitutionStart", SubstitutionStart$0);
12574
12734
  }
12575
- var Super$0 = $TS($S($EXPECT($L189, 'Super "super"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12735
+ var Super$0 = $TS($S($EXPECT($L190, 'Super "super"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12576
12736
  return { $loc, token: $1 };
12577
12737
  });
12578
12738
  function Super(ctx, state) {
12579
12739
  return $EVENT(ctx, state, "Super", Super$0);
12580
12740
  }
12581
- var Switch$0 = $TS($S($EXPECT($L190, 'Switch "switch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12741
+ var Switch$0 = $TS($S($EXPECT($L191, 'Switch "switch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12582
12742
  return { $loc, token: $1 };
12583
12743
  });
12584
12744
  function Switch(ctx, state) {
12585
12745
  return $EVENT(ctx, state, "Switch", Switch$0);
12586
12746
  }
12587
- var Target$0 = $TS($S($EXPECT($L191, 'Target "target"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12747
+ var Target$0 = $TS($S($EXPECT($L192, 'Target "target"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12588
12748
  return { $loc, token: $1 };
12589
12749
  });
12590
12750
  function Target(ctx, state) {
12591
12751
  return $EVENT(ctx, state, "Target", Target$0);
12592
12752
  }
12593
- var Then$0 = $TS($S(__, $EXPECT($L192, 'Then "then"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
12753
+ var Then$0 = $TS($S(__, $EXPECT($L193, 'Then "then"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
12594
12754
  return { $loc, token: "" };
12595
12755
  });
12596
12756
  function Then(ctx, state) {
12597
12757
  return $EVENT(ctx, state, "Then", Then$0);
12598
12758
  }
12599
- var This$0 = $TS($S($EXPECT($L193, 'This "this"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12759
+ var This$0 = $TS($S($EXPECT($L194, 'This "this"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12600
12760
  return { $loc, token: $1 };
12601
12761
  });
12602
12762
  function This(ctx, state) {
12603
12763
  return $EVENT(ctx, state, "This", This$0);
12604
12764
  }
12605
- var Throw$0 = $TS($S($EXPECT($L194, 'Throw "throw"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12765
+ var Throw$0 = $TS($S($EXPECT($L195, 'Throw "throw"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12606
12766
  return { $loc, token: $1 };
12607
12767
  });
12608
12768
  function Throw(ctx, state) {
12609
12769
  return $EVENT(ctx, state, "Throw", Throw$0);
12610
12770
  }
12611
- var TripleDoubleQuote$0 = $TV($EXPECT($L195, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
12771
+ var TripleDoubleQuote$0 = $TV($EXPECT($L196, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
12612
12772
  return { $loc, token: "`" };
12613
12773
  });
12614
12774
  function TripleDoubleQuote(ctx, state) {
12615
12775
  return $EVENT(ctx, state, "TripleDoubleQuote", TripleDoubleQuote$0);
12616
12776
  }
12617
- var TripleSingleQuote$0 = $TV($EXPECT($L196, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
12777
+ var TripleSingleQuote$0 = $TV($EXPECT($L197, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
12618
12778
  return { $loc, token: "`" };
12619
12779
  });
12620
12780
  function TripleSingleQuote(ctx, state) {
12621
12781
  return $EVENT(ctx, state, "TripleSingleQuote", TripleSingleQuote$0);
12622
12782
  }
12623
- var TripleSlash$0 = $TV($EXPECT($L197, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
12783
+ var TripleSlash$0 = $TV($EXPECT($L198, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
12624
12784
  return { $loc, token: "/" };
12625
12785
  });
12626
12786
  function TripleSlash(ctx, state) {
12627
12787
  return $EVENT(ctx, state, "TripleSlash", TripleSlash$0);
12628
12788
  }
12629
- var TripleTick$0 = $TV($EXPECT($L198, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
12789
+ var TripleTick$0 = $TV($EXPECT($L199, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
12630
12790
  return { $loc, token: "`" };
12631
12791
  });
12632
12792
  function TripleTick(ctx, state) {
12633
12793
  return $EVENT(ctx, state, "TripleTick", TripleTick$0);
12634
12794
  }
12635
- var Try$0 = $TS($S($EXPECT($L199, 'Try "try"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12795
+ var Try$0 = $TS($S($EXPECT($L200, 'Try "try"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12636
12796
  return { $loc, token: $1 };
12637
12797
  });
12638
12798
  function Try(ctx, state) {
12639
12799
  return $EVENT(ctx, state, "Try", Try$0);
12640
12800
  }
12641
- var Typeof$0 = $TS($S($EXPECT($L200, 'Typeof "typeof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12801
+ var Typeof$0 = $TS($S($EXPECT($L201, 'Typeof "typeof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12642
12802
  return { $loc, token: $1 };
12643
12803
  });
12644
12804
  function Typeof(ctx, state) {
12645
12805
  return $EVENT(ctx, state, "Typeof", Typeof$0);
12646
12806
  }
12647
- var Unless$0 = $TS($S($EXPECT($L201, 'Unless "unless"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12807
+ var Unless$0 = $TS($S($EXPECT($L202, 'Unless "unless"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12648
12808
  return { $loc, token: $1, negated: true };
12649
12809
  });
12650
12810
  function Unless(ctx, state) {
12651
12811
  return $EVENT(ctx, state, "Unless", Unless$0);
12652
12812
  }
12653
- var Until$0 = $TS($S($EXPECT($L202, 'Until "until"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12813
+ var Until$0 = $TS($S($EXPECT($L203, 'Until "until"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12654
12814
  return { $loc, token: $1 };
12655
12815
  });
12656
12816
  function Until(ctx, state) {
12657
12817
  return $EVENT(ctx, state, "Until", Until$0);
12658
12818
  }
12659
- var Using$0 = $TS($S($EXPECT($L203, 'Using "using"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12819
+ var Using$0 = $TS($S($EXPECT($L204, 'Using "using"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12660
12820
  return { $loc, token: $1 };
12661
12821
  });
12662
12822
  function Using(ctx, state) {
12663
12823
  return $EVENT(ctx, state, "Using", Using$0);
12664
12824
  }
12665
- var Var$0 = $TS($S($EXPECT($L204, 'Var "var"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12825
+ var Var$0 = $TS($S($EXPECT($L205, 'Var "var"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12666
12826
  return { $loc, token: $1 };
12667
12827
  });
12668
12828
  function Var(ctx, state) {
12669
12829
  return $EVENT(ctx, state, "Var", Var$0);
12670
12830
  }
12671
- var Void$0 = $TS($S($EXPECT($L205, 'Void "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12831
+ var Void$0 = $TS($S($EXPECT($L206, 'Void "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12672
12832
  return { $loc, token: $1 };
12673
12833
  });
12674
12834
  function Void(ctx, state) {
12675
12835
  return $EVENT(ctx, state, "Void", Void$0);
12676
12836
  }
12677
- var When$0 = $TS($S($EXPECT($L206, 'When "when"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12837
+ var When$0 = $TS($S($EXPECT($L207, 'When "when"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12678
12838
  return { $loc, token: "case" };
12679
12839
  });
12680
12840
  function When(ctx, state) {
12681
12841
  return $EVENT(ctx, state, "When", When$0);
12682
12842
  }
12683
- var While$0 = $TS($S($EXPECT($L207, 'While "while"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12843
+ var While$0 = $TS($S($EXPECT($L208, 'While "while"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12684
12844
  return { $loc, token: $1 };
12685
12845
  });
12686
12846
  function While(ctx, state) {
12687
12847
  return $EVENT(ctx, state, "While", While$0);
12688
12848
  }
12689
- var Yield$0 = $TS($S($EXPECT($L208, 'Yield "yield"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12849
+ var Yield$0 = $TS($S($EXPECT($L209, 'Yield "yield"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
12690
12850
  return { $loc, token: $1, type: "Yield" };
12691
12851
  });
12692
12852
  function Yield(ctx, state) {
@@ -12765,7 +12925,7 @@ ${input.slice(result.pos)}
12765
12925
  function JSXElement(ctx, state) {
12766
12926
  return $EVENT_C(ctx, state, "JSXElement", JSXElement$$);
12767
12927
  }
12768
- var JSXSelfClosingElement$0 = $TS($S($EXPECT($L17, 'JSXSelfClosingElement "<"'), JSXElementName, $E(TypeArguments), $E(JSXAttributes), $E(Whitespace), $EXPECT($L209, 'JSXSelfClosingElement "/>"')), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
12928
+ var JSXSelfClosingElement$0 = $TS($S($EXPECT($L17, 'JSXSelfClosingElement "<"'), JSXElementName, $E(TypeArguments), $E(JSXAttributes), $E(Whitespace), $EXPECT($L210, 'JSXSelfClosingElement "/>"')), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
12769
12929
  return { type: "JSXElement", children: $0, tag: $2 };
12770
12930
  });
12771
12931
  function JSXSelfClosingElement(ctx, state) {
@@ -12799,7 +12959,7 @@ ${input.slice(result.pos)}
12799
12959
  function JSXOptionalClosingElement(ctx, state) {
12800
12960
  return $EVENT_C(ctx, state, "JSXOptionalClosingElement", JSXOptionalClosingElement$$);
12801
12961
  }
12802
- var JSXClosingElement$0 = $S($EXPECT($L210, 'JSXClosingElement "</"'), $E(Whitespace), JSXElementName, $E(Whitespace), $EXPECT($L45, 'JSXClosingElement ">"'));
12962
+ var JSXClosingElement$0 = $S($EXPECT($L211, 'JSXClosingElement "</"'), $E(Whitespace), JSXElementName, $E(Whitespace), $EXPECT($L45, 'JSXClosingElement ">"'));
12803
12963
  function JSXClosingElement(ctx, state) {
12804
12964
  return $EVENT(ctx, state, "JSXClosingElement", JSXClosingElement$0);
12805
12965
  }
@@ -12820,7 +12980,7 @@ ${input.slice(result.pos)}
12820
12980
  ];
12821
12981
  return { type: "JSXFragment", children: parts, jsxChildren: children.jsxChildren };
12822
12982
  });
12823
- var JSXFragment$1 = $TS($S(CoffeeJSXEnabled, $EXPECT($L211, 'JSXFragment "<>"'), $E(JSXChildren), $E(Whitespace), JSXClosingFragment), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
12983
+ var JSXFragment$1 = $TS($S(CoffeeJSXEnabled, $EXPECT($L212, 'JSXFragment "<>"'), $E(JSXChildren), $E(Whitespace), JSXClosingFragment), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
12824
12984
  var children = $3;
12825
12985
  $0 = $0.slice(1);
12826
12986
  return {
@@ -12833,7 +12993,7 @@ ${input.slice(result.pos)}
12833
12993
  function JSXFragment(ctx, state) {
12834
12994
  return $EVENT_C(ctx, state, "JSXFragment", JSXFragment$$);
12835
12995
  }
12836
- var PushJSXOpeningFragment$0 = $TV($EXPECT($L211, 'PushJSXOpeningFragment "<>"'), function($skip, $loc, $0, $1) {
12996
+ var PushJSXOpeningFragment$0 = $TV($EXPECT($L212, 'PushJSXOpeningFragment "<>"'), function($skip, $loc, $0, $1) {
12837
12997
  module.JSXTagStack.push("");
12838
12998
  return $1;
12839
12999
  });
@@ -12850,7 +13010,7 @@ ${input.slice(result.pos)}
12850
13010
  function JSXOptionalClosingFragment(ctx, state) {
12851
13011
  return $EVENT_C(ctx, state, "JSXOptionalClosingFragment", JSXOptionalClosingFragment$$);
12852
13012
  }
12853
- var JSXClosingFragment$0 = $EXPECT($L212, 'JSXClosingFragment "</>"');
13013
+ var JSXClosingFragment$0 = $EXPECT($L213, 'JSXClosingFragment "</>"');
12854
13014
  function JSXClosingFragment(ctx, state) {
12855
13015
  return $EVENT(ctx, state, "JSXClosingFragment", JSXClosingFragment$0);
12856
13016
  }
@@ -13329,7 +13489,7 @@ ${input.slice(result.pos)}
13329
13489
  function JSXChild(ctx, state) {
13330
13490
  return $EVENT_C(ctx, state, "JSXChild", JSXChild$$);
13331
13491
  }
13332
- var JSXComment$0 = $TS($S($EXPECT($L213, 'JSXComment "<!--"'), JSXCommentContent, $EXPECT($L214, 'JSXComment "-->"')), function($skip, $loc, $0, $1, $2, $3) {
13492
+ var JSXComment$0 = $TS($S($EXPECT($L214, 'JSXComment "<!--"'), JSXCommentContent, $EXPECT($L215, 'JSXComment "-->"')), function($skip, $loc, $0, $1, $2, $3) {
13333
13493
  return ["{/*", $2, "*/}"];
13334
13494
  });
13335
13495
  function JSXComment(ctx, state) {
@@ -13516,37 +13676,37 @@ ${input.slice(result.pos)}
13516
13676
  function InterfaceExtendsTarget(ctx, state) {
13517
13677
  return $EVENT(ctx, state, "InterfaceExtendsTarget", InterfaceExtendsTarget$0);
13518
13678
  }
13519
- var TypeKeyword$0 = $TS($S($EXPECT($L215, 'TypeKeyword "type"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13679
+ var TypeKeyword$0 = $TS($S($EXPECT($L216, 'TypeKeyword "type"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13520
13680
  return { $loc, token: $1 };
13521
13681
  });
13522
13682
  function TypeKeyword(ctx, state) {
13523
13683
  return $EVENT(ctx, state, "TypeKeyword", TypeKeyword$0);
13524
13684
  }
13525
- var Enum$0 = $TS($S($EXPECT($L216, 'Enum "enum"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13685
+ var Enum$0 = $TS($S($EXPECT($L217, 'Enum "enum"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13526
13686
  return { $loc, token: $1 };
13527
13687
  });
13528
13688
  function Enum(ctx, state) {
13529
13689
  return $EVENT(ctx, state, "Enum", Enum$0);
13530
13690
  }
13531
- var Interface$0 = $TS($S($EXPECT($L217, 'Interface "interface"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13691
+ var Interface$0 = $TS($S($EXPECT($L218, 'Interface "interface"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13532
13692
  return { $loc, token: $1 };
13533
13693
  });
13534
13694
  function Interface(ctx, state) {
13535
13695
  return $EVENT(ctx, state, "Interface", Interface$0);
13536
13696
  }
13537
- var Global$0 = $TS($S($EXPECT($L218, 'Global "global"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13697
+ var Global$0 = $TS($S($EXPECT($L219, 'Global "global"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13538
13698
  return { $loc, token: $1 };
13539
13699
  });
13540
13700
  function Global(ctx, state) {
13541
13701
  return $EVENT(ctx, state, "Global", Global$0);
13542
13702
  }
13543
- var Module$0 = $TS($S($EXPECT($L219, 'Module "module"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13703
+ var Module$0 = $TS($S($EXPECT($L220, 'Module "module"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13544
13704
  return { $loc, token: $1 };
13545
13705
  });
13546
13706
  function Module(ctx, state) {
13547
13707
  return $EVENT(ctx, state, "Module", Module$0);
13548
13708
  }
13549
- var Namespace$0 = $TS($S($EXPECT($L220, 'Namespace "namespace"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13709
+ var Namespace$0 = $TS($S($EXPECT($L221, 'Namespace "namespace"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
13550
13710
  return { $loc, token: $1 };
13551
13711
  });
13552
13712
  function Namespace(ctx, state) {
@@ -13820,7 +13980,7 @@ ${input.slice(result.pos)}
13820
13980
  function ReturnTypeSuffix(ctx, state) {
13821
13981
  return $EVENT(ctx, state, "ReturnTypeSuffix", ReturnTypeSuffix$0);
13822
13982
  }
13823
- var ReturnType$0 = $TS($S($E($S(__, $EXPECT($L221, 'ReturnType "asserts"'), NonIdContinue)), TypePredicate), function($skip, $loc, $0, $1, $2) {
13983
+ var ReturnType$0 = $TS($S($E($S(__, $EXPECT($L222, 'ReturnType "asserts"'), NonIdContinue)), TypePredicate), function($skip, $loc, $0, $1, $2) {
13824
13984
  var asserts = $1;
13825
13985
  var t = $2;
13826
13986
  if (asserts) {
@@ -13899,8 +14059,8 @@ ${input.slice(result.pos)}
13899
14059
  function TypeUnarySuffix(ctx, state) {
13900
14060
  return $EVENT_C(ctx, state, "TypeUnarySuffix", TypeUnarySuffix$$);
13901
14061
  }
13902
- var TypeUnaryOp$0 = $S($EXPECT($L222, 'TypeUnaryOp "keyof"'), NonIdContinue);
13903
- var TypeUnaryOp$1 = $S($EXPECT($L183, 'TypeUnaryOp "readonly"'), NonIdContinue);
14062
+ var TypeUnaryOp$0 = $S($EXPECT($L223, 'TypeUnaryOp "keyof"'), NonIdContinue);
14063
+ var TypeUnaryOp$1 = $S($EXPECT($L184, 'TypeUnaryOp "readonly"'), NonIdContinue);
13904
14064
  var TypeUnaryOp$$ = [TypeUnaryOp$0, TypeUnaryOp$1];
13905
14065
  function TypeUnaryOp(ctx, state) {
13906
14066
  return $EVENT_C(ctx, state, "TypeUnaryOp", TypeUnaryOp$$);
@@ -13930,7 +14090,7 @@ ${input.slice(result.pos)}
13930
14090
  function TypeIndexedAccess(ctx, state) {
13931
14091
  return $EVENT_C(ctx, state, "TypeIndexedAccess", TypeIndexedAccess$$);
13932
14092
  }
13933
- var UnknownAlias$0 = $TV($EXPECT($L223, 'UnknownAlias "???"'), function($skip, $loc, $0, $1) {
14093
+ var UnknownAlias$0 = $TV($EXPECT($L224, 'UnknownAlias "???"'), function($skip, $loc, $0, $1) {
13934
14094
  return { $loc, token: "unknown" };
13935
14095
  });
13936
14096
  function UnknownAlias(ctx, state) {
@@ -14136,13 +14296,20 @@ ${input.slice(result.pos)}
14136
14296
  }
14137
14297
  var TypeLiteral$0 = TypeTemplateLiteral;
14138
14298
  var TypeLiteral$1 = Literal;
14139
- var TypeLiteral$2 = $TS($S($EXPECT($L205, 'TypeLiteral "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
14299
+ var TypeLiteral$2 = $TS($S($EXPECT($R17, "TypeLiteral /[+-]/"), NumericLiteral), function($skip, $loc, $0, $1, $2) {
14300
+ var sign = $1;
14301
+ var num = $2;
14302
+ if (sign[0] === "+")
14303
+ return num;
14304
+ return $0;
14305
+ });
14306
+ var TypeLiteral$3 = $TS($S($EXPECT($L206, 'TypeLiteral "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
14140
14307
  return { type: "VoidType", $loc, token: $1 };
14141
14308
  });
14142
- var TypeLiteral$3 = $TV($EXPECT($L224, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
14309
+ var TypeLiteral$4 = $TV($EXPECT($L225, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
14143
14310
  return { $loc, token: "[]" };
14144
14311
  });
14145
- var TypeLiteral$$ = [TypeLiteral$0, TypeLiteral$1, TypeLiteral$2, TypeLiteral$3];
14312
+ var TypeLiteral$$ = [TypeLiteral$0, TypeLiteral$1, TypeLiteral$2, TypeLiteral$3, TypeLiteral$4];
14146
14313
  function TypeLiteral(ctx, state) {
14147
14314
  return $EVENT_C(ctx, state, "TypeLiteral", TypeLiteral$$);
14148
14315
  }
@@ -14265,7 +14432,7 @@ ${input.slice(result.pos)}
14265
14432
  function CivetPrologue(ctx, state) {
14266
14433
  return $EVENT_C(ctx, state, "CivetPrologue", CivetPrologue$$);
14267
14434
  }
14268
- var CivetPrologueContent$0 = $TS($S($EXPECT($L225, 'CivetPrologueContent "civet"'), NonIdContinue, $Q(CivetOption), $EXPECT($R86, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3, $4) {
14435
+ var CivetPrologueContent$0 = $TS($S($EXPECT($L226, 'CivetPrologueContent "civet"'), NonIdContinue, $Q(CivetOption), $EXPECT($R86, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3, $4) {
14269
14436
  var options = $3;
14270
14437
  return {
14271
14438
  type: "CivetPrologue",
@@ -14851,9 +15018,9 @@ ${input.slice(result.pos)}
14851
15018
  }
14852
15019
  }
14853
15020
  });
14854
- if (typeof parse2 !== "undefined") {
14855
- Object.assign(module.config, parse2.config);
14856
- parse2.config = module.config;
15021
+ if (typeof parse !== "undefined") {
15022
+ Object.assign(module.config, parse.config);
15023
+ parse.config = module.config;
14857
15024
  } else {
14858
15025
  Object.assign(module.config, exports.parse.config);
14859
15026
  exports.parse.config = module.config;
@@ -15004,7 +15171,7 @@ ${input.slice(result.pos)}
15004
15171
  };
15005
15172
  }();
15006
15173
  exports.default = parser;
15007
- var parse2 = exports.parse = parser.parse;
15174
+ exports.parse = parser.parse;
15008
15175
  exports.Program = Program;
15009
15176
  exports.TopLevelStatements = TopLevelStatements;
15010
15177
  exports.NestedTopLevelStatements = NestedTopLevelStatements;
@@ -15506,6 +15673,7 @@ ${input.slice(result.pos)}
15506
15673
  exports.OpenBracket = OpenBracket;
15507
15674
  exports.OpenParen = OpenParen;
15508
15675
  exports.Operator = Operator;
15676
+ exports.Override = Override;
15509
15677
  exports.Own = Own;
15510
15678
  exports.Public = Public;
15511
15679
  exports.Private = Private;