diff options
author | John Hodge <tpg@mutabah.net> | 2016-05-13 22:22:09 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-05-13 22:22:09 +0800 |
commit | 432892ea9ce604b6d12d6b087ad6328eb335f70c (patch) | |
tree | 754666f17175755194aa9aa701fb6050eb7ef92f /src/hir/hir.hpp | |
parent | 8e9e3a395f211dc871c3abc816b1cc892ed74312 (diff) | |
download | mrust-432892ea9ce604b6d12d6b087ad6328eb335f70c.tar.gz |
HIR - Continued expansion
Diffstat (limited to 'src/hir/hir.hpp')
-rw-r--r-- | src/hir/hir.hpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/hir/hir.hpp b/src/hir/hir.hpp index 5743e24a..03fe0bde 100644 --- a/src/hir/hir.hpp +++ b/src/hir/hir.hpp @@ -21,6 +21,8 @@ namespace HIR { class Expr { }; +class Pattern { +}; class Crate; class Module; @@ -48,11 +50,27 @@ struct GenericParams // -------------------------------------------------------------------- struct Static { + //GenericParams m_params; + + bool m_is_mut; + TypeRef m_type; + Expr m_value; +}; +struct Constant +{ GenericParams m_params; + + TypeRef m_type; + Expr m_value; }; struct Function { GenericParams m_params; + + ::std::vector< ::std::pair< Pattern, TypeRef > > m_args; + TypeRef m_return; + + Expr m_code; }; // -------------------------------------------------------------------- @@ -124,6 +142,7 @@ TAGGED_UNION(TypeItem, Import, ); TAGGED_UNION(ValueItem, Import, (Import, ::HIR::SimplePath), + (Constant, Constant), (Static, Static), (StructConstant, struct { ::HIR::TypeRef ty; }), (Function, Function), |