Mercurial > projects > dil
changeset 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 | b18b0cd8f8cd |
children | 8af5c7e2f722 |
files | trunk/src/dil/Lexer.d |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
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;