git » jacl.git » commit c30fa90

analyzeBlock: add parent to children

author Alan Dipert
2020-04-11 06:50:58 UTC
committer Alan Dipert
2020-04-11 06:50:58 UTC
parent 3544af35b0f75d9360ff42cc1f5a7b6a5865d456

analyzeBlock: add parent to children

jacl.js +3 -0

diff --git a/jacl.js b/jacl.js
index 406c824..64c67ac 100644
--- a/jacl.js
+++ b/jacl.js
@@ -994,6 +994,9 @@ const analyzeBlock = (env, parent, forms) => {
   }
   let children = [...stmts];
   if (ret) children.push(ret);
+  for (const child of children) {
+    child.parent = parent;
+  }
   return { statements: stmts, ret: ret, children: children };
 };