Skip to content

Commit

Permalink
julefmt: update to latest AST
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed May 17, 2024
1 parent c837f12 commit e30e7ce
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/format.jule
Original file line number Diff line number Diff line change
Expand Up @@ -1116,11 +1116,6 @@ impl scopeFormatter {
self.fmt.formatExpr(u.Expr)
}

fn coExpr(&self, mut expr: &ast::CoExpr) {
self.write("co ")
self.fmt.formatExpr(expr.Expr)
}

fn label(&self, l: &ast::LabelSt) {
// Remove one indentation.
self.fmt.buf = self.fmt.buf[:len(self.fmt.buf)-self.fmt.indentLen]
Expand Down Expand Up @@ -1368,8 +1363,6 @@ impl scopeFormatter {
| &ast::Expr:
let mut expr = (&ast::Expr)(stmt)
self.fmt.formatExpr(expr)
| &ast::CoExpr:
self.coExpr((&ast::CoExpr)(stmt))
| &ast::LabelSt:
self.label((&ast::LabelSt)(stmt))
| &ast::GotoSt:
Expand Down Expand Up @@ -1641,6 +1634,9 @@ impl exprFormatter {
}

fn fnCall(&self, mut f: &ast::FnCallExpr) {
if f.IsCo {
self.write("co ")
}
self.format(f.Expr)
self.write("(")
self.args(f)
Expand Down

0 comments on commit e30e7ce

Please sign in to comment.