File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2052,9 +2052,14 @@ impl<'a> Parser<'a> {
20522052 })?;
20532053
20542054 match expr {
2055- // `parse_prefix` does not itself follow compound chains, but a
2056- // dialect override could still return a compound expression, so
2057- // keep the flatten arms for safety.
2055+ // If we get back a compound field access or identifier,
2056+ // we flatten the nested expression.
2057+ // For example if the current root is `foo`
2058+ // and we get back a compound identifier expression `bar.baz`
2059+ // The full expression should be `foo.bar.baz` (i.e.
2060+ // a root with an access chain with 2 entries) and not
2061+ // `foo.(bar.baz)` (i.e. a root with an access chain with
2062+ // 1 entry`).
20582063 Some(Expr::CompoundFieldAccess { root, access_chain }) => {
20592064 chain.push(AccessExpr::Dot(*root));
20602065 chain.extend(access_chain);
You can’t perform that action at this time.
0 commit comments