(input: &str)
| 34 | } |
| 35 | |
| 36 | pub fn parse_attribute_definition(input: &str) -> IResult<&str, AttributeDefinition> { |
| 37 | map( |
| 38 | tuple((ws(parse_identifier), ws(char(':')), ws(parse_data_type))), |
| 39 | |(name, _, data_type)| AttributeDefinition { |
| 40 | name: name.to_string(), |
| 41 | data_type, |
| 42 | }, |
| 43 | )(input) |
| 44 | } |
| 45 | |
| 46 | #[cfg(test)] |
| 47 | mod tests { |