# HG changeset patch # User Aziz K?ksal # Date 1190885093 -7200 # Node ID a4783b904fba7276b38cac8b852422914218e9f3 # Parent b18b0cd8f8cdc147974903211c22190a8092300f Detecting two more errors when scanning an escape sequence. diff -r b18b0cd8f8cd -r a4783b904fba trunk/src/dil/Lexer.d --- 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;