summaryrefslogtreecommitdiff
path: root/src/types.hpp
diff options
context:
space:
mode:
authorJohn Hodge (sonata) <tpg@mutabah.net>2015-01-13 12:54:14 +0800
committerJohn Hodge (sonata) <tpg@mutabah.net>2015-01-13 12:54:14 +0800
commitb3058a63847bd1d2b58765c279b0c29e60eb65ea (patch)
tree2c20805f935b8f7c087cc1d4ebaae24f0f8acf8e /src/types.hpp
parent6de0331230ceda3bdfa5b12829de519c21fcff9a (diff)
downloadmrust-b3058a63847bd1d2b58765c279b0c29e60eb65ea.tar.gz
Type resolution work in progress
Diffstat (limited to 'src/types.hpp')
-rw-r--r--src/types.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/types.hpp b/src/types.hpp
index 7ce170f2..512519f8 100644
--- a/src/types.hpp
+++ b/src/types.hpp
@@ -90,6 +90,10 @@ public:
m_class(PATH),
m_path( ::std::move(path) )
{}
+
+ bool is_path() const { return m_class == PATH; }
+ AST::Path& path() { assert(is_path()); return m_path; }
+ ::std::vector<TypeRef>& sub_types() { return m_inner_types; }
friend ::std::ostream& operator<<(::std::ostream& os, const TypeRef& tr);