aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/ast')
-rw-r--r--gcc/rust/ast/rust-ast.h3
-rw-r--r--gcc/rust/ast/rust-path.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h
index b4d401c..76324dc 100644
--- a/gcc/rust/ast/rust-ast.h
+++ b/gcc/rust/ast/rust-ast.h
@@ -1381,6 +1381,9 @@ public:
}
bool has_type () { return type != nullptr; }
+ bool has_default_value () { return default_value != nullptr; }
+
+ const Identifier &get_name () const { return name; }
std::unique_ptr<AST::Type> &get_type ()
{
diff --git a/gcc/rust/ast/rust-path.h b/gcc/rust/ast/rust-path.h
index 232f11c..6e2b020 100644
--- a/gcc/rust/ast/rust-path.h
+++ b/gcc/rust/ast/rust-path.h
@@ -191,6 +191,8 @@ public:
Kind get_kind () const { return kind; }
+ std::unique_ptr<AST::Expr> &get_expression () { return expression; }
+
std::string as_string () const
{
switch (get_kind ())