aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast/rust-expr.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/ast/rust-expr.h')
-rw-r--r--gcc/rust/ast/rust-expr.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/rust/ast/rust-expr.h b/gcc/rust/ast/rust-expr.h
index 06ac06e..ee4368f 100644
--- a/gcc/rust/ast/rust-expr.h
+++ b/gcc/rust/ast/rust-expr.h
@@ -662,7 +662,6 @@ public:
LESS_OR_EQUAL // std::cmp::PartialEq::le
};
-private:
// Note: overloading trait specified in comments
ExprType expr_type;
@@ -714,6 +713,8 @@ public:
virtual void accept_vis (ASTVisitor &vis) OVERRIDE;
+ Expr *get_lhs () { return main_or_left_expr.get (); }
+
// TODO: implement via a function call to std::cmp::PartialEq::eq(&op1, &op2)
// maybe?
protected:
@@ -746,7 +747,6 @@ public:
LOGICAL_AND
};
-private:
ExprType expr_type;
// Expr* right_expr;
@@ -796,6 +796,8 @@ public:
virtual void accept_vis (ASTVisitor &vis) OVERRIDE;
+ Expr *get_lhs () { return main_or_left_expr.get (); }
+
protected:
// Use covariance to implement clone function as returning this object rather
// than base