diff options
author | John Hodge (sonata) <tpg@mutabah.net> | 2015-01-15 00:07:26 +0800 |
---|---|---|
committer | John Hodge (sonata) <tpg@mutabah.net> | 2015-01-15 00:07:26 +0800 |
commit | 801bce6026e86d32b6971463a3aefd38eb3b2f27 (patch) | |
tree | be5330a19fe5e6b3e020a5a62c0b3ac9f59f6df0 /src/types.hpp | |
parent | 6e0dfa94d9206d10514c337cee3d704f559381b3 (diff) | |
download | mrust-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.hpp | 6 |
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; }
|