From 80a2cb47caaaac91384c72d49b8523b04e4c67e7 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Mon, 11 Aug 2008 23:46:40 +0200 Subject: Fix various errors in the compiler and semantic analyser. --- MLKForm.m | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'MLKForm.m') diff --git a/MLKForm.m b/MLKForm.m index 89ab36c..19b8dda 100644 --- a/MLKForm.m +++ b/MLKForm.m @@ -34,7 +34,7 @@ forCompiler:_compiler] @implementation MLKForm --(void) initialize ++(void) initialize { ensure_symbols (); } @@ -166,7 +166,11 @@ inContext:context forCompiler:compiler]; - if ([_head isKindOfClass:[MLKCons class]]) + if ([self class] != [MLKSimpleCompoundForm class]) + { + return self; + } + else if ([_head isKindOfClass:[MLKCons class]]) { LRELEASE (self); return [MLKForm formWithObject:[MLKCons cons:FUNCALL @@ -230,7 +234,7 @@ -(void) processBody:(id)object inContext:(MLKLexicalContext *)context { id rest; - NSMutableArray *bodyForms; + NSMutableArray *bodyForms = [NSMutableArray array]; [self splitDeclarationsAndBody:object]; rest = _body; @@ -877,8 +881,6 @@ -(id) complete { - MLKLexicalContext *newContext; - self = [super complete]; if ([_form isKindOfClass:[MLKCons class]]) -- cgit v1.2.3