diff options
Diffstat (limited to 'gcc/rust')
-rw-r--r-- | gcc/rust/ast/rust-ast.h | 2 | ||||
-rw-r--r-- | gcc/rust/ast/rust-stmt.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h index 921832e..70d4d3d 100644 --- a/gcc/rust/ast/rust-ast.h +++ b/gcc/rust/ast/rust-ast.h @@ -901,6 +901,8 @@ public: virtual bool is_item () const = 0; + virtual bool is_expr () const { return false; } + protected: Stmt () : node_id (Analysis::Mappings::get ()->get_next_node_id ()) {} diff --git a/gcc/rust/ast/rust-stmt.h b/gcc/rust/ast/rust-stmt.h index 1b33e1a..59db2a8 100644 --- a/gcc/rust/ast/rust-stmt.h +++ b/gcc/rust/ast/rust-stmt.h @@ -198,6 +198,8 @@ public: bool is_item () const override final { return false; } + bool is_expr () const override final { return true; } + virtual ExprStmtType get_type () const = 0; protected: |