@danielx/civet 0.6.70 → 0.6.72
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/README.md +1 -0
- package/dist/browser.js +569 -413
- package/dist/civet +53 -27
- package/dist/main.js +569 -413
- package/dist/main.mjs +570 -413
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/browser.js
CHANGED
|
@@ -83,6 +83,7 @@ var Civet = (() => {
|
|
|
83
83
|
isWhitespaceOrEmpty: () => isWhitespaceOrEmpty,
|
|
84
84
|
lastAccessInCallExpression: () => lastAccessInCallExpression,
|
|
85
85
|
literalValue: () => literalValue,
|
|
86
|
+
makeAmpersandFunction: () => makeAmpersandFunction,
|
|
86
87
|
makeAsConst: () => makeAsConst,
|
|
87
88
|
makeEmptyBlock: () => makeEmptyBlock,
|
|
88
89
|
makeExpressionStatement: () => makeExpressionStatement,
|
|
@@ -154,6 +155,30 @@ var Civet = (() => {
|
|
|
154
155
|
updateParentPointers(node);
|
|
155
156
|
return node;
|
|
156
157
|
}
|
|
158
|
+
function makeAmpersandFunction(bodyAfterRef = []) {
|
|
159
|
+
const ref = makeRef("$");
|
|
160
|
+
const body = [ref, ...bodyAfterRef];
|
|
161
|
+
const parameters = {
|
|
162
|
+
type: "Parameters",
|
|
163
|
+
children: [ref],
|
|
164
|
+
names: []
|
|
165
|
+
};
|
|
166
|
+
const block = {
|
|
167
|
+
expressions: body
|
|
168
|
+
};
|
|
169
|
+
return {
|
|
170
|
+
type: "ArrowFunction",
|
|
171
|
+
signature: {
|
|
172
|
+
modifier: {}
|
|
173
|
+
},
|
|
174
|
+
children: [parameters, " => ", body],
|
|
175
|
+
ref,
|
|
176
|
+
body,
|
|
177
|
+
ampersandBlock: true,
|
|
178
|
+
block,
|
|
179
|
+
parameters
|
|
180
|
+
};
|
|
181
|
+
}
|
|
157
182
|
function addPostfixStatement(statement, ws, post) {
|
|
158
183
|
const expressions = [
|
|
159
184
|
...post.blockPrefix || [],
|
|
@@ -3372,7 +3397,7 @@ var Civet = (() => {
|
|
|
3372
3397
|
}
|
|
3373
3398
|
];
|
|
3374
3399
|
}
|
|
3375
|
-
if (rest.delim
|
|
3400
|
+
if (Array.isArray(rest.delim) && rest.delim.at(-1)?.token === ",") {
|
|
3376
3401
|
rest.delim.pop();
|
|
3377
3402
|
}
|
|
3378
3403
|
const children = [...props, ...after, rest];
|
|
@@ -3626,9 +3651,9 @@ var Civet = (() => {
|
|
|
3626
3651
|
Validator: () => Validator
|
|
3627
3652
|
});
|
|
3628
3653
|
module.exports = __toCommonJS2(machine_exports);
|
|
3629
|
-
function $EXPECT(
|
|
3654
|
+
function $EXPECT(parser, expectation) {
|
|
3630
3655
|
return function(ctx, state) {
|
|
3631
|
-
const result =
|
|
3656
|
+
const result = parser(ctx, state);
|
|
3632
3657
|
if (!result)
|
|
3633
3658
|
ctx.fail(state.pos, expectation);
|
|
3634
3659
|
return result;
|
|
@@ -3815,9 +3840,9 @@ var Civet = (() => {
|
|
|
3815
3840
|
};
|
|
3816
3841
|
};
|
|
3817
3842
|
}
|
|
3818
|
-
function $T(
|
|
3843
|
+
function $T(parser, fn) {
|
|
3819
3844
|
return function(ctx, state) {
|
|
3820
|
-
const result =
|
|
3845
|
+
const result = parser(ctx, state);
|
|
3821
3846
|
if (!result)
|
|
3822
3847
|
return;
|
|
3823
3848
|
if (ctx.tokenize)
|
|
@@ -3828,9 +3853,9 @@ var Civet = (() => {
|
|
|
3828
3853
|
return result;
|
|
3829
3854
|
};
|
|
3830
3855
|
}
|
|
3831
|
-
function $TR(
|
|
3856
|
+
function $TR(parser, fn) {
|
|
3832
3857
|
return function(ctx, state) {
|
|
3833
|
-
const result =
|
|
3858
|
+
const result = parser(ctx, state);
|
|
3834
3859
|
if (!result)
|
|
3835
3860
|
return;
|
|
3836
3861
|
if (ctx.tokenize)
|
|
@@ -3844,9 +3869,9 @@ var Civet = (() => {
|
|
|
3844
3869
|
return result;
|
|
3845
3870
|
};
|
|
3846
3871
|
}
|
|
3847
|
-
function $TS(
|
|
3872
|
+
function $TS(parser, fn) {
|
|
3848
3873
|
return function(ctx, state) {
|
|
3849
|
-
const result =
|
|
3874
|
+
const result = parser(ctx, state);
|
|
3850
3875
|
if (!result)
|
|
3851
3876
|
return;
|
|
3852
3877
|
if (ctx.tokenize)
|
|
@@ -3860,9 +3885,9 @@ var Civet = (() => {
|
|
|
3860
3885
|
return result;
|
|
3861
3886
|
};
|
|
3862
3887
|
}
|
|
3863
|
-
function $TV(
|
|
3888
|
+
function $TV(parser, fn) {
|
|
3864
3889
|
return function(ctx, state) {
|
|
3865
|
-
const result =
|
|
3890
|
+
const result = parser(ctx, state);
|
|
3866
3891
|
if (!result)
|
|
3867
3892
|
return;
|
|
3868
3893
|
if (ctx.tokenize)
|
|
@@ -3876,9 +3901,9 @@ var Civet = (() => {
|
|
|
3876
3901
|
return result;
|
|
3877
3902
|
};
|
|
3878
3903
|
}
|
|
3879
|
-
function $R$0(
|
|
3904
|
+
function $R$0(parser) {
|
|
3880
3905
|
return function(ctx, state) {
|
|
3881
|
-
const result =
|
|
3906
|
+
const result = parser(ctx, state);
|
|
3882
3907
|
if (!result)
|
|
3883
3908
|
return;
|
|
3884
3909
|
const value = result.value[0];
|
|
@@ -4105,6 +4130,7 @@ ${input.slice(result.pos)}
|
|
|
4105
4130
|
UnaryWithoutParenthesizedAssignmentBody,
|
|
4106
4131
|
UnaryPostfix,
|
|
4107
4132
|
TypePostfix,
|
|
4133
|
+
NWTypePostfix,
|
|
4108
4134
|
UpdateExpression,
|
|
4109
4135
|
UpdateExpressionSymbol,
|
|
4110
4136
|
AssignmentExpression,
|
|
@@ -4217,6 +4243,7 @@ ${input.slice(result.pos)}
|
|
|
4217
4243
|
OperatorDeclaration,
|
|
4218
4244
|
OperatorSignature,
|
|
4219
4245
|
AmpersandBlockRHS,
|
|
4246
|
+
AmpersandTypeSuffix,
|
|
4220
4247
|
AmpersandBlockRHSBody,
|
|
4221
4248
|
ThinArrowFunction,
|
|
4222
4249
|
Arrow,
|
|
@@ -4273,8 +4300,10 @@ ${input.slice(result.pos)}
|
|
|
4273
4300
|
NestedImplicitPropertyDefinition,
|
|
4274
4301
|
NestedPropertyDefinitions,
|
|
4275
4302
|
NestedPropertyDefinition,
|
|
4303
|
+
ImplicitObjectLiteral,
|
|
4304
|
+
ImplicitObjectPropertyDelimiter,
|
|
4276
4305
|
InlineObjectLiteral,
|
|
4277
|
-
|
|
4306
|
+
InlineObjectPropertyDelimiter,
|
|
4278
4307
|
ObjectPropertyDelimiter,
|
|
4279
4308
|
PropertyDefinition,
|
|
4280
4309
|
NamedProperty,
|
|
@@ -4547,6 +4576,7 @@ ${input.slice(result.pos)}
|
|
|
4547
4576
|
If,
|
|
4548
4577
|
Import,
|
|
4549
4578
|
In,
|
|
4579
|
+
Infer,
|
|
4550
4580
|
LetOrConst,
|
|
4551
4581
|
Const,
|
|
4552
4582
|
Is,
|
|
@@ -4645,6 +4675,9 @@ ${input.slice(result.pos)}
|
|
|
4645
4675
|
UsingJSModeError,
|
|
4646
4676
|
TypeDeclaration,
|
|
4647
4677
|
TypeDeclarationRest,
|
|
4678
|
+
TypeAliasDeclaration,
|
|
4679
|
+
InterfaceDeclaration,
|
|
4680
|
+
NamespaceDeclaration,
|
|
4648
4681
|
OptionalEquals,
|
|
4649
4682
|
TypeLexicalDeclaration,
|
|
4650
4683
|
TypeDeclarationBinding,
|
|
@@ -4672,7 +4705,7 @@ ${input.slice(result.pos)}
|
|
|
4672
4705
|
EnumDeclaration,
|
|
4673
4706
|
EnumBlock,
|
|
4674
4707
|
NestedEnumProperties,
|
|
4675
|
-
|
|
4708
|
+
NestedEnumPropertyLine,
|
|
4676
4709
|
EnumProperty,
|
|
4677
4710
|
TypeProperty,
|
|
4678
4711
|
TypeIndexSignature,
|
|
@@ -4881,118 +4914,119 @@ ${input.slice(result.pos)}
|
|
|
4881
4914
|
var $L100 = $L("\u2209");
|
|
4882
4915
|
var $L101 = $L("&");
|
|
4883
4916
|
var $L102 = $L("|");
|
|
4884
|
-
var $L103 = $L("
|
|
4885
|
-
var $L104 = $L("
|
|
4917
|
+
var $L103 = $L("$:");
|
|
4918
|
+
var $L104 = $L(";");
|
|
4886
4919
|
var $L105 = $L("break");
|
|
4887
4920
|
var $L106 = $L("continue");
|
|
4888
4921
|
var $L107 = $L("debugger");
|
|
4889
|
-
var $L108 = $L("
|
|
4890
|
-
var $L109 = $L("
|
|
4891
|
-
var $L110 = $L("
|
|
4892
|
-
var $L111 = $L("
|
|
4893
|
-
var $L112 = $L("
|
|
4894
|
-
var $L113 = $L("
|
|
4895
|
-
var $L114 = $L("
|
|
4896
|
-
var $L115 = $L("
|
|
4897
|
-
var $L116 = $L("
|
|
4898
|
-
var $L117 = $L("
|
|
4899
|
-
var $L118 = $L("
|
|
4900
|
-
var $L119 = $L("
|
|
4901
|
-
var $L120 = $L("
|
|
4902
|
-
var $L121 = $L("
|
|
4903
|
-
var $L122 = $L("
|
|
4904
|
-
var $L123 = $L("
|
|
4905
|
-
var $L124 = $L("
|
|
4906
|
-
var $L125 = $L("
|
|
4907
|
-
var $L126 = $L("
|
|
4908
|
-
var $L127 = $L("
|
|
4909
|
-
var $L128 = $L("
|
|
4910
|
-
var $L129 = $L("
|
|
4911
|
-
var $L130 = $L("
|
|
4912
|
-
var $L131 = $L("
|
|
4913
|
-
var $L132 = $L("
|
|
4914
|
-
var $L133 = $L("
|
|
4915
|
-
var $L134 = $L("
|
|
4916
|
-
var $L135 = $L("
|
|
4917
|
-
var $L136 = $L("
|
|
4918
|
-
var $L137 = $L("
|
|
4919
|
-
var $L138 = $L(
|
|
4920
|
-
var $L139 = $L("
|
|
4921
|
-
var $L140 = $L("
|
|
4922
|
-
var $L141 = $L("
|
|
4923
|
-
var $L142 = $L("
|
|
4924
|
-
var $L143 = $L("
|
|
4925
|
-
var $L144 = $L("
|
|
4926
|
-
var $L145 = $L("
|
|
4927
|
-
var $L146 = $L("
|
|
4928
|
-
var $L147 = $L("
|
|
4929
|
-
var $L148 = $L("
|
|
4930
|
-
var $L149 = $L("
|
|
4931
|
-
var $L150 = $L("
|
|
4932
|
-
var $L151 = $L("
|
|
4933
|
-
var $L152 = $L("
|
|
4934
|
-
var $L153 = $L("
|
|
4935
|
-
var $L154 = $L("
|
|
4936
|
-
var $L155 = $L("
|
|
4937
|
-
var $L156 = $L("
|
|
4938
|
-
var $L157 = $L("
|
|
4939
|
-
var $L158 = $L("
|
|
4940
|
-
var $L159 = $L("
|
|
4941
|
-
var $L160 = $L("
|
|
4942
|
-
var $L161 = $L("
|
|
4943
|
-
var $L162 = $L("
|
|
4944
|
-
var $L163 = $L("
|
|
4945
|
-
var $L164 = $L("
|
|
4946
|
-
var $L165 = $L("
|
|
4947
|
-
var $L166 = $L("
|
|
4948
|
-
var $L167 = $L("
|
|
4949
|
-
var $L168 = $L("
|
|
4950
|
-
var $L169 = $L("
|
|
4951
|
-
var $L170 = $L("\u25B7");
|
|
4952
|
-
var $L171 = $L("
|
|
4953
|
-
var $L172 = $L("
|
|
4954
|
-
var $L173 = $L("
|
|
4955
|
-
var $L174 = $L("
|
|
4956
|
-
var $L175 = $L("
|
|
4957
|
-
var $L176 = $L("
|
|
4958
|
-
var $L177 = $L("
|
|
4959
|
-
var $L178 = $L("
|
|
4960
|
-
var $L179 = $L("
|
|
4961
|
-
var $L180 = $L("
|
|
4962
|
-
var $L181 = $L("
|
|
4963
|
-
var $L182 = $L("
|
|
4964
|
-
var $L183 = $L(
|
|
4965
|
-
var $L184 = $L("
|
|
4966
|
-
var $L185 = $L("
|
|
4967
|
-
var $L186 = $L("
|
|
4968
|
-
var $L187 = $L("
|
|
4969
|
-
var $L188 = $L("
|
|
4970
|
-
var $L189 = $L("
|
|
4971
|
-
var $L190 = $L("
|
|
4972
|
-
var $L191 = $L("
|
|
4973
|
-
var $L192 = $L("
|
|
4974
|
-
var $L193 = $L("
|
|
4975
|
-
var $L194 = $L("
|
|
4976
|
-
var $L195 = $L("
|
|
4977
|
-
var $L196 = $L("
|
|
4978
|
-
var $L197 = $L("
|
|
4979
|
-
var $L198 = $L("
|
|
4980
|
-
var $L199 = $L("
|
|
4981
|
-
var $L200 = $L("
|
|
4982
|
-
var $L201 = $L("
|
|
4983
|
-
var $L202 = $L("
|
|
4984
|
-
var $L203 = $L("
|
|
4985
|
-
var $L204 = $L("
|
|
4986
|
-
var $L205 = $L("
|
|
4987
|
-
var $L206 = $L("
|
|
4988
|
-
var $L207 = $L("
|
|
4989
|
-
var $L208 = $L("
|
|
4990
|
-
var $L209 = $L("
|
|
4991
|
-
var $L210 = $L("
|
|
4992
|
-
var $L211 = $L("
|
|
4993
|
-
var $L212 = $L("
|
|
4994
|
-
var $L213 = $L("
|
|
4995
|
-
var $L214 = $L("
|
|
4922
|
+
var $L108 = $L("require");
|
|
4923
|
+
var $L109 = $L("with");
|
|
4924
|
+
var $L110 = $L("assert");
|
|
4925
|
+
var $L111 = $L(":=");
|
|
4926
|
+
var $L112 = $L("\u2254");
|
|
4927
|
+
var $L113 = $L(".=");
|
|
4928
|
+
var $L114 = $L("/*");
|
|
4929
|
+
var $L115 = $L("*/");
|
|
4930
|
+
var $L116 = $L("\\");
|
|
4931
|
+
var $L117 = $L(")");
|
|
4932
|
+
var $L118 = $L("abstract");
|
|
4933
|
+
var $L119 = $L("as");
|
|
4934
|
+
var $L120 = $L("@");
|
|
4935
|
+
var $L121 = $L("@@");
|
|
4936
|
+
var $L122 = $L("async");
|
|
4937
|
+
var $L123 = $L("await");
|
|
4938
|
+
var $L124 = $L("`");
|
|
4939
|
+
var $L125 = $L("by");
|
|
4940
|
+
var $L126 = $L("case");
|
|
4941
|
+
var $L127 = $L("catch");
|
|
4942
|
+
var $L128 = $L("class");
|
|
4943
|
+
var $L129 = $L("#{");
|
|
4944
|
+
var $L130 = $L("declare");
|
|
4945
|
+
var $L131 = $L("default");
|
|
4946
|
+
var $L132 = $L("delete");
|
|
4947
|
+
var $L133 = $L("do");
|
|
4948
|
+
var $L134 = $L("..");
|
|
4949
|
+
var $L135 = $L("\u2025");
|
|
4950
|
+
var $L136 = $L("...");
|
|
4951
|
+
var $L137 = $L("\u2026");
|
|
4952
|
+
var $L138 = $L("::");
|
|
4953
|
+
var $L139 = $L('"');
|
|
4954
|
+
var $L140 = $L("each");
|
|
4955
|
+
var $L141 = $L("else");
|
|
4956
|
+
var $L142 = $L("export");
|
|
4957
|
+
var $L143 = $L("extends");
|
|
4958
|
+
var $L144 = $L("finally");
|
|
4959
|
+
var $L145 = $L("for");
|
|
4960
|
+
var $L146 = $L("from");
|
|
4961
|
+
var $L147 = $L("function");
|
|
4962
|
+
var $L148 = $L("get");
|
|
4963
|
+
var $L149 = $L("set");
|
|
4964
|
+
var $L150 = $L("#");
|
|
4965
|
+
var $L151 = $L("if");
|
|
4966
|
+
var $L152 = $L("in");
|
|
4967
|
+
var $L153 = $L("infer");
|
|
4968
|
+
var $L154 = $L("let");
|
|
4969
|
+
var $L155 = $L("const");
|
|
4970
|
+
var $L156 = $L("is");
|
|
4971
|
+
var $L157 = $L("loop");
|
|
4972
|
+
var $L158 = $L("new");
|
|
4973
|
+
var $L159 = $L("not");
|
|
4974
|
+
var $L160 = $L("of");
|
|
4975
|
+
var $L161 = $L("[");
|
|
4976
|
+
var $L162 = $L("operator");
|
|
4977
|
+
var $L163 = $L("own");
|
|
4978
|
+
var $L164 = $L("public");
|
|
4979
|
+
var $L165 = $L("private");
|
|
4980
|
+
var $L166 = $L("protected");
|
|
4981
|
+
var $L167 = $L("||>");
|
|
4982
|
+
var $L168 = $L("|\u25B7");
|
|
4983
|
+
var $L169 = $L("|>=");
|
|
4984
|
+
var $L170 = $L("\u25B7=");
|
|
4985
|
+
var $L171 = $L("|>");
|
|
4986
|
+
var $L172 = $L("\u25B7");
|
|
4987
|
+
var $L173 = $L("readonly");
|
|
4988
|
+
var $L174 = $L("return");
|
|
4989
|
+
var $L175 = $L("satisfies");
|
|
4990
|
+
var $L176 = $L("'");
|
|
4991
|
+
var $L177 = $L("static");
|
|
4992
|
+
var $L178 = $L("${");
|
|
4993
|
+
var $L179 = $L("super");
|
|
4994
|
+
var $L180 = $L("switch");
|
|
4995
|
+
var $L181 = $L("target");
|
|
4996
|
+
var $L182 = $L("then");
|
|
4997
|
+
var $L183 = $L("this");
|
|
4998
|
+
var $L184 = $L("throw");
|
|
4999
|
+
var $L185 = $L('"""');
|
|
5000
|
+
var $L186 = $L("'''");
|
|
5001
|
+
var $L187 = $L("///");
|
|
5002
|
+
var $L188 = $L("```");
|
|
5003
|
+
var $L189 = $L("try");
|
|
5004
|
+
var $L190 = $L("typeof");
|
|
5005
|
+
var $L191 = $L("unless");
|
|
5006
|
+
var $L192 = $L("until");
|
|
5007
|
+
var $L193 = $L("using");
|
|
5008
|
+
var $L194 = $L("var");
|
|
5009
|
+
var $L195 = $L("void");
|
|
5010
|
+
var $L196 = $L("when");
|
|
5011
|
+
var $L197 = $L("while");
|
|
5012
|
+
var $L198 = $L("yield");
|
|
5013
|
+
var $L199 = $L("/>");
|
|
5014
|
+
var $L200 = $L("</");
|
|
5015
|
+
var $L201 = $L("<>");
|
|
5016
|
+
var $L202 = $L("</>");
|
|
5017
|
+
var $L203 = $L("<!--");
|
|
5018
|
+
var $L204 = $L("-->");
|
|
5019
|
+
var $L205 = $L("type");
|
|
5020
|
+
var $L206 = $L("enum");
|
|
5021
|
+
var $L207 = $L("interface");
|
|
5022
|
+
var $L208 = $L("global");
|
|
5023
|
+
var $L209 = $L("module");
|
|
5024
|
+
var $L210 = $L("namespace");
|
|
5025
|
+
var $L211 = $L("asserts");
|
|
5026
|
+
var $L212 = $L("keyof");
|
|
5027
|
+
var $L213 = $L("???");
|
|
5028
|
+
var $L214 = $L("[]");
|
|
5029
|
+
var $L215 = $L("civet");
|
|
4996
5030
|
var $R0 = $R(new RegExp("(?=debugger|if|unless|do|for|loop|until|while|switch|throw|try)", "suy"));
|
|
4997
5031
|
var $R1 = $R(new RegExp("(as|of|satisfies|then|when|implements|xor|xnor)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy"));
|
|
4998
5032
|
var $R2 = $R(new RegExp("[0-9]", "suy"));
|
|
@@ -5557,20 +5591,27 @@ ${input.slice(result.pos)}
|
|
|
5557
5591
|
function UnaryPostfix(ctx, state) {
|
|
5558
5592
|
return $EVENT_C(ctx, state, "UnaryPostfix", UnaryPostfix$$);
|
|
5559
5593
|
}
|
|
5560
|
-
var TypePostfix$0 = $TS($S(_,
|
|
5594
|
+
var TypePostfix$0 = $TS($S(_, NWTypePostfix), function($skip, $loc, $0, $1, $2) {
|
|
5561
5595
|
var ws = $1;
|
|
5562
|
-
var
|
|
5563
|
-
|
|
5564
|
-
|
|
5596
|
+
var postfix = $2;
|
|
5597
|
+
return [ws, ...postfix];
|
|
5598
|
+
});
|
|
5599
|
+
function TypePostfix(ctx, state) {
|
|
5600
|
+
return $EVENT(ctx, state, "TypePostfix", TypePostfix$0);
|
|
5601
|
+
}
|
|
5602
|
+
var NWTypePostfix$0 = $TS($S(As, $E(ExclamationPoint), Type), function($skip, $loc, $0, $1, $2, $3) {
|
|
5603
|
+
var as = $1;
|
|
5604
|
+
var ex = $2;
|
|
5605
|
+
var type = $3;
|
|
5565
5606
|
if (ex) {
|
|
5566
|
-
return [{ $loc: ex.$loc, token: "
|
|
5607
|
+
return [{ $loc: ex.$loc, token: "as unknown " }, as, type];
|
|
5567
5608
|
}
|
|
5568
|
-
return [
|
|
5609
|
+
return [as, type];
|
|
5569
5610
|
});
|
|
5570
|
-
var
|
|
5571
|
-
var
|
|
5572
|
-
function
|
|
5573
|
-
return $EVENT_C(ctx, state, "
|
|
5611
|
+
var NWTypePostfix$1 = $S(Satisfies, Type);
|
|
5612
|
+
var NWTypePostfix$$ = [NWTypePostfix$0, NWTypePostfix$1];
|
|
5613
|
+
function NWTypePostfix(ctx, state) {
|
|
5614
|
+
return $EVENT_C(ctx, state, "NWTypePostfix", NWTypePostfix$$);
|
|
5574
5615
|
}
|
|
5575
5616
|
var UpdateExpression$0 = $TS($S(UpdateExpressionSymbol, UnaryWithoutParenthesizedAssignment), function($skip, $loc, $0, $1, $2) {
|
|
5576
5617
|
return {
|
|
@@ -5765,36 +5806,19 @@ ${input.slice(result.pos)}
|
|
|
5765
5806
|
var head = $2;
|
|
5766
5807
|
var body = $3;
|
|
5767
5808
|
if (head.token === "&") {
|
|
5768
|
-
|
|
5769
|
-
|
|
5809
|
+
head = makeAmpersandFunction();
|
|
5810
|
+
}
|
|
5811
|
+
if (head.type === "ArrowFunction" && head.ampersandBlock) {
|
|
5812
|
+
const expressions = [{
|
|
5770
5813
|
type: "PipelineExpression",
|
|
5771
|
-
children: [ws,
|
|
5772
|
-
};
|
|
5773
|
-
const
|
|
5774
|
-
type: "Parameters",
|
|
5775
|
-
children: [ref],
|
|
5776
|
-
names: []
|
|
5777
|
-
};
|
|
5778
|
-
const expressions = [arrowBody];
|
|
5779
|
-
const block = {
|
|
5780
|
-
bare: true,
|
|
5781
|
-
expressions,
|
|
5782
|
-
children: [expressions]
|
|
5783
|
-
};
|
|
5784
|
-
const children = [parameters, " => ", block];
|
|
5814
|
+
children: [ws, head.block.expressions[0], body]
|
|
5815
|
+
}];
|
|
5816
|
+
const block = { ...head.block, expressions, children: [expressions] };
|
|
5785
5817
|
return {
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
}
|
|
5791
|
-
},
|
|
5792
|
-
children,
|
|
5793
|
-
ref,
|
|
5794
|
-
body: [arrowBody],
|
|
5795
|
-
ampersandBlock: true,
|
|
5796
|
-
parameters,
|
|
5797
|
-
block
|
|
5818
|
+
...head,
|
|
5819
|
+
block,
|
|
5820
|
+
body: expressions,
|
|
5821
|
+
children: [...head.children.slice(0, -1), block]
|
|
5798
5822
|
};
|
|
5799
5823
|
}
|
|
5800
5824
|
return {
|
|
@@ -5817,11 +5841,14 @@ ${input.slice(result.pos)}
|
|
|
5817
5841
|
var PipelineTailItem$2 = $T($S(Return, $N(AccessStart)), function(value) {
|
|
5818
5842
|
return value[0];
|
|
5819
5843
|
});
|
|
5820
|
-
var PipelineTailItem$3 =
|
|
5821
|
-
|
|
5844
|
+
var PipelineTailItem$3 = $TS($S(NWTypePostfix, $Q(TypePostfix)), function($skip, $loc, $0, $1, $2) {
|
|
5845
|
+
return makeAmpersandFunction([" ", $1, ...$2]);
|
|
5846
|
+
});
|
|
5847
|
+
var PipelineTailItem$4 = AmpersandFunctionExpression;
|
|
5848
|
+
var PipelineTailItem$5 = $T($S($N(Ampersand), PipelineHeadItem), function(value) {
|
|
5822
5849
|
return value[1];
|
|
5823
5850
|
});
|
|
5824
|
-
var PipelineTailItem$$ = [PipelineTailItem$0, PipelineTailItem$1, PipelineTailItem$2, PipelineTailItem$3, PipelineTailItem$4];
|
|
5851
|
+
var PipelineTailItem$$ = [PipelineTailItem$0, PipelineTailItem$1, PipelineTailItem$2, PipelineTailItem$3, PipelineTailItem$4, PipelineTailItem$5];
|
|
5825
5852
|
function PipelineTailItem(ctx, state) {
|
|
5826
5853
|
return $EVENT_C(ctx, state, "PipelineTailItem", PipelineTailItem$$);
|
|
5827
5854
|
}
|
|
@@ -5868,7 +5895,7 @@ ${input.slice(result.pos)}
|
|
|
5868
5895
|
return $EVENT(ctx, state, "ParenthesizedExpression", ParenthesizedExpression$0);
|
|
5869
5896
|
}
|
|
5870
5897
|
var ClassDeclaration$0 = $TS($S(ClassExpression), function($skip, $loc, $0, $1) {
|
|
5871
|
-
if ($1.
|
|
5898
|
+
if ($1.id)
|
|
5872
5899
|
return $1;
|
|
5873
5900
|
return makeLeftHandSideExpression($1);
|
|
5874
5901
|
});
|
|
@@ -5885,6 +5912,7 @@ ${input.slice(result.pos)}
|
|
|
5885
5912
|
decorators,
|
|
5886
5913
|
abstract,
|
|
5887
5914
|
binding,
|
|
5915
|
+
id: binding?.[0],
|
|
5888
5916
|
heritage,
|
|
5889
5917
|
body,
|
|
5890
5918
|
children: $0
|
|
@@ -6202,7 +6230,8 @@ ${input.slice(result.pos)}
|
|
|
6202
6230
|
name: id.name,
|
|
6203
6231
|
children: [".", id]
|
|
6204
6232
|
}],
|
|
6205
|
-
privateShorthand: true
|
|
6233
|
+
privateShorthand: true,
|
|
6234
|
+
privateId: id
|
|
6206
6235
|
};
|
|
6207
6236
|
});
|
|
6208
6237
|
var PrivateThis$$ = [PrivateThis$0, PrivateThis$1];
|
|
@@ -7209,27 +7238,7 @@ ${input.slice(result.pos)}
|
|
|
7209
7238
|
};
|
|
7210
7239
|
});
|
|
7211
7240
|
var FunctionExpression$1 = $TV($EXPECT($L26, 'FunctionExpression "(&)"'), function($skip, $loc, $0, $1) {
|
|
7212
|
-
|
|
7213
|
-
const parameters = {
|
|
7214
|
-
type: "Parameters",
|
|
7215
|
-
children: [ref],
|
|
7216
|
-
names: []
|
|
7217
|
-
};
|
|
7218
|
-
const block = {
|
|
7219
|
-
expressions: [ref]
|
|
7220
|
-
};
|
|
7221
|
-
return {
|
|
7222
|
-
type: "ArrowFunction",
|
|
7223
|
-
signature: {
|
|
7224
|
-
modifier: {}
|
|
7225
|
-
},
|
|
7226
|
-
children: [parameters, " => ", body],
|
|
7227
|
-
ref,
|
|
7228
|
-
body,
|
|
7229
|
-
ampersandBlock: true,
|
|
7230
|
-
block,
|
|
7231
|
-
parameters
|
|
7232
|
-
};
|
|
7241
|
+
return makeAmpersandFunction();
|
|
7233
7242
|
});
|
|
7234
7243
|
var FunctionExpression$2 = $TS($S(OpenParen, BinaryOp, CloseParen), function($skip, $loc, $0, $1, $2, $3) {
|
|
7235
7244
|
var open = $1;
|
|
@@ -7353,15 +7362,11 @@ ${input.slice(result.pos)}
|
|
|
7353
7362
|
var rhs = $3;
|
|
7354
7363
|
if (!prefix.length && !rhs)
|
|
7355
7364
|
return $skip;
|
|
7356
|
-
let body, ref;
|
|
7365
|
+
let body, ref, typeSuffix;
|
|
7357
7366
|
if (!rhs) {
|
|
7358
7367
|
body = ref = makeRef("$");
|
|
7359
7368
|
} else {
|
|
7360
|
-
|
|
7361
|
-
while (!exp.ref && exp.expression) {
|
|
7362
|
-
exp = exp.expression;
|
|
7363
|
-
}
|
|
7364
|
-
({ ref } = exp);
|
|
7369
|
+
({ ref, typeSuffix } = rhs);
|
|
7365
7370
|
if (!ref) {
|
|
7366
7371
|
throw new Error("Could not find ref in ampersand shorthand block");
|
|
7367
7372
|
}
|
|
@@ -7375,7 +7380,7 @@ ${input.slice(result.pos)}
|
|
|
7375
7380
|
}
|
|
7376
7381
|
const parameters = {
|
|
7377
7382
|
type: "Parameters",
|
|
7378
|
-
children: [ref],
|
|
7383
|
+
children: typeSuffix ? ["(", ref, typeSuffix, ")"] : [ref],
|
|
7379
7384
|
names: []
|
|
7380
7385
|
};
|
|
7381
7386
|
const expressions = [body];
|
|
@@ -7412,7 +7417,10 @@ ${input.slice(result.pos)}
|
|
|
7412
7417
|
var w = $2;
|
|
7413
7418
|
var decl = $3;
|
|
7414
7419
|
decl.names.forEach((name) => module.operators.add(name));
|
|
7415
|
-
return
|
|
7420
|
+
return {
|
|
7421
|
+
...decl,
|
|
7422
|
+
children: [insertTrimmingSpace(w, ""), ...decl.children]
|
|
7423
|
+
};
|
|
7416
7424
|
});
|
|
7417
7425
|
var OperatorDeclaration$1 = $TS($S(OperatorSignature, BracedBlock), function($skip, $loc, $0, $1, $2) {
|
|
7418
7426
|
var signature = $1;
|
|
@@ -7434,7 +7442,10 @@ ${input.slice(result.pos)}
|
|
|
7434
7442
|
var ids = $4;
|
|
7435
7443
|
module.operators.add(id.name);
|
|
7436
7444
|
ids.forEach(([, , id2]) => module.operators.add(id2.name));
|
|
7437
|
-
return
|
|
7445
|
+
return {
|
|
7446
|
+
id,
|
|
7447
|
+
children: []
|
|
7448
|
+
};
|
|
7438
7449
|
});
|
|
7439
7450
|
var OperatorDeclaration$$ = [OperatorDeclaration$0, OperatorDeclaration$1, OperatorDeclaration$2];
|
|
7440
7451
|
function OperatorDeclaration(ctx, state) {
|
|
@@ -7475,12 +7486,19 @@ ${input.slice(result.pos)}
|
|
|
7475
7486
|
function AmpersandBlockRHS(ctx, state) {
|
|
7476
7487
|
return $EVENT(ctx, state, "AmpersandBlockRHS", AmpersandBlockRHS$0);
|
|
7477
7488
|
}
|
|
7478
|
-
var
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
|
|
7482
|
-
|
|
7483
|
-
|
|
7489
|
+
var AmpersandTypeSuffix$0 = $T($S($Y($S($E(_), $E(QuestionMark), $E(_), Colon)), TypeSuffix), function(value) {
|
|
7490
|
+
return value[1];
|
|
7491
|
+
});
|
|
7492
|
+
function AmpersandTypeSuffix(ctx, state) {
|
|
7493
|
+
return $EVENT(ctx, state, "AmpersandTypeSuffix", AmpersandTypeSuffix$0);
|
|
7494
|
+
}
|
|
7495
|
+
var AmpersandBlockRHSBody$0 = $TS($S($E(AmpersandTypeSuffix), $E($S($N(_), $P(CallExpressionRest))), $E(UnaryPostfix), $E($S(WAssignmentOp, $Q($S(NotDedented, UpdateExpression, WAssignmentOp)), NonPipelineExtendedExpression)), $E($S($N($EXPECT($R10, "AmpersandBlockRHSBody /[&]/")), $P(BinaryOpRHS)))), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
7496
|
+
var typeSuffix = $1;
|
|
7497
|
+
var callExpRest = $2;
|
|
7498
|
+
var unaryPostfix = $3;
|
|
7499
|
+
var assign = $4;
|
|
7500
|
+
var binopRHS = $5;
|
|
7501
|
+
if (!typeSuffix && !callExpRest && !binopRHS && !unaryPostfix)
|
|
7484
7502
|
return $skip;
|
|
7485
7503
|
const ref = makeRef("$");
|
|
7486
7504
|
let exp = {
|
|
@@ -7507,16 +7525,16 @@ ${input.slice(result.pos)}
|
|
|
7507
7525
|
names: null,
|
|
7508
7526
|
lhs,
|
|
7509
7527
|
assigned: exp,
|
|
7510
|
-
exp: rhs
|
|
7511
|
-
ref
|
|
7528
|
+
exp: rhs
|
|
7512
7529
|
};
|
|
7513
7530
|
}
|
|
7514
7531
|
if (binopRHS) {
|
|
7515
7532
|
exp = {
|
|
7516
|
-
children: processBinaryOpExpression([exp, binopRHS[1]])
|
|
7517
|
-
ref
|
|
7533
|
+
children: processBinaryOpExpression([exp, binopRHS[1]])
|
|
7518
7534
|
};
|
|
7519
7535
|
}
|
|
7536
|
+
exp.ref = ref;
|
|
7537
|
+
exp.typeSuffix = typeSuffix;
|
|
7520
7538
|
return exp;
|
|
7521
7539
|
});
|
|
7522
7540
|
function AmpersandBlockRHSBody(ctx, state) {
|
|
@@ -7788,13 +7806,12 @@ ${input.slice(result.pos)}
|
|
|
7788
7806
|
return block;
|
|
7789
7807
|
});
|
|
7790
7808
|
var NonSingleBracedBlock$1 = ImplicitNestedBlock;
|
|
7791
|
-
var NonSingleBracedBlock$2 = $TS($S(InsertOpenBrace,
|
|
7792
|
-
var s = $
|
|
7809
|
+
var NonSingleBracedBlock$2 = $TS($S(InsertOpenBrace, NestedImplicitObjectLiteral, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3) {
|
|
7810
|
+
var s = $2;
|
|
7793
7811
|
return {
|
|
7794
7812
|
type: "BlockStatement",
|
|
7795
7813
|
expressions: [s],
|
|
7796
|
-
|
|
7797
|
-
children: [$1, s, $3]
|
|
7814
|
+
children: $0
|
|
7798
7815
|
};
|
|
7799
7816
|
});
|
|
7800
7817
|
var NonSingleBracedBlock$$ = [NonSingleBracedBlock$0, NonSingleBracedBlock$1, NonSingleBracedBlock$2];
|
|
@@ -8192,7 +8209,10 @@ ${input.slice(result.pos)}
|
|
|
8192
8209
|
return $EVENT(ctx, state, "ElementListRest", ElementListRest$0);
|
|
8193
8210
|
}
|
|
8194
8211
|
var ArrayElementExpression$0 = JSXTag;
|
|
8195
|
-
var ArrayElementExpression$1 = $
|
|
8212
|
+
var ArrayElementExpression$1 = $T($S(ImplicitObjectLiteral, $Y(ArrayElementDelimiter)), function(value) {
|
|
8213
|
+
return value[0];
|
|
8214
|
+
});
|
|
8215
|
+
var ArrayElementExpression$2 = $TS($S($E(ExtendedExpression), __, DotDotDot, $Y(ArrayElementDelimiter)), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
8196
8216
|
var exp = $1;
|
|
8197
8217
|
var ws = $2;
|
|
8198
8218
|
var dots = $3;
|
|
@@ -8205,7 +8225,7 @@ ${input.slice(result.pos)}
|
|
|
8205
8225
|
names: exp.names
|
|
8206
8226
|
};
|
|
8207
8227
|
});
|
|
8208
|
-
var ArrayElementExpression$
|
|
8228
|
+
var ArrayElementExpression$3 = $TS($S($E($S($E($S(__, DotDotDot, __)), PostfixedExpression)), $Y(ArrayElementDelimiter)), function($skip, $loc, $0, $1, $2) {
|
|
8209
8229
|
var expMaybeSpread = $1;
|
|
8210
8230
|
if (expMaybeSpread) {
|
|
8211
8231
|
const [spread, exp] = expMaybeSpread;
|
|
@@ -8228,7 +8248,7 @@ ${input.slice(result.pos)}
|
|
|
8228
8248
|
children: []
|
|
8229
8249
|
};
|
|
8230
8250
|
});
|
|
8231
|
-
var ArrayElementExpression$$ = [ArrayElementExpression$0, ArrayElementExpression$1, ArrayElementExpression$2];
|
|
8251
|
+
var ArrayElementExpression$$ = [ArrayElementExpression$0, ArrayElementExpression$1, ArrayElementExpression$2, ArrayElementExpression$3];
|
|
8232
8252
|
function ArrayElementExpression(ctx, state) {
|
|
8233
8253
|
return $EVENT_C(ctx, state, "ArrayElementExpression", ArrayElementExpression$$);
|
|
8234
8254
|
}
|
|
@@ -8292,8 +8312,10 @@ ${input.slice(result.pos)}
|
|
|
8292
8312
|
function BracedObjectLiteralContent(ctx, state) {
|
|
8293
8313
|
return $EVENT_C(ctx, state, "BracedObjectLiteralContent", BracedObjectLiteralContent$$);
|
|
8294
8314
|
}
|
|
8295
|
-
var NestedImplicitObjectLiteral$0 = $TS($S(InsertOpenBrace, NestedImplicitPropertyDefinitions, InsertNewline, InsertIndent, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
8296
|
-
var properties = $
|
|
8315
|
+
var NestedImplicitObjectLiteral$0 = $TS($S(InsertOpenBrace, PushIndent, $E(NestedImplicitPropertyDefinitions), PopIndent, InsertNewline, InsertIndent, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
|
|
8316
|
+
var properties = $3;
|
|
8317
|
+
if (!properties)
|
|
8318
|
+
return $skip;
|
|
8297
8319
|
return {
|
|
8298
8320
|
type: "ObjectExpression",
|
|
8299
8321
|
properties,
|
|
@@ -8303,10 +8325,8 @@ ${input.slice(result.pos)}
|
|
|
8303
8325
|
function NestedImplicitObjectLiteral(ctx, state) {
|
|
8304
8326
|
return $EVENT(ctx, state, "NestedImplicitObjectLiteral", NestedImplicitObjectLiteral$0);
|
|
8305
8327
|
}
|
|
8306
|
-
var NestedImplicitPropertyDefinitions$0 = $
|
|
8307
|
-
var defs = $
|
|
8308
|
-
if (!defs.length)
|
|
8309
|
-
return $skip;
|
|
8328
|
+
var NestedImplicitPropertyDefinitions$0 = $TV($P(NestedImplicitPropertyDefinition), function($skip, $loc, $0, $1) {
|
|
8329
|
+
var defs = $0;
|
|
8310
8330
|
return defs.flat();
|
|
8311
8331
|
});
|
|
8312
8332
|
function NestedImplicitPropertyDefinitions(ctx, state) {
|
|
@@ -8358,7 +8378,7 @@ ${input.slice(result.pos)}
|
|
|
8358
8378
|
function NestedPropertyDefinition(ctx, state) {
|
|
8359
8379
|
return $EVENT(ctx, state, "NestedPropertyDefinition", NestedPropertyDefinition$0);
|
|
8360
8380
|
}
|
|
8361
|
-
var
|
|
8381
|
+
var ImplicitObjectLiteral$0 = $TS($S(InsertInlineOpenBrace, SnugNamedProperty, $Q($S(ImplicitObjectPropertyDelimiter, NamedProperty)), $E($S($E(_), Comma)), InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
8362
8382
|
var open = $1;
|
|
8363
8383
|
var first = $2;
|
|
8364
8384
|
var rest = $3;
|
|
@@ -8369,16 +8389,34 @@ ${input.slice(result.pos)}
|
|
|
8369
8389
|
children: [open, first, ...rest, trailing, close]
|
|
8370
8390
|
};
|
|
8371
8391
|
});
|
|
8372
|
-
function
|
|
8373
|
-
return $EVENT(ctx, state, "
|
|
8392
|
+
function ImplicitObjectLiteral(ctx, state) {
|
|
8393
|
+
return $EVENT(ctx, state, "ImplicitObjectLiteral", ImplicitObjectLiteral$0);
|
|
8374
8394
|
}
|
|
8375
|
-
var
|
|
8376
|
-
var
|
|
8395
|
+
var ImplicitObjectPropertyDelimiter$0 = $S($E(_), Comma, $C(NotDedented, $E(_)));
|
|
8396
|
+
var ImplicitObjectPropertyDelimiter$1 = $T($S($Y($S(Nested, NamedProperty)), InsertComma, Nested), function(value) {
|
|
8377
8397
|
return [value[1], value[2]];
|
|
8378
8398
|
});
|
|
8379
|
-
var
|
|
8380
|
-
function
|
|
8381
|
-
return $EVENT_C(ctx, state, "
|
|
8399
|
+
var ImplicitObjectPropertyDelimiter$$ = [ImplicitObjectPropertyDelimiter$0, ImplicitObjectPropertyDelimiter$1];
|
|
8400
|
+
function ImplicitObjectPropertyDelimiter(ctx, state) {
|
|
8401
|
+
return $EVENT_C(ctx, state, "ImplicitObjectPropertyDelimiter", ImplicitObjectPropertyDelimiter$$);
|
|
8402
|
+
}
|
|
8403
|
+
var InlineObjectLiteral$0 = $TS($S(InsertInlineOpenBrace, SnugNamedProperty, $Q($S(InlineObjectPropertyDelimiter, NamedProperty)), $E($S($E(_), Comma, $Y(Dedented))), InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
8404
|
+
var open = $1;
|
|
8405
|
+
var first = $2;
|
|
8406
|
+
var rest = $3;
|
|
8407
|
+
var trailing = $4;
|
|
8408
|
+
var close = $5;
|
|
8409
|
+
return {
|
|
8410
|
+
type: "ObjectExpression",
|
|
8411
|
+
children: [open, first, ...rest, trailing, close]
|
|
8412
|
+
};
|
|
8413
|
+
});
|
|
8414
|
+
function InlineObjectLiteral(ctx, state) {
|
|
8415
|
+
return $EVENT(ctx, state, "InlineObjectLiteral", InlineObjectLiteral$0);
|
|
8416
|
+
}
|
|
8417
|
+
var InlineObjectPropertyDelimiter$0 = $S($E(_), Comma, $C(NotDedented, $E(_)));
|
|
8418
|
+
function InlineObjectPropertyDelimiter(ctx, state) {
|
|
8419
|
+
return $EVENT(ctx, state, "InlineObjectPropertyDelimiter", InlineObjectPropertyDelimiter$0);
|
|
8382
8420
|
}
|
|
8383
8421
|
var ObjectPropertyDelimiter$0 = $S($E(_), Comma);
|
|
8384
8422
|
var ObjectPropertyDelimiter$1 = $Y($S(__, $EXPECT($L29, 'ObjectPropertyDelimiter "}"')));
|
|
@@ -8699,7 +8737,12 @@ ${input.slice(result.pos)}
|
|
|
8699
8737
|
v = insertTrimmingSpace(p, "");
|
|
8700
8738
|
break;
|
|
8701
8739
|
case "Property":
|
|
8702
|
-
|
|
8740
|
+
const { value: value2 } = p;
|
|
8741
|
+
if (value2.privateShorthand) {
|
|
8742
|
+
v = value2.privateId;
|
|
8743
|
+
} else {
|
|
8744
|
+
v = insertTrimmingSpace(value2, "");
|
|
8745
|
+
}
|
|
8703
8746
|
break;
|
|
8704
8747
|
}
|
|
8705
8748
|
const exp = processCallMemberExpression({
|
|
@@ -9269,8 +9312,11 @@ ${input.slice(result.pos)}
|
|
|
9269
9312
|
return $EVENT_C(ctx, state, "ModuleItem", ModuleItem$$);
|
|
9270
9313
|
}
|
|
9271
9314
|
var StatementListItem$0 = Declaration;
|
|
9272
|
-
var StatementListItem$1 =
|
|
9273
|
-
|
|
9315
|
+
var StatementListItem$1 = $TS($S($N($EXPECT($L103, 'StatementListItem "$:"')), ImplicitObjectLiteral), function($skip, $loc, $0, $1, $2) {
|
|
9316
|
+
return makeLeftHandSideExpression($2);
|
|
9317
|
+
});
|
|
9318
|
+
var StatementListItem$2 = PostfixedStatement;
|
|
9319
|
+
var StatementListItem$$ = [StatementListItem$0, StatementListItem$1, StatementListItem$2];
|
|
9274
9320
|
function StatementListItem(ctx, state) {
|
|
9275
9321
|
return $EVENT_C(ctx, state, "StatementListItem", StatementListItem$$);
|
|
9276
9322
|
}
|
|
@@ -9376,7 +9422,7 @@ ${input.slice(result.pos)}
|
|
|
9376
9422
|
function NoCommaStatement(ctx, state) {
|
|
9377
9423
|
return $EVENT_C(ctx, state, "NoCommaStatement", NoCommaStatement$$);
|
|
9378
9424
|
}
|
|
9379
|
-
var EmptyStatement$0 = $TS($S($E(_), $Y($EXPECT($
|
|
9425
|
+
var EmptyStatement$0 = $TS($S($E(_), $Y($EXPECT($L104, 'EmptyStatement ";"'))), function($skip, $loc, $0, $1, $2) {
|
|
9380
9426
|
return { type: "EmptyStatement", children: $1 || [] };
|
|
9381
9427
|
});
|
|
9382
9428
|
function EmptyStatement(ctx, state) {
|
|
@@ -9407,7 +9453,7 @@ ${input.slice(result.pos)}
|
|
|
9407
9453
|
var w = $3;
|
|
9408
9454
|
return [id, colon, w];
|
|
9409
9455
|
});
|
|
9410
|
-
var Label$1 = $S($EXPECT($
|
|
9456
|
+
var Label$1 = $S($EXPECT($L103, 'Label "$:"'), Whitespace);
|
|
9411
9457
|
var Label$$ = [Label$0, Label$1];
|
|
9412
9458
|
function Label(ctx, state) {
|
|
9413
9459
|
return $EVENT_C(ctx, state, "Label", Label$$);
|
|
@@ -10565,16 +10611,26 @@ ${input.slice(result.pos)}
|
|
|
10565
10611
|
function MaybeNestedExpression(ctx, state) {
|
|
10566
10612
|
return $EVENT_C(ctx, state, "MaybeNestedExpression", MaybeNestedExpression$$);
|
|
10567
10613
|
}
|
|
10568
|
-
var ImportDeclaration$0 = $
|
|
10614
|
+
var ImportDeclaration$0 = $TS($S(Import, _, Identifier, $E(_), Equals, __, $EXPECT($L108, 'ImportDeclaration "require"'), NonIdContinue, Arguments), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
|
|
10615
|
+
const imp = [
|
|
10616
|
+
{ ...$1, ts: true },
|
|
10617
|
+
{ ...$1, token: "const", js: true }
|
|
10618
|
+
];
|
|
10619
|
+
return {
|
|
10620
|
+
type: "ImportDeclaration",
|
|
10621
|
+
children: [imp, $0.slice(1)]
|
|
10622
|
+
};
|
|
10623
|
+
});
|
|
10624
|
+
var ImportDeclaration$1 = $T($S(Import, __, TypeKeyword, __, ImportClause, __, FromClause, $E(ImportAssertion)), function(value) {
|
|
10569
10625
|
return { "type": "ImportDeclaration", "ts": true, "children": value };
|
|
10570
10626
|
});
|
|
10571
|
-
var ImportDeclaration$
|
|
10627
|
+
var ImportDeclaration$2 = $T($S(Import, __, ImportClause, __, FromClause, $E(ImportAssertion)), function(value) {
|
|
10572
10628
|
return { "type": "ImportDeclaration", "children": value };
|
|
10573
10629
|
});
|
|
10574
|
-
var ImportDeclaration$
|
|
10630
|
+
var ImportDeclaration$3 = $T($S(Import, __, ModuleSpecifier, $E(ImportAssertion)), function(value) {
|
|
10575
10631
|
return { "type": "ImportDeclaration", "children": value };
|
|
10576
10632
|
});
|
|
10577
|
-
var ImportDeclaration$
|
|
10633
|
+
var ImportDeclaration$4 = $TS($S(ImpliedImport, $E($S(TypeKeyword, __)), ImportClause, __, FromClause, $E(ImportAssertion)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
10578
10634
|
var i = $1;
|
|
10579
10635
|
var t = $2;
|
|
10580
10636
|
var c = $3;
|
|
@@ -10590,7 +10646,7 @@ ${input.slice(result.pos)}
|
|
|
10590
10646
|
return children;
|
|
10591
10647
|
return { type: "ImportDeclaration", ts: true, children };
|
|
10592
10648
|
});
|
|
10593
|
-
var ImportDeclaration$$ = [ImportDeclaration$0, ImportDeclaration$1, ImportDeclaration$2, ImportDeclaration$3];
|
|
10649
|
+
var ImportDeclaration$$ = [ImportDeclaration$0, ImportDeclaration$1, ImportDeclaration$2, ImportDeclaration$3, ImportDeclaration$4];
|
|
10594
10650
|
function ImportDeclaration(ctx, state) {
|
|
10595
10651
|
return $EVENT_C(ctx, state, "ImportDeclaration", ImportDeclaration$$);
|
|
10596
10652
|
}
|
|
@@ -10649,7 +10705,7 @@ ${input.slice(result.pos)}
|
|
|
10649
10705
|
function FromClause(ctx, state) {
|
|
10650
10706
|
return $EVENT(ctx, state, "FromClause", FromClause$0);
|
|
10651
10707
|
}
|
|
10652
|
-
var ImportAssertion$0 = $S($E(_), $C($EXPECT($
|
|
10708
|
+
var ImportAssertion$0 = $S($E(_), $C($EXPECT($L109, 'ImportAssertion "with"'), $EXPECT($L110, 'ImportAssertion "assert"')), NonIdContinue, $E(_), ObjectLiteral);
|
|
10653
10709
|
function ImportAssertion(ctx, state) {
|
|
10654
10710
|
return $EVENT(ctx, state, "ImportAssertion", ImportAssertion$0);
|
|
10655
10711
|
}
|
|
@@ -10723,10 +10779,17 @@ ${input.slice(result.pos)}
|
|
|
10723
10779
|
return $EVENT_C(ctx, state, "ModuleExportName", ModuleExportName$$);
|
|
10724
10780
|
}
|
|
10725
10781
|
var ModuleSpecifier$0 = $TS($S(UnprocessedModuleSpecifier), function($skip, $loc, $0, $1) {
|
|
10726
|
-
|
|
10727
|
-
|
|
10728
|
-
|
|
10729
|
-
|
|
10782
|
+
let { token } = $1;
|
|
10783
|
+
if (module.config.rewriteTsImports) {
|
|
10784
|
+
token = token.replace(/\.([mc])?ts(['"])$/, ".$1js$2");
|
|
10785
|
+
}
|
|
10786
|
+
if (module.config.rewriteCivetImports) {
|
|
10787
|
+
token = token.replace(
|
|
10788
|
+
/\.civet(['"])$/,
|
|
10789
|
+
`${module.config.rewriteCivetImports.replace(/\$/g, "$$")}$1`
|
|
10790
|
+
);
|
|
10791
|
+
}
|
|
10792
|
+
return { ...$1, token };
|
|
10730
10793
|
});
|
|
10731
10794
|
function ModuleSpecifier(ctx, state) {
|
|
10732
10795
|
return $EVENT(ctx, state, "ModuleSpecifier", ModuleSpecifier$0);
|
|
@@ -10748,18 +10811,55 @@ ${input.slice(result.pos)}
|
|
|
10748
10811
|
function ImportedBinding(ctx, state) {
|
|
10749
10812
|
return $EVENT(ctx, state, "ImportedBinding", ImportedBinding$0);
|
|
10750
10813
|
}
|
|
10751
|
-
var ExportDeclaration$0 = $TS($S(
|
|
10814
|
+
var ExportDeclaration$0 = $TS($S(Export, $E(_), Equals, ExtendedExpression), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
10815
|
+
const exp = [
|
|
10816
|
+
{ ...$1, ts: true },
|
|
10817
|
+
{ ...$1, token: "module.exports", js: true }
|
|
10818
|
+
];
|
|
10819
|
+
return {
|
|
10820
|
+
type: "ExportDeclaration",
|
|
10821
|
+
children: [exp, $0.slice(1)]
|
|
10822
|
+
};
|
|
10823
|
+
});
|
|
10824
|
+
var ExportDeclaration$1 = $TS($S($E(Decorators), Export, __, Default, __, $N(FunctionDeclaration), $C(LexicalDeclaration, VariableStatement, TypeAliasDeclaration, NamespaceDeclaration, EnumDeclaration, OperatorDeclaration)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
|
|
10825
|
+
var declaration = $7;
|
|
10826
|
+
let id, error;
|
|
10827
|
+
if (declaration.id) {
|
|
10828
|
+
id = declaration.id;
|
|
10829
|
+
} else if (declaration.names) {
|
|
10830
|
+
if (declaration.names.length !== 1) {
|
|
10831
|
+
error = {
|
|
10832
|
+
type: "Error",
|
|
10833
|
+
message: `export default with ${declaration.names.length} variable declaration (should be 1)`
|
|
10834
|
+
};
|
|
10835
|
+
}
|
|
10836
|
+
id = declaration.names[0];
|
|
10837
|
+
} else {
|
|
10838
|
+
throw new Error("Could not find name of declaration in export default");
|
|
10839
|
+
}
|
|
10840
|
+
return [
|
|
10841
|
+
declaration,
|
|
10842
|
+
{ children: [";"], ts: declaration.ts },
|
|
10843
|
+
error ?? {
|
|
10844
|
+
type: "ExportDeclaration",
|
|
10845
|
+
declaration: id,
|
|
10846
|
+
ts: declaration.ts,
|
|
10847
|
+
children: [...$0.slice(0, -2), id]
|
|
10848
|
+
}
|
|
10849
|
+
];
|
|
10850
|
+
});
|
|
10851
|
+
var ExportDeclaration$2 = $TS($S($E(Decorators), Export, __, Default, __, $C(HoistableDeclaration, ClassDeclaration, InterfaceDeclaration, ExtendedExpression)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
10752
10852
|
var declaration = $6;
|
|
10753
|
-
return { type: "ExportDeclaration", declaration, children: $0 };
|
|
10853
|
+
return { type: "ExportDeclaration", declaration, ts: declaration.ts, children: $0 };
|
|
10754
10854
|
});
|
|
10755
|
-
var ExportDeclaration$
|
|
10855
|
+
var ExportDeclaration$3 = $TS($S(Export, __, ExportFromClause, __, FromClause), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
10756
10856
|
return { type: "ExportDeclaration", ts: $3.ts, children: $0 };
|
|
10757
10857
|
});
|
|
10758
|
-
var ExportDeclaration$
|
|
10858
|
+
var ExportDeclaration$4 = $TS($S($E(Decorators), Export, __, $C(Declaration, VariableStatement, TypeAndNamedExports, ExportVarDec)), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
10759
10859
|
var declaration = $4;
|
|
10760
10860
|
return { type: "ExportDeclaration", declaration, ts: declaration.ts, children: $0 };
|
|
10761
10861
|
});
|
|
10762
|
-
var ExportDeclaration$$ = [ExportDeclaration$0, ExportDeclaration$1, ExportDeclaration$2];
|
|
10862
|
+
var ExportDeclaration$$ = [ExportDeclaration$0, ExportDeclaration$1, ExportDeclaration$2, ExportDeclaration$3, ExportDeclaration$4];
|
|
10763
10863
|
function ExportDeclaration(ctx, state) {
|
|
10764
10864
|
return $EVENT_C(ctx, state, "ExportDeclaration", ExportDeclaration$$);
|
|
10765
10865
|
}
|
|
@@ -10787,7 +10887,7 @@ ${input.slice(result.pos)}
|
|
|
10787
10887
|
return $EVENT(ctx, state, "TypeAndNamedExports", TypeAndNamedExports$0);
|
|
10788
10888
|
}
|
|
10789
10889
|
var NamedExports$0 = $S(OpenBrace, $Q(ExportSpecifier), $E($S(__, Comma)), __, CloseBrace);
|
|
10790
|
-
var NamedExports$1 = $TS($S(InsertInlineOpenBrace, ImplicitExportSpecifier, $Q($S(
|
|
10890
|
+
var NamedExports$1 = $TS($S(InsertInlineOpenBrace, ImplicitExportSpecifier, $Q($S(ImplicitObjectPropertyDelimiter, ImplicitExportSpecifier)), InsertCloseBrace, $Y($C(StatementDelimiter, $S(__, From)))), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
10791
10891
|
var open = $1;
|
|
10792
10892
|
var first = $2;
|
|
10793
10893
|
var rest = $3;
|
|
@@ -10869,13 +10969,13 @@ ${input.slice(result.pos)}
|
|
|
10869
10969
|
function LexicalDeclaration(ctx, state) {
|
|
10870
10970
|
return $EVENT_C(ctx, state, "LexicalDeclaration", LexicalDeclaration$$);
|
|
10871
10971
|
}
|
|
10872
|
-
var ConstAssignment$0 = $TV($C($EXPECT($
|
|
10972
|
+
var ConstAssignment$0 = $TV($C($EXPECT($L111, 'ConstAssignment ":="'), $EXPECT($L112, 'ConstAssignment "\u2254"')), function($skip, $loc, $0, $1) {
|
|
10873
10973
|
return { $loc, token: "=" };
|
|
10874
10974
|
});
|
|
10875
10975
|
function ConstAssignment(ctx, state) {
|
|
10876
10976
|
return $EVENT(ctx, state, "ConstAssignment", ConstAssignment$0);
|
|
10877
10977
|
}
|
|
10878
|
-
var LetAssignment$0 = $TV($EXPECT($
|
|
10978
|
+
var LetAssignment$0 = $TV($EXPECT($L113, 'LetAssignment ".="'), function($skip, $loc, $0, $1) {
|
|
10879
10979
|
return { $loc, token: "=" };
|
|
10880
10980
|
});
|
|
10881
10981
|
function LetAssignment(ctx, state) {
|
|
@@ -10923,6 +11023,7 @@ ${input.slice(result.pos)}
|
|
|
10923
11023
|
var VariableStatement$0 = $TS($S(Var, __, VariableDeclarationList), function($skip, $loc, $0, $1, $2, $3) {
|
|
10924
11024
|
return {
|
|
10925
11025
|
...$3,
|
|
11026
|
+
names: $3.names,
|
|
10926
11027
|
children: [$1, ...$2, ...$3.children]
|
|
10927
11028
|
};
|
|
10928
11029
|
});
|
|
@@ -11281,7 +11382,7 @@ ${input.slice(result.pos)}
|
|
|
11281
11382
|
function MultiLineComment(ctx, state) {
|
|
11282
11383
|
return $EVENT_C(ctx, state, "MultiLineComment", MultiLineComment$$);
|
|
11283
11384
|
}
|
|
11284
|
-
var JSMultiLineComment$0 = $TV($TEXT($S($EXPECT($
|
|
11385
|
+
var JSMultiLineComment$0 = $TV($TEXT($S($EXPECT($L114, 'JSMultiLineComment "/*"'), $Q($S($N($EXPECT($L115, 'JSMultiLineComment "*/"')), $EXPECT($R59, "JSMultiLineComment /./"))), $EXPECT($L115, 'JSMultiLineComment "*/"'))), function($skip, $loc, $0, $1) {
|
|
11285
11386
|
return { type: "Comment", $loc, token: $1 };
|
|
11286
11387
|
});
|
|
11287
11388
|
function JSMultiLineComment(ctx, state) {
|
|
@@ -11327,7 +11428,7 @@ ${input.slice(result.pos)}
|
|
|
11327
11428
|
var NonNewlineWhitespace$0 = $TR($EXPECT($R65, "NonNewlineWhitespace /[ \\t]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
|
|
11328
11429
|
return { $loc, token: $0 };
|
|
11329
11430
|
});
|
|
11330
|
-
var NonNewlineWhitespace$1 = $T($S($EXPECT($
|
|
11431
|
+
var NonNewlineWhitespace$1 = $T($S($EXPECT($L116, 'NonNewlineWhitespace "\\\\\\\\"'), CoffeeLineContinuationEnabled, EOL), function(value) {
|
|
11331
11432
|
return " ";
|
|
11332
11433
|
});
|
|
11333
11434
|
var NonNewlineWhitespace$$ = [NonNewlineWhitespace$0, NonNewlineWhitespace$1];
|
|
@@ -11373,7 +11474,7 @@ ${input.slice(result.pos)}
|
|
|
11373
11474
|
}
|
|
11374
11475
|
var StatementDelimiter$0 = $Y(EOS);
|
|
11375
11476
|
var StatementDelimiter$1 = SemicolonDelimiter;
|
|
11376
|
-
var StatementDelimiter$2 = $Y($S($E(_), $C($EXPECT($L29, 'StatementDelimiter "}"'), $EXPECT($
|
|
11477
|
+
var StatementDelimiter$2 = $Y($S($E(_), $C($EXPECT($L29, 'StatementDelimiter "}"'), $EXPECT($L117, 'StatementDelimiter ")"'), $EXPECT($L38, 'StatementDelimiter "]"'))));
|
|
11377
11478
|
var StatementDelimiter$$ = [StatementDelimiter$0, StatementDelimiter$1, StatementDelimiter$2];
|
|
11378
11479
|
function StatementDelimiter(ctx, state) {
|
|
11379
11480
|
return $EVENT_C(ctx, state, "StatementDelimiter", StatementDelimiter$$);
|
|
@@ -11397,7 +11498,7 @@ ${input.slice(result.pos)}
|
|
|
11397
11498
|
function Loc(ctx, state) {
|
|
11398
11499
|
return $EVENT(ctx, state, "Loc", Loc$0);
|
|
11399
11500
|
}
|
|
11400
|
-
var Abstract$0 = $TV($TEXT($S($EXPECT($
|
|
11501
|
+
var Abstract$0 = $TV($TEXT($S($EXPECT($L118, 'Abstract "abstract"'), NonIdContinue, $E($EXPECT($L15, 'Abstract " "')))), function($skip, $loc, $0, $1) {
|
|
11401
11502
|
return { $loc, token: $1, ts: true };
|
|
11402
11503
|
});
|
|
11403
11504
|
function Abstract(ctx, state) {
|
|
@@ -11409,43 +11510,43 @@ ${input.slice(result.pos)}
|
|
|
11409
11510
|
function Ampersand(ctx, state) {
|
|
11410
11511
|
return $EVENT(ctx, state, "Ampersand", Ampersand$0);
|
|
11411
11512
|
}
|
|
11412
|
-
var As$0 = $TS($S($EXPECT($
|
|
11513
|
+
var As$0 = $TS($S($EXPECT($L119, 'As "as"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11413
11514
|
return { $loc, token: $1 };
|
|
11414
11515
|
});
|
|
11415
11516
|
function As(ctx, state) {
|
|
11416
11517
|
return $EVENT(ctx, state, "As", As$0);
|
|
11417
11518
|
}
|
|
11418
|
-
var At$0 = $TV($EXPECT($
|
|
11519
|
+
var At$0 = $TV($EXPECT($L120, 'At "@"'), function($skip, $loc, $0, $1) {
|
|
11419
11520
|
return { $loc, token: $1 };
|
|
11420
11521
|
});
|
|
11421
11522
|
function At(ctx, state) {
|
|
11422
11523
|
return $EVENT(ctx, state, "At", At$0);
|
|
11423
11524
|
}
|
|
11424
|
-
var AtAt$0 = $TV($EXPECT($
|
|
11525
|
+
var AtAt$0 = $TV($EXPECT($L121, 'AtAt "@@"'), function($skip, $loc, $0, $1) {
|
|
11425
11526
|
return { $loc, token: "@" };
|
|
11426
11527
|
});
|
|
11427
11528
|
function AtAt(ctx, state) {
|
|
11428
11529
|
return $EVENT(ctx, state, "AtAt", AtAt$0);
|
|
11429
11530
|
}
|
|
11430
|
-
var Async$0 = $TS($S($EXPECT($
|
|
11531
|
+
var Async$0 = $TS($S($EXPECT($L122, 'Async "async"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11431
11532
|
return { $loc, token: $1, type: "Async" };
|
|
11432
11533
|
});
|
|
11433
11534
|
function Async(ctx, state) {
|
|
11434
11535
|
return $EVENT(ctx, state, "Async", Async$0);
|
|
11435
11536
|
}
|
|
11436
|
-
var Await$0 = $TS($S($EXPECT($
|
|
11537
|
+
var Await$0 = $TS($S($EXPECT($L123, 'Await "await"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11437
11538
|
return { $loc, token: $1, type: "Await" };
|
|
11438
11539
|
});
|
|
11439
11540
|
function Await(ctx, state) {
|
|
11440
11541
|
return $EVENT(ctx, state, "Await", Await$0);
|
|
11441
11542
|
}
|
|
11442
|
-
var Backtick$0 = $TV($EXPECT($
|
|
11543
|
+
var Backtick$0 = $TV($EXPECT($L124, 'Backtick "`"'), function($skip, $loc, $0, $1) {
|
|
11443
11544
|
return { $loc, token: $1 };
|
|
11444
11545
|
});
|
|
11445
11546
|
function Backtick(ctx, state) {
|
|
11446
11547
|
return $EVENT(ctx, state, "Backtick", Backtick$0);
|
|
11447
11548
|
}
|
|
11448
|
-
var By$0 = $TS($S($EXPECT($
|
|
11549
|
+
var By$0 = $TS($S($EXPECT($L125, 'By "by"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11449
11550
|
return { $loc, token: $1 };
|
|
11450
11551
|
});
|
|
11451
11552
|
function By(ctx, state) {
|
|
@@ -11457,19 +11558,19 @@ ${input.slice(result.pos)}
|
|
|
11457
11558
|
function Caret(ctx, state) {
|
|
11458
11559
|
return $EVENT(ctx, state, "Caret", Caret$0);
|
|
11459
11560
|
}
|
|
11460
|
-
var Case$0 = $TS($S($EXPECT($
|
|
11561
|
+
var Case$0 = $TS($S($EXPECT($L126, 'Case "case"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11461
11562
|
return { $loc, token: $1 };
|
|
11462
11563
|
});
|
|
11463
11564
|
function Case(ctx, state) {
|
|
11464
11565
|
return $EVENT(ctx, state, "Case", Case$0);
|
|
11465
11566
|
}
|
|
11466
|
-
var Catch$0 = $TS($S($EXPECT($
|
|
11567
|
+
var Catch$0 = $TS($S($EXPECT($L127, 'Catch "catch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11467
11568
|
return { $loc, token: $1 };
|
|
11468
11569
|
});
|
|
11469
11570
|
function Catch(ctx, state) {
|
|
11470
11571
|
return $EVENT(ctx, state, "Catch", Catch$0);
|
|
11471
11572
|
}
|
|
11472
|
-
var Class$0 = $TS($S($EXPECT($
|
|
11573
|
+
var Class$0 = $TS($S($EXPECT($L128, 'Class "class"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11473
11574
|
return { $loc, token: $1 };
|
|
11474
11575
|
});
|
|
11475
11576
|
function Class(ctx, state) {
|
|
@@ -11493,13 +11594,13 @@ ${input.slice(result.pos)}
|
|
|
11493
11594
|
function CloseBracket(ctx, state) {
|
|
11494
11595
|
return $EVENT(ctx, state, "CloseBracket", CloseBracket$0);
|
|
11495
11596
|
}
|
|
11496
|
-
var CloseParen$0 = $TV($EXPECT($
|
|
11597
|
+
var CloseParen$0 = $TV($EXPECT($L117, 'CloseParen ")"'), function($skip, $loc, $0, $1) {
|
|
11497
11598
|
return { $loc, token: $1 };
|
|
11498
11599
|
});
|
|
11499
11600
|
function CloseParen(ctx, state) {
|
|
11500
11601
|
return $EVENT(ctx, state, "CloseParen", CloseParen$0);
|
|
11501
11602
|
}
|
|
11502
|
-
var CoffeeSubstitutionStart$0 = $TV($EXPECT($
|
|
11603
|
+
var CoffeeSubstitutionStart$0 = $TV($EXPECT($L129, 'CoffeeSubstitutionStart "#{"'), function($skip, $loc, $0, $1) {
|
|
11503
11604
|
return { $loc, token: "${" };
|
|
11504
11605
|
});
|
|
11505
11606
|
function CoffeeSubstitutionStart(ctx, state) {
|
|
@@ -11517,31 +11618,31 @@ ${input.slice(result.pos)}
|
|
|
11517
11618
|
function Comma(ctx, state) {
|
|
11518
11619
|
return $EVENT(ctx, state, "Comma", Comma$0);
|
|
11519
11620
|
}
|
|
11520
|
-
var ConstructorShorthand$0 = $TV($EXPECT($
|
|
11621
|
+
var ConstructorShorthand$0 = $TV($EXPECT($L120, 'ConstructorShorthand "@"'), function($skip, $loc, $0, $1) {
|
|
11521
11622
|
return { $loc, token: "constructor" };
|
|
11522
11623
|
});
|
|
11523
11624
|
function ConstructorShorthand(ctx, state) {
|
|
11524
11625
|
return $EVENT(ctx, state, "ConstructorShorthand", ConstructorShorthand$0);
|
|
11525
11626
|
}
|
|
11526
|
-
var Declare$0 = $TS($S($EXPECT($
|
|
11627
|
+
var Declare$0 = $TS($S($EXPECT($L130, 'Declare "declare"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11527
11628
|
return { $loc, token: $1 };
|
|
11528
11629
|
});
|
|
11529
11630
|
function Declare(ctx, state) {
|
|
11530
11631
|
return $EVENT(ctx, state, "Declare", Declare$0);
|
|
11531
11632
|
}
|
|
11532
|
-
var Default$0 = $TS($S($EXPECT($
|
|
11633
|
+
var Default$0 = $TS($S($EXPECT($L131, 'Default "default"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11533
11634
|
return { $loc, token: $1 };
|
|
11534
11635
|
});
|
|
11535
11636
|
function Default(ctx, state) {
|
|
11536
11637
|
return $EVENT(ctx, state, "Default", Default$0);
|
|
11537
11638
|
}
|
|
11538
|
-
var Delete$0 = $TS($S($EXPECT($
|
|
11639
|
+
var Delete$0 = $TS($S($EXPECT($L132, 'Delete "delete"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11539
11640
|
return { $loc, token: $1 };
|
|
11540
11641
|
});
|
|
11541
11642
|
function Delete(ctx, state) {
|
|
11542
11643
|
return $EVENT(ctx, state, "Delete", Delete$0);
|
|
11543
11644
|
}
|
|
11544
|
-
var Do$0 = $TS($S($EXPECT($
|
|
11645
|
+
var Do$0 = $TS($S($EXPECT($L133, 'Do "do"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11545
11646
|
return { $loc, token: $1 };
|
|
11546
11647
|
});
|
|
11547
11648
|
function Do(ctx, state) {
|
|
@@ -11561,45 +11662,45 @@ ${input.slice(result.pos)}
|
|
|
11561
11662
|
function Dot(ctx, state) {
|
|
11562
11663
|
return $EVENT_C(ctx, state, "Dot", Dot$$);
|
|
11563
11664
|
}
|
|
11564
|
-
var DotDot$0 = $TS($S($EXPECT($
|
|
11665
|
+
var DotDot$0 = $TS($S($EXPECT($L134, 'DotDot ".."'), $N($EXPECT($L7, 'DotDot "."'))), function($skip, $loc, $0, $1, $2) {
|
|
11565
11666
|
return { $loc, token: $1 };
|
|
11566
11667
|
});
|
|
11567
|
-
var DotDot$1 = $TV($EXPECT($
|
|
11668
|
+
var DotDot$1 = $TV($EXPECT($L135, 'DotDot "\u2025"'), function($skip, $loc, $0, $1) {
|
|
11568
11669
|
return { $loc, token: ".." };
|
|
11569
11670
|
});
|
|
11570
11671
|
var DotDot$$ = [DotDot$0, DotDot$1];
|
|
11571
11672
|
function DotDot(ctx, state) {
|
|
11572
11673
|
return $EVENT_C(ctx, state, "DotDot", DotDot$$);
|
|
11573
11674
|
}
|
|
11574
|
-
var DotDotDot$0 = $TV($EXPECT($
|
|
11675
|
+
var DotDotDot$0 = $TV($EXPECT($L136, 'DotDotDot "..."'), function($skip, $loc, $0, $1) {
|
|
11575
11676
|
return { $loc, token: $1 };
|
|
11576
11677
|
});
|
|
11577
|
-
var DotDotDot$1 = $TV($EXPECT($
|
|
11678
|
+
var DotDotDot$1 = $TV($EXPECT($L137, 'DotDotDot "\u2026"'), function($skip, $loc, $0, $1) {
|
|
11578
11679
|
return { $loc, token: "..." };
|
|
11579
11680
|
});
|
|
11580
11681
|
var DotDotDot$$ = [DotDotDot$0, DotDotDot$1];
|
|
11581
11682
|
function DotDotDot(ctx, state) {
|
|
11582
11683
|
return $EVENT_C(ctx, state, "DotDotDot", DotDotDot$$);
|
|
11583
11684
|
}
|
|
11584
|
-
var DoubleColon$0 = $TV($EXPECT($
|
|
11685
|
+
var DoubleColon$0 = $TV($EXPECT($L138, 'DoubleColon "::"'), function($skip, $loc, $0, $1) {
|
|
11585
11686
|
return { $loc, token: $1 };
|
|
11586
11687
|
});
|
|
11587
11688
|
function DoubleColon(ctx, state) {
|
|
11588
11689
|
return $EVENT(ctx, state, "DoubleColon", DoubleColon$0);
|
|
11589
11690
|
}
|
|
11590
|
-
var DoubleQuote$0 = $TV($EXPECT($
|
|
11691
|
+
var DoubleQuote$0 = $TV($EXPECT($L139, 'DoubleQuote "\\\\\\""'), function($skip, $loc, $0, $1) {
|
|
11591
11692
|
return { $loc, token: $1 };
|
|
11592
11693
|
});
|
|
11593
11694
|
function DoubleQuote(ctx, state) {
|
|
11594
11695
|
return $EVENT(ctx, state, "DoubleQuote", DoubleQuote$0);
|
|
11595
11696
|
}
|
|
11596
|
-
var Each$0 = $TS($S($EXPECT($
|
|
11697
|
+
var Each$0 = $TS($S($EXPECT($L140, 'Each "each"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11597
11698
|
return { $loc, token: $1 };
|
|
11598
11699
|
});
|
|
11599
11700
|
function Each(ctx, state) {
|
|
11600
11701
|
return $EVENT(ctx, state, "Each", Each$0);
|
|
11601
11702
|
}
|
|
11602
|
-
var Else$0 = $TS($S($EXPECT($
|
|
11703
|
+
var Else$0 = $TS($S($EXPECT($L141, 'Else "else"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11603
11704
|
return { $loc, token: $1 };
|
|
11604
11705
|
});
|
|
11605
11706
|
function Else(ctx, state) {
|
|
@@ -11617,55 +11718,55 @@ ${input.slice(result.pos)}
|
|
|
11617
11718
|
function ExclamationPoint(ctx, state) {
|
|
11618
11719
|
return $EVENT(ctx, state, "ExclamationPoint", ExclamationPoint$0);
|
|
11619
11720
|
}
|
|
11620
|
-
var Export$0 = $TS($S($EXPECT($
|
|
11721
|
+
var Export$0 = $TS($S($EXPECT($L142, 'Export "export"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11621
11722
|
return { $loc, token: $1 };
|
|
11622
11723
|
});
|
|
11623
11724
|
function Export(ctx, state) {
|
|
11624
11725
|
return $EVENT(ctx, state, "Export", Export$0);
|
|
11625
11726
|
}
|
|
11626
|
-
var Extends$0 = $TS($S($EXPECT($
|
|
11727
|
+
var Extends$0 = $TS($S($EXPECT($L143, 'Extends "extends"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11627
11728
|
return { $loc, token: $1 };
|
|
11628
11729
|
});
|
|
11629
11730
|
function Extends(ctx, state) {
|
|
11630
11731
|
return $EVENT(ctx, state, "Extends", Extends$0);
|
|
11631
11732
|
}
|
|
11632
|
-
var Finally$0 = $TS($S($EXPECT($
|
|
11733
|
+
var Finally$0 = $TS($S($EXPECT($L144, 'Finally "finally"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11633
11734
|
return { $loc, token: $1 };
|
|
11634
11735
|
});
|
|
11635
11736
|
function Finally(ctx, state) {
|
|
11636
11737
|
return $EVENT(ctx, state, "Finally", Finally$0);
|
|
11637
11738
|
}
|
|
11638
|
-
var For$0 = $TS($S($EXPECT($
|
|
11739
|
+
var For$0 = $TS($S($EXPECT($L145, 'For "for"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11639
11740
|
return { $loc, token: $1 };
|
|
11640
11741
|
});
|
|
11641
11742
|
function For(ctx, state) {
|
|
11642
11743
|
return $EVENT(ctx, state, "For", For$0);
|
|
11643
11744
|
}
|
|
11644
|
-
var From$0 = $TS($S($EXPECT($
|
|
11745
|
+
var From$0 = $TS($S($EXPECT($L146, 'From "from"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11645
11746
|
return { $loc, token: $1 };
|
|
11646
11747
|
});
|
|
11647
11748
|
function From(ctx, state) {
|
|
11648
11749
|
return $EVENT(ctx, state, "From", From$0);
|
|
11649
11750
|
}
|
|
11650
|
-
var Function$0 = $TS($S($EXPECT($
|
|
11751
|
+
var Function$0 = $TS($S($EXPECT($L147, 'Function "function"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11651
11752
|
return { $loc, token: $1 };
|
|
11652
11753
|
});
|
|
11653
11754
|
function Function(ctx, state) {
|
|
11654
11755
|
return $EVENT(ctx, state, "Function", Function$0);
|
|
11655
11756
|
}
|
|
11656
|
-
var GetOrSet$0 = $TS($S($C($EXPECT($
|
|
11757
|
+
var GetOrSet$0 = $TS($S($C($EXPECT($L148, 'GetOrSet "get"'), $EXPECT($L149, 'GetOrSet "set"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11657
11758
|
return { $loc, token: $1, type: "GetOrSet" };
|
|
11658
11759
|
});
|
|
11659
11760
|
function GetOrSet(ctx, state) {
|
|
11660
11761
|
return $EVENT(ctx, state, "GetOrSet", GetOrSet$0);
|
|
11661
11762
|
}
|
|
11662
|
-
var Hash$0 = $TV($EXPECT($
|
|
11763
|
+
var Hash$0 = $TV($EXPECT($L150, 'Hash "#"'), function($skip, $loc, $0, $1) {
|
|
11663
11764
|
return { $loc, token: $1 };
|
|
11664
11765
|
});
|
|
11665
11766
|
function Hash(ctx, state) {
|
|
11666
11767
|
return $EVENT(ctx, state, "Hash", Hash$0);
|
|
11667
11768
|
}
|
|
11668
|
-
var If$0 = $TV($TEXT($S($EXPECT($
|
|
11769
|
+
var If$0 = $TV($TEXT($S($EXPECT($L151, 'If "if"'), NonIdContinue, $E($EXPECT($L15, 'If " "')))), function($skip, $loc, $0, $1) {
|
|
11669
11770
|
return { $loc, token: $1 };
|
|
11670
11771
|
});
|
|
11671
11772
|
function If(ctx, state) {
|
|
@@ -11677,25 +11778,31 @@ ${input.slice(result.pos)}
|
|
|
11677
11778
|
function Import(ctx, state) {
|
|
11678
11779
|
return $EVENT(ctx, state, "Import", Import$0);
|
|
11679
11780
|
}
|
|
11680
|
-
var In$0 = $TS($S($EXPECT($
|
|
11781
|
+
var In$0 = $TS($S($EXPECT($L152, 'In "in"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11681
11782
|
return { $loc, token: $1 };
|
|
11682
11783
|
});
|
|
11683
11784
|
function In(ctx, state) {
|
|
11684
11785
|
return $EVENT(ctx, state, "In", In$0);
|
|
11685
11786
|
}
|
|
11686
|
-
var
|
|
11787
|
+
var Infer$0 = $TS($S($EXPECT($L153, 'Infer "infer"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11788
|
+
return { $loc, token: $1 };
|
|
11789
|
+
});
|
|
11790
|
+
function Infer(ctx, state) {
|
|
11791
|
+
return $EVENT(ctx, state, "Infer", Infer$0);
|
|
11792
|
+
}
|
|
11793
|
+
var LetOrConst$0 = $TS($S($C($EXPECT($L154, 'LetOrConst "let"'), $EXPECT($L155, 'LetOrConst "const"')), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11687
11794
|
return { $loc, token: $1 };
|
|
11688
11795
|
});
|
|
11689
11796
|
function LetOrConst(ctx, state) {
|
|
11690
11797
|
return $EVENT(ctx, state, "LetOrConst", LetOrConst$0);
|
|
11691
11798
|
}
|
|
11692
|
-
var Const$0 = $TS($S($EXPECT($
|
|
11799
|
+
var Const$0 = $TS($S($EXPECT($L155, 'Const "const"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11693
11800
|
return { $loc, token: $1 };
|
|
11694
11801
|
});
|
|
11695
11802
|
function Const(ctx, state) {
|
|
11696
11803
|
return $EVENT(ctx, state, "Const", Const$0);
|
|
11697
11804
|
}
|
|
11698
|
-
var Is$0 = $TS($S($EXPECT($
|
|
11805
|
+
var Is$0 = $TS($S($EXPECT($L156, 'Is "is"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11699
11806
|
return { $loc, token: $1 };
|
|
11700
11807
|
});
|
|
11701
11808
|
function Is(ctx, state) {
|
|
@@ -11707,25 +11814,25 @@ ${input.slice(result.pos)}
|
|
|
11707
11814
|
function LetOrConstOrVar(ctx, state) {
|
|
11708
11815
|
return $EVENT_C(ctx, state, "LetOrConstOrVar", LetOrConstOrVar$$);
|
|
11709
11816
|
}
|
|
11710
|
-
var Loop$0 = $TS($S($EXPECT($
|
|
11817
|
+
var Loop$0 = $TS($S($EXPECT($L157, 'Loop "loop"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11711
11818
|
return { $loc, token: "while(true)" };
|
|
11712
11819
|
});
|
|
11713
11820
|
function Loop(ctx, state) {
|
|
11714
11821
|
return $EVENT(ctx, state, "Loop", Loop$0);
|
|
11715
11822
|
}
|
|
11716
|
-
var New$0 = $TS($S($EXPECT($
|
|
11823
|
+
var New$0 = $TS($S($EXPECT($L158, 'New "new"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11717
11824
|
return { $loc, token: $1 };
|
|
11718
11825
|
});
|
|
11719
11826
|
function New(ctx, state) {
|
|
11720
11827
|
return $EVENT(ctx, state, "New", New$0);
|
|
11721
11828
|
}
|
|
11722
|
-
var Not$0 = $TS($S($EXPECT($
|
|
11829
|
+
var Not$0 = $TS($S($EXPECT($L159, 'Not "not"'), NonIdContinue, $N($S($E(_), $EXPECT($L14, 'Not ":"')))), function($skip, $loc, $0, $1, $2, $3) {
|
|
11723
11830
|
return { $loc, token: "!" };
|
|
11724
11831
|
});
|
|
11725
11832
|
function Not(ctx, state) {
|
|
11726
11833
|
return $EVENT(ctx, state, "Not", Not$0);
|
|
11727
11834
|
}
|
|
11728
|
-
var Of$0 = $TS($S($EXPECT($
|
|
11835
|
+
var Of$0 = $TS($S($EXPECT($L160, 'Of "of"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11729
11836
|
return { $loc, token: $1 };
|
|
11730
11837
|
});
|
|
11731
11838
|
function Of(ctx, state) {
|
|
@@ -11743,7 +11850,7 @@ ${input.slice(result.pos)}
|
|
|
11743
11850
|
function OpenBrace(ctx, state) {
|
|
11744
11851
|
return $EVENT(ctx, state, "OpenBrace", OpenBrace$0);
|
|
11745
11852
|
}
|
|
11746
|
-
var OpenBracket$0 = $TV($EXPECT($
|
|
11853
|
+
var OpenBracket$0 = $TV($EXPECT($L161, 'OpenBracket "["'), function($skip, $loc, $0, $1) {
|
|
11747
11854
|
return { $loc, token: $1 };
|
|
11748
11855
|
});
|
|
11749
11856
|
function OpenBracket(ctx, state) {
|
|
@@ -11755,43 +11862,43 @@ ${input.slice(result.pos)}
|
|
|
11755
11862
|
function OpenParen(ctx, state) {
|
|
11756
11863
|
return $EVENT(ctx, state, "OpenParen", OpenParen$0);
|
|
11757
11864
|
}
|
|
11758
|
-
var Operator$0 = $TS($S($EXPECT($
|
|
11865
|
+
var Operator$0 = $TS($S($EXPECT($L162, 'Operator "operator"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11759
11866
|
return { $loc, token: $1 };
|
|
11760
11867
|
});
|
|
11761
11868
|
function Operator(ctx, state) {
|
|
11762
11869
|
return $EVENT(ctx, state, "Operator", Operator$0);
|
|
11763
11870
|
}
|
|
11764
|
-
var Own$0 = $TS($S($EXPECT($
|
|
11871
|
+
var Own$0 = $TS($S($EXPECT($L163, 'Own "own"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11765
11872
|
return { $loc, token: $1 };
|
|
11766
11873
|
});
|
|
11767
11874
|
function Own(ctx, state) {
|
|
11768
11875
|
return $EVENT(ctx, state, "Own", Own$0);
|
|
11769
11876
|
}
|
|
11770
|
-
var Public$0 = $TS($S($EXPECT($
|
|
11877
|
+
var Public$0 = $TS($S($EXPECT($L164, 'Public "public"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11771
11878
|
return { $loc, token: $1 };
|
|
11772
11879
|
});
|
|
11773
11880
|
function Public(ctx, state) {
|
|
11774
11881
|
return $EVENT(ctx, state, "Public", Public$0);
|
|
11775
11882
|
}
|
|
11776
|
-
var Private$0 = $TS($S($EXPECT($
|
|
11883
|
+
var Private$0 = $TS($S($EXPECT($L165, 'Private "private"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11777
11884
|
return { $loc, token: $1 };
|
|
11778
11885
|
});
|
|
11779
11886
|
function Private(ctx, state) {
|
|
11780
11887
|
return $EVENT(ctx, state, "Private", Private$0);
|
|
11781
11888
|
}
|
|
11782
|
-
var Protected$0 = $TS($S($EXPECT($
|
|
11889
|
+
var Protected$0 = $TS($S($EXPECT($L166, 'Protected "protected"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11783
11890
|
return { $loc, token: $1 };
|
|
11784
11891
|
});
|
|
11785
11892
|
function Protected(ctx, state) {
|
|
11786
11893
|
return $EVENT(ctx, state, "Protected", Protected$0);
|
|
11787
11894
|
}
|
|
11788
|
-
var Pipe$0 = $TV($C($EXPECT($
|
|
11895
|
+
var Pipe$0 = $TV($C($EXPECT($L167, 'Pipe "||>"'), $EXPECT($L168, 'Pipe "|\u25B7"')), function($skip, $loc, $0, $1) {
|
|
11789
11896
|
return { $loc, token: "||>" };
|
|
11790
11897
|
});
|
|
11791
|
-
var Pipe$1 = $TV($C($EXPECT($
|
|
11898
|
+
var Pipe$1 = $TV($C($EXPECT($L169, 'Pipe "|>="'), $EXPECT($L170, 'Pipe "\u25B7="')), function($skip, $loc, $0, $1) {
|
|
11792
11899
|
return { $loc, token: "|>=" };
|
|
11793
11900
|
});
|
|
11794
|
-
var Pipe$2 = $TV($C($EXPECT($
|
|
11901
|
+
var Pipe$2 = $TV($C($EXPECT($L171, 'Pipe "|>"'), $EXPECT($L172, 'Pipe "\u25B7"')), function($skip, $loc, $0, $1) {
|
|
11795
11902
|
return { $loc, token: "|>" };
|
|
11796
11903
|
});
|
|
11797
11904
|
var Pipe$$ = [Pipe$0, Pipe$1, Pipe$2];
|
|
@@ -11804,31 +11911,31 @@ ${input.slice(result.pos)}
|
|
|
11804
11911
|
function QuestionMark(ctx, state) {
|
|
11805
11912
|
return $EVENT(ctx, state, "QuestionMark", QuestionMark$0);
|
|
11806
11913
|
}
|
|
11807
|
-
var Readonly$0 = $TS($S($EXPECT($
|
|
11914
|
+
var Readonly$0 = $TS($S($EXPECT($L173, 'Readonly "readonly"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11808
11915
|
return { $loc, token: $1, ts: true };
|
|
11809
11916
|
});
|
|
11810
11917
|
function Readonly(ctx, state) {
|
|
11811
11918
|
return $EVENT(ctx, state, "Readonly", Readonly$0);
|
|
11812
11919
|
}
|
|
11813
|
-
var Return$0 = $TS($S($EXPECT($
|
|
11920
|
+
var Return$0 = $TS($S($EXPECT($L174, 'Return "return"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11814
11921
|
return { $loc, token: $1 };
|
|
11815
11922
|
});
|
|
11816
11923
|
function Return(ctx, state) {
|
|
11817
11924
|
return $EVENT(ctx, state, "Return", Return$0);
|
|
11818
11925
|
}
|
|
11819
|
-
var Satisfies$0 = $TS($S($EXPECT($
|
|
11926
|
+
var Satisfies$0 = $TS($S($EXPECT($L175, 'Satisfies "satisfies"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11820
11927
|
return { $loc, token: $1 };
|
|
11821
11928
|
});
|
|
11822
11929
|
function Satisfies(ctx, state) {
|
|
11823
11930
|
return $EVENT(ctx, state, "Satisfies", Satisfies$0);
|
|
11824
11931
|
}
|
|
11825
|
-
var Semicolon$0 = $TV($EXPECT($
|
|
11932
|
+
var Semicolon$0 = $TV($EXPECT($L104, 'Semicolon ";"'), function($skip, $loc, $0, $1) {
|
|
11826
11933
|
return { $loc, token: $1 };
|
|
11827
11934
|
});
|
|
11828
11935
|
function Semicolon(ctx, state) {
|
|
11829
11936
|
return $EVENT(ctx, state, "Semicolon", Semicolon$0);
|
|
11830
11937
|
}
|
|
11831
|
-
var SingleQuote$0 = $TV($EXPECT($
|
|
11938
|
+
var SingleQuote$0 = $TV($EXPECT($L176, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
|
|
11832
11939
|
return { $loc, token: $1 };
|
|
11833
11940
|
});
|
|
11834
11941
|
function SingleQuote(ctx, state) {
|
|
@@ -11840,137 +11947,137 @@ ${input.slice(result.pos)}
|
|
|
11840
11947
|
function Star(ctx, state) {
|
|
11841
11948
|
return $EVENT(ctx, state, "Star", Star$0);
|
|
11842
11949
|
}
|
|
11843
|
-
var Static$0 = $TS($S($EXPECT($
|
|
11950
|
+
var Static$0 = $TS($S($EXPECT($L177, 'Static "static"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11844
11951
|
return { $loc, token: $1 };
|
|
11845
11952
|
});
|
|
11846
|
-
var Static$1 = $TS($S($EXPECT($
|
|
11953
|
+
var Static$1 = $TS($S($EXPECT($L120, 'Static "@"'), $N($C($EXPECT($L4, 'Static "("'), $EXPECT($L120, 'Static "@"')))), function($skip, $loc, $0, $1, $2) {
|
|
11847
11954
|
return { $loc, token: "static " };
|
|
11848
11955
|
});
|
|
11849
11956
|
var Static$$ = [Static$0, Static$1];
|
|
11850
11957
|
function Static(ctx, state) {
|
|
11851
11958
|
return $EVENT_C(ctx, state, "Static", Static$$);
|
|
11852
11959
|
}
|
|
11853
|
-
var SubstitutionStart$0 = $TV($EXPECT($
|
|
11960
|
+
var SubstitutionStart$0 = $TV($EXPECT($L178, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
|
|
11854
11961
|
return { $loc, token: $1 };
|
|
11855
11962
|
});
|
|
11856
11963
|
function SubstitutionStart(ctx, state) {
|
|
11857
11964
|
return $EVENT(ctx, state, "SubstitutionStart", SubstitutionStart$0);
|
|
11858
11965
|
}
|
|
11859
|
-
var Super$0 = $TS($S($EXPECT($
|
|
11966
|
+
var Super$0 = $TS($S($EXPECT($L179, 'Super "super"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11860
11967
|
return { $loc, token: $1 };
|
|
11861
11968
|
});
|
|
11862
11969
|
function Super(ctx, state) {
|
|
11863
11970
|
return $EVENT(ctx, state, "Super", Super$0);
|
|
11864
11971
|
}
|
|
11865
|
-
var Switch$0 = $TS($S($EXPECT($
|
|
11972
|
+
var Switch$0 = $TS($S($EXPECT($L180, 'Switch "switch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11866
11973
|
return { $loc, token: $1 };
|
|
11867
11974
|
});
|
|
11868
11975
|
function Switch(ctx, state) {
|
|
11869
11976
|
return $EVENT(ctx, state, "Switch", Switch$0);
|
|
11870
11977
|
}
|
|
11871
|
-
var Target$0 = $TS($S($EXPECT($
|
|
11978
|
+
var Target$0 = $TS($S($EXPECT($L181, 'Target "target"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11872
11979
|
return { $loc, token: $1 };
|
|
11873
11980
|
});
|
|
11874
11981
|
function Target(ctx, state) {
|
|
11875
11982
|
return $EVENT(ctx, state, "Target", Target$0);
|
|
11876
11983
|
}
|
|
11877
|
-
var Then$0 = $TS($S(__, $EXPECT($
|
|
11984
|
+
var Then$0 = $TS($S(__, $EXPECT($L182, 'Then "then"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
|
|
11878
11985
|
return { $loc, token: "" };
|
|
11879
11986
|
});
|
|
11880
11987
|
function Then(ctx, state) {
|
|
11881
11988
|
return $EVENT(ctx, state, "Then", Then$0);
|
|
11882
11989
|
}
|
|
11883
|
-
var This$0 = $TS($S($EXPECT($
|
|
11990
|
+
var This$0 = $TS($S($EXPECT($L183, 'This "this"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11884
11991
|
return { $loc, token: $1 };
|
|
11885
11992
|
});
|
|
11886
11993
|
function This(ctx, state) {
|
|
11887
11994
|
return $EVENT(ctx, state, "This", This$0);
|
|
11888
11995
|
}
|
|
11889
|
-
var Throw$0 = $TS($S($EXPECT($
|
|
11996
|
+
var Throw$0 = $TS($S($EXPECT($L184, 'Throw "throw"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11890
11997
|
return { $loc, token: $1 };
|
|
11891
11998
|
});
|
|
11892
11999
|
function Throw(ctx, state) {
|
|
11893
12000
|
return $EVENT(ctx, state, "Throw", Throw$0);
|
|
11894
12001
|
}
|
|
11895
|
-
var TripleDoubleQuote$0 = $TV($EXPECT($
|
|
12002
|
+
var TripleDoubleQuote$0 = $TV($EXPECT($L185, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
|
|
11896
12003
|
return { $loc, token: "`" };
|
|
11897
12004
|
});
|
|
11898
12005
|
function TripleDoubleQuote(ctx, state) {
|
|
11899
12006
|
return $EVENT(ctx, state, "TripleDoubleQuote", TripleDoubleQuote$0);
|
|
11900
12007
|
}
|
|
11901
|
-
var TripleSingleQuote$0 = $TV($EXPECT($
|
|
12008
|
+
var TripleSingleQuote$0 = $TV($EXPECT($L186, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
|
|
11902
12009
|
return { $loc, token: "`" };
|
|
11903
12010
|
});
|
|
11904
12011
|
function TripleSingleQuote(ctx, state) {
|
|
11905
12012
|
return $EVENT(ctx, state, "TripleSingleQuote", TripleSingleQuote$0);
|
|
11906
12013
|
}
|
|
11907
|
-
var TripleSlash$0 = $TV($EXPECT($
|
|
12014
|
+
var TripleSlash$0 = $TV($EXPECT($L187, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
|
|
11908
12015
|
return { $loc, token: "/" };
|
|
11909
12016
|
});
|
|
11910
12017
|
function TripleSlash(ctx, state) {
|
|
11911
12018
|
return $EVENT(ctx, state, "TripleSlash", TripleSlash$0);
|
|
11912
12019
|
}
|
|
11913
|
-
var TripleTick$0 = $TV($EXPECT($
|
|
12020
|
+
var TripleTick$0 = $TV($EXPECT($L188, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
|
|
11914
12021
|
return { $loc, token: "`" };
|
|
11915
12022
|
});
|
|
11916
12023
|
function TripleTick(ctx, state) {
|
|
11917
12024
|
return $EVENT(ctx, state, "TripleTick", TripleTick$0);
|
|
11918
12025
|
}
|
|
11919
|
-
var Try$0 = $TS($S($EXPECT($
|
|
12026
|
+
var Try$0 = $TS($S($EXPECT($L189, 'Try "try"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11920
12027
|
return { $loc, token: $1 };
|
|
11921
12028
|
});
|
|
11922
12029
|
function Try(ctx, state) {
|
|
11923
12030
|
return $EVENT(ctx, state, "Try", Try$0);
|
|
11924
12031
|
}
|
|
11925
|
-
var Typeof$0 = $TS($S($EXPECT($
|
|
12032
|
+
var Typeof$0 = $TS($S($EXPECT($L190, 'Typeof "typeof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11926
12033
|
return { $loc, token: $1 };
|
|
11927
12034
|
});
|
|
11928
12035
|
function Typeof(ctx, state) {
|
|
11929
12036
|
return $EVENT(ctx, state, "Typeof", Typeof$0);
|
|
11930
12037
|
}
|
|
11931
|
-
var Unless$0 = $TS($S($EXPECT($
|
|
12038
|
+
var Unless$0 = $TS($S($EXPECT($L191, 'Unless "unless"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11932
12039
|
return { $loc, token: $1, negated: true };
|
|
11933
12040
|
});
|
|
11934
12041
|
function Unless(ctx, state) {
|
|
11935
12042
|
return $EVENT(ctx, state, "Unless", Unless$0);
|
|
11936
12043
|
}
|
|
11937
|
-
var Until$0 = $TS($S($EXPECT($
|
|
12044
|
+
var Until$0 = $TS($S($EXPECT($L192, 'Until "until"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11938
12045
|
return { $loc, token: $1 };
|
|
11939
12046
|
});
|
|
11940
12047
|
function Until(ctx, state) {
|
|
11941
12048
|
return $EVENT(ctx, state, "Until", Until$0);
|
|
11942
12049
|
}
|
|
11943
|
-
var Using$0 = $TS($S($EXPECT($
|
|
12050
|
+
var Using$0 = $TS($S($EXPECT($L193, 'Using "using"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11944
12051
|
return { $loc, token: $1 };
|
|
11945
12052
|
});
|
|
11946
12053
|
function Using(ctx, state) {
|
|
11947
12054
|
return $EVENT(ctx, state, "Using", Using$0);
|
|
11948
12055
|
}
|
|
11949
|
-
var Var$0 = $TS($S($EXPECT($
|
|
12056
|
+
var Var$0 = $TS($S($EXPECT($L194, 'Var "var"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11950
12057
|
return { $loc, token: $1 };
|
|
11951
12058
|
});
|
|
11952
12059
|
function Var(ctx, state) {
|
|
11953
12060
|
return $EVENT(ctx, state, "Var", Var$0);
|
|
11954
12061
|
}
|
|
11955
|
-
var Void$0 = $TS($S($EXPECT($
|
|
12062
|
+
var Void$0 = $TS($S($EXPECT($L195, 'Void "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11956
12063
|
return { $loc, token: $1 };
|
|
11957
12064
|
});
|
|
11958
12065
|
function Void(ctx, state) {
|
|
11959
12066
|
return $EVENT(ctx, state, "Void", Void$0);
|
|
11960
12067
|
}
|
|
11961
|
-
var When$0 = $TS($S($EXPECT($
|
|
12068
|
+
var When$0 = $TS($S($EXPECT($L196, 'When "when"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11962
12069
|
return { $loc, token: "case" };
|
|
11963
12070
|
});
|
|
11964
12071
|
function When(ctx, state) {
|
|
11965
12072
|
return $EVENT(ctx, state, "When", When$0);
|
|
11966
12073
|
}
|
|
11967
|
-
var While$0 = $TS($S($EXPECT($
|
|
12074
|
+
var While$0 = $TS($S($EXPECT($L197, 'While "while"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11968
12075
|
return { $loc, token: $1 };
|
|
11969
12076
|
});
|
|
11970
12077
|
function While(ctx, state) {
|
|
11971
12078
|
return $EVENT(ctx, state, "While", While$0);
|
|
11972
12079
|
}
|
|
11973
|
-
var Yield$0 = $TS($S($EXPECT($
|
|
12080
|
+
var Yield$0 = $TS($S($EXPECT($L198, 'Yield "yield"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11974
12081
|
return { $loc, token: $1, type: "Yield" };
|
|
11975
12082
|
});
|
|
11976
12083
|
function Yield(ctx, state) {
|
|
@@ -12049,7 +12156,7 @@ ${input.slice(result.pos)}
|
|
|
12049
12156
|
function JSXElement(ctx, state) {
|
|
12050
12157
|
return $EVENT_C(ctx, state, "JSXElement", JSXElement$$);
|
|
12051
12158
|
}
|
|
12052
|
-
var JSXSelfClosingElement$0 = $TS($S($EXPECT($L16, 'JSXSelfClosingElement "<"'), JSXElementName, $E(TypeArguments), $E(JSXAttributes), $E(Whitespace), $EXPECT($
|
|
12159
|
+
var JSXSelfClosingElement$0 = $TS($S($EXPECT($L16, 'JSXSelfClosingElement "<"'), JSXElementName, $E(TypeArguments), $E(JSXAttributes), $E(Whitespace), $EXPECT($L199, 'JSXSelfClosingElement "/>"')), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
12053
12160
|
return { type: "JSXElement", children: $0, tag: $2 };
|
|
12054
12161
|
});
|
|
12055
12162
|
function JSXSelfClosingElement(ctx, state) {
|
|
@@ -12083,7 +12190,7 @@ ${input.slice(result.pos)}
|
|
|
12083
12190
|
function JSXOptionalClosingElement(ctx, state) {
|
|
12084
12191
|
return $EVENT_C(ctx, state, "JSXOptionalClosingElement", JSXOptionalClosingElement$$);
|
|
12085
12192
|
}
|
|
12086
|
-
var JSXClosingElement$0 = $S($EXPECT($
|
|
12193
|
+
var JSXClosingElement$0 = $S($EXPECT($L200, 'JSXClosingElement "</"'), $E(Whitespace), JSXElementName, $E(Whitespace), $EXPECT($L37, 'JSXClosingElement ">"'));
|
|
12087
12194
|
function JSXClosingElement(ctx, state) {
|
|
12088
12195
|
return $EVENT(ctx, state, "JSXClosingElement", JSXClosingElement$0);
|
|
12089
12196
|
}
|
|
@@ -12104,7 +12211,7 @@ ${input.slice(result.pos)}
|
|
|
12104
12211
|
];
|
|
12105
12212
|
return { type: "JSXFragment", children: parts, jsxChildren: children.jsxChildren };
|
|
12106
12213
|
});
|
|
12107
|
-
var JSXFragment$1 = $TS($S(CoffeeJSXEnabled, $EXPECT($
|
|
12214
|
+
var JSXFragment$1 = $TS($S(CoffeeJSXEnabled, $EXPECT($L201, 'JSXFragment "<>"'), $E(JSXChildren), $E(Whitespace), JSXClosingFragment), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
12108
12215
|
var children = $3;
|
|
12109
12216
|
$0 = $0.slice(1);
|
|
12110
12217
|
return {
|
|
@@ -12117,7 +12224,7 @@ ${input.slice(result.pos)}
|
|
|
12117
12224
|
function JSXFragment(ctx, state) {
|
|
12118
12225
|
return $EVENT_C(ctx, state, "JSXFragment", JSXFragment$$);
|
|
12119
12226
|
}
|
|
12120
|
-
var PushJSXOpeningFragment$0 = $TV($EXPECT($
|
|
12227
|
+
var PushJSXOpeningFragment$0 = $TV($EXPECT($L201, 'PushJSXOpeningFragment "<>"'), function($skip, $loc, $0, $1) {
|
|
12121
12228
|
module.JSXTagStack.push("");
|
|
12122
12229
|
return $1;
|
|
12123
12230
|
});
|
|
@@ -12134,11 +12241,11 @@ ${input.slice(result.pos)}
|
|
|
12134
12241
|
function JSXOptionalClosingFragment(ctx, state) {
|
|
12135
12242
|
return $EVENT_C(ctx, state, "JSXOptionalClosingFragment", JSXOptionalClosingFragment$$);
|
|
12136
12243
|
}
|
|
12137
|
-
var JSXClosingFragment$0 = $EXPECT($
|
|
12244
|
+
var JSXClosingFragment$0 = $EXPECT($L202, 'JSXClosingFragment "</>"');
|
|
12138
12245
|
function JSXClosingFragment(ctx, state) {
|
|
12139
12246
|
return $EVENT(ctx, state, "JSXClosingFragment", JSXClosingFragment$0);
|
|
12140
12247
|
}
|
|
12141
|
-
var JSXElementName$0 = $TV($Y($S($C($EXPECT($
|
|
12248
|
+
var JSXElementName$0 = $TV($Y($S($C($EXPECT($L150, 'JSXElementName "#"'), Dot), JSXShorthandString)), function($skip, $loc, $0, $1) {
|
|
12142
12249
|
return module.config.defaultElement;
|
|
12143
12250
|
});
|
|
12144
12251
|
var JSXElementName$1 = $TEXT($S(JSXIdentifierName, $C($S(Colon, JSXIdentifierName), $Q($S(Dot, JSXIdentifierName)))));
|
|
@@ -12316,7 +12423,7 @@ ${input.slice(result.pos)}
|
|
|
12316
12423
|
}
|
|
12317
12424
|
return $skip;
|
|
12318
12425
|
});
|
|
12319
|
-
var JSXAttribute$5 = $TS($S($EXPECT($
|
|
12426
|
+
var JSXAttribute$5 = $TS($S($EXPECT($L150, 'JSXAttribute "#"'), JSXShorthandString), function($skip, $loc, $0, $1, $2) {
|
|
12320
12427
|
return [" ", "id=", $2];
|
|
12321
12428
|
});
|
|
12322
12429
|
var JSXAttribute$6 = $TS($S(Dot, JSXShorthandString), function($skip, $loc, $0, $1, $2) {
|
|
@@ -12608,7 +12715,7 @@ ${input.slice(result.pos)}
|
|
|
12608
12715
|
function JSXChild(ctx, state) {
|
|
12609
12716
|
return $EVENT_C(ctx, state, "JSXChild", JSXChild$$);
|
|
12610
12717
|
}
|
|
12611
|
-
var JSXComment$0 = $TS($S($EXPECT($
|
|
12718
|
+
var JSXComment$0 = $TS($S($EXPECT($L203, 'JSXComment "<!--"'), JSXCommentContent, $EXPECT($L204, 'JSXComment "-->"')), function($skip, $loc, $0, $1, $2, $3) {
|
|
12612
12719
|
return ["{/*", $2, "*/}"];
|
|
12613
12720
|
});
|
|
12614
12721
|
function JSXComment(ctx, state) {
|
|
@@ -12695,21 +12802,66 @@ ${input.slice(result.pos)}
|
|
|
12695
12802
|
var TypeDeclaration$0 = $T($S($E($S(Export, $E(_))), $S(Declare, $E(_)), TypeLexicalDeclaration), function(value) {
|
|
12696
12803
|
return { "ts": true, "children": value };
|
|
12697
12804
|
});
|
|
12698
|
-
var TypeDeclaration$1 = $
|
|
12699
|
-
|
|
12805
|
+
var TypeDeclaration$1 = $TS($S($E($S(Export, $E(_))), $E($S(Declare, $E(_))), TypeDeclarationRest), function($skip, $loc, $0, $1, $2, $3) {
|
|
12806
|
+
var export_ = $1;
|
|
12807
|
+
var declare = $2;
|
|
12808
|
+
var t = $3;
|
|
12809
|
+
return {
|
|
12810
|
+
...t,
|
|
12811
|
+
ts: true,
|
|
12812
|
+
export: export_,
|
|
12813
|
+
declare,
|
|
12814
|
+
children: [export_, declare, ...t.children]
|
|
12815
|
+
};
|
|
12700
12816
|
});
|
|
12701
12817
|
var TypeDeclaration$$ = [TypeDeclaration$0, TypeDeclaration$1];
|
|
12702
12818
|
function TypeDeclaration(ctx, state) {
|
|
12703
12819
|
return $EVENT_C(ctx, state, "TypeDeclaration", TypeDeclaration$$);
|
|
12704
12820
|
}
|
|
12705
|
-
var TypeDeclarationRest$0 =
|
|
12706
|
-
var TypeDeclarationRest$1 =
|
|
12707
|
-
var TypeDeclarationRest$2 =
|
|
12821
|
+
var TypeDeclarationRest$0 = TypeAliasDeclaration;
|
|
12822
|
+
var TypeDeclarationRest$1 = InterfaceDeclaration;
|
|
12823
|
+
var TypeDeclarationRest$2 = NamespaceDeclaration;
|
|
12708
12824
|
var TypeDeclarationRest$3 = FunctionSignature;
|
|
12709
12825
|
var TypeDeclarationRest$$ = [TypeDeclarationRest$0, TypeDeclarationRest$1, TypeDeclarationRest$2, TypeDeclarationRest$3];
|
|
12710
12826
|
function TypeDeclarationRest(ctx, state) {
|
|
12711
12827
|
return $EVENT_C(ctx, state, "TypeDeclarationRest", TypeDeclarationRest$$);
|
|
12712
12828
|
}
|
|
12829
|
+
var TypeAliasDeclaration$0 = $TS($S(TypeKeyword, $E(_), IdentifierName, $E(TypeParameters), OptionalEquals, $C($S($E(_), Type), $S(__, Type))), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
12830
|
+
var id = $3;
|
|
12831
|
+
return {
|
|
12832
|
+
type: "TypeDeclaration",
|
|
12833
|
+
id,
|
|
12834
|
+
children: $0,
|
|
12835
|
+
ts: true
|
|
12836
|
+
};
|
|
12837
|
+
});
|
|
12838
|
+
function TypeAliasDeclaration(ctx, state) {
|
|
12839
|
+
return $EVENT(ctx, state, "TypeAliasDeclaration", TypeAliasDeclaration$0);
|
|
12840
|
+
}
|
|
12841
|
+
var InterfaceDeclaration$0 = $TS($S(Interface, $E(_), IdentifierName, $E(TypeParameters), $E(InterfaceExtendsClause), InterfaceBlock), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
12842
|
+
var id = $3;
|
|
12843
|
+
return {
|
|
12844
|
+
type: "InterfaceDeclaration",
|
|
12845
|
+
id,
|
|
12846
|
+
children: $0,
|
|
12847
|
+
ts: true
|
|
12848
|
+
};
|
|
12849
|
+
});
|
|
12850
|
+
function InterfaceDeclaration(ctx, state) {
|
|
12851
|
+
return $EVENT(ctx, state, "InterfaceDeclaration", InterfaceDeclaration$0);
|
|
12852
|
+
}
|
|
12853
|
+
var NamespaceDeclaration$0 = $TS($S(Namespace, $E(_), IdentifierName, ModuleBlock), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
12854
|
+
var id = $3;
|
|
12855
|
+
return {
|
|
12856
|
+
type: "NamespaceDeclaration",
|
|
12857
|
+
id,
|
|
12858
|
+
children: $0,
|
|
12859
|
+
ts: true
|
|
12860
|
+
};
|
|
12861
|
+
});
|
|
12862
|
+
function NamespaceDeclaration(ctx, state) {
|
|
12863
|
+
return $EVENT(ctx, state, "NamespaceDeclaration", NamespaceDeclaration$0);
|
|
12864
|
+
}
|
|
12713
12865
|
var OptionalEquals$0 = $S(__, Equals);
|
|
12714
12866
|
var OptionalEquals$1 = $T($S($Y(IndentedFurther), InsertSpaceEquals), function(value) {
|
|
12715
12867
|
return value[1];
|
|
@@ -12740,37 +12892,37 @@ ${input.slice(result.pos)}
|
|
|
12740
12892
|
function InterfaceExtendsTarget(ctx, state) {
|
|
12741
12893
|
return $EVENT(ctx, state, "InterfaceExtendsTarget", InterfaceExtendsTarget$0);
|
|
12742
12894
|
}
|
|
12743
|
-
var TypeKeyword$0 = $TS($S($EXPECT($
|
|
12895
|
+
var TypeKeyword$0 = $TS($S($EXPECT($L205, 'TypeKeyword "type"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
12744
12896
|
return { $loc, token: $1 };
|
|
12745
12897
|
});
|
|
12746
12898
|
function TypeKeyword(ctx, state) {
|
|
12747
12899
|
return $EVENT(ctx, state, "TypeKeyword", TypeKeyword$0);
|
|
12748
12900
|
}
|
|
12749
|
-
var Enum$0 = $TS($S($EXPECT($
|
|
12901
|
+
var Enum$0 = $TS($S($EXPECT($L206, 'Enum "enum"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
12750
12902
|
return { $loc, token: $1 };
|
|
12751
12903
|
});
|
|
12752
12904
|
function Enum(ctx, state) {
|
|
12753
12905
|
return $EVENT(ctx, state, "Enum", Enum$0);
|
|
12754
12906
|
}
|
|
12755
|
-
var Interface$0 = $TS($S($EXPECT($
|
|
12907
|
+
var Interface$0 = $TS($S($EXPECT($L207, 'Interface "interface"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
12756
12908
|
return { $loc, token: $1 };
|
|
12757
12909
|
});
|
|
12758
12910
|
function Interface(ctx, state) {
|
|
12759
12911
|
return $EVENT(ctx, state, "Interface", Interface$0);
|
|
12760
12912
|
}
|
|
12761
|
-
var Global$0 = $TS($S($EXPECT($
|
|
12913
|
+
var Global$0 = $TS($S($EXPECT($L208, 'Global "global"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
12762
12914
|
return { $loc, token: $1 };
|
|
12763
12915
|
});
|
|
12764
12916
|
function Global(ctx, state) {
|
|
12765
12917
|
return $EVENT(ctx, state, "Global", Global$0);
|
|
12766
12918
|
}
|
|
12767
|
-
var Module$0 = $TS($S($EXPECT($
|
|
12919
|
+
var Module$0 = $TS($S($EXPECT($L209, 'Module "module"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
12768
12920
|
return { $loc, token: $1 };
|
|
12769
12921
|
});
|
|
12770
12922
|
function Module(ctx, state) {
|
|
12771
12923
|
return $EVENT(ctx, state, "Module", Module$0);
|
|
12772
12924
|
}
|
|
12773
|
-
var Namespace$0 = $TS($S($EXPECT($
|
|
12925
|
+
var Namespace$0 = $TS($S($EXPECT($L210, 'Namespace "namespace"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
12774
12926
|
return { $loc, token: $1 };
|
|
12775
12927
|
});
|
|
12776
12928
|
function Namespace(ctx, state) {
|
|
@@ -12872,9 +13024,10 @@ ${input.slice(result.pos)}
|
|
|
12872
13024
|
children: $0
|
|
12873
13025
|
};
|
|
12874
13026
|
const names = new Set(block.properties.map((p) => p.name.name));
|
|
12875
|
-
return
|
|
12876
|
-
|
|
12877
|
-
|
|
13027
|
+
return {
|
|
13028
|
+
type: "EnumDeclaration",
|
|
13029
|
+
id,
|
|
13030
|
+
children: [ts, {
|
|
12878
13031
|
js: true,
|
|
12879
13032
|
children: [
|
|
12880
13033
|
["let ", id, " = {};\n"],
|
|
@@ -12916,8 +13069,8 @@ ${input.slice(result.pos)}
|
|
|
12916
13069
|
}
|
|
12917
13070
|
})
|
|
12918
13071
|
]
|
|
12919
|
-
}
|
|
12920
|
-
|
|
13072
|
+
}]
|
|
13073
|
+
};
|
|
12921
13074
|
});
|
|
12922
13075
|
function EnumDeclaration(ctx, state) {
|
|
12923
13076
|
return $EVENT(ctx, state, "EnumDeclaration", EnumDeclaration$0);
|
|
@@ -12947,26 +13100,26 @@ ${input.slice(result.pos)}
|
|
|
12947
13100
|
function EnumBlock(ctx, state) {
|
|
12948
13101
|
return $EVENT_C(ctx, state, "EnumBlock", EnumBlock$$);
|
|
12949
13102
|
}
|
|
12950
|
-
var NestedEnumProperties$0 = $TS($S(PushIndent, $Q(
|
|
13103
|
+
var NestedEnumProperties$0 = $TS($S(PushIndent, $Q(NestedEnumPropertyLine), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
|
|
12951
13104
|
var props = $2;
|
|
12952
13105
|
if (!props.length)
|
|
12953
13106
|
return $skip;
|
|
12954
13107
|
return {
|
|
12955
|
-
properties: props.map((p) => p.property),
|
|
13108
|
+
properties: props.flat().map((p) => p.property),
|
|
12956
13109
|
children: $0
|
|
12957
13110
|
};
|
|
12958
13111
|
});
|
|
12959
13112
|
function NestedEnumProperties(ctx, state) {
|
|
12960
13113
|
return $EVENT(ctx, state, "NestedEnumProperties", NestedEnumProperties$0);
|
|
12961
13114
|
}
|
|
12962
|
-
var
|
|
12963
|
-
return {
|
|
12964
|
-
property:
|
|
12965
|
-
children:
|
|
12966
|
-
};
|
|
13115
|
+
var NestedEnumPropertyLine$0 = $TS($S($S(Nested, EnumProperty), $Q($S($E(_), EnumProperty))), function($skip, $loc, $0, $1, $2) {
|
|
13116
|
+
return [$1, ...$2].map((pair) => ({
|
|
13117
|
+
property: pair[1],
|
|
13118
|
+
children: pair
|
|
13119
|
+
}));
|
|
12967
13120
|
});
|
|
12968
|
-
function
|
|
12969
|
-
return $EVENT(ctx, state, "
|
|
13121
|
+
function NestedEnumPropertyLine(ctx, state) {
|
|
13122
|
+
return $EVENT(ctx, state, "NestedEnumPropertyLine", NestedEnumPropertyLine$0);
|
|
12970
13123
|
}
|
|
12971
13124
|
var EnumProperty$0 = $TS($S(Identifier, $E($S(__, Equals, ExtendedExpression)), ObjectPropertyDelimiter), function($skip, $loc, $0, $1, $2, $3) {
|
|
12972
13125
|
var name = $1;
|
|
@@ -13043,7 +13196,7 @@ ${input.slice(result.pos)}
|
|
|
13043
13196
|
function ReturnTypeSuffix(ctx, state) {
|
|
13044
13197
|
return $EVENT(ctx, state, "ReturnTypeSuffix", ReturnTypeSuffix$0);
|
|
13045
13198
|
}
|
|
13046
|
-
var ReturnType$0 = $TS($S($E($S(__, $EXPECT($
|
|
13199
|
+
var ReturnType$0 = $TS($S($E($S(__, $EXPECT($L211, 'ReturnType "asserts"'), NonIdContinue)), TypePredicate), function($skip, $loc, $0, $1, $2) {
|
|
13047
13200
|
var asserts = $1;
|
|
13048
13201
|
var t = $2;
|
|
13049
13202
|
if (asserts) {
|
|
@@ -13064,7 +13217,7 @@ ${input.slice(result.pos)}
|
|
|
13064
13217
|
function ReturnType(ctx, state) {
|
|
13065
13218
|
return $EVENT(ctx, state, "ReturnType", ReturnType$0);
|
|
13066
13219
|
}
|
|
13067
|
-
var TypePredicate$0 = $TS($S(Type, $E($S(__, $EXPECT($
|
|
13220
|
+
var TypePredicate$0 = $TS($S(Type, $E($S(__, $EXPECT($L156, 'TypePredicate "is"'), NonIdContinue, Type))), function($skip, $loc, $0, $1, $2) {
|
|
13068
13221
|
var lhs = $1;
|
|
13069
13222
|
var rhs = $2;
|
|
13070
13223
|
if (!rhs)
|
|
@@ -13098,7 +13251,7 @@ ${input.slice(result.pos)}
|
|
|
13098
13251
|
function TypeBinary(ctx, state) {
|
|
13099
13252
|
return $EVENT(ctx, state, "TypeBinary", TypeBinary$0);
|
|
13100
13253
|
}
|
|
13101
|
-
var TypeUnary$0 = $TS($S($Q($S(__, TypeUnaryOp
|
|
13254
|
+
var TypeUnary$0 = $TS($S($Q($S(__, TypeUnaryOp)), TypePrimary, $Q(TypeUnarySuffix)), function($skip, $loc, $0, $1, $2, $3) {
|
|
13102
13255
|
var prefix = $1;
|
|
13103
13256
|
var t = $2;
|
|
13104
13257
|
var suffix = $3;
|
|
@@ -13122,10 +13275,9 @@ ${input.slice(result.pos)}
|
|
|
13122
13275
|
function TypeUnarySuffix(ctx, state) {
|
|
13123
13276
|
return $EVENT_C(ctx, state, "TypeUnarySuffix", TypeUnarySuffix$$);
|
|
13124
13277
|
}
|
|
13125
|
-
var TypeUnaryOp$0 = $S($EXPECT($
|
|
13126
|
-
var TypeUnaryOp$1 = $S($EXPECT($
|
|
13127
|
-
var TypeUnaryOp
|
|
13128
|
-
var TypeUnaryOp$$ = [TypeUnaryOp$0, TypeUnaryOp$1, TypeUnaryOp$2];
|
|
13278
|
+
var TypeUnaryOp$0 = $S($EXPECT($L212, 'TypeUnaryOp "keyof"'), NonIdContinue);
|
|
13279
|
+
var TypeUnaryOp$1 = $S($EXPECT($L173, 'TypeUnaryOp "readonly"'), NonIdContinue);
|
|
13280
|
+
var TypeUnaryOp$$ = [TypeUnaryOp$0, TypeUnaryOp$1];
|
|
13129
13281
|
function TypeUnaryOp(ctx, state) {
|
|
13130
13282
|
return $EVENT_C(ctx, state, "TypeUnaryOp", TypeUnaryOp$$);
|
|
13131
13283
|
}
|
|
@@ -13154,25 +13306,26 @@ ${input.slice(result.pos)}
|
|
|
13154
13306
|
function TypeIndexedAccess(ctx, state) {
|
|
13155
13307
|
return $EVENT_C(ctx, state, "TypeIndexedAccess", TypeIndexedAccess$$);
|
|
13156
13308
|
}
|
|
13157
|
-
var UnknownAlias$0 = $TV($EXPECT($
|
|
13309
|
+
var UnknownAlias$0 = $TV($EXPECT($L213, 'UnknownAlias "???"'), function($skip, $loc, $0, $1) {
|
|
13158
13310
|
return { $loc, token: "unknown" };
|
|
13159
13311
|
});
|
|
13160
13312
|
function UnknownAlias(ctx, state) {
|
|
13161
13313
|
return $EVENT(ctx, state, "UnknownAlias", UnknownAlias$0);
|
|
13162
13314
|
}
|
|
13163
|
-
var TypePrimary$0 = $
|
|
13315
|
+
var TypePrimary$0 = $S($E(_), Infer, $E(_), IdentifierName, $E($S(NotDedented, ExtendsToken, Type)));
|
|
13316
|
+
var TypePrimary$1 = $TS($S($E(_), Typeof, $E(_), UnaryExpression), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
13164
13317
|
return {
|
|
13165
13318
|
type: "TypeofType",
|
|
13166
13319
|
children: $0
|
|
13167
13320
|
};
|
|
13168
13321
|
});
|
|
13169
|
-
var TypePrimary$
|
|
13322
|
+
var TypePrimary$2 = $TS($S($E(_), TypeTuple), function($skip, $loc, $0, $1, $2) {
|
|
13170
13323
|
return { ...$2, children: [$1, ...$2.children] };
|
|
13171
13324
|
});
|
|
13172
|
-
var TypePrimary$
|
|
13173
|
-
var TypePrimary$
|
|
13174
|
-
var TypePrimary$
|
|
13175
|
-
var TypePrimary$
|
|
13325
|
+
var TypePrimary$3 = InterfaceBlock;
|
|
13326
|
+
var TypePrimary$4 = $S($E(_), FunctionType);
|
|
13327
|
+
var TypePrimary$5 = $S($E(_), InlineInterfaceLiteral);
|
|
13328
|
+
var TypePrimary$6 = $TS($S($E(_), ImportType), function($skip, $loc, $0, $1, $2) {
|
|
13176
13329
|
var t = $2;
|
|
13177
13330
|
return {
|
|
13178
13331
|
type: "ImportType",
|
|
@@ -13180,7 +13333,7 @@ ${input.slice(result.pos)}
|
|
|
13180
13333
|
children: $0
|
|
13181
13334
|
};
|
|
13182
13335
|
});
|
|
13183
|
-
var TypePrimary$
|
|
13336
|
+
var TypePrimary$7 = $TS($S($E(_), TypeLiteral), function($skip, $loc, $0, $1, $2) {
|
|
13184
13337
|
var t = $2;
|
|
13185
13338
|
return {
|
|
13186
13339
|
type: "LiteralType",
|
|
@@ -13188,7 +13341,7 @@ ${input.slice(result.pos)}
|
|
|
13188
13341
|
children: $0
|
|
13189
13342
|
};
|
|
13190
13343
|
});
|
|
13191
|
-
var TypePrimary$
|
|
13344
|
+
var TypePrimary$8 = $TS($S($E(_), UnknownAlias), function($skip, $loc, $0, $1, $2) {
|
|
13192
13345
|
return {
|
|
13193
13346
|
type: "IdentifierType",
|
|
13194
13347
|
children: $0,
|
|
@@ -13196,7 +13349,7 @@ ${input.slice(result.pos)}
|
|
|
13196
13349
|
args: void 0
|
|
13197
13350
|
};
|
|
13198
13351
|
});
|
|
13199
|
-
var TypePrimary$
|
|
13352
|
+
var TypePrimary$9 = $TS($S($E(_), IdentifierName, $Q($S(Dot, IdentifierName)), $E(TypeArguments)), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
13200
13353
|
var args = $4;
|
|
13201
13354
|
return {
|
|
13202
13355
|
type: "IdentifierType",
|
|
@@ -13205,13 +13358,13 @@ ${input.slice(result.pos)}
|
|
|
13205
13358
|
args
|
|
13206
13359
|
};
|
|
13207
13360
|
});
|
|
13208
|
-
var TypePrimary$
|
|
13361
|
+
var TypePrimary$10 = $TS($S($E(_), OpenParen, $C(Type, $S(EOS, Type)), __, CloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
13209
13362
|
return {
|
|
13210
13363
|
type: "ParenthesizedType",
|
|
13211
13364
|
children: $0
|
|
13212
13365
|
};
|
|
13213
13366
|
});
|
|
13214
|
-
var TypePrimary$$ = [TypePrimary$0, TypePrimary$1, TypePrimary$2, TypePrimary$3, TypePrimary$4, TypePrimary$5, TypePrimary$6, TypePrimary$7, TypePrimary$8, TypePrimary$9];
|
|
13367
|
+
var TypePrimary$$ = [TypePrimary$0, TypePrimary$1, TypePrimary$2, TypePrimary$3, TypePrimary$4, TypePrimary$5, TypePrimary$6, TypePrimary$7, TypePrimary$8, TypePrimary$9, TypePrimary$10];
|
|
13215
13368
|
function TypePrimary(ctx, state) {
|
|
13216
13369
|
return $EVENT_C(ctx, state, "TypePrimary", TypePrimary$$);
|
|
13217
13370
|
}
|
|
@@ -13287,11 +13440,7 @@ ${input.slice(result.pos)}
|
|
|
13287
13440
|
return [$1, $2, $3, $7, $5, $6, $4];
|
|
13288
13441
|
return $0;
|
|
13289
13442
|
});
|
|
13290
|
-
var TypeConditional$2 =
|
|
13291
|
-
if (!$2)
|
|
13292
|
-
return $1;
|
|
13293
|
-
return $0;
|
|
13294
|
-
});
|
|
13443
|
+
var TypeConditional$2 = TypeBinary;
|
|
13295
13444
|
var TypeConditional$$ = [TypeConditional$0, TypeConditional$1, TypeConditional$2];
|
|
13296
13445
|
function TypeConditional(ctx, state) {
|
|
13297
13446
|
return $EVENT_C(ctx, state, "TypeConditional", TypeConditional$$);
|
|
@@ -13363,10 +13512,10 @@ ${input.slice(result.pos)}
|
|
|
13363
13512
|
}
|
|
13364
13513
|
var TypeLiteral$0 = TypeTemplateLiteral;
|
|
13365
13514
|
var TypeLiteral$1 = Literal;
|
|
13366
|
-
var TypeLiteral$2 = $TS($S($EXPECT($
|
|
13515
|
+
var TypeLiteral$2 = $TS($S($EXPECT($L195, 'TypeLiteral "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
13367
13516
|
return { type: "VoidType", $loc, token: $1 };
|
|
13368
13517
|
});
|
|
13369
|
-
var TypeLiteral$3 = $TV($EXPECT($
|
|
13518
|
+
var TypeLiteral$3 = $TV($EXPECT($L214, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
|
|
13370
13519
|
return { $loc, token: "[]" };
|
|
13371
13520
|
});
|
|
13372
13521
|
var TypeLiteral$$ = [TypeLiteral$0, TypeLiteral$1, TypeLiteral$2, TypeLiteral$3];
|
|
@@ -13385,7 +13534,7 @@ ${input.slice(result.pos)}
|
|
|
13385
13534
|
var InlineInterfacePropertyDelimiter$1 = $T($S($Y($S($C(IndentedFurther, $E(_)), InlineBasicInterfaceProperty)), InsertComma), function(value) {
|
|
13386
13535
|
return value[1];
|
|
13387
13536
|
});
|
|
13388
|
-
var InlineInterfacePropertyDelimiter$2 = $Y($S(__, $C($EXPECT($L14, 'InlineInterfacePropertyDelimiter ":"'), $EXPECT($
|
|
13537
|
+
var InlineInterfacePropertyDelimiter$2 = $Y($S(__, $C($EXPECT($L14, 'InlineInterfacePropertyDelimiter ":"'), $EXPECT($L117, 'InlineInterfacePropertyDelimiter ")"'), $EXPECT($L38, 'InlineInterfacePropertyDelimiter "]"'), $EXPECT($L29, 'InlineInterfacePropertyDelimiter "}"'))));
|
|
13389
13538
|
var InlineInterfacePropertyDelimiter$3 = $Y(EOS);
|
|
13390
13539
|
var InlineInterfacePropertyDelimiter$$ = [InlineInterfacePropertyDelimiter$0, InlineInterfacePropertyDelimiter$1, InlineInterfacePropertyDelimiter$2, InlineInterfacePropertyDelimiter$3];
|
|
13391
13540
|
function InlineInterfacePropertyDelimiter(ctx, state) {
|
|
@@ -13449,11 +13598,11 @@ ${input.slice(result.pos)}
|
|
|
13449
13598
|
function TypeParameters(ctx, state) {
|
|
13450
13599
|
return $EVENT(ctx, state, "TypeParameters", TypeParameters$0);
|
|
13451
13600
|
}
|
|
13452
|
-
var TypeParameter$0 = $S(__, $E($S($EXPECT($
|
|
13601
|
+
var TypeParameter$0 = $S(__, $E($S($EXPECT($L155, 'TypeParameter "const"'), $E(_))), Identifier, $E(TypeConstraint), $E(TypeInitializer), TypeParameterDelimiter);
|
|
13453
13602
|
function TypeParameter(ctx, state) {
|
|
13454
13603
|
return $EVENT(ctx, state, "TypeParameter", TypeParameter$0);
|
|
13455
13604
|
}
|
|
13456
|
-
var TypeConstraint$0 = $S(__, $EXPECT($
|
|
13605
|
+
var TypeConstraint$0 = $S(__, $EXPECT($L143, 'TypeConstraint "extends"'), NonIdContinue, Type);
|
|
13457
13606
|
function TypeConstraint(ctx, state) {
|
|
13458
13607
|
return $EVENT(ctx, state, "TypeConstraint", TypeConstraint$0);
|
|
13459
13608
|
}
|
|
@@ -13492,7 +13641,7 @@ ${input.slice(result.pos)}
|
|
|
13492
13641
|
function CivetPrologue(ctx, state) {
|
|
13493
13642
|
return $EVENT_C(ctx, state, "CivetPrologue", CivetPrologue$$);
|
|
13494
13643
|
}
|
|
13495
|
-
var CivetPrologueContent$0 = $TS($S($EXPECT($
|
|
13644
|
+
var CivetPrologueContent$0 = $TS($S($EXPECT($L215, 'CivetPrologueContent "civet"'), NonIdContinue, $Q(CivetOption), $EXPECT($R85, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
13496
13645
|
var options = $3;
|
|
13497
13646
|
return {
|
|
13498
13647
|
type: "CivetPrologue",
|
|
@@ -13975,9 +14124,9 @@ ${input.slice(result.pos)}
|
|
|
13975
14124
|
preludeVar,
|
|
13976
14125
|
ref,
|
|
13977
14126
|
typeSuffix,
|
|
13978
|
-
" = (lhs, rhs) => ((rhs",
|
|
14127
|
+
" = (lhs, rhs) => (((rhs",
|
|
13979
14128
|
asAny,
|
|
13980
|
-
")?.[Symbol.isConcatSpreadable] ? (lhs",
|
|
14129
|
+
")?.[Symbol.isConcatSpreadable] ?? Array.isArray(rhs)) ? (lhs",
|
|
13981
14130
|
asAny,
|
|
13982
14131
|
").push.apply(lhs, rhs",
|
|
13983
14132
|
asAny,
|
|
@@ -14179,20 +14328,20 @@ ${input.slice(result.pos)}
|
|
|
14179
14328
|
function Dedented(ctx, state) {
|
|
14180
14329
|
return $EVENT(ctx, state, "Dedented", Dedented$0);
|
|
14181
14330
|
}
|
|
14182
|
-
var
|
|
14331
|
+
var parser = function() {
|
|
14183
14332
|
const { fail, validate, reset } = Validator();
|
|
14184
14333
|
let ctx = { expectation: "", fail };
|
|
14185
14334
|
return {
|
|
14186
14335
|
parse: (input, options = {}) => {
|
|
14187
14336
|
if (typeof input !== "string")
|
|
14188
14337
|
throw new Error("Input must be a string");
|
|
14189
|
-
const
|
|
14190
|
-
if (!
|
|
14338
|
+
const parser2 = options.startRule != null ? grammar[options.startRule] : Object.values(grammar)[0];
|
|
14339
|
+
if (!parser2)
|
|
14191
14340
|
throw new Error(`Could not find rule with name '${options.startRule}'`);
|
|
14192
14341
|
const filename = options.filename || "<anonymous>";
|
|
14193
14342
|
reset();
|
|
14194
14343
|
Object.assign(ctx, { ...options.events, tokenize: options.tokenize });
|
|
14195
|
-
return validate(input,
|
|
14344
|
+
return validate(input, parser2(ctx, {
|
|
14196
14345
|
input,
|
|
14197
14346
|
pos: 0
|
|
14198
14347
|
}), {
|
|
@@ -14201,8 +14350,8 @@ ${input.slice(result.pos)}
|
|
|
14201
14350
|
}
|
|
14202
14351
|
};
|
|
14203
14352
|
}();
|
|
14204
|
-
exports.default =
|
|
14205
|
-
exports.parse =
|
|
14353
|
+
exports.default = parser;
|
|
14354
|
+
exports.parse = parser.parse;
|
|
14206
14355
|
exports.Program = Program;
|
|
14207
14356
|
exports.TopLevelStatements = TopLevelStatements;
|
|
14208
14357
|
exports.NestedTopLevelStatements = NestedTopLevelStatements;
|
|
@@ -14248,6 +14397,7 @@ ${input.slice(result.pos)}
|
|
|
14248
14397
|
exports.UnaryWithoutParenthesizedAssignmentBody = UnaryWithoutParenthesizedAssignmentBody;
|
|
14249
14398
|
exports.UnaryPostfix = UnaryPostfix;
|
|
14250
14399
|
exports.TypePostfix = TypePostfix;
|
|
14400
|
+
exports.NWTypePostfix = NWTypePostfix;
|
|
14251
14401
|
exports.UpdateExpression = UpdateExpression;
|
|
14252
14402
|
exports.UpdateExpressionSymbol = UpdateExpressionSymbol;
|
|
14253
14403
|
exports.AssignmentExpression = AssignmentExpression;
|
|
@@ -14360,6 +14510,7 @@ ${input.slice(result.pos)}
|
|
|
14360
14510
|
exports.OperatorDeclaration = OperatorDeclaration;
|
|
14361
14511
|
exports.OperatorSignature = OperatorSignature;
|
|
14362
14512
|
exports.AmpersandBlockRHS = AmpersandBlockRHS;
|
|
14513
|
+
exports.AmpersandTypeSuffix = AmpersandTypeSuffix;
|
|
14363
14514
|
exports.AmpersandBlockRHSBody = AmpersandBlockRHSBody;
|
|
14364
14515
|
exports.ThinArrowFunction = ThinArrowFunction;
|
|
14365
14516
|
exports.Arrow = Arrow;
|
|
@@ -14416,8 +14567,10 @@ ${input.slice(result.pos)}
|
|
|
14416
14567
|
exports.NestedImplicitPropertyDefinition = NestedImplicitPropertyDefinition;
|
|
14417
14568
|
exports.NestedPropertyDefinitions = NestedPropertyDefinitions;
|
|
14418
14569
|
exports.NestedPropertyDefinition = NestedPropertyDefinition;
|
|
14570
|
+
exports.ImplicitObjectLiteral = ImplicitObjectLiteral;
|
|
14571
|
+
exports.ImplicitObjectPropertyDelimiter = ImplicitObjectPropertyDelimiter;
|
|
14419
14572
|
exports.InlineObjectLiteral = InlineObjectLiteral;
|
|
14420
|
-
exports.
|
|
14573
|
+
exports.InlineObjectPropertyDelimiter = InlineObjectPropertyDelimiter;
|
|
14421
14574
|
exports.ObjectPropertyDelimiter = ObjectPropertyDelimiter;
|
|
14422
14575
|
exports.PropertyDefinition = PropertyDefinition;
|
|
14423
14576
|
exports.NamedProperty = NamedProperty;
|
|
@@ -14690,6 +14843,7 @@ ${input.slice(result.pos)}
|
|
|
14690
14843
|
exports.If = If;
|
|
14691
14844
|
exports.Import = Import;
|
|
14692
14845
|
exports.In = In;
|
|
14846
|
+
exports.Infer = Infer;
|
|
14693
14847
|
exports.LetOrConst = LetOrConst;
|
|
14694
14848
|
exports.Const = Const;
|
|
14695
14849
|
exports.Is = Is;
|
|
@@ -14788,6 +14942,9 @@ ${input.slice(result.pos)}
|
|
|
14788
14942
|
exports.UsingJSModeError = UsingJSModeError;
|
|
14789
14943
|
exports.TypeDeclaration = TypeDeclaration;
|
|
14790
14944
|
exports.TypeDeclarationRest = TypeDeclarationRest;
|
|
14945
|
+
exports.TypeAliasDeclaration = TypeAliasDeclaration;
|
|
14946
|
+
exports.InterfaceDeclaration = InterfaceDeclaration;
|
|
14947
|
+
exports.NamespaceDeclaration = NamespaceDeclaration;
|
|
14791
14948
|
exports.OptionalEquals = OptionalEquals;
|
|
14792
14949
|
exports.TypeLexicalDeclaration = TypeLexicalDeclaration;
|
|
14793
14950
|
exports.TypeDeclarationBinding = TypeDeclarationBinding;
|
|
@@ -14815,7 +14972,7 @@ ${input.slice(result.pos)}
|
|
|
14815
14972
|
exports.EnumDeclaration = EnumDeclaration;
|
|
14816
14973
|
exports.EnumBlock = EnumBlock;
|
|
14817
14974
|
exports.NestedEnumProperties = NestedEnumProperties;
|
|
14818
|
-
exports.
|
|
14975
|
+
exports.NestedEnumPropertyLine = NestedEnumPropertyLine;
|
|
14819
14976
|
exports.EnumProperty = EnumProperty;
|
|
14820
14977
|
exports.TypeProperty = TypeProperty;
|
|
14821
14978
|
exports.TypeIndexSignature = TypeIndexSignature;
|
|
@@ -14932,7 +15089,7 @@ ${input.slice(result.pos)}
|
|
|
14932
15089
|
generate: () => generate_default,
|
|
14933
15090
|
isCompileError: () => isCompileError,
|
|
14934
15091
|
lib: () => lib_exports,
|
|
14935
|
-
parse: () =>
|
|
15092
|
+
parse: () => import_parser.parse,
|
|
14936
15093
|
prune: () => prune2,
|
|
14937
15094
|
util: () => util_exports
|
|
14938
15095
|
});
|
|
@@ -15396,7 +15553,6 @@ ${input.slice(result.pos)}
|
|
|
15396
15553
|
};
|
|
15397
15554
|
|
|
15398
15555
|
// source/main.civet
|
|
15399
|
-
var { parse: parse2 } = import_parser.default;
|
|
15400
15556
|
var { SourceMap: SourceMap2 } = util_exports;
|
|
15401
15557
|
var uncacheable = /* @__PURE__ */ new Set([
|
|
15402
15558
|
// Meta
|
|
@@ -15458,8 +15614,8 @@ ${input.slice(result.pos)}
|
|
|
15458
15614
|
}
|
|
15459
15615
|
let ast;
|
|
15460
15616
|
try {
|
|
15461
|
-
|
|
15462
|
-
ast = prune2(
|
|
15617
|
+
import_parser.parse.config = options.parseOptions || {};
|
|
15618
|
+
ast = prune2((0, import_parser.parse)(src, {
|
|
15463
15619
|
filename,
|
|
15464
15620
|
events
|
|
15465
15621
|
}));
|
|
@@ -15568,7 +15724,7 @@ ${counts}`;
|
|
|
15568
15724
|
const key = [tagKey, stateKey, state.pos, ruleName];
|
|
15569
15725
|
stateCache.set(key, result);
|
|
15570
15726
|
}
|
|
15571
|
-
if (
|
|
15727
|
+
if (import_parser.parse.config.verbose && result) {
|
|
15572
15728
|
console.log(`Parsed ${JSON.stringify(state.input.slice(state.pos, result.pos))} [pos ${state.pos}-${result.pos}] as ${ruleName}`);
|
|
15573
15729
|
}
|
|
15574
15730
|
if (trace) {
|
|
@@ -15584,6 +15740,6 @@ ${counts}`;
|
|
|
15584
15740
|
return err instanceof Error && //@ts-ignore
|
|
15585
15741
|
[err.message, err.name, err.filename, err.line, err.column, err.offset].every(($1) => $1 !== void 0);
|
|
15586
15742
|
};
|
|
15587
|
-
var main_default = { parse:
|
|
15743
|
+
var main_default = { parse: import_parser.parse, generate: generate_default, util: util_exports, compile, isCompileError };
|
|
15588
15744
|
return __toCommonJS(main_exports);
|
|
15589
15745
|
})();
|