Work on real D strings instead of ubyte pointer and length

Also fix a couple UTF-8 decoder bugs!
This commit is contained in:
josh committed 2022-10-15 13:32:33 -04:00
1 parent de93d23585
commit 623c644e74
11 files changed
+43 -77

No files matched your search

+2 -2
View File
@@ -9,12 +9,12 @@ int main()
unittest
{
string input = "abcdef";
auto parser = new Testparser.Parser(cast(const(ubyte) *)input.ptr, input.length);
auto parser = new Testparser.Parser(input);
assert(parser.parse() == true);
writeln("pass1");
input = "abcabcdef";
parser = new Testparser.Parser(cast(const(ubyte) *)input.ptr, input.length);
parser = new Testparser.Parser(input);
assert(parser.parse() == true);
writeln("pass2");
}