summaryrefslogtreecommitdiff
path: root/src/hir/from_ast_expr.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-09-12 11:24:52 +0800
committerJohn Hodge <tpg@mutabah.net>2016-09-12 11:24:52 +0800
commitcf5d3d1349df9c5fe4b526476c4262abed8e5eef (patch)
tree1d159b2e85a8449ca84bc9f33dc8bcdd47438237 /src/hir/from_ast_expr.cpp
parenta4a4c80b9111e8442f8371bd6428d1295f1f48d3 (diff)
downloadmrust-cf5d3d1349df9c5fe4b526476c4262abed8e5eef.tar.gz
HIR From AST - Correct paths for range ops
Diffstat (limited to 'src/hir/from_ast_expr.cpp')
-rw-r--r--src/hir/from_ast_expr.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/hir/from_ast_expr.cpp b/src/hir/from_ast_expr.cpp
index 5e3908aa..35d27b24 100644
--- a/src/hir/from_ast_expr.cpp
+++ b/src/hir/from_ast_expr.cpp
@@ -1,4 +1,9 @@
/*
+ * MRustC - Rust Compiler
+ * - By John Hodge (Mutabah/thePowersGang)
+ *
+ * hir/from_ast_expr.cpp
+ * - Constructs a HIR expression tree from an AST expression tree
*/
#include <hir/expr_ptr.hpp>
#include <hir/expr.hpp>
@@ -104,10 +109,10 @@ struct LowerHIR_ExprNode_Visitor:
{
case ::AST::ExprNode_BinOp::RANGE: {
// NOTE: Not language items
- auto path_Range = ::HIR::GenericPath( ::HIR::SimplePath("", {"ops", "Range"}) );
- auto path_RangeFrom = ::HIR::GenericPath( ::HIR::SimplePath("", {"ops", "RangeFrom"}) );
- auto path_RangeTo = ::HIR::GenericPath( ::HIR::SimplePath("", {"ops", "RangeTo"}) );
- auto path_RangeFull = ::HIR::GenericPath( ::HIR::SimplePath("", {"ops", "RangeFull"}) );
+ auto path_Range = ::HIR::GenericPath( ::HIR::SimplePath(g_core_crate, {"ops", "Range"}) );
+ auto path_RangeFrom = ::HIR::GenericPath( ::HIR::SimplePath(g_core_crate, {"ops", "RangeFrom"}) );
+ auto path_RangeTo = ::HIR::GenericPath( ::HIR::SimplePath(g_core_crate, {"ops", "RangeTo"}) );
+ auto path_RangeFull = ::HIR::GenericPath( ::HIR::SimplePath(g_core_crate, {"ops", "RangeFull"}) );
::HIR::ExprNode_StructLiteral::t_values values;
if( v.m_left )
@@ -134,8 +139,8 @@ struct LowerHIR_ExprNode_Visitor:
break; }
case ::AST::ExprNode_BinOp::RANGE_INC: {
// NOTE: Not language items
- auto path_RangeInclusive_NonEmpty = ::HIR::GenericPath( ::HIR::SimplePath("", {"ops", "RangeInclusive", "NonEmpty"}) );
- auto path_RangeToInclusive = ::HIR::GenericPath( ::HIR::SimplePath("", {"ops", "RangeToInclusive"}) );
+ auto path_RangeInclusive_NonEmpty = ::HIR::GenericPath( ::HIR::SimplePath(g_core_crate, {"ops", "RangeInclusive", "NonEmpty"}) );
+ auto path_RangeToInclusive = ::HIR::GenericPath( ::HIR::SimplePath(g_core_crate, {"ops", "RangeToInclusive"}) );
if( v.m_left )
{