Letrec. index in stdlib. fixing NaNs when measuring things without gaps, w or h. more window management stuff in OS
This commit is contained in:
parent
db4abfa450
commit
5f592f40bf
5 changed files with 89 additions and 15 deletions
|
|
@ -71,8 +71,8 @@ export function compile(ast: AST, useStore = true, bound = new Set<string>(), to
|
|||
|
||||
case 'let':
|
||||
const newBound = new Set([...bound, ast.name]);
|
||||
return `((${sanitizeName(ast.name)}) =>
|
||||
${compile(ast.body, useStore, newBound, topLevel)})(${compile(ast.value, useStore, bound, topLevel)})`;
|
||||
return `(() => { let ${sanitizeName(ast.name)} = ${compile(ast.value, useStore, newBound, topLevel)};
|
||||
return ${compile(ast.body, useStore, newBound, topLevel)}; })()`;
|
||||
|
||||
case 'match':
|
||||
return compileMatch(ast, useStore, bound, topLevel);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue