Parse catalog path: /segment1/segment2/... Supports ISO GQL delimited identifiers: /`My-Schema`/`My-Graph`
(tokens: &[Token])
| 2897 | /// Parse catalog path: /segment1/segment2/... |
| 2898 | /// Supports ISO GQL delimited identifiers: /`My-Schema`/`My-Graph` |
| 2899 | fn catalog_path(tokens: &[Token]) -> IResult<&[Token], CatalogPath> { |
| 2900 | map( |
| 2901 | tuple(( |
| 2902 | // Optional leading slash |
| 2903 | opt(expect_token(Token::Slash)), |
| 2904 | // One or more segments separated by '/' - now accepts delimited identifiers |
| 2905 | separated_list1(expect_token(Token::Slash), identifier_or_quoted), |
| 2906 | // Optional trailing slash |
| 2907 | opt(expect_token(Token::Slash)), |
| 2908 | )), |
| 2909 | |(_, segments, _)| CatalogPath::new(segments, Location::default()), |
| 2910 | )(tokens) |
| 2911 | } |
| 2912 | |
| 2913 | /// Parse graph type specification: (VERTEX TYPE ... EDGE TYPE ...) |
| 2914 | fn graph_type_spec(tokens: &[Token]) -> IResult<&[Token], GraphTypeSpec> { |
no test coverage detected