diff options
| author | Marijn Haverbeke <[email protected]> | 2011-03-24 16:07:43 +0100 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-03-25 08:23:00 -0700 |
| commit | d4c3059e1ef6dfe0796cb9badd0773ab21d96c42 (patch) | |
| tree | 9b243aeff79918f2f7d0a32773688a59e6f6307d /src/comp/front/token.rs | |
| parent | Start making the standard-lib utf-8 aware (diff) | |
| download | rust-d4c3059e1ef6dfe0796cb9badd0773ab21d96c42.tar.xz rust-d4c3059e1ef6dfe0796cb9badd0773ab21d96c42.zip | |
make lexer unicode-aware for strings and char literals
Diffstat (limited to 'src/comp/front/token.rs')
| -rw-r--r-- | src/comp/front/token.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |