[breaking-change] remove the sign from integer literals in the ast

This commit is contained in:
Oliver Schneider
2016-02-11 09:52:55 +01:00
parent 625e78b700
commit bfa66bb389
10 changed files with 55 additions and 82 deletions

View File

@@ -645,24 +645,16 @@ pub trait PrintState<'a> {
}
ast::LitInt(i, t) => {
match t {
ast::SignedIntLit(st, ast::Plus) => {
ast::SignedIntLit(st) => {
word(self.writer(),
&st.val_to_string(i as i64))
}
ast::SignedIntLit(st, ast::Minus) => {
let istr = st.val_to_string(-(i as i64));
word(self.writer(),
&format!("-{}", istr))
}
ast::UnsignedIntLit(ut) => {
word(self.writer(), &ut.val_to_string(i))
}
ast::UnsuffixedIntLit(ast::Plus) => {
ast::UnsuffixedIntLit => {
word(self.writer(), &format!("{}", i))
}
ast::UnsuffixedIntLit(ast::Minus) => {
word(self.writer(), &format!("-{}", i))
}
}
}
ast::LitFloat(ref f, t) => {