mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-12 22:15:27 -04:00
fix: remove prebake specific logic in transpiler
This commit is contained in:
@@ -25,7 +25,6 @@ export function transpiler(input, options = {}) {
|
||||
emitMiniLocations = true,
|
||||
emitWidgets = true,
|
||||
blockBased = false,
|
||||
prebake = false,
|
||||
range = [],
|
||||
} = options;
|
||||
|
||||
@@ -269,7 +268,7 @@ export function transpiler(input, options = {}) {
|
||||
}
|
||||
|
||||
// add return to last statement
|
||||
if (addReturn && !prebake) {
|
||||
if (addReturn) {
|
||||
const { expression } = body[body.length - 1];
|
||||
body[body.length - 1] = {
|
||||
type: 'ReturnStatement',
|
||||
|
||||
@@ -43,7 +43,7 @@ import { debugAudiograph } from './audiograph';
|
||||
const { latestCode, maxPolyphony, audioDeviceName, multiChannelOrbits } = settingsMap.get();
|
||||
let modulesLoading, presets, drawContext, clearCanvas, audioReady;
|
||||
|
||||
const evaluateUserPrebake = (code) => evaluate(code, transpiler, { prebake: true });
|
||||
const evaluateUserPrebake = (code) => evaluate(code, transpiler, { addReturn: false });
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
audioReady = initAudioOnFirstClick({
|
||||
|
||||
Reference in New Issue
Block a user