diff options
author | John Hodge <tpg@mutabah.net> | 2016-05-16 11:56:41 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-05-16 11:56:41 +0800 |
commit | 0733ed89c69f6488e4c1a6c18a51e355231c1969 (patch) | |
tree | 6f6f14c523a3f323c753541db3759e51d0dfc81d /src/hir/path.cpp | |
parent | cca4ff65a4fc2f52563ee5db5a2b358b813d946f (diff) | |
download | mrust-0733ed89c69f6488e4c1a6c18a51e355231c1969.tar.gz |
HIR - Path lowering hacked up
Diffstat (limited to 'src/hir/path.cpp')
-rw-r--r-- | src/hir/path.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/hir/path.cpp b/src/hir/path.cpp index 3ea90b9f..3c955f6a 100644 --- a/src/hir/path.cpp +++ b/src/hir/path.cpp @@ -42,7 +42,23 @@ namespace HIR { m_path( mv$(sp) ) { } +::HIR::GenericPath::GenericPath(::HIR::SimplePath sp, ::HIR::PathParams params): + m_path( mv$(sp) ), + m_params( mv$(params) ) +{ +} + +::HIR::Path::Path(::HIR::GenericPath gp): + m_data( ::HIR::Path::Data::make_Generic( mv$(gp) ) ) +{ +} +::HIR::Path::Path(::HIR::TypeRefPtr type, ::HIR::GenericPath trait, ::std::string item, ::HIR::PathParams params): + m_data( ::HIR::Path::Data::make_UFCS({ + mv$(type), mv$(trait), mv$(item), mv$(params) + }) ) +{ +} ::HIR::Path::Path(::HIR::SimplePath sp): m_data( ::HIR::Path::Data::make_Generic(::HIR::GenericPath(mv$(sp))) ) { |