From 2e12fbfc06abdf1547528047b1438204ca4121a1 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Tue, 26 Apr 2011 20:13:23 -0400 Subject: Support octal #fmt conversions --- src/comp/front/extfmt.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/comp/front/extfmt.rs') 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; -- cgit v1.2.3