summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MLKInterpreter.m2
-rw-r--r--MLKLexicalContext.m2
2 files changed, 2 insertions, 2 deletions
diff --git a/MLKInterpreter.m b/MLKInterpreter.m
index fdba4be..79b8794 100644
--- a/MLKInterpreter.m
+++ b/MLKInterpreter.m
@@ -151,7 +151,7 @@ static MLKSymbol *_DEFMACRO;
if ([[body car] isKindOfClass:[MLKCons class]]
&& [[body car] car] == DECLARE)
{
- declarations = [body car];
+ declarations = [[body car] cdr];
body = [body cdr];
}
else
diff --git a/MLKLexicalContext.m b/MLKLexicalContext.m
index eb0afed..85539f1 100644
--- a/MLKLexicalContext.m
+++ b/MLKLexicalContext.m
@@ -172,7 +172,7 @@ static MLKSymbol *LEXICAL;
while (rest)
{
id item = [rest car];
- if ([[item cdr] car] == symbol)
+ if ([item isKindOfClass:[MLKCons class]] && [[item cdr] car] == symbol)
{
if ([item car] == LEXICAL)
return YES;