Skip to content

Commit

Permalink
refactor(style): use call without parens, remove infix calls
Browse files Browse the repository at this point in the history
  • Loading branch information
kollhof committed Apr 13, 2020
1 parent f79918a commit b238a19
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions src/js/async.fnk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/lang/literals/string.test.fnk
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit b238a19

Please sign in to comment.