Skip to content

Commit ce24d37

Browse files
committed
syntax: slight improvement in fidelity of printing tokens. Still not great.
1 parent 40bd686 commit ce24d37

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/libsyntax/parse/token.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,12 @@ fn to_str(in: @ident_interner, t: Token) -> ~str {
150150
~"'" + char::escape_default(c as char) + ~"'"
151151
}
152152
LIT_INT(i, t) => {
153-
int::to_str(i as int, 10u) + ast_util::int_ty_to_str(t)
153+
i.to_str() + ast_util::int_ty_to_str(t)
154154
}
155155
LIT_UINT(u, t) => {
156-
uint::to_str(u as uint, 10u) + ast_util::uint_ty_to_str(t)
157-
}
158-
LIT_INT_UNSUFFIXED(i) => {
159-
int::to_str(i as int, 10u)
156+
u.to_str() + ast_util::uint_ty_to_str(t)
160157
}
158+
LIT_INT_UNSUFFIXED(i) => { i.to_str() }
161159
LIT_FLOAT(s, t) => {
162160
let mut body = *in.get(s);
163161
if body.ends_with(~".") {

0 commit comments

Comments
 (0)