From 99a697b56abba8e4ab94fc14b5b4769bee9702f0 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Wed, 13 Apr 2011 21:36:32 -0400 Subject: Add support for upper-case hex and binary output to #fmt. Only works for uints at present. Necessitated the addition of _str.to_upper. --- src/comp/front/extfmt.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/comp/front') diff --git a/src/comp/front/extfmt.rs b/src/comp/front/extfmt.rs index 54174dd3..bd5fc433 100644 --- a/src/comp/front/extfmt.rs +++ b/src/comp/front/extfmt.rs @@ -246,6 +246,9 @@ fn pieces_to_expr(vec[piece] pieces, vec[@ast.expr] args) -> @ast.expr { case (ty_hex(_)) { ret make_conv_call(arg.span, "uint", cnv, arg); } + case (ty_bits) { + ret make_conv_call(arg.span, "uint", cnv, arg); + } case (_) { log unsupported; fail; -- cgit v1.2.3