diff options
author | John Hodge <tpg@mutabah.net> | 2016-05-24 17:31:56 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-05-24 17:31:56 +0800 |
commit | 66b9f2589107f60041f024873512f93c9c8aee63 (patch) | |
tree | 2a351e2b6a8f038ff2d45cc60ddb0023da057994 /src | |
parent | dd32dcc71299a489f18dc9d1247104cb81b6b5dd (diff) | |
download | mrust-66b9f2589107f60041f024873512f93c9c8aee63.tar.gz |
(minor) HIR - Planning for const eval
Diffstat (limited to 'src')
-rw-r--r-- | src/hir/hir.hpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/hir/hir.hpp b/src/hir/hir.hpp index 4236e8ac..f77c2a14 100644 --- a/src/hir/hir.hpp +++ b/src/hir/hir.hpp @@ -42,9 +42,11 @@ struct VisEnt /// NOTE: Intentionally minimal, just covers the values (not the types) TAGGED_UNION(Literal, Invalid, (Invalid, struct {}), + // List = Array, Tuple, struct literal (List, ::std::vector<Literal>), (Integer, uint64_t), (Float, double), + // String = &'static str or &[u8; N] (String, ::std::string) ); @@ -53,21 +55,20 @@ TAGGED_UNION(Literal, Invalid, // -------------------------------------------------------------------- struct Static { - //GenericParams m_params; - bool m_is_mut; TypeRef m_type; ExprPtr m_value; - //Literal m_value_res; + Literal m_value_res; }; struct Constant { + // NOTE: The generics can't influence the value of this `const` GenericParams m_params; TypeRef m_type; ExprPtr m_value; - //Literal m_value_res; + Literal m_value_res; }; struct Function { |