void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
+ std::unique_ptr<Expr> &get_awaited_expr () { return awaited_expr; }
+
ExprType get_expression_type () const final override
{
return ExprType::Await;
Location get_locus () const override final { return locus; }
+ bool get_has_move () const { return has_move; }
+ std::unique_ptr<BlockExpr> &get_block_expr () { return block_expr; }
+
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
}
std::vector<std::unique_ptr<EnumItem>> &get_variants () { return items; }
+ WhereClause &get_where_clause () { return where_clause; }
protected:
/* Use covariance to implement clone function as returning this object
return trait_items;
}
+ WhereClause &get_where_clause () { return where_clause; }
+
Identifier get_name () const { return name; }
+ bool is_unsafe () const { return unsafety == Unsafety::Unsafe; }
// Mega-constructor
Trait (Analysis::NodeMapping mappings, Identifier name, Unsafety unsafety,
virtual void accept_vis (HIRFullVisitor &vis) = 0;
virtual void accept_vis (HIRExternalItemVisitor &vis) = 0;
+ Visibility &get_visibility () { return visibility; }
Analysis::NodeMapping get_mappings () const { return mappings; }
Identifier get_item_name () const { return item_name; }