refactor: rename rawChildren to unknownSlots

This commit is contained in:
c0dev0id
2026-07-06 21:10:46 +02:00
parent e823608325
commit 7fb584d929
2 changed files with 15 additions and 15 deletions

View File

@@ -222,7 +222,7 @@ function buildInstrument(node) {
timbre: null,
fmModulations: [],
amModulations: [],
rawChildren: [],
unknownSlots: [],
};
for (const child of node.children) {
@@ -246,7 +246,7 @@ function buildInstrument(node) {
instr.amModulations.push({ ...child.props });
break;
default:
instr.rawChildren.push(buildGeneric(child));
instr.unknownSlots.push(buildGeneric(child));
}
}
@@ -262,7 +262,7 @@ function buildVariation(node) {
subvariations: [],
spread: null,
railsbackCurve: null,
rawChildren: [],
unknownSlots: [],
};
for (const child of node.children) {
@@ -284,7 +284,7 @@ function buildVariation(node) {
v.railsbackCurve = buildShape(child);
break;
default:
v.rawChildren.push(buildGeneric(child));
v.unknownSlots.push(buildGeneric(child));
}
}
@@ -298,7 +298,7 @@ function buildBasicProperties(node) {
oscillator: null,
fmModulations: [],
amModulations: [],
rawChildren: [],
unknownSlots: [],
};
for (const child of node.children) {
@@ -322,7 +322,7 @@ function buildBasicProperties(node) {
if (envChild) am.shape = buildShape(envChild);
bp.amModulations.push(am);
} else {
bp.rawChildren.push(buildGeneric(child));
bp.unknownSlots.push(buildGeneric(child));
}
}
@@ -334,7 +334,7 @@ function buildLabelSpec(node) {
type: 'label_spec',
label: node.positionals[0],
basicProperties: null,
rawChildren: [],
unknownSlots: [],
};
const directBpChildren = [];
@@ -348,7 +348,7 @@ function buildLabelSpec(node) {
) {
directBpChildren.push(child);
} else {
ls.rawChildren.push(buildGeneric(child));
ls.unknownSlots.push(buildGeneric(child));
}
}
if (!ls.basicProperties && directBpChildren.length > 0) {
@@ -386,7 +386,7 @@ function buildBar(node) {
upperStressBound: null,
tunings: [],
voices: {},
rawChildren: [],
unknownSlots: [],
};
for (const child of node.children) {
@@ -414,7 +414,7 @@ function buildBar(node) {
bar.voices[child.positionals[0]] = buildVoice(child);
break;
default:
bar.rawChildren.push(buildGeneric(child));
bar.unknownSlots.push(buildGeneric(child));
}
}