libsyntax: Make float literals not use @str

This commit is contained in:
Patrick Walton
2014-01-15 17:15:39 -08:00
committed by Huon Wilson
parent 8d6ef2e1b1
commit b496d7bec2
7 changed files with 24 additions and 20 deletions

View File

@@ -29,12 +29,11 @@ pub fn expand_syntax_ext(cx: &mut base::ExtCtxt,
match e.node {
ast::ExprLit(lit) => {
match lit.node {
ast::LitStr(ref s, _) => {
ast::LitStr(ref s, _) |
ast::LitFloat(ref s, _) |
ast::LitFloatUnsuffixed(ref s) => {
accumulator.push_str(s.get());
}
ast::LitFloat(s, _) | ast::LitFloatUnsuffixed(s) => {
accumulator.push_str(s);
}
ast::LitChar(c) => {
accumulator.push_char(char::from_u32(c).unwrap());
}