Skip to content

Commit a3075b1

Browse files
committed
juledoc: update to latest julefmt formatting
1 parent 04cd71b commit a3075b1

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

builder/formatter.jule

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1753,10 +1753,9 @@ impl binaryFormatter {
17531753
self.write(bin.Op.Kind)
17541754
}
17551755

1756-
fn binary(&self, mut &bin: &ast::BinaryExpr) {
1756+
fn binary(&self, mut bin: &ast::BinaryExpr) {
17571757
self.bin = bin
17581758
self.head(self.bin)
1759-
rep:
17601759
if self.bin.Op.Row == self.bin.Right.Token.Row {
17611760
self.writeSpace()
17621761
self.ef.fmt.popRowCommentsByC(self.bin.Right.Token.Row, self.bin.Right.Token.Column, false)
@@ -1770,16 +1769,19 @@ impl binaryFormatter {
17701769
self.ef.fmt.popRowCommentsByC(self.bin.Right.Token.Row, self.bin.Right.Token.Column, false)
17711770
match type self.bin.Right.Kind {
17721771
| &ast::BinaryExpr:
1773-
self.bin = self.bin.Right.Kind.(&ast::BinaryExpr)
1774-
self.head(self.bin)
1775-
self.ef.fmt.doneIndent()
1776-
goto rep
1772+
bin = self.bin.Right.Kind.(&ast::BinaryExpr)
1773+
if self.bin.Op.Row != self.bin.Right.Token.Row {
1774+
self.binary(bin)
1775+
self.ef.fmt.doneIndent()
1776+
} else {
1777+
self.ef.fmt.doneIndent()
1778+
self.binary(bin)
1779+
}
17771780
|:
1778-
self.ef.fmt.popRowCommentsByC(self.bin.Right.Token.Row, self.bin.Right.Token.Column, false)
17791781
self.format(self.bin.Right)
17801782
self.ef.fmt.row = self.bin.Right.Token.Row
1783+
self.ef.fmt.doneIndent()
17811784
}
1782-
self.ef.fmt.doneIndent()
17831785
}
17841786

17851787
fn isZip(&self, mut &kind: ast::ExprData): bool {

0 commit comments

Comments
 (0)