@fairfox/polly 0.77.0 → 0.77.1
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.
|
@@ -2681,7 +2681,19 @@ class HandlerExtractor {
|
|
|
2681
2681
|
const paramName = this.extractPayloadPropertyParam(initializer);
|
|
2682
2682
|
if (paramName !== null) {
|
|
2683
2683
|
assignments.push({ field, value: `param:${paramName}` });
|
|
2684
|
+
return;
|
|
2685
|
+
}
|
|
2686
|
+
if (this.isTranslatableInitializer(initializer)) {
|
|
2687
|
+
assignments.push({ field, value: `EXPR:${initializer.getText()}` });
|
|
2688
|
+
return;
|
|
2684
2689
|
}
|
|
2690
|
+
if (process.env["POLLY_DEBUG"]) {
|
|
2691
|
+
const on = signalName ? ` on ${signalName}.value` : "";
|
|
2692
|
+
console.log(`[WARN] dropped object-literal property '${name}'${on} — initializer kind ${initializer.getKindName()} is not translatable to TLA+`);
|
|
2693
|
+
}
|
|
2694
|
+
}
|
|
2695
|
+
isTranslatableInitializer(node) {
|
|
2696
|
+
return Node4.isBinaryExpression(node) || Node4.isPropertyAccessExpression(node) || Node4.isElementAccessExpression(node) || Node4.isPrefixUnaryExpression(node) || Node4.isPostfixUnaryExpression(node) || Node4.isParenthesizedExpression(node);
|
|
2685
2697
|
}
|
|
2686
2698
|
extractPayloadPropertyParam(initializer) {
|
|
2687
2699
|
if (!Node4.isPropertyAccessExpression(initializer))
|
|
@@ -6807,4 +6819,4 @@ main().catch((_error) => {
|
|
|
6807
6819
|
process.exit(1);
|
|
6808
6820
|
});
|
|
6809
6821
|
|
|
6810
|
-
//# debugId=
|
|
6822
|
+
//# debugId=1DBE75DC4C8D1D6864756E2164756E21
|