git » jacl.git » commit 60df9a0

Macro lambda list time

author Alan Dipert
2020-06-17 04:57:00 UTC
committer Alan Dipert
2020-06-17 04:57:00 UTC
parent 9dae452150fba98e95f4633a9ea418e8c87df4a4

Macro lambda list time

jacl.js +4 -4

diff --git a/jacl.js b/jacl.js
index 2ca5599..b72b47b 100644
--- a/jacl.js
+++ b/jacl.js
@@ -1021,7 +1021,7 @@ const analyzeBlock = (env, parent, forms) => {
   return { statements: stmts, ret: ret, children: children };
 };
 
-const parseLambdaList = list => {
+const parseLambdaList = (list, isMacro) => {
   const eqClSym = (x, name) => (x instanceof LispSymbol) &&
     x.packageName === 'COMMON-LISP' &&
     x.name === name;
@@ -1194,8 +1194,8 @@ const parseLambdaList = list => {
   return sections;
 };
 
-const analyzeLambdaList = (env, parent, list) => {
-  const sections = parseLambdaList(list);
+const analyzeLambdaList = (env, parent, list, isMacro) => {
+  const sections = parseLambdaList(list, isMacro);
   env = env.withLocals(sections.required);
   const initforms = [];
   for (const spec of sections.optional) {
@@ -1281,7 +1281,7 @@ const analyzeSpecials = new Map([
       body = body.slice(1);
     }
     node = makeNode('lambda', { env: env, parent: parent, form: form, declarations: declarations });
-    const { lambdaList, initforms, bodyEnv } = analyzeLambdaList(env.withContext('expr'), node, list);
+    const { lambdaList, initforms, bodyEnv } = analyzeLambdaList(env.withContext('expr'), node, list, false);
     node.lambdaList = lambdaList;
     node = merge(node, analyzeBlock(bodyEnv, node, body));
     node.children = [...node.children, ...initforms];