await argument bug

This commit is contained in:
Dmitry Vasilev
2023-01-15 10:09:17 +08:00
parent 78c40e3f6c
commit 9a4bfe2593
2 changed files with 2 additions and 1 deletions

View File

@@ -71,6 +71,7 @@ const codegen_function_expr = (node, cxt) => {
const args = node.function_args.children.map(do_codegen).join(',')
const call = (node.is_async ? 'async ' : '') + `(${args}) => ` + (
// TODO gensym __obj, __fn
(node.body.type == 'do')
? '{ let __obj, __fn; ' + do_codegen(node.body) + '}'
: '{ let __obj, __fn; return ' + do_codegen(node.body) + '}'