Skip to content

Commit

Permalink
julefmt: remove ternary operator
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Mar 29, 2024
1 parent 6593ed0 commit e72fc11
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/format.jule
Original file line number Diff line number Diff line change
Expand Up @@ -1698,16 +1698,6 @@ impl ExprFormatter {
self.write("]")
}

fn ternary(&self, mut t: &ast::TernaryExpr) {
self.write("if ")
self.format(t.condition)
self.write(" { ")
self.format(t.true_expr)
self.write(" } else { ")
self.format(t.false_expr)
self.write(" }")
}

fn format_kind(&self, mut &kind: any) {
match type kind {
| &ast::Expr:
Expand Down Expand Up @@ -1756,8 +1746,6 @@ impl ExprFormatter {
self.indexing((&ast::IndexingExpr)(kind))
| &ast::SlicingExpr:
self.slicing((&ast::SlicingExpr)(kind))
| &ast::TernaryExpr:
self.ternary((&ast::TernaryExpr)(kind))
}
}

Expand Down

0 comments on commit e72fc11

Please sign in to comment.