[svn] r7702: nemerle/trunk/ncc/parsing/Lexer.n
VladD2
svnadmin at nemerle.org
Tue Jun 12 19:24:56 CEST 2007
Log:
Remove "<#" and "#>" from recursive string.
Author: VladD2
Date: Tue Jun 12 19:24:55 2007
New Revision: 7702
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 Tue Jun 12 19:24:55 2007
@@ -907,8 +907,8 @@
{
mutable nestingLevel = 1;
def buf = Text.StringBuilder (1024);
- _ = buf.Append ("<#");
- def (startLine, startCol) = (line, col - 2);
+ //_ = buf.Append ("<#");
+ def (startLine, startCol) = (line, col/* - 2*/);
def loop (ch)
{
| '<' when peek () == '#' => _ = read (); nestingLevel++; _ = buf.Append ("<#"); loop (read ())
@@ -916,10 +916,13 @@
def next = read ();
if (next == '>')
{
- _ = buf.Append ("#>");
nestingLevel--;
if (nestingLevel == 0) Token.StringLiteral (buf.ToString ())
- else loop (read ())
+ else
+ {
+ _ = buf.Append ("#>");
+ loop (read ())
+ }
}
else
{
@@ -936,7 +939,7 @@
}
def tok = loop (read ());
- tok.Location = Location (file_idx, startLine, startCol, line, col);
+ tok.Location = Location (file_idx, startLine, startCol, line, col - 2);
tok
}
More information about the svn
mailing list