diff trunk/src/dil/Unicode.d @ 737:f88b5285b86b

Implemented DDocEmitter. Fixed quite a few bugs.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Sat, 09 Feb 2008 02:00:20 +0100
parents ceaac6a24258
children 49fe21aa387c
line wrap: on
line diff
--- a/trunk/src/dil/Unicode.d	Mon Feb 04 21:55:44 2008 +0200
+++ b/trunk/src/dil/Unicode.d	Sat Feb 09 02:00:20 2008 +0100
@@ -60,7 +60,7 @@
 /// index is set one past the last trail byte of the valid UTF-8 sequence.
 dchar decode(char[] str, ref size_t index)
 in { assert(str.length && index < str.length); }
-out(c) { assert(isValidChar(c)); }
+out(c) { assert(isValidChar(c) || c == ERROR_CHAR); }
 body
 {
   char* p = str.ptr + index;
@@ -74,7 +74,7 @@
 /// ref_p is set to the last trail byte of the valid UTF-8 sequence.
 dchar decode(ref char* ref_p, char* end)
 in { assert(ref_p && ref_p < end); }
-out(c) { assert(isValidChar(c)); }
+out(c) { assert(isValidChar(c) || c == ERROR_CHAR); }
 body
 {
   char* p = ref_p;