refactor: extract coerce and stressorToString into util.js
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
// RFC-compliant YAML serializer for Sompyler instrument blocks.
|
||||
// Operates on the model produced by ast-parser.js buildModel().
|
||||
import { stressorToString } from './util.js';
|
||||
|
||||
// ── Shape ──────────────────────────────────────────────────────────────────
|
||||
// RFC §1.3.4.5: SHAPE = [PREFIX (":" / ";")] Node 1*(";" Node)
|
||||
@@ -241,10 +240,6 @@ function patchInstrumentHeader(text, instruments) {
|
||||
return result.join('\n');
|
||||
}
|
||||
|
||||
export function stressorToString(s) {
|
||||
if (!s?.groups?.length) return '';
|
||||
return s.groups.map(g => g.join(',')).join(';');
|
||||
}
|
||||
|
||||
function patchBarMeta(doc, bar) {
|
||||
const props = [];
|
||||
|
||||
Reference in New Issue
Block a user