(input: &str)
| 113 | } |
| 114 | |
| 115 | pub fn parse_condition(input: &str) -> IResult<&str, Condition> { |
| 116 | let (input, first) = alt(( |
| 117 | map(parse_binary_condition, Condition::Binary), |
| 118 | map( |
| 119 | tuple((char('('), ws(parse_condition), char(')'))), |
| 120 | |(_, condition, _)| condition, |
| 121 | ), |
| 122 | ))(input)?; |
| 123 | |
| 124 | continue_parsing_condition(input, first) |
| 125 | } |
| 126 | |
| 127 | #[cfg(test)] |
| 128 | mod tests { |