git » jacl.git » commit a817fef

Fix LAMBDA in return context

author Alan Dipert
2021-07-27 03:03:15 UTC
committer Alan Dipert
2021-07-27 03:03:15 UTC
parent 3e03216b086133526cc169d146a4e4ff0a0e9183

Fix LAMBDA in return context

jacl.js +1 -0

diff --git a/jacl.js b/jacl.js
index c0c5219..39242ce 100644
--- a/jacl.js
+++ b/jacl.js
@@ -2020,6 +2020,7 @@ const emitNode = (print, node) => {
       break;
     }
     case 'lambda': {
+      if (context === 'return') print('return ');
       if (context === 'expr' || context == 'return') {
         print(`(`);
       }