[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

@@ -38,14 +38,10 @@ pub fn expand_syntax_ext(cx: &mut base::ExtCtxt,
accumulator.push(c);
}
ast::LitInt(i, ast::UnsignedIntLit(_)) |
ast::LitInt(i, ast::SignedIntLit(_, ast::Plus)) |
ast::LitInt(i, ast::UnsuffixedIntLit(ast::Plus)) => {
ast::LitInt(i, ast::SignedIntLit(_)) |
ast::LitInt(i, ast::UnsuffixedIntLit) => {
accumulator.push_str(&format!("{}", i));
}
ast::LitInt(i, ast::SignedIntLit(_, ast::Minus)) |
ast::LitInt(i, ast::UnsuffixedIntLit(ast::Minus)) => {
accumulator.push_str(&format!("-{}", i));
}
ast::LitBool(b) => {
accumulator.push_str(&format!("{}", b));
}