about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2012-11-29 12:08:59 -0800
committerGraydon Hoare <graydon@mozilla.com>2012-11-29 12:09:11 -0800
commitce24d3775980b992e59b382686ba50ca7b1d04dc (patch)
tree4b15461f82402dcf84314e12dd32eeac95c48c89 /src/libsyntax/parse
parent40bd686e70b97af597363a3a304e06f0e47189f8 (diff)
downloadrust-ce24d3775980b992e59b382686ba50ca7b1d04dc.tar.gz
rust-ce24d3775980b992e59b382686ba50ca7b1d04dc.zip
syntax: slight improvement in fidelity of printing tokens. Still not great.
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/token.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index c38895f39f1..489c13b146b 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -150,14 +150,12 @@ fn to_str(in: @ident_interner, t: Token) -> ~str {
         ~"'" + char::escape_default(c as char) + ~"'"
       }
       LIT_INT(i, t) => {
-        int::to_str(i as int, 10u) + ast_util::int_ty_to_str(t)
+          i.to_str() + ast_util::int_ty_to_str(t)
       }
       LIT_UINT(u, t) => {
-        uint::to_str(u as uint, 10u) + ast_util::uint_ty_to_str(t)
-      }
-      LIT_INT_UNSUFFIXED(i) => {
-        int::to_str(i as int, 10u)
+          u.to_str() + ast_util::uint_ty_to_str(t)
       }
+      LIT_INT_UNSUFFIXED(i) => { i.to_str() }
       LIT_FLOAT(s, t) => {
         let mut body = *in.get(s);
         if body.ends_with(~".") {