| 295 | } |
| 296 | |
| 297 | fn entity_pattern(input: &str) -> IResult<&str, Pattern> { |
| 298 | map( |
| 299 | tuple(( |
| 300 | ws(char('$')), |
| 301 | ws(identifier), |
| 302 | ws(tag("isa")), |
| 303 | ws(identifier), |
| 304 | opt(delimited( |
| 305 | ws(char('(')), |
| 306 | separated_list0(ws(char(',')), attribute_value), |
| 307 | ws(char(')')), |
| 308 | )), |
| 309 | )), |
| 310 | |(_, variable, _, entity_type, attributes)| Pattern::EntityPattern { |
| 311 | variable: variable.to_string(), |
| 312 | entity_type: entity_type.to_string(), |
| 313 | attributes: attributes.unwrap_or_default(), |
| 314 | }, |
| 315 | )(input) |
| 316 | } |
| 317 | |
| 318 | fn relationship_pattern(input: &str) -> IResult<&str, Pattern> { |
| 319 | map( |