| ... | ... | @@ -1515,17 +1515,23 @@ pub const Parser = struct { |
| 1515 | 1515 | continue; |
| 1516 | 1516 | }, |
| 1517 | 1517 | Token.Id.Period => { |
| 1518 | const identifier = try self.createLiteral(arena, ast.NodeIdentifier, Token(undefined)); |
| 1518 | 1519 | const node = try self.createToDestNode(arena, dest_ptr, ast.NodeInfixOp, |
| 1519 | 1520 | ast.NodeInfixOp { |
| 1520 | 1521 | .base = undefined, |
| 1521 | 1522 | .lhs = dest_ptr.get(), |
| 1522 | 1523 | .op_token = token, |
| 1523 | 1524 | .op = ast.NodeInfixOp.InfixOp.Period, |
| 1524 | | .rhs = undefined, |
| 1525 | .rhs = &identifier.base, |
| 1525 | 1526 | } |
| 1526 | 1527 | ); |
| 1527 | 1528 | stack.append(State { .SuffixOpExpressionEnd = dest_ptr }) catch unreachable; |
| 1528 | | try stack.append(State { .SuffixOpExpressionBegin = DestPtr { .Field = &node.rhs }}); |
| 1529 | try stack.append(State { |
| 1530 | .ExpectTokenSave = ExpectTokenSave { |
| 1531 | .id = Token.Id.Identifier, |
| 1532 | .ptr = &identifier.token |
| 1533 | } |
| 1534 | }); |
| 1529 | 1535 | continue; |
| 1530 | 1536 | }, |
| 1531 | 1537 | else => { |
| ... | ... | @@ -5011,6 +5017,7 @@ test "zig fmt: inline asm" { |
| 5011 | 5017 | test "zig fmt: coroutines" { |
| 5012 | 5018 | try testCanonical( |
| 5013 | 5019 | \\async fn simpleAsyncFn() void { |
| 5020 | \\ const a = async a.b(); |
| 5014 | 5021 | \\ x += 1; |
| 5015 | 5022 | \\ suspend; |
| 5016 | 5023 | \\ x += 1; |