- add Stepper + use it everywhere

- rename files to make more sense
- add transpilation slide
This commit is contained in:
Felix Roos
2023-04-06 22:14:17 +02:00
parent 8ca850f9fe
commit 123323e32b
17 changed files with 200 additions and 92 deletions
+2 -2
View File
@@ -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}})()`;
}