summaryrefslogtreecommitdiff
path: root/src/ast/crate.hpp
diff options
context:
space:
mode:
authorubsan <npmazzuca@gmail.com>2016-12-24 19:07:08 -0700
committerubsan <npmazzuca@gmail.com>2016-12-24 19:07:08 -0700
commit0c14c734fa32014fd24297ccdbed927016185ffd (patch)
treeed4bbff4be39c44c57164641f4ed32b5ad4675f0 /src/ast/crate.hpp
parentd12a8a886caf2e0edf33c1af831b1df990d2c892 (diff)
downloadmrust-0c14c734fa32014fd24297ccdbed927016185ffd.tar.gz
No more tears!
No more DOS line endings or trailing whitespace either
Diffstat (limited to 'src/ast/crate.hpp')
-rw-r--r--src/ast/crate.hpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ast/crate.hpp b/src/ast/crate.hpp
index 31076c02..c51dacf5 100644
--- a/src/ast/crate.hpp
+++ b/src/ast/crate.hpp
@@ -14,14 +14,14 @@ class Crate
{
public:
::AST::MetaItems m_attrs;
-
+
::std::map< ::std::string, ::AST::Path> m_lang_items;
public:
Module m_root_module;
::std::map< ::std::string, ExternCrate> m_extern_crates;
// Mapping filled by searching for (?visible) macros with is_pub=true
::std::map< ::std::string, const MacroRules*> m_exported_macros;
-
+
enum class Type {
Unknown,
RustLib,
@@ -37,15 +37,15 @@ public:
::std::string m_crate_name;
AST::Path m_prelude_path;
-
+
Crate();
const Module& root_module() const { return m_root_module; }
Module& root_module() { return m_root_module; }
-
+
/// Load referenced crates
void load_externs();
-
+
void load_extern_crate(Span sp, const ::std::string& name);
};
@@ -55,14 +55,14 @@ class ExternCrate
public:
::std::string m_name;
::HIR::CratePtr m_hir;
-
+
ExternCrate(const ::std::string& name, const ::std::string& path);
-
+
ExternCrate(ExternCrate&&) = default;
ExternCrate& operator=(ExternCrate&&) = default;
ExternCrate(const ExternCrate&) = delete;
ExternCrate& operator=(const ExternCrate& ) = delete;
-
+
void with_all_macros(::std::function<void(const ::std::string& , const MacroRules&)> cb) const;
const MacroRules* find_macro_rules(const ::std::string& name) const;
};