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

Function property_access_continued

graphlite/src/ast/parser.rs:2310–2329  ·  view source on GitHub ↗

Parse property access that starts with a PropertyAccess token: PropertyAccess.Dot.Identifier...

(tokens: &[Token])

Source from the content-addressed store, hash-verified

2308
2309/// Parse property access that starts with a PropertyAccess token: PropertyAccess.Dot.Identifier...
2310fn property_access_continued(tokens: &[Token]) -> IResult<&[Token], PropertyAccess> {
2311 map(
2312 tuple((
2313 property_access_token,
2314 many0(tuple((expect_token(Token::Dot), identifier))),
2315 )),
2316 |(base_access, additional_properties)| {
2317 // Build the full property path by extending the base property access
2318 let mut property_path = base_access.property;
2319 for (_, prop) in additional_properties {
2320 property_path = format!("{}.{}", property_path, prop);
2321 }
2322 PropertyAccess {
2323 object: base_access.object,
2324 property: property_path,
2325 location: Location::default(),
2326 }
2327 },
2328 )(tokens)
2329}
2330
2331/// Parse variable reference: identifier (bound in MATCH/LET clauses)
2332fn variable(tokens: &[Token]) -> IResult<&[Token], Variable> {

Callers

nothing calls this directly

Calls 1

expect_tokenFunction · 0.85

Tested by

no test coverage detected