From 6ed66892fe330fb8e422923993b262b44533bdb5 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 3 Aug 2008 01:01:02 +0200 Subject: Interpreter: Fix handling of SETQ forms with more than one assignee. --- MLKInterpreter.m | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'MLKInterpreter.m') diff --git a/MLKInterpreter.m b/MLKInterpreter.m index d2c29c0..ca49b80 100644 --- a/MLKInterpreter.m +++ b/MLKInterpreter.m @@ -848,19 +848,33 @@ static MLKSymbol *V_INITP; if (expandOnly) { - RETURN_VALUE ([MLKCons + id thisSETQ = [MLKCons cons:car with:[MLKCons cons:symbol with:[MLKCons cons:value - with:denullify([[self eval: - [MLKCons cons:car - with:rest] - inLexicalContext:context - withEnvironment:lexenv - expandOnly:expandOnly] - objectAtIndex:0])]]]); + with:nil]]]; + id more = denullify([[self eval:[MLKCons cons:car with:rest] + inLexicalContext:context + withEnvironment:lexenv + expandOnly:expandOnly] + objectAtIndex:0]); + + if (!more) + { + RETURN_VALUE (thisSETQ); + } + else + { + RETURN_VALUE ([MLKCons cons:PROGN + with:[MLKCons + cons:thisSETQ + with:[MLKCons + cons:more + with:nil]]]); + + } } if (car == _FSETQ) -- cgit v1.2.3