diff options
author | John Hodge <tpg@mutabah.net> | 2016-09-12 11:24:52 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-09-12 11:24:52 +0800 |
commit | cf5d3d1349df9c5fe4b526476c4262abed8e5eef (patch) | |
tree | 1d159b2e85a8449ca84bc9f33dc8bcdd47438237 /src/hir/from_ast.cpp | |
parent | a4a4c80b9111e8442f8371bd6428d1295f1f48d3 (diff) | |
download | mrust-cf5d3d1349df9c5fe4b526476c4262abed8e5eef.tar.gz |
HIR From AST - Correct paths for range ops
Diffstat (limited to 'src/hir/from_ast.cpp')
-rw-r--r-- | src/hir/from_ast.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/hir/from_ast.cpp b/src/hir/from_ast.cpp index aabfc3ef..17bbb2c3 100644 --- a/src/hir/from_ast.cpp +++ b/src/hir/from_ast.cpp @@ -1,4 +1,9 @@ /* + * MRustC - Rust Compiler + * - By John Hodge (Mutabah/thePowersGang) + * + * hir/from_ast.cpp + * - Constructs the HIR module tree from the AST module tree */ #include "common.hpp" #include "hir.hpp" @@ -14,7 +19,8 @@ ::HIR::PathParams LowerHIR_PathParams(const Span& sp, const ::AST::PathParams& src_params, bool allow_assoc); ::HIR::TraitPath LowerHIR_TraitPath(const Span& sp, const ::AST::Path& path); -::HIR::SimplePath path_Sized = ::HIR::SimplePath("", {"marker", "Sized"}); +::HIR::SimplePath path_Sized; +::std::string g_core_crate; ::HIR::Crate* g_crate_ptr = nullptr; // -------------------------------------------------------------------- @@ -1259,6 +1265,7 @@ public: { ::HIR::Crate rv; g_crate_ptr = &rv; + g_core_crate = (crate.m_load_std == ::AST::Crate::LOAD_NONE ? "" : "core"); auto& macros = rv.m_exported_macros; // - Extract macros from root module |