mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-23 18:02:40 +00:00
Update IfExpression to follow AST conventions (#1167)
This commit is contained in:
1 parent
baf832b18b
commit
883f2a3ecd
6 files changed
+31
-35
No files matched your search
@@ -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