Skip to content

Commit be38a7f

Browse files
committed
juledoc: add formatting support for index expressions
1 parent 05c94f9 commit be38a7f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

builder/formatter.jule

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1625,7 +1625,9 @@ impl exprFormatter {
16251625
| &ast::IndexExpr:
16261626
mut i := kind.(&ast::IndexExpr)
16271627
self.format(i.X)
1628-
self.write("[ ... ]")
1628+
self.write("[")
1629+
self.format(i.Index)
1630+
self.write("]")
16291631
| &ast::SlicingExpr:
16301632
self.slicing(kind.(&ast::SlicingExpr))
16311633
| &ast::ChanSend:

0 commit comments

Comments
 (0)