@danielx/civet 0.6.19 → 0.6.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.js +242 -363
- package/dist/main.js +242 -363
- package/dist/main.mjs +242 -363
- package/package.json +1 -1
package/dist/browser.js
CHANGED
|
@@ -2065,10 +2065,11 @@ var Civet = (() => {
|
|
|
2065
2065
|
});
|
|
2066
2066
|
}
|
|
2067
2067
|
function processProgram(root, config, m, ReservedWord) {
|
|
2068
|
+
assert.equal(m.forbidBracedApplication.length, 1, "forbidBracedApplication");
|
|
2068
2069
|
assert.equal(m.forbidClassImplicitCall.length, 1, "forbidClassImplicitCall");
|
|
2069
2070
|
assert.equal(m.forbidIndentedApplication.length, 1, "forbidIndentedApplication");
|
|
2071
|
+
assert.equal(m.forbidNewlineBinaryOp.length, 1, "forbidNewlineBinaryOp");
|
|
2070
2072
|
assert.equal(m.forbidTrailingMemberProperty.length, 1, "forbidTrailingMemberProperty");
|
|
2071
|
-
assert.equal(m.forbidMultiLineImplicitObjectLiteral.length, 1, "forbidMultiLineImplicitObjectLiteral");
|
|
2072
2073
|
assert.equal(m.JSXTagStack.length, 0, "JSXTagStack should be empty");
|
|
2073
2074
|
addParentPointers(root);
|
|
2074
2075
|
const { expressions: statements } = root;
|
|
@@ -3192,10 +3193,8 @@ ${input.slice(result.pos)}
|
|
|
3192
3193
|
InlineObjectLiteral,
|
|
3193
3194
|
ImplicitInlineObjectPropertyDelimiter,
|
|
3194
3195
|
ObjectPropertyDelimiter,
|
|
3195
|
-
PropertyDefinitionList,
|
|
3196
3196
|
PropertyDefinition,
|
|
3197
3197
|
NamedProperty,
|
|
3198
|
-
ImplicitNamedProperty,
|
|
3199
3198
|
SnugNamedProperty,
|
|
3200
3199
|
PropertyName,
|
|
3201
3200
|
ComputedPropertyName,
|
|
@@ -3301,10 +3300,6 @@ ${input.slice(result.pos)}
|
|
|
3301
3300
|
AllowTrailingMemberProperty,
|
|
3302
3301
|
RestoreTrailingMemberProperty,
|
|
3303
3302
|
TrailingMemberPropertyAllowed,
|
|
3304
|
-
ForbidMultiLineImplicitObjectLiteral,
|
|
3305
|
-
AllowMultiLineImplicitObjectLiteral,
|
|
3306
|
-
RestoreMultiLineImplicitObjectLiteral,
|
|
3307
|
-
MultiLineImplicitObjectLiteralAllowed,
|
|
3308
3303
|
AllowNewlineBinaryOp,
|
|
3309
3304
|
ForbidNewlineBinaryOp,
|
|
3310
3305
|
RestoreNewlineBinaryOp,
|
|
@@ -3538,6 +3533,7 @@ ${input.slice(result.pos)}
|
|
|
3538
3533
|
NestedJSXChildExpression,
|
|
3539
3534
|
TypeDeclaration,
|
|
3540
3535
|
TypeDeclarationRest,
|
|
3536
|
+
OptionalEquals,
|
|
3541
3537
|
TypeLexicalDeclaration,
|
|
3542
3538
|
TypeDeclarationBinding,
|
|
3543
3539
|
InterfaceExtendsClause,
|
|
@@ -3626,6 +3622,7 @@ ${input.slice(result.pos)}
|
|
|
3626
3622
|
InsertOpenBracket,
|
|
3627
3623
|
InsertCloseBracket,
|
|
3628
3624
|
InsertComma,
|
|
3625
|
+
InsertSpaceEquals,
|
|
3629
3626
|
InsertConst,
|
|
3630
3627
|
InsertLet,
|
|
3631
3628
|
InsertReadonly,
|
|
@@ -3653,13 +3650,13 @@ ${input.slice(result.pos)}
|
|
|
3653
3650
|
Init,
|
|
3654
3651
|
Indent,
|
|
3655
3652
|
TrackIndented,
|
|
3656
|
-
Samedent,
|
|
3657
|
-
IndentedFurther,
|
|
3658
|
-
NotDedented,
|
|
3659
|
-
Dedented,
|
|
3660
3653
|
PushIndent,
|
|
3661
3654
|
PopIndent,
|
|
3662
|
-
Nested
|
|
3655
|
+
Nested,
|
|
3656
|
+
IndentedFurther,
|
|
3657
|
+
IndentedAtLeast,
|
|
3658
|
+
NotDedented,
|
|
3659
|
+
Dedented
|
|
3663
3660
|
});
|
|
3664
3661
|
var $L0 = $L("");
|
|
3665
3662
|
var $L1 = $L("{");
|
|
@@ -4503,7 +4500,7 @@ ${input.slice(result.pos)}
|
|
|
4503
4500
|
return result;
|
|
4504
4501
|
}
|
|
4505
4502
|
}
|
|
4506
|
-
var TrailingMemberExpressions$0 = $TS($S($Q(MemberExpressionRest), $Q($S(
|
|
4503
|
+
var TrailingMemberExpressions$0 = $TS($S($Q(MemberExpressionRest), $Q($S(IndentedAtLeast, $Y($S($E($EXPECT($L5, fail, 'TrailingMemberExpressions "?"')), $EXPECT($L6, fail, 'TrailingMemberExpressions "."'), $N($EXPECT($R1, fail, "TrailingMemberExpressions /[0-9]/")))), MemberExpressionRest))), function($skip, $loc, $0, $1, $2) {
|
|
4507
4504
|
return $1.concat($2);
|
|
4508
4505
|
});
|
|
4509
4506
|
function TrailingMemberExpressions(state) {
|
|
@@ -4554,7 +4551,7 @@ ${input.slice(result.pos)}
|
|
|
4554
4551
|
return result;
|
|
4555
4552
|
}
|
|
4556
4553
|
}
|
|
4557
|
-
var TrailingCallExpressions$0 = $P($S(
|
|
4554
|
+
var TrailingCallExpressions$0 = $P($S(IndentedAtLeast, $Y($S($E($EXPECT($L5, fail, 'TrailingCallExpressions "?"')), $EXPECT($L6, fail, 'TrailingCallExpressions "."'), $N($R$0($EXPECT($R1, fail, "TrailingCallExpressions /[0-9]/"))))), $P(CallExpressionRest)));
|
|
4558
4555
|
function TrailingCallExpressions(state) {
|
|
4559
4556
|
let eventData;
|
|
4560
4557
|
if (state.events) {
|
|
@@ -4602,7 +4599,7 @@ ${input.slice(result.pos)}
|
|
|
4602
4599
|
return result;
|
|
4603
4600
|
}
|
|
4604
4601
|
}
|
|
4605
|
-
var CommaDelimiter$0 = $S(
|
|
4602
|
+
var CommaDelimiter$0 = $S(NotDedented, Comma);
|
|
4606
4603
|
function CommaDelimiter(state) {
|
|
4607
4604
|
let eventData;
|
|
4608
4605
|
if (state.events) {
|
|
@@ -8758,7 +8755,7 @@ ${input.slice(result.pos)}
|
|
|
8758
8755
|
var s = $3;
|
|
8759
8756
|
var ws = $4;
|
|
8760
8757
|
var c = $5;
|
|
8761
|
-
if (!s.
|
|
8758
|
+
if (!s.expressions.length)
|
|
8762
8759
|
return $skip;
|
|
8763
8760
|
return {
|
|
8764
8761
|
type: "BlockStatement",
|
|
@@ -8833,16 +8830,16 @@ ${input.slice(result.pos)}
|
|
|
8833
8830
|
return result;
|
|
8834
8831
|
}
|
|
8835
8832
|
}
|
|
8836
|
-
var SingleLineStatements$0 = $TS($S($Q($S($S($E(_), $N(EOS)), Statement, SemicolonDelimiter)), $E($S($S($E(_), $N(EOS)), Statement, $E(SemicolonDelimiter)))), function($skip, $loc, $0, $1, $2) {
|
|
8837
|
-
var stmts = $
|
|
8838
|
-
var last = $
|
|
8839
|
-
const
|
|
8833
|
+
var SingleLineStatements$0 = $TS($S(ForbidNewlineBinaryOp, $Q($S($S($E(_), $N(EOS)), Statement, SemicolonDelimiter)), $E($S($S($E(_), $N(EOS)), Statement, $E(SemicolonDelimiter))), RestoreNewlineBinaryOp), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
8834
|
+
var stmts = $2;
|
|
8835
|
+
var last = $3;
|
|
8836
|
+
const expressions = [...stmts];
|
|
8840
8837
|
if (last)
|
|
8841
|
-
|
|
8838
|
+
expressions.push(last);
|
|
8842
8839
|
return {
|
|
8843
8840
|
type: "BlockStatement",
|
|
8844
|
-
expressions
|
|
8845
|
-
children,
|
|
8841
|
+
expressions,
|
|
8842
|
+
children: [expressions],
|
|
8846
8843
|
bare: true
|
|
8847
8844
|
};
|
|
8848
8845
|
});
|
|
@@ -9298,9 +9295,7 @@ ${input.slice(result.pos)}
|
|
|
9298
9295
|
} else {
|
|
9299
9296
|
children = [open, content, ...ws, close];
|
|
9300
9297
|
}
|
|
9301
|
-
const names = children.flatMap((c) =>
|
|
9302
|
-
return c.names || [];
|
|
9303
|
-
});
|
|
9298
|
+
const names = children.flatMap((c) => c?.names || []);
|
|
9304
9299
|
return {
|
|
9305
9300
|
type: "ArrayExpression",
|
|
9306
9301
|
children,
|
|
@@ -9416,17 +9411,17 @@ ${input.slice(result.pos)}
|
|
|
9416
9411
|
}
|
|
9417
9412
|
}
|
|
9418
9413
|
var ArrayLiteralContent$0 = RangeExpression;
|
|
9419
|
-
var ArrayLiteralContent$1 = $S(
|
|
9420
|
-
var ArrayLiteralContent$2 = NestedElementList
|
|
9421
|
-
var ArrayLiteralContent$3 = $TS($S(ElementListWithIndentedApplicationForbidden, InsertComma, $E(NestedElementList)), function($skip, $loc, $0, $1, $2, $3) {
|
|
9414
|
+
var ArrayLiteralContent$1 = $S(NestedElementList, $Y($S(__, CloseBracket)));
|
|
9415
|
+
var ArrayLiteralContent$2 = $TS($S(ElementListWithIndentedApplicationForbidden, ArrayElementDelimiter, $E(NestedElementList), $Y($S(__, CloseBracket))), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
9422
9416
|
var list = $1;
|
|
9423
|
-
var
|
|
9417
|
+
var delimiter = $2;
|
|
9424
9418
|
var nested = $3;
|
|
9425
|
-
if (nested)
|
|
9426
|
-
return [...list, comma, ...nested];
|
|
9427
|
-
} else {
|
|
9419
|
+
if (!nested)
|
|
9428
9420
|
return list;
|
|
9429
|
-
|
|
9421
|
+
return [...list, delimiter, ...nested];
|
|
9422
|
+
});
|
|
9423
|
+
var ArrayLiteralContent$3 = $TV($Q($S(__, ElementListWithIndentedApplicationForbidden, ArrayElementDelimiter)), function($skip, $loc, $0, $1) {
|
|
9424
|
+
return $1.flat();
|
|
9430
9425
|
});
|
|
9431
9426
|
function ArrayLiteralContent(state) {
|
|
9432
9427
|
let eventData;
|
|
@@ -9574,9 +9569,9 @@ ${input.slice(result.pos)}
|
|
|
9574
9569
|
return result;
|
|
9575
9570
|
}
|
|
9576
9571
|
}
|
|
9577
|
-
var ElementList$0 = $TS($S(ArrayElementExpression, $Q(ElementListRest)), function($skip, $loc, $0, $1, $2) {
|
|
9578
|
-
var first = $
|
|
9579
|
-
var rest = $
|
|
9572
|
+
var ElementList$0 = $TS($S($N(EOS), ArrayElementExpression, $Q(ElementListRest)), function($skip, $loc, $0, $1, $2, $3) {
|
|
9573
|
+
var first = $2;
|
|
9574
|
+
var rest = $3;
|
|
9580
9575
|
if (rest.length) {
|
|
9581
9576
|
return [{
|
|
9582
9577
|
...first,
|
|
@@ -9613,7 +9608,7 @@ ${input.slice(result.pos)}
|
|
|
9613
9608
|
return result;
|
|
9614
9609
|
}
|
|
9615
9610
|
}
|
|
9616
|
-
var ElementListRest$0 = $S($S(
|
|
9611
|
+
var ElementListRest$0 = $S($S($E(_), Comma, $N(EOS)), ArrayElementExpression);
|
|
9617
9612
|
function ElementListRest(state) {
|
|
9618
9613
|
let eventData;
|
|
9619
9614
|
if (state.events) {
|
|
@@ -9728,26 +9723,16 @@ ${input.slice(result.pos)}
|
|
|
9728
9723
|
return result;
|
|
9729
9724
|
}
|
|
9730
9725
|
}
|
|
9731
|
-
var BracedObjectLiteral$0 = $TS($S(OpenBrace, AllowAll, $E($S(
|
|
9726
|
+
var BracedObjectLiteral$0 = $TS($S(OpenBrace, AllowAll, $E($S(BracedObjectLiteralContent, __, CloseBrace)), RestoreAll), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
9732
9727
|
var open = $1;
|
|
9733
9728
|
if (!$3)
|
|
9734
9729
|
return $skip;
|
|
9735
9730
|
const [properties, ...close] = $3;
|
|
9736
|
-
if (properties) {
|
|
9737
|
-
const children = [open, ...properties, close];
|
|
9738
|
-
return {
|
|
9739
|
-
type: "ObjectExpression",
|
|
9740
|
-
children,
|
|
9741
|
-
names: children.flatMap((c) => {
|
|
9742
|
-
return c.names || [];
|
|
9743
|
-
}),
|
|
9744
|
-
properties
|
|
9745
|
-
};
|
|
9746
|
-
}
|
|
9747
9731
|
return {
|
|
9748
9732
|
type: "ObjectExpression",
|
|
9749
|
-
children: [open, close],
|
|
9750
|
-
names: []
|
|
9733
|
+
children: [open, properties, close],
|
|
9734
|
+
names: properties.flatMap((c) => c.names || []),
|
|
9735
|
+
properties
|
|
9751
9736
|
};
|
|
9752
9737
|
});
|
|
9753
9738
|
function BracedObjectLiteral(state) {
|
|
@@ -9772,8 +9757,33 @@ ${input.slice(result.pos)}
|
|
|
9772
9757
|
return result;
|
|
9773
9758
|
}
|
|
9774
9759
|
}
|
|
9775
|
-
var BracedObjectLiteralContent$0 = NestedPropertyDefinitions
|
|
9776
|
-
|
|
9760
|
+
var BracedObjectLiteralContent$0 = $TS($S($Q($S(PropertyDefinition, ObjectPropertyDelimiter)), $E(NestedPropertyDefinitions)), function($skip, $loc, $0, $1, $2) {
|
|
9761
|
+
var line = $1;
|
|
9762
|
+
var nested = $2;
|
|
9763
|
+
line = line.flatMap(([prop, delim]) => {
|
|
9764
|
+
prop = Array.isArray(prop) ? prop : [prop];
|
|
9765
|
+
let last = prop[prop.length - 1];
|
|
9766
|
+
last = {
|
|
9767
|
+
...last,
|
|
9768
|
+
delim,
|
|
9769
|
+
children: [...last.children, delim]
|
|
9770
|
+
};
|
|
9771
|
+
return [...prop.slice(0, prop.length - 1), last];
|
|
9772
|
+
});
|
|
9773
|
+
return line.concat(nested || []);
|
|
9774
|
+
});
|
|
9775
|
+
var BracedObjectLiteralContent$1 = $TV($P($S(__, PropertyDefinition, ObjectPropertyDelimiter)), function($skip, $loc, $0, $1) {
|
|
9776
|
+
return $0.flatMap(([ws, prop, delim]) => {
|
|
9777
|
+
prop = Array.isArray(prop) ? prop : [prop];
|
|
9778
|
+
let last = prop[prop.length - 1];
|
|
9779
|
+
last = {
|
|
9780
|
+
...last,
|
|
9781
|
+
delim,
|
|
9782
|
+
children: [ws, ...last.children.slice(1), delim]
|
|
9783
|
+
};
|
|
9784
|
+
return [...prop.slice(0, prop.length - 1), last];
|
|
9785
|
+
});
|
|
9786
|
+
});
|
|
9777
9787
|
function BracedObjectLiteralContent(state) {
|
|
9778
9788
|
let eventData;
|
|
9779
9789
|
if (state.events) {
|
|
@@ -9797,9 +9807,11 @@ ${input.slice(result.pos)}
|
|
|
9797
9807
|
}
|
|
9798
9808
|
}
|
|
9799
9809
|
var NestedImplicitObjectLiteral$0 = $TS($S(InsertOpenBrace, NestedImplicitPropertyDefinitions, InsertNewline, InsertIndent, InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
9810
|
+
var properties = $2;
|
|
9800
9811
|
return {
|
|
9801
9812
|
type: "ObjectExpression",
|
|
9802
|
-
|
|
9813
|
+
properties,
|
|
9814
|
+
children: $0
|
|
9803
9815
|
};
|
|
9804
9816
|
});
|
|
9805
9817
|
function NestedImplicitObjectLiteral(state) {
|
|
@@ -9852,7 +9864,7 @@ ${input.slice(result.pos)}
|
|
|
9852
9864
|
return result;
|
|
9853
9865
|
}
|
|
9854
9866
|
}
|
|
9855
|
-
var NestedImplicitPropertyDefinition$0 = $TS($S(Nested,
|
|
9867
|
+
var NestedImplicitPropertyDefinition$0 = $TS($S(Nested, NamedProperty, ObjectPropertyDelimiter), function($skip, $loc, $0, $1, $2, $3) {
|
|
9856
9868
|
var ws = $1;
|
|
9857
9869
|
var prop = $2;
|
|
9858
9870
|
var delimiter = $3;
|
|
@@ -9955,7 +9967,7 @@ ${input.slice(result.pos)}
|
|
|
9955
9967
|
return result;
|
|
9956
9968
|
}
|
|
9957
9969
|
}
|
|
9958
|
-
var InlineObjectLiteral$0 = $TS($S(InsertInlineOpenBrace, SnugNamedProperty, $Q($S(ImplicitInlineObjectPropertyDelimiter,
|
|
9970
|
+
var InlineObjectLiteral$0 = $TS($S(InsertInlineOpenBrace, SnugNamedProperty, $Q($S(ImplicitInlineObjectPropertyDelimiter, NamedProperty)), $E($S($E(_), Comma, $Y(Dedented))), InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
9959
9971
|
var open = $1;
|
|
9960
9972
|
var first = $2;
|
|
9961
9973
|
var rest = $3;
|
|
@@ -9989,7 +10001,7 @@ ${input.slice(result.pos)}
|
|
|
9989
10001
|
}
|
|
9990
10002
|
}
|
|
9991
10003
|
var ImplicitInlineObjectPropertyDelimiter$0 = $S($E(_), Comma, $C(NotDedented, $E(_)));
|
|
9992
|
-
var ImplicitInlineObjectPropertyDelimiter$1 = $T($S($Y($S(
|
|
10004
|
+
var ImplicitInlineObjectPropertyDelimiter$1 = $T($S($Y($S(Nested, NamedProperty)), InsertComma, $C(Nested, $E(_))), function(value) {
|
|
9993
10005
|
return [value[1], value[2]];
|
|
9994
10006
|
});
|
|
9995
10007
|
function ImplicitInlineObjectPropertyDelimiter(state) {
|
|
@@ -10041,41 +10053,7 @@ ${input.slice(result.pos)}
|
|
|
10041
10053
|
return result;
|
|
10042
10054
|
}
|
|
10043
10055
|
}
|
|
10044
|
-
var
|
|
10045
|
-
return $0.flatMap(([prop, delim]) => {
|
|
10046
|
-
prop = Array.isArray(prop) ? prop : [prop];
|
|
10047
|
-
let last = prop[prop.length - 1];
|
|
10048
|
-
last = {
|
|
10049
|
-
...last,
|
|
10050
|
-
delim,
|
|
10051
|
-
children: [...last.children, delim]
|
|
10052
|
-
};
|
|
10053
|
-
return [...prop.slice(0, prop.length - 1), last];
|
|
10054
|
-
});
|
|
10055
|
-
});
|
|
10056
|
-
function PropertyDefinitionList(state) {
|
|
10057
|
-
let eventData;
|
|
10058
|
-
if (state.events) {
|
|
10059
|
-
const result = state.events.enter?.("PropertyDefinitionList", state);
|
|
10060
|
-
if (result) {
|
|
10061
|
-
if (result.cache)
|
|
10062
|
-
return result.cache;
|
|
10063
|
-
eventData = result.data;
|
|
10064
|
-
}
|
|
10065
|
-
}
|
|
10066
|
-
if (state.tokenize) {
|
|
10067
|
-
const result = $TOKEN("PropertyDefinitionList", state, PropertyDefinitionList$0(state));
|
|
10068
|
-
if (state.events)
|
|
10069
|
-
state.events.exit?.("PropertyDefinitionList", state, result, eventData);
|
|
10070
|
-
return result;
|
|
10071
|
-
} else {
|
|
10072
|
-
const result = PropertyDefinitionList$0(state);
|
|
10073
|
-
if (state.events)
|
|
10074
|
-
state.events.exit?.("PropertyDefinitionList", state, result, eventData);
|
|
10075
|
-
return result;
|
|
10076
|
-
}
|
|
10077
|
-
}
|
|
10078
|
-
var PropertyDefinition$0 = $TS($S(__, AtThis, IdentifierReference), function($skip, $loc, $0, $1, $2, $3) {
|
|
10056
|
+
var PropertyDefinition$0 = $TS($S($E(_), AtThis, IdentifierReference), function($skip, $loc, $0, $1, $2, $3) {
|
|
10079
10057
|
var ws = $1;
|
|
10080
10058
|
var at = $2;
|
|
10081
10059
|
var id = $3;
|
|
@@ -10088,7 +10066,7 @@ ${input.slice(result.pos)}
|
|
|
10088
10066
|
value
|
|
10089
10067
|
};
|
|
10090
10068
|
});
|
|
10091
|
-
var PropertyDefinition$1 = $TS($S(
|
|
10069
|
+
var PropertyDefinition$1 = $TS($S($E(_), NamedProperty), function($skip, $loc, $0, $1, $2) {
|
|
10092
10070
|
var ws = $1;
|
|
10093
10071
|
var prop = $2;
|
|
10094
10072
|
return {
|
|
@@ -10096,7 +10074,7 @@ ${input.slice(result.pos)}
|
|
|
10096
10074
|
children: [ws, ...prop.children]
|
|
10097
10075
|
};
|
|
10098
10076
|
});
|
|
10099
|
-
var PropertyDefinition$2 = $TS($S(
|
|
10077
|
+
var PropertyDefinition$2 = $TS($S($E(_), $TEXT($EXPECT($R6, fail, "PropertyDefinition /[!+-]/")), PropertyName), function($skip, $loc, $0, $1, $2, $3) {
|
|
10100
10078
|
var ws = $1;
|
|
10101
10079
|
var toggle = $2;
|
|
10102
10080
|
var id = $3;
|
|
@@ -10109,7 +10087,7 @@ ${input.slice(result.pos)}
|
|
|
10109
10087
|
value
|
|
10110
10088
|
};
|
|
10111
10089
|
});
|
|
10112
|
-
var PropertyDefinition$3 = $TS($S(
|
|
10090
|
+
var PropertyDefinition$3 = $TS($S($E(_), MethodDefinition), function($skip, $loc, $0, $1, $2) {
|
|
10113
10091
|
var ws = $1;
|
|
10114
10092
|
var def = $2;
|
|
10115
10093
|
if (!def.block || def.block.empty)
|
|
@@ -10119,7 +10097,7 @@ ${input.slice(result.pos)}
|
|
|
10119
10097
|
children: [ws, ...def.children]
|
|
10120
10098
|
};
|
|
10121
10099
|
});
|
|
10122
|
-
var PropertyDefinition$4 = $TS($S(
|
|
10100
|
+
var PropertyDefinition$4 = $TS($S($E(_), DotDotDot, ExtendedExpression), function($skip, $loc, $0, $1, $2, $3) {
|
|
10123
10101
|
var ws = $1;
|
|
10124
10102
|
var dots = $2;
|
|
10125
10103
|
var exp = $3;
|
|
@@ -10131,9 +10109,9 @@ ${input.slice(result.pos)}
|
|
|
10131
10109
|
value: exp
|
|
10132
10110
|
};
|
|
10133
10111
|
});
|
|
10134
|
-
var PropertyDefinition$5 = $TS($S(
|
|
10112
|
+
var PropertyDefinition$5 = $TS($S($E(_), $N(EOS), CallExpression), function($skip, $loc, $0, $1, $2, $3) {
|
|
10135
10113
|
var ws = $1;
|
|
10136
|
-
var value = $
|
|
10114
|
+
var value = $3;
|
|
10137
10115
|
switch (value.type) {
|
|
10138
10116
|
case "Identifier":
|
|
10139
10117
|
return { ...value, children: [ws, ...value.children] };
|
|
@@ -10254,41 +10232,8 @@ ${input.slice(result.pos)}
|
|
|
10254
10232
|
return result;
|
|
10255
10233
|
}
|
|
10256
10234
|
}
|
|
10257
|
-
var
|
|
10258
|
-
var
|
|
10259
|
-
var exp = $5;
|
|
10260
|
-
return {
|
|
10261
|
-
type: "Property",
|
|
10262
|
-
children: $0,
|
|
10263
|
-
name,
|
|
10264
|
-
names: exp.names || [],
|
|
10265
|
-
value: exp
|
|
10266
|
-
};
|
|
10267
|
-
});
|
|
10268
|
-
function ImplicitNamedProperty(state) {
|
|
10269
|
-
let eventData;
|
|
10270
|
-
if (state.events) {
|
|
10271
|
-
const result = state.events.enter?.("ImplicitNamedProperty", state);
|
|
10272
|
-
if (result) {
|
|
10273
|
-
if (result.cache)
|
|
10274
|
-
return result.cache;
|
|
10275
|
-
eventData = result.data;
|
|
10276
|
-
}
|
|
10277
|
-
}
|
|
10278
|
-
if (state.tokenize) {
|
|
10279
|
-
const result = $TOKEN("ImplicitNamedProperty", state, ImplicitNamedProperty$0(state));
|
|
10280
|
-
if (state.events)
|
|
10281
|
-
state.events.exit?.("ImplicitNamedProperty", state, result, eventData);
|
|
10282
|
-
return result;
|
|
10283
|
-
} else {
|
|
10284
|
-
const result = ImplicitNamedProperty$0(state);
|
|
10285
|
-
if (state.events)
|
|
10286
|
-
state.events.exit?.("ImplicitNamedProperty", state, result, eventData);
|
|
10287
|
-
return result;
|
|
10288
|
-
}
|
|
10289
|
-
}
|
|
10290
|
-
var SnugNamedProperty$0 = $TS($S(PropertyName, Colon, $C(MultiLineImplicitObjectLiteralAllowed, $N(EOS)), ExtendedExpression), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
10291
|
-
var exp = $4;
|
|
10235
|
+
var SnugNamedProperty$0 = $TS($S(PropertyName, Colon, ExtendedExpression), function($skip, $loc, $0, $1, $2, $3) {
|
|
10236
|
+
var exp = $3;
|
|
10292
10237
|
return {
|
|
10293
10238
|
type: "Property",
|
|
10294
10239
|
children: $0,
|
|
@@ -10864,7 +10809,7 @@ ${input.slice(result.pos)}
|
|
|
10864
10809
|
ws.push(...$2);
|
|
10865
10810
|
return [ws, $3];
|
|
10866
10811
|
});
|
|
10867
|
-
var NotDedentedBinaryOp$1 = $TS($S(
|
|
10812
|
+
var NotDedentedBinaryOp$1 = $TS($S(Nested, $E(_), $N(Identifier), BinaryOp), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
10868
10813
|
const ws = [...$1];
|
|
10869
10814
|
if ($2)
|
|
10870
10815
|
ws.push(...$2);
|
|
@@ -11652,7 +11597,7 @@ ${input.slice(result.pos)}
|
|
|
11652
11597
|
return result;
|
|
11653
11598
|
}
|
|
11654
11599
|
}
|
|
11655
|
-
var ElseClause$0 = $S(
|
|
11600
|
+
var ElseClause$0 = $S(Nested, Else, Block);
|
|
11656
11601
|
var ElseClause$1 = $S($E(_), Else, Block);
|
|
11657
11602
|
function ElseClause(state) {
|
|
11658
11603
|
let eventData;
|
|
@@ -11796,7 +11741,7 @@ ${input.slice(result.pos)}
|
|
|
11796
11741
|
return result;
|
|
11797
11742
|
}
|
|
11798
11743
|
}
|
|
11799
|
-
var ElseExpressionClause$0 = $TS($S($C($S(
|
|
11744
|
+
var ElseExpressionClause$0 = $TS($S($C($S(Nested, Else), $S($E(_), Else)), ElseExpressionBlock), function($skip, $loc, $0, $1, $2) {
|
|
11800
11745
|
return [...$1, $2];
|
|
11801
11746
|
});
|
|
11802
11747
|
function ElseExpressionClause(state) {
|
|
@@ -12900,7 +12845,7 @@ ${input.slice(result.pos)}
|
|
|
12900
12845
|
return result;
|
|
12901
12846
|
}
|
|
12902
12847
|
}
|
|
12903
|
-
var CaseBlock$0 = $TS($S($E($C(
|
|
12848
|
+
var CaseBlock$0 = $TS($S($E($C(Nested, _)), OpenBrace, NestedCaseClauses, __, CloseBrace), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
|
|
12904
12849
|
var clauses = $3;
|
|
12905
12850
|
return {
|
|
12906
12851
|
type: "CaseBlock",
|
|
@@ -13117,11 +13062,9 @@ ${input.slice(result.pos)}
|
|
|
13117
13062
|
return result;
|
|
13118
13063
|
}
|
|
13119
13064
|
}
|
|
13120
|
-
var CaseExpressionList$0 = $TS($S(
|
|
13121
|
-
var first = $
|
|
13122
|
-
var rest = $
|
|
13123
|
-
if (!first)
|
|
13124
|
-
return $skip;
|
|
13065
|
+
var CaseExpressionList$0 = $TS($S($S($E(_), CaseExpression, InsertColon), $Q($S(__, Comma, CaseExpression, InsertColon))), function($skip, $loc, $0, $1, $2) {
|
|
13066
|
+
var first = $1;
|
|
13067
|
+
var rest = $2;
|
|
13125
13068
|
const result = rest.map(([ws, _comma, exp, col]) => {
|
|
13126
13069
|
exp = insertTrimmingSpace(exp, "");
|
|
13127
13070
|
if (ws.length)
|
|
@@ -13314,7 +13257,7 @@ ${input.slice(result.pos)}
|
|
|
13314
13257
|
return result;
|
|
13315
13258
|
}
|
|
13316
13259
|
}
|
|
13317
|
-
var CatchClause$0 = $TS($S($C(
|
|
13260
|
+
var CatchClause$0 = $TS($S($C(Nested, _), Catch, $E(CatchBind), $C(ThenClause, BracedOrEmptyBlock)), function($skip, $loc, $0, $1, $2, $3, $4) {
|
|
13318
13261
|
var block = $4;
|
|
13319
13262
|
return {
|
|
13320
13263
|
type: "CatchClause",
|
|
@@ -13368,7 +13311,7 @@ ${input.slice(result.pos)}
|
|
|
13368
13311
|
return result;
|
|
13369
13312
|
}
|
|
13370
13313
|
}
|
|
13371
|
-
var FinallyClause$0 = $S($C(
|
|
13314
|
+
var FinallyClause$0 = $S($C(Nested, _), Finally, $C(ThenClause, BracedOrEmptyBlock));
|
|
13372
13315
|
function FinallyClause(state) {
|
|
13373
13316
|
let eventData;
|
|
13374
13317
|
if (state.events) {
|
|
@@ -13992,110 +13935,6 @@ ${input.slice(result.pos)}
|
|
|
13992
13935
|
return result;
|
|
13993
13936
|
}
|
|
13994
13937
|
}
|
|
13995
|
-
var ForbidMultiLineImplicitObjectLiteral$0 = $TV($EXPECT($L0, fail, 'ForbidMultiLineImplicitObjectLiteral ""'), function($skip, $loc, $0, $1) {
|
|
13996
|
-
module.forbidMultiLineImplicitObjectLiteral.push(true);
|
|
13997
|
-
});
|
|
13998
|
-
function ForbidMultiLineImplicitObjectLiteral(state) {
|
|
13999
|
-
let eventData;
|
|
14000
|
-
if (state.events) {
|
|
14001
|
-
const result = state.events.enter?.("ForbidMultiLineImplicitObjectLiteral", state);
|
|
14002
|
-
if (result) {
|
|
14003
|
-
if (result.cache)
|
|
14004
|
-
return result.cache;
|
|
14005
|
-
eventData = result.data;
|
|
14006
|
-
}
|
|
14007
|
-
}
|
|
14008
|
-
if (state.tokenize) {
|
|
14009
|
-
const result = $TOKEN("ForbidMultiLineImplicitObjectLiteral", state, ForbidMultiLineImplicitObjectLiteral$0(state));
|
|
14010
|
-
if (state.events)
|
|
14011
|
-
state.events.exit?.("ForbidMultiLineImplicitObjectLiteral", state, result, eventData);
|
|
14012
|
-
return result;
|
|
14013
|
-
} else {
|
|
14014
|
-
const result = ForbidMultiLineImplicitObjectLiteral$0(state);
|
|
14015
|
-
if (state.events)
|
|
14016
|
-
state.events.exit?.("ForbidMultiLineImplicitObjectLiteral", state, result, eventData);
|
|
14017
|
-
return result;
|
|
14018
|
-
}
|
|
14019
|
-
}
|
|
14020
|
-
var AllowMultiLineImplicitObjectLiteral$0 = $TV($EXPECT($L0, fail, 'AllowMultiLineImplicitObjectLiteral ""'), function($skip, $loc, $0, $1) {
|
|
14021
|
-
module.forbidMultiLineImplicitObjectLiteral.push(false);
|
|
14022
|
-
});
|
|
14023
|
-
function AllowMultiLineImplicitObjectLiteral(state) {
|
|
14024
|
-
let eventData;
|
|
14025
|
-
if (state.events) {
|
|
14026
|
-
const result = state.events.enter?.("AllowMultiLineImplicitObjectLiteral", state);
|
|
14027
|
-
if (result) {
|
|
14028
|
-
if (result.cache)
|
|
14029
|
-
return result.cache;
|
|
14030
|
-
eventData = result.data;
|
|
14031
|
-
}
|
|
14032
|
-
}
|
|
14033
|
-
if (state.tokenize) {
|
|
14034
|
-
const result = $TOKEN("AllowMultiLineImplicitObjectLiteral", state, AllowMultiLineImplicitObjectLiteral$0(state));
|
|
14035
|
-
if (state.events)
|
|
14036
|
-
state.events.exit?.("AllowMultiLineImplicitObjectLiteral", state, result, eventData);
|
|
14037
|
-
return result;
|
|
14038
|
-
} else {
|
|
14039
|
-
const result = AllowMultiLineImplicitObjectLiteral$0(state);
|
|
14040
|
-
if (state.events)
|
|
14041
|
-
state.events.exit?.("AllowMultiLineImplicitObjectLiteral", state, result, eventData);
|
|
14042
|
-
return result;
|
|
14043
|
-
}
|
|
14044
|
-
}
|
|
14045
|
-
var RestoreMultiLineImplicitObjectLiteral$0 = $TV($EXPECT($L0, fail, 'RestoreMultiLineImplicitObjectLiteral ""'), function($skip, $loc, $0, $1) {
|
|
14046
|
-
module.forbidMultiLineImplicitObjectLiteral.pop();
|
|
14047
|
-
});
|
|
14048
|
-
function RestoreMultiLineImplicitObjectLiteral(state) {
|
|
14049
|
-
let eventData;
|
|
14050
|
-
if (state.events) {
|
|
14051
|
-
const result = state.events.enter?.("RestoreMultiLineImplicitObjectLiteral", state);
|
|
14052
|
-
if (result) {
|
|
14053
|
-
if (result.cache)
|
|
14054
|
-
return result.cache;
|
|
14055
|
-
eventData = result.data;
|
|
14056
|
-
}
|
|
14057
|
-
}
|
|
14058
|
-
if (state.tokenize) {
|
|
14059
|
-
const result = $TOKEN("RestoreMultiLineImplicitObjectLiteral", state, RestoreMultiLineImplicitObjectLiteral$0(state));
|
|
14060
|
-
if (state.events)
|
|
14061
|
-
state.events.exit?.("RestoreMultiLineImplicitObjectLiteral", state, result, eventData);
|
|
14062
|
-
return result;
|
|
14063
|
-
} else {
|
|
14064
|
-
const result = RestoreMultiLineImplicitObjectLiteral$0(state);
|
|
14065
|
-
if (state.events)
|
|
14066
|
-
state.events.exit?.("RestoreMultiLineImplicitObjectLiteral", state, result, eventData);
|
|
14067
|
-
return result;
|
|
14068
|
-
}
|
|
14069
|
-
}
|
|
14070
|
-
var MultiLineImplicitObjectLiteralAllowed$0 = $TV($EXPECT($L0, fail, 'MultiLineImplicitObjectLiteralAllowed ""'), function($skip, $loc, $0, $1) {
|
|
14071
|
-
if (module.config.verbose) {
|
|
14072
|
-
console.log("forbidMultiLineImplicitObjectLiteral:", module.forbidMultiLineImplicitObjectLiteral);
|
|
14073
|
-
}
|
|
14074
|
-
if (module.multiLineImplicitObjectLiteralForbidden)
|
|
14075
|
-
return $skip;
|
|
14076
|
-
});
|
|
14077
|
-
function MultiLineImplicitObjectLiteralAllowed(state) {
|
|
14078
|
-
let eventData;
|
|
14079
|
-
if (state.events) {
|
|
14080
|
-
const result = state.events.enter?.("MultiLineImplicitObjectLiteralAllowed", state);
|
|
14081
|
-
if (result) {
|
|
14082
|
-
if (result.cache)
|
|
14083
|
-
return result.cache;
|
|
14084
|
-
eventData = result.data;
|
|
14085
|
-
}
|
|
14086
|
-
}
|
|
14087
|
-
if (state.tokenize) {
|
|
14088
|
-
const result = $TOKEN("MultiLineImplicitObjectLiteralAllowed", state, MultiLineImplicitObjectLiteralAllowed$0(state));
|
|
14089
|
-
if (state.events)
|
|
14090
|
-
state.events.exit?.("MultiLineImplicitObjectLiteralAllowed", state, result, eventData);
|
|
14091
|
-
return result;
|
|
14092
|
-
} else {
|
|
14093
|
-
const result = MultiLineImplicitObjectLiteralAllowed$0(state);
|
|
14094
|
-
if (state.events)
|
|
14095
|
-
state.events.exit?.("MultiLineImplicitObjectLiteralAllowed", state, result, eventData);
|
|
14096
|
-
return result;
|
|
14097
|
-
}
|
|
14098
|
-
}
|
|
14099
13938
|
var AllowNewlineBinaryOp$0 = $TV($EXPECT($L0, fail, 'AllowNewlineBinaryOp ""'), function($skip, $loc, $0, $1) {
|
|
14100
13939
|
module.forbidNewlineBinaryOp.push(false);
|
|
14101
13940
|
});
|
|
@@ -14200,7 +14039,7 @@ ${input.slice(result.pos)}
|
|
|
14200
14039
|
return result;
|
|
14201
14040
|
}
|
|
14202
14041
|
}
|
|
14203
|
-
var AllowAll$0 = $S(AllowTrailingMemberProperty, AllowBracedApplication, AllowIndentedApplication,
|
|
14042
|
+
var AllowAll$0 = $S(AllowTrailingMemberProperty, AllowBracedApplication, AllowIndentedApplication, AllowClassImplicitCall, AllowNewlineBinaryOp);
|
|
14204
14043
|
function AllowAll(state) {
|
|
14205
14044
|
let eventData;
|
|
14206
14045
|
if (state.events) {
|
|
@@ -14223,7 +14062,7 @@ ${input.slice(result.pos)}
|
|
|
14223
14062
|
return result;
|
|
14224
14063
|
}
|
|
14225
14064
|
}
|
|
14226
|
-
var RestoreAll$0 = $S(RestoreTrailingMemberProperty, RestoreBracedApplication, RestoreIndentedApplication,
|
|
14065
|
+
var RestoreAll$0 = $S(RestoreTrailingMemberProperty, RestoreBracedApplication, RestoreIndentedApplication, RestoreClassImplicitCall, RestoreNewlineBinaryOp);
|
|
14227
14066
|
function RestoreAll(state) {
|
|
14228
14067
|
let eventData;
|
|
14229
14068
|
if (state.events) {
|
|
@@ -16826,7 +16665,7 @@ ${input.slice(result.pos)}
|
|
|
16826
16665
|
}
|
|
16827
16666
|
}
|
|
16828
16667
|
var StatementDelimiter$0 = SemicolonDelimiter;
|
|
16829
|
-
var StatementDelimiter$1 = $S($Y($S(
|
|
16668
|
+
var StatementDelimiter$1 = $S($Y($S(Nested, $C($EXPECT($L4, fail, 'StatementDelimiter "("'), $EXPECT($L114, fail, 'StatementDelimiter "["'), $EXPECT($L115, fail, 'StatementDelimiter "`"'), $EXPECT($L59, fail, 'StatementDelimiter "+"'), $EXPECT($L20, fail, 'StatementDelimiter "-"'), $EXPECT($L55, fail, 'StatementDelimiter "*"'), $EXPECT($L56, fail, 'StatementDelimiter "/"'), ObjectLiteral, Arrow, FatArrow, $S(Function, $E($S($E(_), Star)), $E(_), $EXPECT($L4, fail, 'StatementDelimiter "("'))))), InsertSemicolon);
|
|
16830
16669
|
var StatementDelimiter$2 = $Y(EOS);
|
|
16831
16670
|
function StatementDelimiter(state) {
|
|
16832
16671
|
let eventData;
|
|
@@ -19047,7 +18886,7 @@ ${input.slice(result.pos)}
|
|
|
19047
18886
|
return result;
|
|
19048
18887
|
}
|
|
19049
18888
|
}
|
|
19050
|
-
var JSXImplicitFragment$0 = $TS($S(JSXTag, $Q($S(
|
|
18889
|
+
var JSXImplicitFragment$0 = $TS($S(JSXTag, $Q($S(Nested, JSXTag))), function($skip, $loc, $0, $1, $2) {
|
|
19051
18890
|
const jsx = $2.length === 0 ? $1 : {
|
|
19052
18891
|
type: "JSXFragment",
|
|
19053
18892
|
children: [
|
|
@@ -20567,7 +20406,7 @@ ${input.slice(result.pos)}
|
|
|
20567
20406
|
return result;
|
|
20568
20407
|
}
|
|
20569
20408
|
}
|
|
20570
|
-
var TypeDeclarationRest$0 = $S(TypeKeyword, $E(_), IdentifierName, $E(TypeParameters),
|
|
20409
|
+
var TypeDeclarationRest$0 = $S(TypeKeyword, $E(_), IdentifierName, $E(TypeParameters), OptionalEquals, $C($S($E(_), Type), $S(__, Type)));
|
|
20571
20410
|
var TypeDeclarationRest$1 = $S(Interface, $E(_), IdentifierName, $E(TypeParameters), $E(InterfaceExtendsClause), InterfaceBlock);
|
|
20572
20411
|
var TypeDeclarationRest$2 = $S(Namespace, $E(_), IdentifierName, ModuleBlock);
|
|
20573
20412
|
var TypeDeclarationRest$3 = FunctionSignature;
|
|
@@ -20593,6 +20432,32 @@ ${input.slice(result.pos)}
|
|
|
20593
20432
|
return result;
|
|
20594
20433
|
}
|
|
20595
20434
|
}
|
|
20435
|
+
var OptionalEquals$0 = $S(__, Equals);
|
|
20436
|
+
var OptionalEquals$1 = $T($S($Y(IndentedFurther), InsertSpaceEquals), function(value) {
|
|
20437
|
+
return value[1];
|
|
20438
|
+
});
|
|
20439
|
+
function OptionalEquals(state) {
|
|
20440
|
+
let eventData;
|
|
20441
|
+
if (state.events) {
|
|
20442
|
+
const result = state.events.enter?.("OptionalEquals", state);
|
|
20443
|
+
if (result) {
|
|
20444
|
+
if (result.cache)
|
|
20445
|
+
return result.cache;
|
|
20446
|
+
eventData = result.data;
|
|
20447
|
+
}
|
|
20448
|
+
}
|
|
20449
|
+
if (state.tokenize) {
|
|
20450
|
+
const result = $TOKEN("OptionalEquals", state, OptionalEquals$0(state) || OptionalEquals$1(state));
|
|
20451
|
+
if (state.events)
|
|
20452
|
+
state.events.exit?.("OptionalEquals", state, result, eventData);
|
|
20453
|
+
return result;
|
|
20454
|
+
} else {
|
|
20455
|
+
const result = OptionalEquals$0(state) || OptionalEquals$1(state);
|
|
20456
|
+
if (state.events)
|
|
20457
|
+
state.events.exit?.("OptionalEquals", state, result, eventData);
|
|
20458
|
+
return result;
|
|
20459
|
+
}
|
|
20460
|
+
}
|
|
20596
20461
|
var TypeLexicalDeclaration$0 = $S(__, LetOrConstOrVar, TypeDeclarationBinding, $Q($S(CommaDelimiter, __, TypeDeclarationBinding)));
|
|
20597
20462
|
var TypeLexicalDeclaration$1 = $S(__, EnumDeclaration);
|
|
20598
20463
|
var TypeLexicalDeclaration$2 = ClassSignature;
|
|
@@ -21740,10 +21605,10 @@ ${input.slice(result.pos)}
|
|
|
21740
21605
|
return result;
|
|
21741
21606
|
}
|
|
21742
21607
|
}
|
|
21743
|
-
var TypePrimary$0 =
|
|
21744
|
-
var TypePrimary$1 =
|
|
21745
|
-
var TypePrimary$2 = $S($E(_),
|
|
21746
|
-
var TypePrimary$3 = $S($E(_),
|
|
21608
|
+
var TypePrimary$0 = $S($E(_), TypeTuple);
|
|
21609
|
+
var TypePrimary$1 = InterfaceBlock;
|
|
21610
|
+
var TypePrimary$2 = $S($E(_), FunctionType);
|
|
21611
|
+
var TypePrimary$3 = $S($E(_), InlineInterfaceLiteral);
|
|
21747
21612
|
var TypePrimary$4 = $S($E(_), ImportType);
|
|
21748
21613
|
var TypePrimary$5 = $TS($S($E(_), TypeLiteral), function($skip, $loc, $0, $1, $2) {
|
|
21749
21614
|
var t = $2;
|
|
@@ -21856,25 +21721,34 @@ ${input.slice(result.pos)}
|
|
|
21856
21721
|
return result;
|
|
21857
21722
|
}
|
|
21858
21723
|
}
|
|
21859
|
-
var TypeElement$0 = $TS($S(__, IdentifierName, $E(_), DotDotDot, $S(__, $E($S(QuestionMark, $E(_))), Colon, __), Type), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
21724
|
+
var TypeElement$0 = $TS($S(__, $E($S(DotDotDot, __)), IdentifierName, $E($S($E(_), DotDotDot)), $S(__, $E($S(QuestionMark, $E(_))), Colon, __), Type), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
|
|
21860
21725
|
var ws = $1;
|
|
21861
|
-
var
|
|
21862
|
-
var
|
|
21863
|
-
var
|
|
21726
|
+
var dots1 = $2;
|
|
21727
|
+
var name = $3;
|
|
21728
|
+
var dots2 = $4;
|
|
21864
21729
|
var colon = $5;
|
|
21865
21730
|
var type = $6;
|
|
21866
|
-
|
|
21731
|
+
let dots = dots1 || dots2 && [dots2[1], dots2[0]];
|
|
21732
|
+
if (dots1 && dots2) {
|
|
21733
|
+
dots = [dots, {
|
|
21734
|
+
type: "Error",
|
|
21735
|
+
message: "... both before and after identifier"
|
|
21736
|
+
}];
|
|
21737
|
+
}
|
|
21738
|
+
return [ws, dots, name, colon, type];
|
|
21867
21739
|
});
|
|
21868
|
-
var TypeElement$1 = $
|
|
21740
|
+
var TypeElement$1 = $S(__, DotDotDot, __, Type);
|
|
21741
|
+
var TypeElement$2 = $TS($S(Type, $E($S($E(_), DotDotDot))), function($skip, $loc, $0, $1, $2) {
|
|
21869
21742
|
var type = $1;
|
|
21870
|
-
var
|
|
21871
|
-
|
|
21743
|
+
var spaceDots = $2;
|
|
21744
|
+
if (!spaceDots)
|
|
21745
|
+
return type;
|
|
21746
|
+
const [space, dots] = spaceDots;
|
|
21872
21747
|
const ws = getTrimmingSpace(type);
|
|
21873
21748
|
if (!ws)
|
|
21874
21749
|
return [dots, space, type];
|
|
21875
21750
|
return [ws, dots, space, insertTrimmingSpace(type, "")];
|
|
21876
21751
|
});
|
|
21877
|
-
var TypeElement$2 = $S($E($S(__, DotDotDot)), $E($S(__, IdentifierName, __, $E($S(QuestionMark, $E(_))), Colon, __)), Type);
|
|
21878
21752
|
function TypeElement(state) {
|
|
21879
21753
|
let eventData;
|
|
21880
21754
|
if (state.events) {
|
|
@@ -22977,6 +22851,31 @@ ${input.slice(result.pos)}
|
|
|
22977
22851
|
return result;
|
|
22978
22852
|
}
|
|
22979
22853
|
}
|
|
22854
|
+
var InsertSpaceEquals$0 = $TV($EXPECT($L0, fail, 'InsertSpaceEquals ""'), function($skip, $loc, $0, $1) {
|
|
22855
|
+
return { $loc, token: " =" };
|
|
22856
|
+
});
|
|
22857
|
+
function InsertSpaceEquals(state) {
|
|
22858
|
+
let eventData;
|
|
22859
|
+
if (state.events) {
|
|
22860
|
+
const result = state.events.enter?.("InsertSpaceEquals", state);
|
|
22861
|
+
if (result) {
|
|
22862
|
+
if (result.cache)
|
|
22863
|
+
return result.cache;
|
|
22864
|
+
eventData = result.data;
|
|
22865
|
+
}
|
|
22866
|
+
}
|
|
22867
|
+
if (state.tokenize) {
|
|
22868
|
+
const result = $TOKEN("InsertSpaceEquals", state, InsertSpaceEquals$0(state));
|
|
22869
|
+
if (state.events)
|
|
22870
|
+
state.events.exit?.("InsertSpaceEquals", state, result, eventData);
|
|
22871
|
+
return result;
|
|
22872
|
+
} else {
|
|
22873
|
+
const result = InsertSpaceEquals$0(state);
|
|
22874
|
+
if (state.events)
|
|
22875
|
+
state.events.exit?.("InsertSpaceEquals", state, result, eventData);
|
|
22876
|
+
return result;
|
|
22877
|
+
}
|
|
22878
|
+
}
|
|
22980
22879
|
var InsertConst$0 = $TV($EXPECT($L0, fail, 'InsertConst ""'), function($skip, $loc, $0, $1) {
|
|
22981
22880
|
return { $loc, token: "const " };
|
|
22982
22881
|
});
|
|
@@ -23589,7 +23488,6 @@ ${input.slice(result.pos)}
|
|
|
23589
23488
|
module.forbidIndentedApplication = [false];
|
|
23590
23489
|
module.forbidBracedApplication = [false];
|
|
23591
23490
|
module.forbidTrailingMemberProperty = [false];
|
|
23592
|
-
module.forbidMultiLineImplicitObjectLiteral = [false];
|
|
23593
23491
|
module.forbidNewlineBinaryOp = [false];
|
|
23594
23492
|
module.JSXTagStack = [];
|
|
23595
23493
|
module.operators = /* @__PURE__ */ new Set();
|
|
@@ -23626,12 +23524,6 @@ ${input.slice(result.pos)}
|
|
|
23626
23524
|
return s[s.length - 1];
|
|
23627
23525
|
}
|
|
23628
23526
|
},
|
|
23629
|
-
multiLineImplicitObjectLiteralForbidden: {
|
|
23630
|
-
get() {
|
|
23631
|
-
const { forbidMultiLineImplicitObjectLiteral: s } = module;
|
|
23632
|
-
return s[s.length - 1];
|
|
23633
|
-
}
|
|
23634
|
-
},
|
|
23635
23527
|
newlineBinaryOpForbidden: {
|
|
23636
23528
|
get() {
|
|
23637
23529
|
const { forbidNewlineBinaryOp: s } = module;
|
|
@@ -23934,19 +23826,11 @@ ${input.slice(result.pos)}
|
|
|
23934
23826
|
return result;
|
|
23935
23827
|
}
|
|
23936
23828
|
}
|
|
23937
|
-
var
|
|
23938
|
-
|
|
23939
|
-
const { level } = indent;
|
|
23940
|
-
const currentIndentLevel = module.currentIndent.level;
|
|
23941
|
-
if (level === currentIndentLevel) {
|
|
23942
|
-
return $0;
|
|
23943
|
-
}
|
|
23944
|
-
return $skip;
|
|
23945
|
-
});
|
|
23946
|
-
function Samedent(state) {
|
|
23829
|
+
var PushIndent$0 = $Y($S(EOS, TrackIndented));
|
|
23830
|
+
function PushIndent(state) {
|
|
23947
23831
|
let eventData;
|
|
23948
23832
|
if (state.events) {
|
|
23949
|
-
const result = state.events.enter?.("
|
|
23833
|
+
const result = state.events.enter?.("PushIndent", state);
|
|
23950
23834
|
if (result) {
|
|
23951
23835
|
if (result.cache)
|
|
23952
23836
|
return result.cache;
|
|
@@ -23954,30 +23838,27 @@ ${input.slice(result.pos)}
|
|
|
23954
23838
|
}
|
|
23955
23839
|
}
|
|
23956
23840
|
if (state.tokenize) {
|
|
23957
|
-
const result = $TOKEN("
|
|
23841
|
+
const result = $TOKEN("PushIndent", state, PushIndent$0(state));
|
|
23958
23842
|
if (state.events)
|
|
23959
|
-
state.events.exit?.("
|
|
23843
|
+
state.events.exit?.("PushIndent", state, result, eventData);
|
|
23960
23844
|
return result;
|
|
23961
23845
|
} else {
|
|
23962
|
-
const result =
|
|
23846
|
+
const result = PushIndent$0(state);
|
|
23963
23847
|
if (state.events)
|
|
23964
|
-
state.events.exit?.("
|
|
23848
|
+
state.events.exit?.("PushIndent", state, result, eventData);
|
|
23965
23849
|
return result;
|
|
23966
23850
|
}
|
|
23967
23851
|
}
|
|
23968
|
-
var
|
|
23969
|
-
|
|
23970
|
-
|
|
23971
|
-
const currentIndentLevel = module.currentIndent.level;
|
|
23972
|
-
if (level > currentIndentLevel) {
|
|
23973
|
-
return $0;
|
|
23852
|
+
var PopIndent$0 = $TV($EXPECT($L0, fail, 'PopIndent ""'), function($skip, $loc, $0, $1) {
|
|
23853
|
+
if (module.config.verbose) {
|
|
23854
|
+
console.log("popping indent", module.indentLevels[module.indentLevels.length - 1], "->", module.indentLevels[module.indentLevels.length - 2]);
|
|
23974
23855
|
}
|
|
23975
|
-
|
|
23856
|
+
module.indentLevels.pop();
|
|
23976
23857
|
});
|
|
23977
|
-
function
|
|
23858
|
+
function PopIndent(state) {
|
|
23978
23859
|
let eventData;
|
|
23979
23860
|
if (state.events) {
|
|
23980
|
-
const result = state.events.enter?.("
|
|
23861
|
+
const result = state.events.enter?.("PopIndent", state);
|
|
23981
23862
|
if (result) {
|
|
23982
23863
|
if (result.cache)
|
|
23983
23864
|
return result.cache;
|
|
@@ -23985,29 +23866,30 @@ ${input.slice(result.pos)}
|
|
|
23985
23866
|
}
|
|
23986
23867
|
}
|
|
23987
23868
|
if (state.tokenize) {
|
|
23988
|
-
const result = $TOKEN("
|
|
23869
|
+
const result = $TOKEN("PopIndent", state, PopIndent$0(state));
|
|
23989
23870
|
if (state.events)
|
|
23990
|
-
state.events.exit?.("
|
|
23871
|
+
state.events.exit?.("PopIndent", state, result, eventData);
|
|
23991
23872
|
return result;
|
|
23992
23873
|
} else {
|
|
23993
|
-
const result =
|
|
23874
|
+
const result = PopIndent$0(state);
|
|
23994
23875
|
if (state.events)
|
|
23995
|
-
state.events.exit?.("
|
|
23876
|
+
state.events.exit?.("PopIndent", state, result, eventData);
|
|
23996
23877
|
return result;
|
|
23997
23878
|
}
|
|
23998
23879
|
}
|
|
23999
|
-
var
|
|
24000
|
-
|
|
24001
|
-
if (
|
|
24002
|
-
|
|
24003
|
-
if (
|
|
24004
|
-
|
|
24005
|
-
|
|
23880
|
+
var Nested$0 = $TS($S(EOS, Indent), function($skip, $loc, $0, $1, $2) {
|
|
23881
|
+
var indent = $2;
|
|
23882
|
+
if (indent.level === module.currentIndent.level)
|
|
23883
|
+
return $0;
|
|
23884
|
+
if (module.config.verbose) {
|
|
23885
|
+
console.log(`failing Nested: ${indent.level} does not match current indent level ${module.currentIndent.level}`);
|
|
23886
|
+
}
|
|
23887
|
+
return $skip;
|
|
24006
23888
|
});
|
|
24007
|
-
function
|
|
23889
|
+
function Nested(state) {
|
|
24008
23890
|
let eventData;
|
|
24009
23891
|
if (state.events) {
|
|
24010
|
-
const result = state.events.enter?.("
|
|
23892
|
+
const result = state.events.enter?.("Nested", state);
|
|
24011
23893
|
if (result) {
|
|
24012
23894
|
if (result.cache)
|
|
24013
23895
|
return result.cache;
|
|
@@ -24015,24 +23897,27 @@ ${input.slice(result.pos)}
|
|
|
24015
23897
|
}
|
|
24016
23898
|
}
|
|
24017
23899
|
if (state.tokenize) {
|
|
24018
|
-
const result = $TOKEN("
|
|
23900
|
+
const result = $TOKEN("Nested", state, Nested$0(state));
|
|
24019
23901
|
if (state.events)
|
|
24020
|
-
state.events.exit?.("
|
|
23902
|
+
state.events.exit?.("Nested", state, result, eventData);
|
|
24021
23903
|
return result;
|
|
24022
23904
|
} else {
|
|
24023
|
-
const result =
|
|
23905
|
+
const result = Nested$0(state);
|
|
24024
23906
|
if (state.events)
|
|
24025
|
-
state.events.exit?.("
|
|
23907
|
+
state.events.exit?.("Nested", state, result, eventData);
|
|
24026
23908
|
return result;
|
|
24027
23909
|
}
|
|
24028
23910
|
}
|
|
24029
|
-
var
|
|
24030
|
-
|
|
23911
|
+
var IndentedFurther$0 = $TS($S(EOS, Indent), function($skip, $loc, $0, $1, $2) {
|
|
23912
|
+
var indent = $2;
|
|
23913
|
+
if (indent.level > module.currentIndent.level)
|
|
23914
|
+
return $0;
|
|
23915
|
+
return $skip;
|
|
24031
23916
|
});
|
|
24032
|
-
function
|
|
23917
|
+
function IndentedFurther(state) {
|
|
24033
23918
|
let eventData;
|
|
24034
23919
|
if (state.events) {
|
|
24035
|
-
const result = state.events.enter?.("
|
|
23920
|
+
const result = state.events.enter?.("IndentedFurther", state);
|
|
24036
23921
|
if (result) {
|
|
24037
23922
|
if (result.cache)
|
|
24038
23923
|
return result.cache;
|
|
@@ -24040,22 +23925,27 @@ ${input.slice(result.pos)}
|
|
|
24040
23925
|
}
|
|
24041
23926
|
}
|
|
24042
23927
|
if (state.tokenize) {
|
|
24043
|
-
const result = $TOKEN("
|
|
23928
|
+
const result = $TOKEN("IndentedFurther", state, IndentedFurther$0(state));
|
|
24044
23929
|
if (state.events)
|
|
24045
|
-
state.events.exit?.("
|
|
23930
|
+
state.events.exit?.("IndentedFurther", state, result, eventData);
|
|
24046
23931
|
return result;
|
|
24047
23932
|
} else {
|
|
24048
|
-
const result =
|
|
23933
|
+
const result = IndentedFurther$0(state);
|
|
24049
23934
|
if (state.events)
|
|
24050
|
-
state.events.exit?.("
|
|
23935
|
+
state.events.exit?.("IndentedFurther", state, result, eventData);
|
|
24051
23936
|
return result;
|
|
24052
23937
|
}
|
|
24053
23938
|
}
|
|
24054
|
-
var
|
|
24055
|
-
|
|
23939
|
+
var IndentedAtLeast$0 = $TS($S(EOS, Indent), function($skip, $loc, $0, $1, $2) {
|
|
23940
|
+
var indent = $2;
|
|
23941
|
+
if (indent.level >= module.currentIndent.level)
|
|
23942
|
+
return $0;
|
|
23943
|
+
return $skip;
|
|
23944
|
+
});
|
|
23945
|
+
function IndentedAtLeast(state) {
|
|
24056
23946
|
let eventData;
|
|
24057
23947
|
if (state.events) {
|
|
24058
|
-
const result = state.events.enter?.("
|
|
23948
|
+
const result = state.events.enter?.("IndentedAtLeast", state);
|
|
24059
23949
|
if (result) {
|
|
24060
23950
|
if (result.cache)
|
|
24061
23951
|
return result.cache;
|
|
@@ -24063,27 +23953,29 @@ ${input.slice(result.pos)}
|
|
|
24063
23953
|
}
|
|
24064
23954
|
}
|
|
24065
23955
|
if (state.tokenize) {
|
|
24066
|
-
const result = $TOKEN("
|
|
23956
|
+
const result = $TOKEN("IndentedAtLeast", state, IndentedAtLeast$0(state));
|
|
24067
23957
|
if (state.events)
|
|
24068
|
-
state.events.exit?.("
|
|
23958
|
+
state.events.exit?.("IndentedAtLeast", state, result, eventData);
|
|
24069
23959
|
return result;
|
|
24070
23960
|
} else {
|
|
24071
|
-
const result =
|
|
23961
|
+
const result = IndentedAtLeast$0(state);
|
|
24072
23962
|
if (state.events)
|
|
24073
|
-
state.events.exit?.("
|
|
23963
|
+
state.events.exit?.("IndentedAtLeast", state, result, eventData);
|
|
24074
23964
|
return result;
|
|
24075
23965
|
}
|
|
24076
23966
|
}
|
|
24077
|
-
var
|
|
24078
|
-
|
|
24079
|
-
|
|
24080
|
-
|
|
24081
|
-
|
|
23967
|
+
var NotDedented$0 = $TS($S($E(IndentedAtLeast), $E(_)), function($skip, $loc, $0, $1, $2) {
|
|
23968
|
+
const ws = [];
|
|
23969
|
+
if ($1)
|
|
23970
|
+
ws.push(...$1);
|
|
23971
|
+
if ($2)
|
|
23972
|
+
ws.push(...$2);
|
|
23973
|
+
return ws.flat(Infinity).filter(Boolean);
|
|
24082
23974
|
});
|
|
24083
|
-
function
|
|
23975
|
+
function NotDedented(state) {
|
|
24084
23976
|
let eventData;
|
|
24085
23977
|
if (state.events) {
|
|
24086
|
-
const result = state.events.enter?.("
|
|
23978
|
+
const result = state.events.enter?.("NotDedented", state);
|
|
24087
23979
|
if (result) {
|
|
24088
23980
|
if (result.cache)
|
|
24089
23981
|
return result.cache;
|
|
@@ -24091,37 +23983,24 @@ ${input.slice(result.pos)}
|
|
|
24091
23983
|
}
|
|
24092
23984
|
}
|
|
24093
23985
|
if (state.tokenize) {
|
|
24094
|
-
const result = $TOKEN("
|
|
23986
|
+
const result = $TOKEN("NotDedented", state, NotDedented$0(state));
|
|
24095
23987
|
if (state.events)
|
|
24096
|
-
state.events.exit?.("
|
|
23988
|
+
state.events.exit?.("NotDedented", state, result, eventData);
|
|
24097
23989
|
return result;
|
|
24098
23990
|
} else {
|
|
24099
|
-
const result =
|
|
23991
|
+
const result = NotDedented$0(state);
|
|
24100
23992
|
if (state.events)
|
|
24101
|
-
state.events.exit?.("
|
|
23993
|
+
state.events.exit?.("NotDedented", state, result, eventData);
|
|
24102
23994
|
return result;
|
|
24103
23995
|
}
|
|
24104
23996
|
}
|
|
24105
|
-
var
|
|
24106
|
-
|
|
24107
|
-
var indent = $2;
|
|
24108
|
-
const { level } = indent;
|
|
24109
|
-
const currentIndent = module.currentIndent;
|
|
24110
|
-
if (module.config.verbose) {
|
|
24111
|
-
console.log("Indented", level, currentIndent);
|
|
24112
|
-
}
|
|
24113
|
-
if (level !== currentIndent.level) {
|
|
24114
|
-
if (module.config.verbose) {
|
|
24115
|
-
console.log("skipped nested");
|
|
24116
|
-
}
|
|
24117
|
-
return $skip;
|
|
24118
|
-
}
|
|
24119
|
-
return $0;
|
|
23997
|
+
var Dedented$0 = $T($S($N(IndentedAtLeast), EOS), function(value) {
|
|
23998
|
+
return value[1];
|
|
24120
23999
|
});
|
|
24121
|
-
function
|
|
24000
|
+
function Dedented(state) {
|
|
24122
24001
|
let eventData;
|
|
24123
24002
|
if (state.events) {
|
|
24124
|
-
const result = state.events.enter?.("
|
|
24003
|
+
const result = state.events.enter?.("Dedented", state);
|
|
24125
24004
|
if (result) {
|
|
24126
24005
|
if (result.cache)
|
|
24127
24006
|
return result.cache;
|
|
@@ -24129,14 +24008,14 @@ ${input.slice(result.pos)}
|
|
|
24129
24008
|
}
|
|
24130
24009
|
}
|
|
24131
24010
|
if (state.tokenize) {
|
|
24132
|
-
const result = $TOKEN("
|
|
24011
|
+
const result = $TOKEN("Dedented", state, Dedented$0(state));
|
|
24133
24012
|
if (state.events)
|
|
24134
|
-
state.events.exit?.("
|
|
24013
|
+
state.events.exit?.("Dedented", state, result, eventData);
|
|
24135
24014
|
return result;
|
|
24136
24015
|
} else {
|
|
24137
|
-
const result =
|
|
24016
|
+
const result = Dedented$0(state);
|
|
24138
24017
|
if (state.events)
|
|
24139
|
-
state.events.exit?.("
|
|
24018
|
+
state.events.exit?.("Dedented", state, result, eventData);
|
|
24140
24019
|
return result;
|
|
24141
24020
|
}
|
|
24142
24021
|
}
|
|
@@ -24613,7 +24492,7 @@ ${input.slice(result.pos)}
|
|
|
24613
24492
|
var uncacheable;
|
|
24614
24493
|
({ parse } = import_parser.default);
|
|
24615
24494
|
({ SourceMap: SourceMap2 } = util_exports);
|
|
24616
|
-
uncacheable = /* @__PURE__ */ new Set(["ActualAssignment", "AllowAll", "AllowClassImplicitCall", "AllowBracedApplication", "AllowIndentedApplication", "AllowMultiLineImplicitObjectLiteral", "AllowNewlineBinaryOp", "AllowTrailingMemberProperty", "AllowedTrailingMemberExpressions", "ApplicationStart", "Arguments", "ArgumentsWithTrailingMemberExpressions", "ArrowFunction", "ArrowFunctionTail", "AssignmentExpression", "AssignmentExpressionTail", "BinaryOpExpression", "BinaryOpRHS", "BracedApplicationAllowed", "BracedBlock", "BracedObjectLiteralContent", "BracedOrEmptyBlock", "CallExpression", "CallExpressionRest", "ClassImplicitCallForbidden", "CoffeeCommentEnabled", "CommaDelimiter", "ConditionalExpression", "ConditionFragment", "Declaration", "Debugger", "Dedented", "ElementListWithIndentedApplicationForbidden", "ElseClause", "Expression", "ExpressionStatement", "ExpressionWithIndentedApplicationForbidden", "ExpressionWithObjectApplicationForbidden", "ExtendedExpression", "FatArrowBody", "ForbidClassImplicitCall", "ForbidBracedApplication", "ForbidIndentedApplication", "ForbidMultiLineImplicitObjectLiteral", "ForbidNewlineBinaryOp", "ForbidTrailingMemberProperty", "FunctionDeclaration", "FunctionExpression", "HoistableDeclaration", "ImplicitArguments", "ImplicitInlineObjectPropertyDelimiter", "ImplicitNestedBlock", "IndentedApplicationAllowed", "IndentedFurther", "IndentedJSXChildExpression", "InlineObjectLiteral", "InsertIndent", "JSXChild", "JSXChildren", "JSXElement", "JSXFragment", "JSXImplicitFragment", "JSXMixedChildren", "JSXNested", "JSXNestedChildren", "JSXOptionalClosingElement", "JSXOptionalClosingFragment", "JSXTag", "LeftHandSideExpression", "MemberExpression", "MemberExpressionRest", "Nested", "NestedBindingElement", "NestedBindingElements", "NestedBlockExpression", "NestedBlockExpression", "NestedBlockStatement", "NestedBlockStatements", "NestedClassSignatureElement", "NestedClassSignatureElements", "NestedDeclareElement", "NestedDeclareElements", "NestedElement", "NestedElementList", "NestedImplicitObjectLiteral", "NestedImplicitPropertyDefinition", "NestedImplicitPropertyDefinitions", "NestedInterfaceProperty", "NestedJSXChildExpression", "NestedModuleItem", "NestedModuleItems", "NestedNonAssignmentExtendedExpression", "NestedObject", "NestedPropertyDefinitions", "NewlineBinaryOpAllowed", "NonPipelineAssignmentExpression", "NonPipelineExtendedExpression", "NonPipelinePostfixedExpression", "NonSingleBracedBlock", "NotDedented", "ObjectLiteral", "PatternExpressionList", "PopIndent", "PopJSXStack", "PostfixedExpression", "PostfixedStatement", "PrimaryExpression", "PushIndent", "PushJSXOpeningElement", "PushJSXOpeningFragment", "RestoreAll", "RestoreClassImplicitCall", "RestoreMultiLineImplicitObjectLiteral", "RestoreBracedApplication", "RestoreIndentedApplication", "RestoreTrailingMemberProperty", "RestoreNewlineBinaryOp", "RHS", "
|
|
24495
|
+
uncacheable = /* @__PURE__ */ new Set(["ActualAssignment", "AllowAll", "AllowClassImplicitCall", "AllowBracedApplication", "AllowIndentedApplication", "AllowMultiLineImplicitObjectLiteral", "AllowNewlineBinaryOp", "AllowTrailingMemberProperty", "AllowedTrailingMemberExpressions", "ApplicationStart", "Arguments", "ArgumentsWithTrailingMemberExpressions", "ArrowFunction", "ArrowFunctionTail", "AssignmentExpression", "AssignmentExpressionTail", "BinaryOpExpression", "BinaryOpRHS", "BracedApplicationAllowed", "BracedBlock", "BracedObjectLiteralContent", "BracedOrEmptyBlock", "CallExpression", "CallExpressionRest", "ClassImplicitCallForbidden", "CoffeeCommentEnabled", "CommaDelimiter", "ConditionalExpression", "ConditionFragment", "Declaration", "Debugger", "Dedented", "ElementListWithIndentedApplicationForbidden", "ElseClause", "Expression", "ExpressionStatement", "ExpressionWithIndentedApplicationForbidden", "ExpressionWithObjectApplicationForbidden", "ExtendedExpression", "FatArrowBody", "ForbidClassImplicitCall", "ForbidBracedApplication", "ForbidIndentedApplication", "ForbidMultiLineImplicitObjectLiteral", "ForbidNewlineBinaryOp", "ForbidTrailingMemberProperty", "FunctionDeclaration", "FunctionExpression", "HoistableDeclaration", "ImplicitArguments", "ImplicitInlineObjectPropertyDelimiter", "ImplicitNestedBlock", "IndentedApplicationAllowed", "IndentedAtLeast", "IndentedFurther", "IndentedJSXChildExpression", "InlineObjectLiteral", "InsertIndent", "JSXChild", "JSXChildren", "JSXElement", "JSXFragment", "JSXImplicitFragment", "JSXMixedChildren", "JSXNested", "JSXNestedChildren", "JSXOptionalClosingElement", "JSXOptionalClosingFragment", "JSXTag", "LeftHandSideExpression", "MemberExpression", "MemberExpressionRest", "Nested", "NestedBindingElement", "NestedBindingElements", "NestedBlockExpression", "NestedBlockExpression", "NestedBlockStatement", "NestedBlockStatements", "NestedClassSignatureElement", "NestedClassSignatureElements", "NestedDeclareElement", "NestedDeclareElements", "NestedElement", "NestedElementList", "NestedImplicitObjectLiteral", "NestedImplicitPropertyDefinition", "NestedImplicitPropertyDefinitions", "NestedInterfaceProperty", "NestedJSXChildExpression", "NestedModuleItem", "NestedModuleItems", "NestedNonAssignmentExtendedExpression", "NestedObject", "NestedPropertyDefinitions", "NewlineBinaryOpAllowed", "NonPipelineArgumentPart", "NonPipelineArgumentList", "NonPipelineAssignmentExpression", "NonPipelineExtendedExpression", "NonPipelinePostfixedExpression", "NonSingleBracedBlock", "NotDedented", "ObjectLiteral", "PatternExpressionList", "PopIndent", "PopJSXStack", "PostfixedExpression", "PostfixedStatement", "PrimaryExpression", "PushIndent", "PushJSXOpeningElement", "PushJSXOpeningFragment", "RestoreAll", "RestoreClassImplicitCall", "RestoreMultiLineImplicitObjectLiteral", "RestoreBracedApplication", "RestoreIndentedApplication", "RestoreTrailingMemberProperty", "RestoreNewlineBinaryOp", "RHS", "ShortCircuitExpression", "SingleLineAssignmentExpression", "SingleLineBinaryOpRHS", "SingleLineComment", "SingleLineStatements", "SnugNamedProperty", "Statement", "StatementListItem", "SuffixedExpression", "SuffixedStatement", "ThinArrowFunction", "TrackIndented", "TrailingMemberExpressions", "TrailingMemberPropertyAllowed", "TypedJSXElement", "TypedJSXFragment", "UnaryExpression", "UpdateExpression"]);
|
|
24617
24496
|
var compile = function(src, options) {
|
|
24618
24497
|
var ast, code, events, filename, ref, result, sm;
|
|
24619
24498
|
if (!options) {
|