Parse property access that starts with a PropertyAccess token: PropertyAccess.Dot.Identifier...
(tokens: &[Token])
| 2308 | |
| 2309 | /// Parse property access that starts with a PropertyAccess token: PropertyAccess.Dot.Identifier... |
| 2310 | fn 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) |
| 2332 | fn variable(tokens: &[Token]) -> IResult<&[Token], Variable> { |
nothing calls this directly
no test coverage detected