@fairfox/polly 0.85.0 → 0.85.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.
|
@@ -3527,6 +3527,28 @@ function sectionBody(cfg, header) {
|
|
|
3527
3527
|
}
|
|
3528
3528
|
return body;
|
|
3529
3529
|
}
|
|
3530
|
+
function constantBody(cfg) {
|
|
3531
|
+
const body = [];
|
|
3532
|
+
let inSection = false;
|
|
3533
|
+
for (const line of cfg.split(`
|
|
3534
|
+
`)) {
|
|
3535
|
+
const headerMatch = /^([A-Z_]+)\b(.*)$/.exec(line);
|
|
3536
|
+
if (headerMatch) {
|
|
3537
|
+
const isConstant = headerMatch[1] === "CONSTANT" || headerMatch[1] === "CONSTANTS";
|
|
3538
|
+
inSection = isConstant;
|
|
3539
|
+
const inline = (headerMatch[2] ?? "").trim();
|
|
3540
|
+
if (isConstant && inline !== "")
|
|
3541
|
+
body.push(` ${inline}`);
|
|
3542
|
+
continue;
|
|
3543
|
+
}
|
|
3544
|
+
if (!inSection)
|
|
3545
|
+
continue;
|
|
3546
|
+
if (line.trim() === "" || line.trim().startsWith("\\*"))
|
|
3547
|
+
continue;
|
|
3548
|
+
body.push(line);
|
|
3549
|
+
}
|
|
3550
|
+
return body;
|
|
3551
|
+
}
|
|
3530
3552
|
function headerLine(cfg, header) {
|
|
3531
3553
|
for (const line of cfg.split(`
|
|
3532
3554
|
`)) {
|
|
@@ -3541,7 +3563,7 @@ function buildWitnessCfg(baseCfg) {
|
|
|
3541
3563
|
const init = headerLine(baseCfg, "INIT");
|
|
3542
3564
|
const next = headerLine(baseCfg, "NEXT");
|
|
3543
3565
|
const behaviour = spec ? [spec] : init && next ? [init, next] : ["SPECIFICATION UserSpec"];
|
|
3544
|
-
const constants =
|
|
3566
|
+
const constants = constantBody(baseCfg);
|
|
3545
3567
|
const constraint = sectionBody(baseCfg, "CONSTRAINT");
|
|
3546
3568
|
const symmetry = sectionBody(baseCfg, "SYMMETRY");
|
|
3547
3569
|
const out = [
|
|
@@ -9562,4 +9584,4 @@ main().catch((error) => {
|
|
|
9562
9584
|
process.exit(1);
|
|
9563
9585
|
});
|
|
9564
9586
|
|
|
9565
|
-
//# debugId=
|
|
9587
|
+
//# debugId=F55B4EE81F3A37C864756E2164756E21
|