add a predicate that determines whether a binop is lazy (and and or are lazy)
This commit is contained in:
parent
d5fc01caef
commit
a7c4c19d4b
1 changed files with 8 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue