mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 19:51:09 +01:00
Update IfExpression to follow AST conventions (#1167)
This commit is contained in:
@@ -519,13 +519,18 @@ class IfExpression : public Expression {
|
||||
return InheritsFromIfExpression(node->kind());
|
||||
}
|
||||
|
||||
auto condition() const -> Nonnull<Expression*> { return condition_; }
|
||||
auto then_expression() const -> Nonnull<Expression*> {
|
||||
return then_expression_;
|
||||
auto condition() const -> const Expression& { return *condition_; }
|
||||
auto condition() -> Expression& { return *condition_; }
|
||||
|
||||
auto then_expression() const -> const Expression& {
|
||||
return *then_expression_;
|
||||
}
|
||||
auto else_expression() const -> Nonnull<Expression*> {
|
||||
return else_expression_;
|
||||
auto then_expression() -> Expression& { return *then_expression_; }
|
||||
|
||||
auto else_expression() const -> const Expression& {
|
||||
return *else_expression_;
|
||||
}
|
||||
auto else_expression() -> Expression& { return *else_expression_; }
|
||||
|
||||
private:
|
||||
Nonnull<Expression*> condition_;
|
||||
|
||||
Reference in New Issue
Block a user