From 2f3201a64c43762052bc13022ddb5695c11ea516 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Tue, 31 Aug 2010 11:36:36 -0700 Subject: Reinstate commit 9f0eaa65817303b8768c80454734144c176fda43 with sufficient fixes to hopefully not break tinderboxes. --- src/comp/fe/token.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/comp/fe/token.rs') diff --git a/src/comp/fe/token.rs b/src/comp/fe/token.rs index 5e8171bc..2ec492fa 100644 --- a/src/comp/fe/token.rs +++ b/src/comp/fe/token.rs @@ -275,8 +275,9 @@ fn to_str(token t) -> str { } case (LIT_CHAR(c)) { // FIXME: escape and encode. - auto tmp = ""; - tmp += (c as u8); + auto tmp = "'"; + tmp += c as u8; + tmp += '\'' as u8; ret tmp; } @@ -285,7 +286,7 @@ fn to_str(token t) -> str { } /* Name components */ - case (IDENT(s)) { ret s; } + case (IDENT(s)) { auto si = "ident:"; si += s; ret si; } case (IDX(i)) { ret "_" + _int.to_str(i, 10u); } case (UNDERSCORE()) { ret "_"; } -- cgit v1.2.3