Skip to content

Commit

Permalink
Add print! and println! macros. Closes rust-lang#7653.
Browse files Browse the repository at this point in the history
  • Loading branch information
poiru committed Jul 13, 2013
1 parent a9eb868 commit 948334f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/libsyntax/ext/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),+));
} )
)
}";
}
Expand Down

0 comments on commit 948334f

Please sign in to comment.