diff options
| author | Brendan Zabarauskas <bjzaba@yahoo.com.au> | 2013-05-10 15:01:27 +1000 |
|---|---|---|
| committer | Brendan Zabarauskas <bjzaba@yahoo.com.au> | 2013-05-15 11:02:17 +1000 |
| commit | 7e4a176dd3a1789d5d10cb995a62daa185cb9cdd (patch) | |
| tree | 3344b5785ebbc1a25aa137c916ed0d09b2324b46 /src/libsyntax/ext | |
| parent | b9824e18c2b02d74bd1bf646fea5f05477ca5071 (diff) | |
| download | rust-7e4a176dd3a1789d5d10cb995a62daa185cb9cdd.tar.gz rust-7e4a176dd3a1789d5d10cb995a62daa185cb9cdd.zip | |
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.
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/expand.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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+ ); ) |
