Add support for bool, char to extfmt.

XFAIL syntax-extension-fmt in rustboot.
This commit is contained in:
Brian Anderson 2011-04-11 21:36:10 -04:00
parent 37f87161cc
commit bba245f3e6
3 changed files with 32 additions and 3 deletions

View file

@ -179,6 +179,16 @@ fn pieces_to_expr(vec[piece] pieces, vec[@ast.expr] args) -> @ast.expr {
}
}
}
case (ty_bool) {
let vec[str] path = vec("std", "ExtFmt", "RT", "bool_to_str");
let vec[@ast.expr] args = vec(arg);
ret make_call(arg.span, path, args);
}
case (ty_char) {
let vec[str] path = vec("std", "ExtFmt", "RT", "char_to_str");
let vec[@ast.expr] args = vec(arg);
ret make_call(arg.span, path, args);
}
case (_) {
log unsupported;
fail;