Parse path pattern: [identifier =] [path_type] node (edge node)
(tokens: &[Token])
| 1166 | |
| 1167 | /// Parse path pattern: [identifier =] [path_type] node (edge node)* |
| 1168 | fn path_pattern(tokens: &[Token]) -> IResult<&[Token], PathPattern> { |
| 1169 | map( |
| 1170 | tuple(( |
| 1171 | opt(tuple((identifier, expect_token(Token::Equal)))), |
| 1172 | opt(path_type_keywords), |
| 1173 | many1(pattern_element), |
| 1174 | )), |
| 1175 | |(assignment, path_type, elements)| PathPattern { |
| 1176 | assignment: assignment.map(|(id, _)| id), |
| 1177 | path_type, |
| 1178 | elements, |
| 1179 | location: Location::default(), |
| 1180 | }, |
| 1181 | )(tokens) |
| 1182 | } |
| 1183 | |
| 1184 | /// Parse path type keywords: WALK | TRAIL | SIMPLE PATH | ACYCLIC PATH |
| 1185 | fn path_type_keywords(tokens: &[Token]) -> IResult<&[Token], PathType> { |
nothing calls this directly
no test coverage detected