diff options
-rw-r--r-- | MLKInterpreter.m | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/MLKInterpreter.m b/MLKInterpreter.m index 247bc8e..030d537 100644 --- a/MLKInterpreter.m +++ b/MLKInterpreter.m @@ -562,6 +562,7 @@ static MLKSymbol *_LAMBDA; eofValue:eofValue recursive:NO preserveWhitespace:NO]; + NSString *formdesc; //NSLog (@"%@", code); //NSLog (@"%@", [code descriptionForLisp]); @@ -571,7 +572,14 @@ static MLKSymbol *_LAMBDA; if (code == eofValue) break; - NSLog (@"; LOAD: Evaluating a top-level form."); + if ([code isKindOfClass:[MLKCons class]] && [code cdr]) + formdesc = [NSString stringWithFormat:@"(%@ %@ ...)", + [[code car] descriptionForLisp], + [[[code cdr] car] descriptionForLisp]]; + else + formdesc = [code descriptionForLisp]; + + NSLog (@"; LOAD: Evaluating a top-level form: %@.", formdesc); result = [MLKInterpreter eval:code inLexicalContext:[MLKLexicalContext globalContext] @@ -581,7 +589,7 @@ static MLKSymbol *_LAMBDA; if (print) { //FIXME - NSLog (@"; LOAD: Fnord. Primary value: %@", result); + //NSLog (@"; LOAD: Fnord. Primary value: %@", result); } } |