diff --git a/src/js/async.fnk b/src/js/async.fnk index e3bf8a9..65a4bd0 100644 --- a/src/js/async.fnk +++ b/src/js/async.fnk @@ -2,17 +2,14 @@ {isArrowFunctionExpression, isFunctionExpression} = import '@babel/types' -assign = Object.assign - - transform_async = fn path: # TODO: should avoid mutating nodes match path: isArrowFunctionExpression:: ?: - path.node assign {async: true} + Object.assign:: path.node, {async: true} isFunctionExpression:: ?: - path.node assign {async: true} + Object.assign:: path.node, {async: true} {parentPath: {}}: transform_async:: path.parentPath diff --git a/src/lang/literals/string.test.fnk b/src/lang/literals/string.test.fnk index d41a309..c0a911a 100644 --- a/src/lang/literals/string.test.fnk +++ b/src/lang/literals/string.test.fnk @@ -36,7 +36,7 @@ describe:: 'string', fn: it:: 'compiles tagged template string', fn: expect:: fink2js` - str = foo'bar \${spam ni shrub} na' + str = foo'bar \${ni:: spam, shrub} na' ` to_match_snapshot