Add support for upper-case hex and binary output to #fmt.

Only works for uints at present. Necessitated the addition of _str.to_upper.
This commit is contained in:
Brian Anderson 2011-04-13 21:36:32 -04:00
parent 5c0f4c1939
commit 99a697b56a
5 changed files with 40 additions and 0 deletions

View file

@ -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;