diff options
| author | Brian Anderson <[email protected]> | 2011-04-13 21:36:32 -0400 |
|---|---|---|
| committer | Brian Anderson <[email protected]> | 2011-04-13 22:14:54 -0400 |
| commit | 99a697b56abba8e4ab94fc14b5b4769bee9702f0 (patch) | |
| tree | ae9b3e81e9fbfe294974a0034a35b57b96babf27 /src/comp/front/extfmt.rs | |
| parent | Add more commentary about ExtFmt (diff) | |
| download | rust-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.rs | 3 |
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; |