[svn] r6438: nemerle/trunk/ncc/parsing/Lexer.n
nazgul
svnadmin at nemerle.org
Sun Jul 9 01:10:07 CEST 2006
Log:
Handle CR chars as new line if they are not followed by newline
Author: nazgul
Date: Sun Jul 9 01:10:05 2006
New Revision: 6438
Modified:
nemerle/trunk/ncc/parsing/Lexer.n
Modified: nemerle/trunk/ncc/parsing/Lexer.n
==============================================================================
--- nemerle/trunk/ncc/parsing/Lexer.n (original)
+++ nemerle/trunk/ncc/parsing/Lexer.n Sun Jul 9 01:10:05 2006
@@ -364,8 +364,14 @@
match (ch) {
| '\n' => ++line; col = 1;
| '\r' =>
+ if (peek_or_white () == '\n')
+ () // will be handled later
+ else {
+ ++line; col = 1; // it is a new line character
+ }
when (is_check_wrong_chars)
Message.Warning (10002, this.Location, "CR character found in input stream")
+
| '\t' =>
++col;
when (is_check_wrong_chars)
More information about the svn
mailing list