mirror of
https://codeberg.org/uzu/strudel
synced 2026-08-19 18:41:58 -04:00
- add Stepper + use it everywhere
- rename files to make more sense - add transpilation slide
This commit is contained in:
@@ -4,7 +4,7 @@ import { walk } from 'estree-walker';
|
||||
import { isNoteWithOctave } from '@strudel.cycles/core';
|
||||
|
||||
export function transpiler(input, options = {}) {
|
||||
const { wrapAsync = false, addReturn = true, simpleLocs = false } = options;
|
||||
const { wrapAsync = false, addReturn = true, simpleLocs = false, codegenOptions = {} } = options;
|
||||
|
||||
let ast = parse(input, {
|
||||
ecmaVersion: 2022,
|
||||
@@ -47,7 +47,7 @@ export function transpiler(input, options = {}) {
|
||||
argument: expression,
|
||||
};
|
||||
}
|
||||
const output = escodegen.generate(ast);
|
||||
const output = escodegen.generate(ast, codegenOptions);
|
||||
if (wrapAsync) {
|
||||
return `(async ()=>{${output}})()`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user