add a predicate that determines whether a binop is lazy (and and or are lazy)

This commit is contained in:
Tim Chevalier 2011-06-28 13:06:43 -07:00
parent d5fc01caef
commit a7c4c19d4b

View File

@ -173,6 +173,14 @@ fn binop_to_str(binop op) -> str {
}
}
pred lazy_binop(binop b) -> bool {
alt (b) {
case (and) { true }
case (or) { true }
case (_) { false }
}
}
tag unop { box(mutability); deref; not; neg; }
fn unop_to_str(unop op) -> str {