Parse label list: :label (&label)* OR :label (:label)* (BNF-compliant + backward compatible) Supports ISO GQL delimited identifiers: :`Special-Label`
(tokens: &[Token])
| 1317 | /// Parse label list: :label (&label)* OR :label (:label)* (BNF-compliant + backward compatible) |
| 1318 | /// Supports ISO GQL delimited identifiers: :`Special-Label` |
| 1319 | fn label_list(tokens: &[Token]) -> IResult<&[Token], Vec<String>> { |
| 1320 | map( |
| 1321 | tuple(( |
| 1322 | expect_token(Token::Colon), |
| 1323 | identifier_or_quoted, |
| 1324 | many0(tuple(( |
| 1325 | alt(( |
| 1326 | expect_token(Token::Ampersand), // BNF syntax: &label |
| 1327 | expect_token(Token::Colon), // Legacy syntax: :label |
| 1328 | )), |
| 1329 | identifier_or_quoted, |
| 1330 | ))), |
| 1331 | )), |
| 1332 | |(_, first_label, additional_labels)| { |
| 1333 | let mut labels = vec![first_label]; |
| 1334 | labels.extend(additional_labels.into_iter().map(|(_, label)| label)); |
| 1335 | labels |
| 1336 | }, |
| 1337 | )(tokens) |
| 1338 | } |
| 1339 | |
| 1340 | /// Parse property map: {property, ...} |
| 1341 | fn property_map(tokens: &[Token]) -> IResult<&[Token], PropertyMap> { |
nothing calls this directly
no test coverage detected