Parse node pattern: (identifier? :label? {properties}?)
(tokens: &[Token])
| 1246 | |
| 1247 | /// Parse node pattern: (identifier? :label? {properties}?) |
| 1248 | fn node_pattern(tokens: &[Token]) -> IResult<&[Token], Node> { |
| 1249 | map( |
| 1250 | tuple(( |
| 1251 | expect_token(Token::LeftParen), |
| 1252 | opt(identifier), |
| 1253 | opt(label_list), |
| 1254 | opt(property_map), |
| 1255 | expect_token(Token::RightParen), |
| 1256 | )), |
| 1257 | |(_, identifier, labels, properties, _)| Node { |
| 1258 | identifier, |
| 1259 | labels: labels.unwrap_or_default(), |
| 1260 | properties, |
| 1261 | location: Location::default(), |
| 1262 | }, |
| 1263 | )(tokens) |
| 1264 | } |
| 1265 | |
| 1266 | /// Parse edge pattern: -[:label {properties}]- |
| 1267 | fn edge_pattern(tokens: &[Token]) -> IResult<&[Token], Edge> { |
nothing calls this directly
no test coverage detected