From 7e4a176dd3a1789d5d10cb995a62daa185cb9cdd Mon Sep 17 00:00:00 2001 From: Brendan Zabarauskas Date: Fri, 10 May 2013 15:01:27 +1000 Subject: Use parentheses for cond! macro instead of preceding pipes This is temporary. Once the macro parser has improved or been re-written these can be removed. --- src/libsyntax/ext/expand.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/libsyntax/ext') diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index ad1da0a8685..f9ca84473fb 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -559,8 +559,8 @@ pub fn core_macros() -> ~str { // // ~~~ // let clamped = cond!( - // | x > mx { mx } - // | x < mn { mn } + // (x > mx) { mx } + // (x < mn) { mn } // _ { x } // ); // ~~~ @@ -568,12 +568,12 @@ pub fn core_macros() -> ~str { // The optional default case is denoted by `_`. // macro_rules! cond ( - ($( | $pred:expr $body:block)+ _ $default:block ) => ( + ( $(($pred:expr) $body:block)+ _ $default:block ) => ( $(if $pred $body else)+ $default ); // for if the default case was ommitted - ( $( | $pred:expr $body:block )+ ) => ( + ( $(($pred:expr) $body:block)+ ) => ( $(if $pred $body)else+ ); ) -- cgit 1.4.1-3-g733a5