From 8f996567e84015714bcf322d11a46580611e3377 Mon Sep 17 00:00:00 2001 From: Arthur Cohen Date: Mon, 20 Jun 2022 14:57:21 +0200 Subject: hir: Add ConstGenericParam and lower to them properly --- gcc/rust/ast/rust-ast.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/rust/ast') 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 &get_type () { -- cgit v1.1 From 6e5468e256dd06eb6988a0eca37c86bc52722457 Mon Sep 17 00:00:00 2001 From: Arthur Cohen Date: Mon, 20 Jun 2022 16:50:46 +0200 Subject: hir: Add ConstGenericArg and lower them properly --- gcc/rust/ast/rust-path.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/rust/ast') diff --git a/gcc/rust/ast/rust-path.h b/gcc/rust/ast/rust-path.h index 5642226..03758d0 100644 --- a/gcc/rust/ast/rust-path.h +++ b/gcc/rust/ast/rust-path.h @@ -189,6 +189,8 @@ public: Kind get_kind () const { return kind; } + std::unique_ptr &get_expression () { return expression; } + std::string as_string () const { switch (get_kind ()) -- cgit v1.1