@danielx/civet 0.6.71 → 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 +268 -171
- package/dist/main.js +268 -171
- package/dist/main.mjs +268 -171
- package/package.json +1 -1
package/dist/browser.js
CHANGED
|
@@ -3397,7 +3397,7 @@ var Civet = (() => {
|
|
|
3397
3397
|
}
|
|
3398
3398
|
];
|
|
3399
3399
|
}
|
|
3400
|
-
if (rest.delim
|
|
3400
|
+
if (Array.isArray(rest.delim) && rest.delim.at(-1)?.token === ",") {
|
|
3401
3401
|
rest.delim.pop();
|
|
3402
3402
|
}
|
|
3403
3403
|
const children = [...props, ...after, rest];
|
|
@@ -4576,6 +4576,7 @@ ${input.slice(result.pos)}
|
|
|
4576
4576
|
If,
|
|
4577
4577
|
Import,
|
|
4578
4578
|
In,
|
|
4579
|
+
Infer,
|
|
4579
4580
|
LetOrConst,
|
|
4580
4581
|
Const,
|
|
4581
4582
|
Is,
|
|
@@ -4674,6 +4675,9 @@ ${input.slice(result.pos)}
|
|
|
4674
4675
|
UsingJSModeError,
|
|
4675
4676
|
TypeDeclaration,
|
|
4676
4677
|
TypeDeclarationRest,
|
|
4678
|
+
TypeAliasDeclaration,
|
|
4679
|
+
InterfaceDeclaration,
|
|
4680
|
+
NamespaceDeclaration,
|
|
4677
4681
|
OptionalEquals,
|
|
4678
4682
|
TypeLexicalDeclaration,
|
|
4679
4683
|
TypeDeclarationBinding,
|
|
@@ -4701,7 +4705,7 @@ ${input.slice(result.pos)}
|
|
|
4701
4705
|
EnumDeclaration,
|
|
4702
4706
|
EnumBlock,
|
|
4703
4707
|
NestedEnumProperties,
|
|
4704
|
-
|
|
4708
|
+
NestedEnumPropertyLine,
|
|
4705
4709
|
EnumProperty,
|
|
4706
4710
|
TypeProperty,
|
|
4707
4711
|
TypeIndexSignature,
|
|
@@ -4960,66 +4964,66 @@ ${input.slice(result.pos)}
|
|
|
4960
4964
|
var $L150 = $L("#");
|
|
4961
4965
|
var $L151 = $L("if");
|
|
4962
4966
|
var $L152 = $L("in");
|
|
4963
|
-
var $L153 = $L("
|
|
4964
|
-
var $L154 = $L("
|
|
4965
|
-
var $L155 = $L("
|
|
4966
|
-
var $L156 = $L("
|
|
4967
|
-
var $L157 = $L("
|
|
4968
|
-
var $L158 = $L("
|
|
4969
|
-
var $L159 = $L("
|
|
4970
|
-
var $L160 = $L("
|
|
4971
|
-
var $L161 = $L("
|
|
4972
|
-
var $L162 = $L("
|
|
4973
|
-
var $L163 = $L("
|
|
4974
|
-
var $L164 = $L("
|
|
4975
|
-
var $L165 = $L("
|
|
4976
|
-
var $L166 = $L("
|
|
4977
|
-
var $L167 = $L("
|
|
4978
|
-
var $L168 = $L("
|
|
4979
|
-
var $L169 = $L("
|
|
4980
|
-
var $L170 = $L("
|
|
4981
|
-
var $L171 = $L("
|
|
4982
|
-
var $L172 = $L("
|
|
4983
|
-
var $L173 = $L("
|
|
4984
|
-
var $L174 = $L("
|
|
4985
|
-
var $L175 = $L("
|
|
4986
|
-
var $L176 = $L("
|
|
4987
|
-
var $L177 = $L("
|
|
4988
|
-
var $L178 = $L("
|
|
4989
|
-
var $L179 = $L("
|
|
4990
|
-
var $L180 = $L("
|
|
4991
|
-
var $L181 = $L("
|
|
4992
|
-
var $L182 = $L("
|
|
4993
|
-
var $L183 = $L("
|
|
4994
|
-
var $L184 = $L(
|
|
4995
|
-
var $L185 = $L("'
|
|
4996
|
-
var $L186 = $L("
|
|
4997
|
-
var $L187 = $L("
|
|
4998
|
-
var $L188 = $L("
|
|
4999
|
-
var $L189 = $L("
|
|
5000
|
-
var $L190 = $L("
|
|
5001
|
-
var $L191 = $L("
|
|
5002
|
-
var $L192 = $L("
|
|
5003
|
-
var $L193 = $L("
|
|
5004
|
-
var $L194 = $L("
|
|
5005
|
-
var $L195 = $L("
|
|
5006
|
-
var $L196 = $L("
|
|
5007
|
-
var $L197 = $L("
|
|
5008
|
-
var $L198 = $L("
|
|
5009
|
-
var $L199 = $L("
|
|
5010
|
-
var $L200 = $L("
|
|
5011
|
-
var $L201 = $L("
|
|
5012
|
-
var $L202 = $L("
|
|
5013
|
-
var $L203 = $L("
|
|
5014
|
-
var $L204 = $L("
|
|
5015
|
-
var $L205 = $L("
|
|
5016
|
-
var $L206 = $L("
|
|
5017
|
-
var $L207 = $L("
|
|
5018
|
-
var $L208 = $L("
|
|
5019
|
-
var $L209 = $L("
|
|
5020
|
-
var $L210 = $L("
|
|
5021
|
-
var $L211 = $L("
|
|
5022
|
-
var $L212 = $L("
|
|
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");
|
|
5023
5027
|
var $L213 = $L("???");
|
|
5024
5028
|
var $L214 = $L("[]");
|
|
5025
5029
|
var $L215 = $L("civet");
|
|
@@ -5891,7 +5895,7 @@ ${input.slice(result.pos)}
|
|
|
5891
5895
|
return $EVENT(ctx, state, "ParenthesizedExpression", ParenthesizedExpression$0);
|
|
5892
5896
|
}
|
|
5893
5897
|
var ClassDeclaration$0 = $TS($S(ClassExpression), function($skip, $loc, $0, $1) {
|
|
5894
|
-
if ($1.
|
|
5898
|
+
if ($1.id)
|
|
5895
5899
|
return $1;
|
|
5896
5900
|
return makeLeftHandSideExpression($1);
|
|
5897
5901
|
});
|
|
@@ -5908,6 +5912,7 @@ ${input.slice(result.pos)}
|
|
|
5908
5912
|
decorators,
|
|
5909
5913
|
abstract,
|
|
5910
5914
|
binding,
|
|
5915
|
+
id: binding?.[0],
|
|
5911
5916
|
heritage,
|
|
5912
5917
|
body,
|
|
5913
5918
|
children: $0
|
|
@@ -6225,7 +6230,8 @@ ${input.slice(result.pos)}
|
|
|
6225
6230
|
name: id.name,
|
|
6226
6231
|
children: [".", id]
|
|
6227
6232
|
}],
|
|
6228
|
-
privateShorthand: true
|
|
6233
|
+
privateShorthand: true,
|
|
6234
|
+
privateId: id
|
|
6229
6235
|
};
|
|
6230
6236
|
});
|
|
6231
6237
|
var PrivateThis$$ = [PrivateThis$0, PrivateThis$1];
|
|
@@ -7411,7 +7417,10 @@ ${input.slice(result.pos)}
|
|
|
7411
7417
|
var w = $2;
|
|
7412
7418
|
var decl = $3;
|
|
7413
7419
|
decl.names.forEach((name) => module.operators.add(name));
|
|
7414
|
-
return
|
|
7420
|
+
return {
|
|
7421
|
+
...decl,
|
|
7422
|
+
children: [insertTrimmingSpace(w, ""), ...decl.children]
|
|
7423
|
+
};
|
|
7415
7424
|
});
|
|
7416
7425
|
var OperatorDeclaration$1 = $TS($S(OperatorSignature, BracedBlock), function($skip, $loc, $0, $1, $2) {
|
|
7417
7426
|
var signature = $1;
|
|
@@ -7433,7 +7442,10 @@ ${input.slice(result.pos)}
|
|
|
7433
7442
|
var ids = $4;
|
|
7434
7443
|
module.operators.add(id.name);
|
|
7435
7444
|
ids.forEach(([, , id2]) => module.operators.add(id2.name));
|
|
7436
|
-
return
|
|
7445
|
+
return {
|
|
7446
|
+
id,
|
|
7447
|
+
children: []
|
|
7448
|
+
};
|
|
7437
7449
|
});
|
|
7438
7450
|
var OperatorDeclaration$$ = [OperatorDeclaration$0, OperatorDeclaration$1, OperatorDeclaration$2];
|
|
7439
7451
|
function OperatorDeclaration(ctx, state) {
|
|
@@ -8725,7 +8737,12 @@ ${input.slice(result.pos)}
|
|
|
8725
8737
|
v = insertTrimmingSpace(p, "");
|
|
8726
8738
|
break;
|
|
8727
8739
|
case "Property":
|
|
8728
|
-
|
|
8740
|
+
const { value: value2 } = p;
|
|
8741
|
+
if (value2.privateShorthand) {
|
|
8742
|
+
v = value2.privateId;
|
|
8743
|
+
} else {
|
|
8744
|
+
v = insertTrimmingSpace(value2, "");
|
|
8745
|
+
}
|
|
8729
8746
|
break;
|
|
8730
8747
|
}
|
|
8731
8748
|
const exp = processCallMemberExpression({
|
|
@@ -10804,18 +10821,45 @@ ${input.slice(result.pos)}
|
|
|
10804
10821
|
children: [exp, $0.slice(1)]
|
|
10805
10822
|
};
|
|
10806
10823
|
});
|
|
10807
|
-
var ExportDeclaration$1 = $TS($S($E(Decorators), Export, __, Default, __, $C(
|
|
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) {
|
|
10808
10852
|
var declaration = $6;
|
|
10809
|
-
return { type: "ExportDeclaration", declaration, children: $0 };
|
|
10853
|
+
return { type: "ExportDeclaration", declaration, ts: declaration.ts, children: $0 };
|
|
10810
10854
|
});
|
|
10811
|
-
var ExportDeclaration$
|
|
10855
|
+
var ExportDeclaration$3 = $TS($S(Export, __, ExportFromClause, __, FromClause), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
10812
10856
|
return { type: "ExportDeclaration", ts: $3.ts, children: $0 };
|
|
10813
10857
|
});
|
|
10814
|
-
var ExportDeclaration$
|
|
10858
|
+
var ExportDeclaration$4 = $TS($S($E(Decorators), Export, __, $C(Declaration, VariableStatement, TypeAndNamedExports, ExportVarDec)), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
10815
10859
|
var declaration = $4;
|
|
10816
10860
|
return { type: "ExportDeclaration", declaration, ts: declaration.ts, children: $0 };
|
|
10817
10861
|
});
|
|
10818
|
-
var ExportDeclaration$$ = [ExportDeclaration$0, ExportDeclaration$1, ExportDeclaration$2, ExportDeclaration$3];
|
|
10862
|
+
var ExportDeclaration$$ = [ExportDeclaration$0, ExportDeclaration$1, ExportDeclaration$2, ExportDeclaration$3, ExportDeclaration$4];
|
|
10819
10863
|
function ExportDeclaration(ctx, state) {
|
|
10820
10864
|
return $EVENT_C(ctx, state, "ExportDeclaration", ExportDeclaration$$);
|
|
10821
10865
|
}
|
|
@@ -10979,6 +11023,7 @@ ${input.slice(result.pos)}
|
|
|
10979
11023
|
var VariableStatement$0 = $TS($S(Var, __, VariableDeclarationList), function($skip, $loc, $0, $1, $2, $3) {
|
|
10980
11024
|
return {
|
|
10981
11025
|
...$3,
|
|
11026
|
+
names: $3.names,
|
|
10982
11027
|
children: [$1, ...$2, ...$3.children]
|
|
10983
11028
|
};
|
|
10984
11029
|
});
|
|
@@ -11739,19 +11784,25 @@ ${input.slice(result.pos)}
|
|
|
11739
11784
|
function In(ctx, state) {
|
|
11740
11785
|
return $EVENT(ctx, state, "In", In$0);
|
|
11741
11786
|
}
|
|
11742
|
-
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) {
|
|
11743
11794
|
return { $loc, token: $1 };
|
|
11744
11795
|
});
|
|
11745
11796
|
function LetOrConst(ctx, state) {
|
|
11746
11797
|
return $EVENT(ctx, state, "LetOrConst", LetOrConst$0);
|
|
11747
11798
|
}
|
|
11748
|
-
var Const$0 = $TS($S($EXPECT($
|
|
11799
|
+
var Const$0 = $TS($S($EXPECT($L155, 'Const "const"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11749
11800
|
return { $loc, token: $1 };
|
|
11750
11801
|
});
|
|
11751
11802
|
function Const(ctx, state) {
|
|
11752
11803
|
return $EVENT(ctx, state, "Const", Const$0);
|
|
11753
11804
|
}
|
|
11754
|
-
var Is$0 = $TS($S($EXPECT($
|
|
11805
|
+
var Is$0 = $TS($S($EXPECT($L156, 'Is "is"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11755
11806
|
return { $loc, token: $1 };
|
|
11756
11807
|
});
|
|
11757
11808
|
function Is(ctx, state) {
|
|
@@ -11763,25 +11814,25 @@ ${input.slice(result.pos)}
|
|
|
11763
11814
|
function LetOrConstOrVar(ctx, state) {
|
|
11764
11815
|
return $EVENT_C(ctx, state, "LetOrConstOrVar", LetOrConstOrVar$$);
|
|
11765
11816
|
}
|
|
11766
|
-
var Loop$0 = $TS($S($EXPECT($
|
|
11817
|
+
var Loop$0 = $TS($S($EXPECT($L157, 'Loop "loop"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11767
11818
|
return { $loc, token: "while(true)" };
|
|
11768
11819
|
});
|
|
11769
11820
|
function Loop(ctx, state) {
|
|
11770
11821
|
return $EVENT(ctx, state, "Loop", Loop$0);
|
|
11771
11822
|
}
|
|
11772
|
-
var New$0 = $TS($S($EXPECT($
|
|
11823
|
+
var New$0 = $TS($S($EXPECT($L158, 'New "new"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11773
11824
|
return { $loc, token: $1 };
|
|
11774
11825
|
});
|
|
11775
11826
|
function New(ctx, state) {
|
|
11776
11827
|
return $EVENT(ctx, state, "New", New$0);
|
|
11777
11828
|
}
|
|
11778
|
-
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) {
|
|
11779
11830
|
return { $loc, token: "!" };
|
|
11780
11831
|
});
|
|
11781
11832
|
function Not(ctx, state) {
|
|
11782
11833
|
return $EVENT(ctx, state, "Not", Not$0);
|
|
11783
11834
|
}
|
|
11784
|
-
var Of$0 = $TS($S($EXPECT($
|
|
11835
|
+
var Of$0 = $TS($S($EXPECT($L160, 'Of "of"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11785
11836
|
return { $loc, token: $1 };
|
|
11786
11837
|
});
|
|
11787
11838
|
function Of(ctx, state) {
|
|
@@ -11799,7 +11850,7 @@ ${input.slice(result.pos)}
|
|
|
11799
11850
|
function OpenBrace(ctx, state) {
|
|
11800
11851
|
return $EVENT(ctx, state, "OpenBrace", OpenBrace$0);
|
|
11801
11852
|
}
|
|
11802
|
-
var OpenBracket$0 = $TV($EXPECT($
|
|
11853
|
+
var OpenBracket$0 = $TV($EXPECT($L161, 'OpenBracket "["'), function($skip, $loc, $0, $1) {
|
|
11803
11854
|
return { $loc, token: $1 };
|
|
11804
11855
|
});
|
|
11805
11856
|
function OpenBracket(ctx, state) {
|
|
@@ -11811,43 +11862,43 @@ ${input.slice(result.pos)}
|
|
|
11811
11862
|
function OpenParen(ctx, state) {
|
|
11812
11863
|
return $EVENT(ctx, state, "OpenParen", OpenParen$0);
|
|
11813
11864
|
}
|
|
11814
|
-
var Operator$0 = $TS($S($EXPECT($
|
|
11865
|
+
var Operator$0 = $TS($S($EXPECT($L162, 'Operator "operator"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11815
11866
|
return { $loc, token: $1 };
|
|
11816
11867
|
});
|
|
11817
11868
|
function Operator(ctx, state) {
|
|
11818
11869
|
return $EVENT(ctx, state, "Operator", Operator$0);
|
|
11819
11870
|
}
|
|
11820
|
-
var Own$0 = $TS($S($EXPECT($
|
|
11871
|
+
var Own$0 = $TS($S($EXPECT($L163, 'Own "own"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11821
11872
|
return { $loc, token: $1 };
|
|
11822
11873
|
});
|
|
11823
11874
|
function Own(ctx, state) {
|
|
11824
11875
|
return $EVENT(ctx, state, "Own", Own$0);
|
|
11825
11876
|
}
|
|
11826
|
-
var Public$0 = $TS($S($EXPECT($
|
|
11877
|
+
var Public$0 = $TS($S($EXPECT($L164, 'Public "public"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11827
11878
|
return { $loc, token: $1 };
|
|
11828
11879
|
});
|
|
11829
11880
|
function Public(ctx, state) {
|
|
11830
11881
|
return $EVENT(ctx, state, "Public", Public$0);
|
|
11831
11882
|
}
|
|
11832
|
-
var Private$0 = $TS($S($EXPECT($
|
|
11883
|
+
var Private$0 = $TS($S($EXPECT($L165, 'Private "private"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11833
11884
|
return { $loc, token: $1 };
|
|
11834
11885
|
});
|
|
11835
11886
|
function Private(ctx, state) {
|
|
11836
11887
|
return $EVENT(ctx, state, "Private", Private$0);
|
|
11837
11888
|
}
|
|
11838
|
-
var Protected$0 = $TS($S($EXPECT($
|
|
11889
|
+
var Protected$0 = $TS($S($EXPECT($L166, 'Protected "protected"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11839
11890
|
return { $loc, token: $1 };
|
|
11840
11891
|
});
|
|
11841
11892
|
function Protected(ctx, state) {
|
|
11842
11893
|
return $EVENT(ctx, state, "Protected", Protected$0);
|
|
11843
11894
|
}
|
|
11844
|
-
var Pipe$0 = $TV($C($EXPECT($
|
|
11895
|
+
var Pipe$0 = $TV($C($EXPECT($L167, 'Pipe "||>"'), $EXPECT($L168, 'Pipe "|\u25B7"')), function($skip, $loc, $0, $1) {
|
|
11845
11896
|
return { $loc, token: "||>" };
|
|
11846
11897
|
});
|
|
11847
|
-
var Pipe$1 = $TV($C($EXPECT($
|
|
11898
|
+
var Pipe$1 = $TV($C($EXPECT($L169, 'Pipe "|>="'), $EXPECT($L170, 'Pipe "\u25B7="')), function($skip, $loc, $0, $1) {
|
|
11848
11899
|
return { $loc, token: "|>=" };
|
|
11849
11900
|
});
|
|
11850
|
-
var Pipe$2 = $TV($C($EXPECT($
|
|
11901
|
+
var Pipe$2 = $TV($C($EXPECT($L171, 'Pipe "|>"'), $EXPECT($L172, 'Pipe "\u25B7"')), function($skip, $loc, $0, $1) {
|
|
11851
11902
|
return { $loc, token: "|>" };
|
|
11852
11903
|
});
|
|
11853
11904
|
var Pipe$$ = [Pipe$0, Pipe$1, Pipe$2];
|
|
@@ -11860,19 +11911,19 @@ ${input.slice(result.pos)}
|
|
|
11860
11911
|
function QuestionMark(ctx, state) {
|
|
11861
11912
|
return $EVENT(ctx, state, "QuestionMark", QuestionMark$0);
|
|
11862
11913
|
}
|
|
11863
|
-
var Readonly$0 = $TS($S($EXPECT($
|
|
11914
|
+
var Readonly$0 = $TS($S($EXPECT($L173, 'Readonly "readonly"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11864
11915
|
return { $loc, token: $1, ts: true };
|
|
11865
11916
|
});
|
|
11866
11917
|
function Readonly(ctx, state) {
|
|
11867
11918
|
return $EVENT(ctx, state, "Readonly", Readonly$0);
|
|
11868
11919
|
}
|
|
11869
|
-
var Return$0 = $TS($S($EXPECT($
|
|
11920
|
+
var Return$0 = $TS($S($EXPECT($L174, 'Return "return"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11870
11921
|
return { $loc, token: $1 };
|
|
11871
11922
|
});
|
|
11872
11923
|
function Return(ctx, state) {
|
|
11873
11924
|
return $EVENT(ctx, state, "Return", Return$0);
|
|
11874
11925
|
}
|
|
11875
|
-
var Satisfies$0 = $TS($S($EXPECT($
|
|
11926
|
+
var Satisfies$0 = $TS($S($EXPECT($L175, 'Satisfies "satisfies"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11876
11927
|
return { $loc, token: $1 };
|
|
11877
11928
|
});
|
|
11878
11929
|
function Satisfies(ctx, state) {
|
|
@@ -11884,7 +11935,7 @@ ${input.slice(result.pos)}
|
|
|
11884
11935
|
function Semicolon(ctx, state) {
|
|
11885
11936
|
return $EVENT(ctx, state, "Semicolon", Semicolon$0);
|
|
11886
11937
|
}
|
|
11887
|
-
var SingleQuote$0 = $TV($EXPECT($
|
|
11938
|
+
var SingleQuote$0 = $TV($EXPECT($L176, `SingleQuote "'"`), function($skip, $loc, $0, $1) {
|
|
11888
11939
|
return { $loc, token: $1 };
|
|
11889
11940
|
});
|
|
11890
11941
|
function SingleQuote(ctx, state) {
|
|
@@ -11896,7 +11947,7 @@ ${input.slice(result.pos)}
|
|
|
11896
11947
|
function Star(ctx, state) {
|
|
11897
11948
|
return $EVENT(ctx, state, "Star", Star$0);
|
|
11898
11949
|
}
|
|
11899
|
-
var Static$0 = $TS($S($EXPECT($
|
|
11950
|
+
var Static$0 = $TS($S($EXPECT($L177, 'Static "static"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11900
11951
|
return { $loc, token: $1 };
|
|
11901
11952
|
});
|
|
11902
11953
|
var Static$1 = $TS($S($EXPECT($L120, 'Static "@"'), $N($C($EXPECT($L4, 'Static "("'), $EXPECT($L120, 'Static "@"')))), function($skip, $loc, $0, $1, $2) {
|
|
@@ -11906,127 +11957,127 @@ ${input.slice(result.pos)}
|
|
|
11906
11957
|
function Static(ctx, state) {
|
|
11907
11958
|
return $EVENT_C(ctx, state, "Static", Static$$);
|
|
11908
11959
|
}
|
|
11909
|
-
var SubstitutionStart$0 = $TV($EXPECT($
|
|
11960
|
+
var SubstitutionStart$0 = $TV($EXPECT($L178, 'SubstitutionStart "${"'), function($skip, $loc, $0, $1) {
|
|
11910
11961
|
return { $loc, token: $1 };
|
|
11911
11962
|
});
|
|
11912
11963
|
function SubstitutionStart(ctx, state) {
|
|
11913
11964
|
return $EVENT(ctx, state, "SubstitutionStart", SubstitutionStart$0);
|
|
11914
11965
|
}
|
|
11915
|
-
var Super$0 = $TS($S($EXPECT($
|
|
11966
|
+
var Super$0 = $TS($S($EXPECT($L179, 'Super "super"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11916
11967
|
return { $loc, token: $1 };
|
|
11917
11968
|
});
|
|
11918
11969
|
function Super(ctx, state) {
|
|
11919
11970
|
return $EVENT(ctx, state, "Super", Super$0);
|
|
11920
11971
|
}
|
|
11921
|
-
var Switch$0 = $TS($S($EXPECT($
|
|
11972
|
+
var Switch$0 = $TS($S($EXPECT($L180, 'Switch "switch"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11922
11973
|
return { $loc, token: $1 };
|
|
11923
11974
|
});
|
|
11924
11975
|
function Switch(ctx, state) {
|
|
11925
11976
|
return $EVENT(ctx, state, "Switch", Switch$0);
|
|
11926
11977
|
}
|
|
11927
|
-
var Target$0 = $TS($S($EXPECT($
|
|
11978
|
+
var Target$0 = $TS($S($EXPECT($L181, 'Target "target"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11928
11979
|
return { $loc, token: $1 };
|
|
11929
11980
|
});
|
|
11930
11981
|
function Target(ctx, state) {
|
|
11931
11982
|
return $EVENT(ctx, state, "Target", Target$0);
|
|
11932
11983
|
}
|
|
11933
|
-
var Then$0 = $TS($S(__, $EXPECT($
|
|
11984
|
+
var Then$0 = $TS($S(__, $EXPECT($L182, 'Then "then"'), NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
|
|
11934
11985
|
return { $loc, token: "" };
|
|
11935
11986
|
});
|
|
11936
11987
|
function Then(ctx, state) {
|
|
11937
11988
|
return $EVENT(ctx, state, "Then", Then$0);
|
|
11938
11989
|
}
|
|
11939
|
-
var This$0 = $TS($S($EXPECT($
|
|
11990
|
+
var This$0 = $TS($S($EXPECT($L183, 'This "this"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11940
11991
|
return { $loc, token: $1 };
|
|
11941
11992
|
});
|
|
11942
11993
|
function This(ctx, state) {
|
|
11943
11994
|
return $EVENT(ctx, state, "This", This$0);
|
|
11944
11995
|
}
|
|
11945
|
-
var Throw$0 = $TS($S($EXPECT($
|
|
11996
|
+
var Throw$0 = $TS($S($EXPECT($L184, 'Throw "throw"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11946
11997
|
return { $loc, token: $1 };
|
|
11947
11998
|
});
|
|
11948
11999
|
function Throw(ctx, state) {
|
|
11949
12000
|
return $EVENT(ctx, state, "Throw", Throw$0);
|
|
11950
12001
|
}
|
|
11951
|
-
var TripleDoubleQuote$0 = $TV($EXPECT($
|
|
12002
|
+
var TripleDoubleQuote$0 = $TV($EXPECT($L185, 'TripleDoubleQuote "\\\\\\"\\\\\\"\\\\\\""'), function($skip, $loc, $0, $1) {
|
|
11952
12003
|
return { $loc, token: "`" };
|
|
11953
12004
|
});
|
|
11954
12005
|
function TripleDoubleQuote(ctx, state) {
|
|
11955
12006
|
return $EVENT(ctx, state, "TripleDoubleQuote", TripleDoubleQuote$0);
|
|
11956
12007
|
}
|
|
11957
|
-
var TripleSingleQuote$0 = $TV($EXPECT($
|
|
12008
|
+
var TripleSingleQuote$0 = $TV($EXPECT($L186, `TripleSingleQuote "'''"`), function($skip, $loc, $0, $1) {
|
|
11958
12009
|
return { $loc, token: "`" };
|
|
11959
12010
|
});
|
|
11960
12011
|
function TripleSingleQuote(ctx, state) {
|
|
11961
12012
|
return $EVENT(ctx, state, "TripleSingleQuote", TripleSingleQuote$0);
|
|
11962
12013
|
}
|
|
11963
|
-
var TripleSlash$0 = $TV($EXPECT($
|
|
12014
|
+
var TripleSlash$0 = $TV($EXPECT($L187, 'TripleSlash "///"'), function($skip, $loc, $0, $1) {
|
|
11964
12015
|
return { $loc, token: "/" };
|
|
11965
12016
|
});
|
|
11966
12017
|
function TripleSlash(ctx, state) {
|
|
11967
12018
|
return $EVENT(ctx, state, "TripleSlash", TripleSlash$0);
|
|
11968
12019
|
}
|
|
11969
|
-
var TripleTick$0 = $TV($EXPECT($
|
|
12020
|
+
var TripleTick$0 = $TV($EXPECT($L188, 'TripleTick "```"'), function($skip, $loc, $0, $1) {
|
|
11970
12021
|
return { $loc, token: "`" };
|
|
11971
12022
|
});
|
|
11972
12023
|
function TripleTick(ctx, state) {
|
|
11973
12024
|
return $EVENT(ctx, state, "TripleTick", TripleTick$0);
|
|
11974
12025
|
}
|
|
11975
|
-
var Try$0 = $TS($S($EXPECT($
|
|
12026
|
+
var Try$0 = $TS($S($EXPECT($L189, 'Try "try"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11976
12027
|
return { $loc, token: $1 };
|
|
11977
12028
|
});
|
|
11978
12029
|
function Try(ctx, state) {
|
|
11979
12030
|
return $EVENT(ctx, state, "Try", Try$0);
|
|
11980
12031
|
}
|
|
11981
|
-
var Typeof$0 = $TS($S($EXPECT($
|
|
12032
|
+
var Typeof$0 = $TS($S($EXPECT($L190, 'Typeof "typeof"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11982
12033
|
return { $loc, token: $1 };
|
|
11983
12034
|
});
|
|
11984
12035
|
function Typeof(ctx, state) {
|
|
11985
12036
|
return $EVENT(ctx, state, "Typeof", Typeof$0);
|
|
11986
12037
|
}
|
|
11987
|
-
var Unless$0 = $TS($S($EXPECT($
|
|
12038
|
+
var Unless$0 = $TS($S($EXPECT($L191, 'Unless "unless"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11988
12039
|
return { $loc, token: $1, negated: true };
|
|
11989
12040
|
});
|
|
11990
12041
|
function Unless(ctx, state) {
|
|
11991
12042
|
return $EVENT(ctx, state, "Unless", Unless$0);
|
|
11992
12043
|
}
|
|
11993
|
-
var Until$0 = $TS($S($EXPECT($
|
|
12044
|
+
var Until$0 = $TS($S($EXPECT($L192, 'Until "until"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
11994
12045
|
return { $loc, token: $1 };
|
|
11995
12046
|
});
|
|
11996
12047
|
function Until(ctx, state) {
|
|
11997
12048
|
return $EVENT(ctx, state, "Until", Until$0);
|
|
11998
12049
|
}
|
|
11999
|
-
var Using$0 = $TS($S($EXPECT($
|
|
12050
|
+
var Using$0 = $TS($S($EXPECT($L193, 'Using "using"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
12000
12051
|
return { $loc, token: $1 };
|
|
12001
12052
|
});
|
|
12002
12053
|
function Using(ctx, state) {
|
|
12003
12054
|
return $EVENT(ctx, state, "Using", Using$0);
|
|
12004
12055
|
}
|
|
12005
|
-
var Var$0 = $TS($S($EXPECT($
|
|
12056
|
+
var Var$0 = $TS($S($EXPECT($L194, 'Var "var"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
12006
12057
|
return { $loc, token: $1 };
|
|
12007
12058
|
});
|
|
12008
12059
|
function Var(ctx, state) {
|
|
12009
12060
|
return $EVENT(ctx, state, "Var", Var$0);
|
|
12010
12061
|
}
|
|
12011
|
-
var Void$0 = $TS($S($EXPECT($
|
|
12062
|
+
var Void$0 = $TS($S($EXPECT($L195, 'Void "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
12012
12063
|
return { $loc, token: $1 };
|
|
12013
12064
|
});
|
|
12014
12065
|
function Void(ctx, state) {
|
|
12015
12066
|
return $EVENT(ctx, state, "Void", Void$0);
|
|
12016
12067
|
}
|
|
12017
|
-
var When$0 = $TS($S($EXPECT($
|
|
12068
|
+
var When$0 = $TS($S($EXPECT($L196, 'When "when"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
12018
12069
|
return { $loc, token: "case" };
|
|
12019
12070
|
});
|
|
12020
12071
|
function When(ctx, state) {
|
|
12021
12072
|
return $EVENT(ctx, state, "When", When$0);
|
|
12022
12073
|
}
|
|
12023
|
-
var While$0 = $TS($S($EXPECT($
|
|
12074
|
+
var While$0 = $TS($S($EXPECT($L197, 'While "while"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
12024
12075
|
return { $loc, token: $1 };
|
|
12025
12076
|
});
|
|
12026
12077
|
function While(ctx, state) {
|
|
12027
12078
|
return $EVENT(ctx, state, "While", While$0);
|
|
12028
12079
|
}
|
|
12029
|
-
var Yield$0 = $TS($S($EXPECT($
|
|
12080
|
+
var Yield$0 = $TS($S($EXPECT($L198, 'Yield "yield"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
12030
12081
|
return { $loc, token: $1, type: "Yield" };
|
|
12031
12082
|
});
|
|
12032
12083
|
function Yield(ctx, state) {
|
|
@@ -12105,7 +12156,7 @@ ${input.slice(result.pos)}
|
|
|
12105
12156
|
function JSXElement(ctx, state) {
|
|
12106
12157
|
return $EVENT_C(ctx, state, "JSXElement", JSXElement$$);
|
|
12107
12158
|
}
|
|
12108
|
-
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) {
|
|
12109
12160
|
return { type: "JSXElement", children: $0, tag: $2 };
|
|
12110
12161
|
});
|
|
12111
12162
|
function JSXSelfClosingElement(ctx, state) {
|
|
@@ -12139,7 +12190,7 @@ ${input.slice(result.pos)}
|
|
|
12139
12190
|
function JSXOptionalClosingElement(ctx, state) {
|
|
12140
12191
|
return $EVENT_C(ctx, state, "JSXOptionalClosingElement", JSXOptionalClosingElement$$);
|
|
12141
12192
|
}
|
|
12142
|
-
var JSXClosingElement$0 = $S($EXPECT($
|
|
12193
|
+
var JSXClosingElement$0 = $S($EXPECT($L200, 'JSXClosingElement "</"'), $E(Whitespace), JSXElementName, $E(Whitespace), $EXPECT($L37, 'JSXClosingElement ">"'));
|
|
12143
12194
|
function JSXClosingElement(ctx, state) {
|
|
12144
12195
|
return $EVENT(ctx, state, "JSXClosingElement", JSXClosingElement$0);
|
|
12145
12196
|
}
|
|
@@ -12160,7 +12211,7 @@ ${input.slice(result.pos)}
|
|
|
12160
12211
|
];
|
|
12161
12212
|
return { type: "JSXFragment", children: parts, jsxChildren: children.jsxChildren };
|
|
12162
12213
|
});
|
|
12163
|
-
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) {
|
|
12164
12215
|
var children = $3;
|
|
12165
12216
|
$0 = $0.slice(1);
|
|
12166
12217
|
return {
|
|
@@ -12173,7 +12224,7 @@ ${input.slice(result.pos)}
|
|
|
12173
12224
|
function JSXFragment(ctx, state) {
|
|
12174
12225
|
return $EVENT_C(ctx, state, "JSXFragment", JSXFragment$$);
|
|
12175
12226
|
}
|
|
12176
|
-
var PushJSXOpeningFragment$0 = $TV($EXPECT($
|
|
12227
|
+
var PushJSXOpeningFragment$0 = $TV($EXPECT($L201, 'PushJSXOpeningFragment "<>"'), function($skip, $loc, $0, $1) {
|
|
12177
12228
|
module.JSXTagStack.push("");
|
|
12178
12229
|
return $1;
|
|
12179
12230
|
});
|
|
@@ -12190,7 +12241,7 @@ ${input.slice(result.pos)}
|
|
|
12190
12241
|
function JSXOptionalClosingFragment(ctx, state) {
|
|
12191
12242
|
return $EVENT_C(ctx, state, "JSXOptionalClosingFragment", JSXOptionalClosingFragment$$);
|
|
12192
12243
|
}
|
|
12193
|
-
var JSXClosingFragment$0 = $EXPECT($
|
|
12244
|
+
var JSXClosingFragment$0 = $EXPECT($L202, 'JSXClosingFragment "</>"');
|
|
12194
12245
|
function JSXClosingFragment(ctx, state) {
|
|
12195
12246
|
return $EVENT(ctx, state, "JSXClosingFragment", JSXClosingFragment$0);
|
|
12196
12247
|
}
|
|
@@ -12664,7 +12715,7 @@ ${input.slice(result.pos)}
|
|
|
12664
12715
|
function JSXChild(ctx, state) {
|
|
12665
12716
|
return $EVENT_C(ctx, state, "JSXChild", JSXChild$$);
|
|
12666
12717
|
}
|
|
12667
|
-
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) {
|
|
12668
12719
|
return ["{/*", $2, "*/}"];
|
|
12669
12720
|
});
|
|
12670
12721
|
function JSXComment(ctx, state) {
|
|
@@ -12751,21 +12802,66 @@ ${input.slice(result.pos)}
|
|
|
12751
12802
|
var TypeDeclaration$0 = $T($S($E($S(Export, $E(_))), $S(Declare, $E(_)), TypeLexicalDeclaration), function(value) {
|
|
12752
12803
|
return { "ts": true, "children": value };
|
|
12753
12804
|
});
|
|
12754
|
-
var TypeDeclaration$1 = $
|
|
12755
|
-
|
|
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
|
+
};
|
|
12756
12816
|
});
|
|
12757
12817
|
var TypeDeclaration$$ = [TypeDeclaration$0, TypeDeclaration$1];
|
|
12758
12818
|
function TypeDeclaration(ctx, state) {
|
|
12759
12819
|
return $EVENT_C(ctx, state, "TypeDeclaration", TypeDeclaration$$);
|
|
12760
12820
|
}
|
|
12761
|
-
var TypeDeclarationRest$0 =
|
|
12762
|
-
var TypeDeclarationRest$1 =
|
|
12763
|
-
var TypeDeclarationRest$2 =
|
|
12821
|
+
var TypeDeclarationRest$0 = TypeAliasDeclaration;
|
|
12822
|
+
var TypeDeclarationRest$1 = InterfaceDeclaration;
|
|
12823
|
+
var TypeDeclarationRest$2 = NamespaceDeclaration;
|
|
12764
12824
|
var TypeDeclarationRest$3 = FunctionSignature;
|
|
12765
12825
|
var TypeDeclarationRest$$ = [TypeDeclarationRest$0, TypeDeclarationRest$1, TypeDeclarationRest$2, TypeDeclarationRest$3];
|
|
12766
12826
|
function TypeDeclarationRest(ctx, state) {
|
|
12767
12827
|
return $EVENT_C(ctx, state, "TypeDeclarationRest", TypeDeclarationRest$$);
|
|
12768
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
|
+
}
|
|
12769
12865
|
var OptionalEquals$0 = $S(__, Equals);
|
|
12770
12866
|
var OptionalEquals$1 = $T($S($Y(IndentedFurther), InsertSpaceEquals), function(value) {
|
|
12771
12867
|
return value[1];
|
|
@@ -12796,37 +12892,37 @@ ${input.slice(result.pos)}
|
|
|
12796
12892
|
function InterfaceExtendsTarget(ctx, state) {
|
|
12797
12893
|
return $EVENT(ctx, state, "InterfaceExtendsTarget", InterfaceExtendsTarget$0);
|
|
12798
12894
|
}
|
|
12799
|
-
var TypeKeyword$0 = $TS($S($EXPECT($
|
|
12895
|
+
var TypeKeyword$0 = $TS($S($EXPECT($L205, 'TypeKeyword "type"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
12800
12896
|
return { $loc, token: $1 };
|
|
12801
12897
|
});
|
|
12802
12898
|
function TypeKeyword(ctx, state) {
|
|
12803
12899
|
return $EVENT(ctx, state, "TypeKeyword", TypeKeyword$0);
|
|
12804
12900
|
}
|
|
12805
|
-
var Enum$0 = $TS($S($EXPECT($
|
|
12901
|
+
var Enum$0 = $TS($S($EXPECT($L206, 'Enum "enum"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
12806
12902
|
return { $loc, token: $1 };
|
|
12807
12903
|
});
|
|
12808
12904
|
function Enum(ctx, state) {
|
|
12809
12905
|
return $EVENT(ctx, state, "Enum", Enum$0);
|
|
12810
12906
|
}
|
|
12811
|
-
var Interface$0 = $TS($S($EXPECT($
|
|
12907
|
+
var Interface$0 = $TS($S($EXPECT($L207, 'Interface "interface"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
12812
12908
|
return { $loc, token: $1 };
|
|
12813
12909
|
});
|
|
12814
12910
|
function Interface(ctx, state) {
|
|
12815
12911
|
return $EVENT(ctx, state, "Interface", Interface$0);
|
|
12816
12912
|
}
|
|
12817
|
-
var Global$0 = $TS($S($EXPECT($
|
|
12913
|
+
var Global$0 = $TS($S($EXPECT($L208, 'Global "global"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
12818
12914
|
return { $loc, token: $1 };
|
|
12819
12915
|
});
|
|
12820
12916
|
function Global(ctx, state) {
|
|
12821
12917
|
return $EVENT(ctx, state, "Global", Global$0);
|
|
12822
12918
|
}
|
|
12823
|
-
var Module$0 = $TS($S($EXPECT($
|
|
12919
|
+
var Module$0 = $TS($S($EXPECT($L209, 'Module "module"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
12824
12920
|
return { $loc, token: $1 };
|
|
12825
12921
|
});
|
|
12826
12922
|
function Module(ctx, state) {
|
|
12827
12923
|
return $EVENT(ctx, state, "Module", Module$0);
|
|
12828
12924
|
}
|
|
12829
|
-
var Namespace$0 = $TS($S($EXPECT($
|
|
12925
|
+
var Namespace$0 = $TS($S($EXPECT($L210, 'Namespace "namespace"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
12830
12926
|
return { $loc, token: $1 };
|
|
12831
12927
|
});
|
|
12832
12928
|
function Namespace(ctx, state) {
|
|
@@ -12928,9 +13024,10 @@ ${input.slice(result.pos)}
|
|
|
12928
13024
|
children: $0
|
|
12929
13025
|
};
|
|
12930
13026
|
const names = new Set(block.properties.map((p) => p.name.name));
|
|
12931
|
-
return
|
|
12932
|
-
|
|
12933
|
-
|
|
13027
|
+
return {
|
|
13028
|
+
type: "EnumDeclaration",
|
|
13029
|
+
id,
|
|
13030
|
+
children: [ts, {
|
|
12934
13031
|
js: true,
|
|
12935
13032
|
children: [
|
|
12936
13033
|
["let ", id, " = {};\n"],
|
|
@@ -12972,8 +13069,8 @@ ${input.slice(result.pos)}
|
|
|
12972
13069
|
}
|
|
12973
13070
|
})
|
|
12974
13071
|
]
|
|
12975
|
-
}
|
|
12976
|
-
|
|
13072
|
+
}]
|
|
13073
|
+
};
|
|
12977
13074
|
});
|
|
12978
13075
|
function EnumDeclaration(ctx, state) {
|
|
12979
13076
|
return $EVENT(ctx, state, "EnumDeclaration", EnumDeclaration$0);
|
|
@@ -13003,26 +13100,26 @@ ${input.slice(result.pos)}
|
|
|
13003
13100
|
function EnumBlock(ctx, state) {
|
|
13004
13101
|
return $EVENT_C(ctx, state, "EnumBlock", EnumBlock$$);
|
|
13005
13102
|
}
|
|
13006
|
-
var NestedEnumProperties$0 = $TS($S(PushIndent, $Q(
|
|
13103
|
+
var NestedEnumProperties$0 = $TS($S(PushIndent, $Q(NestedEnumPropertyLine), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
|
|
13007
13104
|
var props = $2;
|
|
13008
13105
|
if (!props.length)
|
|
13009
13106
|
return $skip;
|
|
13010
13107
|
return {
|
|
13011
|
-
properties: props.map((p) => p.property),
|
|
13108
|
+
properties: props.flat().map((p) => p.property),
|
|
13012
13109
|
children: $0
|
|
13013
13110
|
};
|
|
13014
13111
|
});
|
|
13015
13112
|
function NestedEnumProperties(ctx, state) {
|
|
13016
13113
|
return $EVENT(ctx, state, "NestedEnumProperties", NestedEnumProperties$0);
|
|
13017
13114
|
}
|
|
13018
|
-
var
|
|
13019
|
-
return {
|
|
13020
|
-
property:
|
|
13021
|
-
children:
|
|
13022
|
-
};
|
|
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
|
+
}));
|
|
13023
13120
|
});
|
|
13024
|
-
function
|
|
13025
|
-
return $EVENT(ctx, state, "
|
|
13121
|
+
function NestedEnumPropertyLine(ctx, state) {
|
|
13122
|
+
return $EVENT(ctx, state, "NestedEnumPropertyLine", NestedEnumPropertyLine$0);
|
|
13026
13123
|
}
|
|
13027
13124
|
var EnumProperty$0 = $TS($S(Identifier, $E($S(__, Equals, ExtendedExpression)), ObjectPropertyDelimiter), function($skip, $loc, $0, $1, $2, $3) {
|
|
13028
13125
|
var name = $1;
|
|
@@ -13099,7 +13196,7 @@ ${input.slice(result.pos)}
|
|
|
13099
13196
|
function ReturnTypeSuffix(ctx, state) {
|
|
13100
13197
|
return $EVENT(ctx, state, "ReturnTypeSuffix", ReturnTypeSuffix$0);
|
|
13101
13198
|
}
|
|
13102
|
-
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) {
|
|
13103
13200
|
var asserts = $1;
|
|
13104
13201
|
var t = $2;
|
|
13105
13202
|
if (asserts) {
|
|
@@ -13120,7 +13217,7 @@ ${input.slice(result.pos)}
|
|
|
13120
13217
|
function ReturnType(ctx, state) {
|
|
13121
13218
|
return $EVENT(ctx, state, "ReturnType", ReturnType$0);
|
|
13122
13219
|
}
|
|
13123
|
-
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) {
|
|
13124
13221
|
var lhs = $1;
|
|
13125
13222
|
var rhs = $2;
|
|
13126
13223
|
if (!rhs)
|
|
@@ -13154,7 +13251,7 @@ ${input.slice(result.pos)}
|
|
|
13154
13251
|
function TypeBinary(ctx, state) {
|
|
13155
13252
|
return $EVENT(ctx, state, "TypeBinary", TypeBinary$0);
|
|
13156
13253
|
}
|
|
13157
|
-
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) {
|
|
13158
13255
|
var prefix = $1;
|
|
13159
13256
|
var t = $2;
|
|
13160
13257
|
var suffix = $3;
|
|
@@ -13178,10 +13275,9 @@ ${input.slice(result.pos)}
|
|
|
13178
13275
|
function TypeUnarySuffix(ctx, state) {
|
|
13179
13276
|
return $EVENT_C(ctx, state, "TypeUnarySuffix", TypeUnarySuffix$$);
|
|
13180
13277
|
}
|
|
13181
|
-
var TypeUnaryOp$0 = $S($EXPECT($
|
|
13182
|
-
var TypeUnaryOp$1 = $S($EXPECT($
|
|
13183
|
-
var TypeUnaryOp
|
|
13184
|
-
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];
|
|
13185
13281
|
function TypeUnaryOp(ctx, state) {
|
|
13186
13282
|
return $EVENT_C(ctx, state, "TypeUnaryOp", TypeUnaryOp$$);
|
|
13187
13283
|
}
|
|
@@ -13216,19 +13312,20 @@ ${input.slice(result.pos)}
|
|
|
13216
13312
|
function UnknownAlias(ctx, state) {
|
|
13217
13313
|
return $EVENT(ctx, state, "UnknownAlias", UnknownAlias$0);
|
|
13218
13314
|
}
|
|
13219
|
-
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) {
|
|
13220
13317
|
return {
|
|
13221
13318
|
type: "TypeofType",
|
|
13222
13319
|
children: $0
|
|
13223
13320
|
};
|
|
13224
13321
|
});
|
|
13225
|
-
var TypePrimary$
|
|
13322
|
+
var TypePrimary$2 = $TS($S($E(_), TypeTuple), function($skip, $loc, $0, $1, $2) {
|
|
13226
13323
|
return { ...$2, children: [$1, ...$2.children] };
|
|
13227
13324
|
});
|
|
13228
|
-
var TypePrimary$
|
|
13229
|
-
var TypePrimary$
|
|
13230
|
-
var TypePrimary$
|
|
13231
|
-
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) {
|
|
13232
13329
|
var t = $2;
|
|
13233
13330
|
return {
|
|
13234
13331
|
type: "ImportType",
|
|
@@ -13236,7 +13333,7 @@ ${input.slice(result.pos)}
|
|
|
13236
13333
|
children: $0
|
|
13237
13334
|
};
|
|
13238
13335
|
});
|
|
13239
|
-
var TypePrimary$
|
|
13336
|
+
var TypePrimary$7 = $TS($S($E(_), TypeLiteral), function($skip, $loc, $0, $1, $2) {
|
|
13240
13337
|
var t = $2;
|
|
13241
13338
|
return {
|
|
13242
13339
|
type: "LiteralType",
|
|
@@ -13244,7 +13341,7 @@ ${input.slice(result.pos)}
|
|
|
13244
13341
|
children: $0
|
|
13245
13342
|
};
|
|
13246
13343
|
});
|
|
13247
|
-
var TypePrimary$
|
|
13344
|
+
var TypePrimary$8 = $TS($S($E(_), UnknownAlias), function($skip, $loc, $0, $1, $2) {
|
|
13248
13345
|
return {
|
|
13249
13346
|
type: "IdentifierType",
|
|
13250
13347
|
children: $0,
|
|
@@ -13252,7 +13349,7 @@ ${input.slice(result.pos)}
|
|
|
13252
13349
|
args: void 0
|
|
13253
13350
|
};
|
|
13254
13351
|
});
|
|
13255
|
-
var TypePrimary$
|
|
13352
|
+
var TypePrimary$9 = $TS($S($E(_), IdentifierName, $Q($S(Dot, IdentifierName)), $E(TypeArguments)), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
13256
13353
|
var args = $4;
|
|
13257
13354
|
return {
|
|
13258
13355
|
type: "IdentifierType",
|
|
@@ -13261,13 +13358,13 @@ ${input.slice(result.pos)}
|
|
|
13261
13358
|
args
|
|
13262
13359
|
};
|
|
13263
13360
|
});
|
|
13264
|
-
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) {
|
|
13265
13362
|
return {
|
|
13266
13363
|
type: "ParenthesizedType",
|
|
13267
13364
|
children: $0
|
|
13268
13365
|
};
|
|
13269
13366
|
});
|
|
13270
|
-
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];
|
|
13271
13368
|
function TypePrimary(ctx, state) {
|
|
13272
13369
|
return $EVENT_C(ctx, state, "TypePrimary", TypePrimary$$);
|
|
13273
13370
|
}
|
|
@@ -13343,11 +13440,7 @@ ${input.slice(result.pos)}
|
|
|
13343
13440
|
return [$1, $2, $3, $7, $5, $6, $4];
|
|
13344
13441
|
return $0;
|
|
13345
13442
|
});
|
|
13346
|
-
var TypeConditional$2 =
|
|
13347
|
-
if (!$2)
|
|
13348
|
-
return $1;
|
|
13349
|
-
return $0;
|
|
13350
|
-
});
|
|
13443
|
+
var TypeConditional$2 = TypeBinary;
|
|
13351
13444
|
var TypeConditional$$ = [TypeConditional$0, TypeConditional$1, TypeConditional$2];
|
|
13352
13445
|
function TypeConditional(ctx, state) {
|
|
13353
13446
|
return $EVENT_C(ctx, state, "TypeConditional", TypeConditional$$);
|
|
@@ -13419,7 +13512,7 @@ ${input.slice(result.pos)}
|
|
|
13419
13512
|
}
|
|
13420
13513
|
var TypeLiteral$0 = TypeTemplateLiteral;
|
|
13421
13514
|
var TypeLiteral$1 = Literal;
|
|
13422
|
-
var TypeLiteral$2 = $TS($S($EXPECT($
|
|
13515
|
+
var TypeLiteral$2 = $TS($S($EXPECT($L195, 'TypeLiteral "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
|
|
13423
13516
|
return { type: "VoidType", $loc, token: $1 };
|
|
13424
13517
|
});
|
|
13425
13518
|
var TypeLiteral$3 = $TV($EXPECT($L214, 'TypeLiteral "[]"'), function($skip, $loc, $0, $1) {
|
|
@@ -13505,7 +13598,7 @@ ${input.slice(result.pos)}
|
|
|
13505
13598
|
function TypeParameters(ctx, state) {
|
|
13506
13599
|
return $EVENT(ctx, state, "TypeParameters", TypeParameters$0);
|
|
13507
13600
|
}
|
|
13508
|
-
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);
|
|
13509
13602
|
function TypeParameter(ctx, state) {
|
|
13510
13603
|
return $EVENT(ctx, state, "TypeParameter", TypeParameter$0);
|
|
13511
13604
|
}
|
|
@@ -14750,6 +14843,7 @@ ${input.slice(result.pos)}
|
|
|
14750
14843
|
exports.If = If;
|
|
14751
14844
|
exports.Import = Import;
|
|
14752
14845
|
exports.In = In;
|
|
14846
|
+
exports.Infer = Infer;
|
|
14753
14847
|
exports.LetOrConst = LetOrConst;
|
|
14754
14848
|
exports.Const = Const;
|
|
14755
14849
|
exports.Is = Is;
|
|
@@ -14848,6 +14942,9 @@ ${input.slice(result.pos)}
|
|
|
14848
14942
|
exports.UsingJSModeError = UsingJSModeError;
|
|
14849
14943
|
exports.TypeDeclaration = TypeDeclaration;
|
|
14850
14944
|
exports.TypeDeclarationRest = TypeDeclarationRest;
|
|
14945
|
+
exports.TypeAliasDeclaration = TypeAliasDeclaration;
|
|
14946
|
+
exports.InterfaceDeclaration = InterfaceDeclaration;
|
|
14947
|
+
exports.NamespaceDeclaration = NamespaceDeclaration;
|
|
14851
14948
|
exports.OptionalEquals = OptionalEquals;
|
|
14852
14949
|
exports.TypeLexicalDeclaration = TypeLexicalDeclaration;
|
|
14853
14950
|
exports.TypeDeclarationBinding = TypeDeclarationBinding;
|
|
@@ -14875,7 +14972,7 @@ ${input.slice(result.pos)}
|
|
|
14875
14972
|
exports.EnumDeclaration = EnumDeclaration;
|
|
14876
14973
|
exports.EnumBlock = EnumBlock;
|
|
14877
14974
|
exports.NestedEnumProperties = NestedEnumProperties;
|
|
14878
|
-
exports.
|
|
14975
|
+
exports.NestedEnumPropertyLine = NestedEnumPropertyLine;
|
|
14879
14976
|
exports.EnumProperty = EnumProperty;
|
|
14880
14977
|
exports.TypeProperty = TypeProperty;
|
|
14881
14978
|
exports.TypeIndexSignature = TypeIndexSignature;
|