diff trunk/src/dil/Lexer.d @ 416:a4783b904fba

Detecting two more errors when scanning an escape sequence.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Thu, 27 Sep 2007 11:24:53 +0200
parents 9c69615a4876
children 7354f15cd5e9
line wrap: on
line diff
--- a/trunk/src/dil/Lexer.d	Thu Sep 27 10:46:00 2007 +0200
+++ b/trunk/src/dil/Lexer.d	Thu Sep 27 11:24:53 2007 +0200
@@ -1807,6 +1807,15 @@
         else
           error(MID.InvalidBeginHTMLEntity);
       }
+      else if (*p == '\n' || *p == '\r' ||
+               *p == LS[0] && p[1] == LS[1] && (p[2] == LS[2] || p[2] == PS[2]))
+      {
+        error(MID.UndefinedEscapeSequence, r"\NewLine");
+      }
+      else if (*p == 0 || *p == _Z_)
+      {
+        error(MID.UndefinedEscapeSequence, r"\EOF");
+      }
       else
       {
         dchar d = *p;