diff options
author | John Hodge <tpg@mutabah.net> | 2016-03-22 12:55:46 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-03-22 12:55:46 +0800 |
commit | 2db4633001c72f89de5073b26c6b8c3f1a19baa6 (patch) | |
tree | 17b1565166350c6e5f4499385e54c4133e5c355d /src/hir/path.hpp | |
parent | 92c8489a21feac851a3de2b5a8f192c647504904 (diff) | |
download | mrust-2db4633001c72f89de5073b26c6b8c3f1a19baa6.tar.gz |
HIR - Continued planning
Diffstat (limited to 'src/hir/path.hpp')
-rw-r--r-- | src/hir/path.hpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/hir/path.hpp b/src/hir/path.hpp new file mode 100644 index 00000000..e51e3c50 --- /dev/null +++ b/src/hir/path.hpp @@ -0,0 +1,41 @@ + +#ifndef _HIR_PATH_HPP_ +#define _HIR_PATH_HPP_ +#pragma once + +#include <common.hpp> + +namespace HIR { + +class TypeRef; + +/// Simple path - Absolute with no generic parameters +struct SimplePath +{ + SimplePath(::std::string crate): + m_crate_name( mv$(crate) ) + { + } + + ::std::string m_crate_name; + ::std::vector< ::std::string> m_components; +}; +/// Generic path - Simple path with one lot of generic params +class GenericPath +{ +public: + SimplePath m_path; + ::std::vector<TypeRef> m_params; +}; + +class Path +{ + // Two possibilities + // - UFCS + // - Generic path +}; + +} // namespace HIR + +#endif + |