diff options
Diffstat (limited to 'gcc/rust/ast/rust-expr.h')
-rw-r--r-- | gcc/rust/ast/rust-expr.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-expr.h b/gcc/rust/ast/rust-expr.h index f546184..1b3a85f 100644 --- a/gcc/rust/ast/rust-expr.h +++ b/gcc/rust/ast/rust-expr.h @@ -152,6 +152,8 @@ public: Location get_locus () const override { return lit_expr.get_locus (); } + LiteralExpr get_literal () const { return lit_expr; } + void accept_vis (ASTVisitor &vis) override; bool check_cfg_predicate (const Session &session) const override; @@ -175,6 +177,10 @@ public: : path (std::move (path)), lit (std::move (lit_expr)) {} + SimplePath get_path () const { return path; } + + LiteralExpr get_literal () const { return lit; } + std::string as_string () const override { return path.as_string () + " = " + lit.as_string (); |