summaryrefslogtreecommitdiff
path: root/MLKParenReader.m
diff options
context:
space:
mode:
Diffstat (limited to 'MLKParenReader.m')
-rw-r--r--MLKParenReader.m7
1 files changed, 3 insertions, 4 deletions
diff --git a/MLKParenReader.m b/MLKParenReader.m
index f50cf68..2470aba 100644
--- a/MLKParenReader.m
+++ b/MLKParenReader.m
@@ -55,8 +55,7 @@ static unichar slurpWhitespaceAndPeek (MLKStream *stream, MLKReadtable *readtabl
cons = nil;
tail = nil;
- nextChar = slurpWhitespaceAndPeek(stream, readtable);
- while (nextChar != ')')
+ while ((nextChar = slurpWhitespaceAndPeek(stream, readtable)) != ')')
{
id item;
@@ -78,7 +77,7 @@ static unichar slurpWhitespaceAndPeek (MLKStream *stream, MLKReadtable *readtabl
tail = [tail cdr];
}
}
-
- return [NSArray arrayWithObject:cons];
+
+ return [NSArray arrayWithObject:(cons ? (id)cons : (id)[NSNull null])];
}
@end