MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / catalog_path

Function catalog_path

graphlite/src/ast/parser.rs:2899–2911  ·  view source on GitHub ↗

Parse catalog path: /segment1/segment2/... Supports ISO GQL delimited identifiers: /`My-Schema`/`My-Graph`

(tokens: &[Token])

Source from the content-addressed store, hash-verified

2897/// Parse catalog path: /segment1/segment2/...
2898/// Supports ISO GQL delimited identifiers: /`My-Schema`/`My-Graph`
2899fn 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 ...)
2914fn graph_type_spec(tokens: &[Token]) -> IResult<&[Token], GraphTypeSpec> {

Callers 2

validated_schema_nameFunction · 0.85

Calls 1

expect_tokenFunction · 0.85

Tested by

no test coverage detected