From 948334f33398f0ba073107585b8dfaa0dc9feaa9 Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Sat, 13 Jul 2013 16:30:31 +0300 Subject: [PATCH] Add print! and println! macros. Closes #7653. --- src/libsyntax/ext/expand.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index b5d7d94c31314..73fa659a7aab1 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -643,6 +643,18 @@ pub fn core_macros() -> @str { $(if $pred $body)else+ ); ) + + macro_rules! print( + ($( $arg:expr),+) => ( { + print(fmt!($($arg),+)); + } ) + ) + + macro_rules! println( + ($( $arg:expr),+) => ( { + println(fmt!($($arg),+)); + } ) + ) }"; }