diff options
| author | Brian Anderson <[email protected]> | 2011-04-11 21:36:10 -0400 |
|---|---|---|
| committer | Brian Anderson <[email protected]> | 2011-04-11 21:54:03 -0400 |
| commit | bba245f3e6cdf9203cfafe7e8a81739a499b20eb (patch) | |
| tree | 4333ee7ef70ca5d8f71deb0dbc42c0ec7541bde0 /src/comp/front | |
| parent | Move ExtFmt compile-time functions into their own module (diff) | |
| download | rust-bba245f3e6cdf9203cfafe7e8a81739a499b20eb.tar.xz rust-bba245f3e6cdf9203cfafe7e8a81739a499b20eb.zip | |
Add support for bool, char to extfmt.
XFAIL syntax-extension-fmt in rustboot.
Diffstat (limited to 'src/comp/front')
| -rw-r--r-- | src/comp/front/extfmt.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/comp/front/extfmt.rs b/src/comp/front/extfmt.rs index f006cb5e..6004bc90 100644 --- a/src/comp/front/extfmt.rs +++ b/src/comp/front/extfmt.rs @@ -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; |