(input: &str)
| 29 | } |
| 30 | |
| 31 | pub fn parse_inference(input: &str) -> IResult<&str, Inference> { |
| 32 | alt(( |
| 33 | map(parse_entity_inference, Inference::EntityInference), |
| 34 | map(parse_extend_entity_inference, |i| { |
| 35 | Inference::ExtendEntityInference(i) |
| 36 | }), |
| 37 | map(parse_relationship_inference, |i| { |
| 38 | Inference::RelationshipInference(i) |
| 39 | }), |
| 40 | ))(input) |
| 41 | } |
| 42 | |
| 43 | #[cfg(test)] |
| 44 | mod tests { |