diff options
author | Philip Herron <herron.philip@googlemail.com> | 2020-05-22 16:56:28 +0100 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2020-11-28 21:13:15 +0000 |
commit | 6f772d22974d1985f0de002437938480f60f01d7 (patch) | |
tree | 5aeac38a7526abb20ebd84ac7f9b63113ba6fa88 /gcc | |
parent | d24bacfe4c4a70da9105a37b5005fa6c11d0c7af (diff) | |
download | gcc-6f772d22974d1985f0de002437938480f60f01d7.zip gcc-6f772d22974d1985f0de002437938480f60f01d7.tar.gz gcc-6f772d22974d1985f0de002437938480f60f01d7.tar.bz2 |
need access to the fields in AssignmentExpr and ReturnExpr
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/ast/rust-expr.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/rust/ast/rust-expr.h b/gcc/rust/ast/rust-expr.h index 4a9716d..06ac06e 100644 --- a/gcc/rust/ast/rust-expr.h +++ b/gcc/rust/ast/rust-expr.h @@ -947,6 +947,8 @@ public: void visit_rhs (ASTVisitor &vis) { right_expr->accept_vis (vis); } + Expr *get_lhs () { return main_or_left_expr.get (); } + protected: // Use covariance to implement clone function as returning this object rather // than base @@ -3618,13 +3620,13 @@ protected: // Return expression AST node representation class ReturnExpr : public ExprWithoutBlock { +public: // bool has_return_expr; // Expr* return_expr; ::std::unique_ptr<Expr> return_expr; Location locus; -public: /*~ReturnExpr() { if (has_return_expr) { delete return_expr; |