Get test-pass/utf8.rs to run

This involved a small fix to the unicode-escape character lexing and
to the pretty-printer.
This commit is contained in:
Marijn Haverbeke 2011-05-23 22:46:39 +02:00
parent dc2cdbf4a1
commit 86d51ec24b
2 changed files with 25 additions and 44 deletions

View file

@ -957,7 +957,8 @@ fn escape_str(str st, char to_escape) -> str {
case ('\\') {out += "\\\\";}
case (?cur) {
if (cur == to_escape) {out += "\\";}
str::push_byte(out, cur as u8);
// FIXME some (or all?) non-ascii things should be escaped
str::push_char(out, cur);
}
}
i += 1u;