aboutsummaryrefslogtreecommitdiff
path: root/src/comp/front/extfmt.rs
diff options
context:
space:
mode:
authorBrian Anderson <[email protected]>2011-04-13 21:36:32 -0400
committerBrian Anderson <[email protected]>2011-04-13 22:14:54 -0400
commit99a697b56abba8e4ab94fc14b5b4769bee9702f0 (patch)
treeae9b3e81e9fbfe294974a0034a35b57b96babf27 /src/comp/front/extfmt.rs
parentAdd more commentary about ExtFmt (diff)
downloadrust-99a697b56abba8e4ab94fc14b5b4769bee9702f0.tar.xz
rust-99a697b56abba8e4ab94fc14b5b4769bee9702f0.zip
Add support for upper-case hex and binary output to #fmt.
Only works for uints at present. Necessitated the addition of _str.to_upper.
Diffstat (limited to 'src/comp/front/extfmt.rs')
-rw-r--r--src/comp/front/extfmt.rs3
1 files changed, 3 insertions, 0 deletions
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;