Update IfExpression to follow AST conventions (#1167)

This commit is contained in:
Geoff Romer
2022-04-12 12:28:48 -07:00
committed by GitHub
parent baf832b18b
commit 883f2a3ecd
6 changed files with 31 additions and 35 deletions
+2 -3
View File
@@ -161,9 +161,8 @@ void Expression::Print(llvm::raw_ostream& out) const {
break;
case ExpressionKind::IfExpression: {
const auto& if_expr = cast<IfExpression>(*this);
out << "if " << *if_expr.condition() << " then "
<< *if_expr.then_expression() << " else "
<< *if_expr.else_expression();
out << "if " << if_expr.condition() << " then "
<< if_expr.then_expression() << " else " << if_expr.else_expression();
break;
}
case ExpressionKind::UnimplementedExpression: {