| ... | ... | @@ -1536,10 +1536,11 @@ pub const Parser = struct { |
| 1536 | 1536 | continue; |
| 1537 | 1537 | } |
| 1538 | 1538 | |
| 1539 | const comments = try self.eatComments(arena); |
| 1539 | 1540 | const node = try arena.construct(ast.Node.SwitchCase { |
| 1540 | 1541 | .base = ast.Node { |
| 1541 | 1542 | .id = ast.Node.Id.SwitchCase, |
| 1542 | | .before_comments = null, |
| 1543 | .before_comments = comments, |
| 1543 | 1544 | .same_line_comment = null, |
| 1544 | 1545 | }, |
| 1545 | 1546 | .items = ArrayList(&ast.Node).init(arena), |
| ... | ... | @@ -1551,6 +1552,7 @@ pub const Parser = struct { |
| 1551 | 1552 | try stack.append(State { .AssignmentExpressionBegin = OptionalCtx { .Required = &node.expr } }); |
| 1552 | 1553 | try stack.append(State { .PointerPayload = OptionalCtx { .Optional = &node.payload } }); |
| 1553 | 1554 | try stack.append(State { .SwitchCaseFirstItem = &node.items }); |
| 1555 | |
| 1554 | 1556 | continue; |
| 1555 | 1557 | }, |
| 1556 | 1558 | |
| ... | ... | @@ -4123,7 +4125,9 @@ pub const Parser = struct { |
| 4123 | 4125 | ast.Node.Id.SwitchCase => { |
| 4124 | 4126 | const switch_case = @fieldParentPtr(ast.Node.SwitchCase, "base", base); |
| 4125 | 4127 | |
| 4126 | | try stack.append(RenderState { .PrintSameLineComment = switch_case.base.same_line_comment }); |
| 4128 | try self.renderComments(stream, base, indent); |
| 4129 | |
| 4130 | try stack.append(RenderState { .PrintSameLineComment = base.same_line_comment }); |
| 4127 | 4131 | try stack.append(RenderState { .Text = "," }); |
| 4128 | 4132 | try stack.append(RenderState { .Expression = switch_case.expr }); |
| 4129 | 4133 | if (switch_case.payload) |payload| { |