Permalink
Browse files

Wrapping parenthesis around the condition in case it includes more than

one statement.
  • Loading branch information...
1 parent 6403b4e commit 69776194e7b4ad6438283f6c5b8cd2f54e807b74 @matthewp matthewp committed Oct 17, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 include/macros.sibilant
View
@@ -360,5 +360,5 @@
(if (undefined? body) ");"
(concat ") {" (indent (translate body)) "}"))))
-(defmacro ternary (cond if-true if-false)
- (concat (translate cond) " ? " (translate if-true) " : " (translate if-false)))
+(defmacro edternary (cond if-true if-false)
+ (concat "(" (translate cond) ") ? " (translate if-true) " : " (translate if-false)))

0 comments on commit 6977619

Please sign in to comment.