From 49197c750ebfbb5eb763306f1fed0ef698ad7ca2 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 15 Jun 2008 00:26:47 +0200 Subject: MLKReader: Properly handle invalid constituent characters. --- MLKReader.m | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'MLKReader.m') 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 -- cgit v1.2.3