From d4c3059e1ef6dfe0796cb9badd0773ab21d96c42 Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Thu, 24 Mar 2011 16:07:43 +0100 Subject: make lexer unicode-aware for strings and char literals --- src/comp/front/token.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/comp/front/token.rs') diff --git a/src/comp/front/token.rs b/src/comp/front/token.rs index 46fd0735..72d82010 100644 --- a/src/comp/front/token.rs +++ b/src/comp/front/token.rs @@ -303,9 +303,9 @@ fn to_str(token t) -> str { ret "\"" + s + "\""; } case (LIT_CHAR(?c)) { - // FIXME: escape and encode. + // FIXME: escape. auto tmp = "'"; - _str.push_byte(tmp, c as u8); + _str.push_char(tmp, c); _str.push_byte(tmp, '\'' as u8); ret tmp; } -- cgit v1.2.3