(input: &str)
| 19 | } |
| 20 | |
| 21 | pub fn parse_relationship_inference(input: &str) -> IResult<&str, RelationshipInference> { |
| 22 | map( |
| 23 | tuple(( |
| 24 | ws(parse_roles1), |
| 25 | ws(tag("forms")), |
| 26 | ws(parse_identifier), |
| 27 | opt(parse_attributes0), |
| 28 | )), |
| 29 | |(roles, _, relationship_type, attributes)| RelationshipInference { |
| 30 | roles, |
| 31 | relationship_type: relationship_type.to_string(), |
| 32 | attributes: attributes.unwrap_or_default(), |
| 33 | }, |
| 34 | )(input) |
| 35 | } |
| 36 | |
| 37 | #[cfg(test)] |
| 38 | mod tests { |