summaryrefslogtreecommitdiff
path: root/src/types.hpp
diff options
context:
space:
mode:
authorJohn Hodge (sonata) <tpg@mutabah.net>2015-01-15 00:07:26 +0800
committerJohn Hodge (sonata) <tpg@mutabah.net>2015-01-15 00:07:26 +0800
commit801bce6026e86d32b6971463a3aefd38eb3b2f27 (patch)
treebe5330a19fe5e6b3e020a5a62c0b3ac9f59f6df0 /src/types.hpp
parent6e0dfa94d9206d10514c337cee3d704f559381b3 (diff)
downloadmrust-801bce6026e86d32b6971463a3aefd38eb3b2f27.tar.gz
Type aliases added (AST only, no parse yet), need to handle lookups
Diffstat (limited to 'src/types.hpp')
-rw-r--r--src/types.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/types.hpp b/src/types.hpp
index 512519f8..4ef24685 100644
--- a/src/types.hpp
+++ b/src/types.hpp
@@ -84,12 +84,18 @@ public:
m_class(GENERIC),
m_path({AST::PathNode(name, {})})
{}
+ TypeRef(::std::string name):
+ TypeRef(TagArg(), ::std::move(name))
+ {}
struct TagPath {};
TypeRef(TagPath, AST::Path path):
m_class(PATH),
m_path( ::std::move(path) )
{}
+ TypeRef(AST::Path path):
+ TypeRef(TagPath(), ::std::move(path))
+ {}
bool is_path() const { return m_class == PATH; }
AST::Path& path() { assert(is_path()); return m_path; }