diff options
| author | Brian Anderson <[email protected]> | 2011-04-26 20:13:23 -0400 |
|---|---|---|
| committer | Brian Anderson <[email protected]> | 2011-04-26 20:20:17 -0400 |
| commit | 2e12fbfc06abdf1547528047b1438204ca4121a1 (patch) | |
| tree | 449454de4d0605d25c292650a563f7d4933efe4d /src/comp/front | |
| parent | Make #fmt char conversions behave like printf (diff) | |
| download | rust-2e12fbfc06abdf1547528047b1438204ca4121a1.tar.xz rust-2e12fbfc06abdf1547528047b1438204ca4121a1.zip | |
Support octal #fmt conversions
Diffstat (limited to 'src/comp/front')
| -rw-r--r-- | src/comp/front/extfmt.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/comp/front/extfmt.rs b/src/comp/front/extfmt.rs index 39c074c3..aea3e7df 100644 --- a/src/comp/front/extfmt.rs +++ b/src/comp/front/extfmt.rs @@ -25,6 +25,7 @@ import std.ExtFmt.CT.ty_char; import std.ExtFmt.CT.ty_int; import std.ExtFmt.CT.ty_bits; import std.ExtFmt.CT.ty_hex; +import std.ExtFmt.CT.ty_octal; import std.ExtFmt.CT.flag; import std.ExtFmt.CT.flag_left_justify; import std.ExtFmt.CT.flag_left_zero_pad; @@ -236,6 +237,9 @@ fn pieces_to_expr(vec[piece] pieces, vec[@ast.expr] args) -> @ast.expr { case (ty_bits) { rt_type = "ty_bits"; } + case (ty_octal) { + rt_type = "ty_octal"; + } case (_) { rt_type = "ty_default"; } @@ -381,6 +385,9 @@ fn pieces_to_expr(vec[piece] pieces, vec[@ast.expr] args) -> @ast.expr { case (ty_bits) { ret make_conv_call(arg.span, "uint", cnv, arg); } + case (ty_octal) { + ret make_conv_call(arg.span, "uint", cnv, arg); + } case (_) { log_err unsupported; fail; |