changeset 11:dffcdaa7c47a

- Added Unicode line and paragraph separators. - Checking for LS and PS in // comment scanner.
author aziz
date Sat, 23 Jun 2007 08:54:00 +0000
parents 3ee65d6e39c9
children 0989206cf73c
files trunk/src/Lexer.d
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/trunk/src/Lexer.d	Sat Jun 23 08:33:00 2007 +0000
+++ b/trunk/src/Lexer.d	Sat Jun 23 08:54:00 2007 +0000
@@ -65,6 +65,9 @@
 }
 +/
 
+const char[3] LS = \u2028;
+const char[3] PS = \u2029;
+
 class Lexer
 {
   Token token;
@@ -154,6 +157,8 @@
           do
           {
             c = *++p;
+            if (c == LS[0] && p[1] == LS[1] && (p[2] == LS[2] || p[2] == PS[2]))
+              break;
           } while (c != '\n' && c != 0)
           t.type = TOK.Comment;
           t.end = p;