summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-06-15 00:26:47 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-06-15 00:26:47 +0200
commit49197c750ebfbb5eb763306f1fed0ef698ad7ca2 (patch)
tree9a680373c9e00f003ef06f0e9ef28589d6d3d3b4
parentc251d4e8815d64ec73017890c5ee48db867e050b (diff)
MLKReader: Properly handle invalid constituent characters.
-rw-r--r--MLKReader.m11
1 files changed, 5 insertions, 6 deletions
diff --git a/MLKReader.m b/MLKReader.m
index b1d00c3..fe216ca 100644
--- a/MLKReader.m
+++ b/MLKReader.m
@@ -132,19 +132,18 @@
[stream unreadChar:ch];
break;
}
+ else if ([readtable isInvalidConstituent:ch])
+ {
+ [[[MLKReaderError alloc] initWithStream:stream] raise];
+ }
else if ([readtable isWhitespaceCharacter:ch])
{
if (preserveWhitespace)
[stream unreadChar:ch];
break;
}
- else if ([readtable isInvalidCharacter:ch])
- {
- [[[MLKReaderError alloc] initWithStream:stream] raise];
- }
}
- // FIXME: Check the token for invalid syntax.
- return token;
+ // FIXME: Check the token for meaning.
}
@end