summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MLKInterpreter.m5
-rw-r--r--MLKStream.m11
2 files changed, 14 insertions, 2 deletions
diff --git a/MLKInterpreter.m b/MLKInterpreter.m
index a1b86fd..778985f 100644
--- a/MLKInterpreter.m
+++ b/MLKInterpreter.m
@@ -101,6 +101,8 @@ static MLKSymbol *_LAMBDA;
{
MLKDynamicContext *dynamicContext = [MLKDynamicContext currentContext];
+ //NSLog (@"eval: %@", [program descriptionForLisp]);
+
if (!program || [program isKindOfClass:[MLKSymbol class]])
{
//NSLog (@"Processing symbol.");
@@ -559,11 +561,13 @@ static MLKSymbol *_LAMBDA;
while (YES)
{
id result;
+ //NSLog (@"; LOAD: Reding a form.");
id code = [MLKReader readFromStream:stream
eofError:NO
eofValue:eofValue
recursive:NO
preserveWhitespace:NO];
+ //NSLog (@"; LOAD: Reading finished.");
NSString *formdesc;
//NSLog (@"%@", code);
@@ -597,6 +601,7 @@ static MLKSymbol *_LAMBDA;
}
}
+ //NSLog (@"; LOAD: END");
return YES;
}
@end
diff --git a/MLKStream.m b/MLKStream.m
index fa36232..d130520 100644
--- a/MLKStream.m
+++ b/MLKStream.m
@@ -125,19 +125,26 @@
-(BOOL) isEOF
{
+ BOOL eofp = NO;
+
NS_DURING
{
[self peekChar];
}
NS_HANDLER
{
+ // For some reason, NS_VALUERETURN (YES, BOOL) causes warnings of
+ // the following kind on the Apple runtime:
+ //
+ // *** Attempt to remove unrecognized exception handler 0xbfff6200
+ //
if ([[localException name] isEqual:@"MLKStreamError"])
- NS_VALUERETURN (YES, BOOL);
+ eofp = YES;
else
[localException raise];
}
NS_ENDHANDLER;
- return NO;
+ return eofp;
}
@end