summaryrefslogtreecommitdiff
path: root/MLKInterpreter.m
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-08-03 01:01:02 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-08-03 01:01:02 +0200
commit6ed66892fe330fb8e422923993b262b44533bdb5 (patch)
treedd0f71c02e34fc130d15551ab1ee703cee41baf3 /MLKInterpreter.m
parentc342181fee4c2a580f46eb22fed7c981a6bb70a9 (diff)
Interpreter: Fix handling of SETQ forms with more than one assignee.
Diffstat (limited to 'MLKInterpreter.m')
-rw-r--r--MLKInterpreter.m30
1 files changed, 22 insertions, 8 deletions
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)