diff options
author | John Hodge <tpg@mutabah.net> | 2018-05-20 15:02:17 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2018-05-20 15:02:17 +0800 |
commit | 1c50e757b45f64ead016d6cd2bf27585ba5dce04 (patch) | |
tree | b90d54a4698355112aa9204da15b5b7f7ff940d2 /src/expand/std_prelude.cpp | |
parent | 7a4733c76c0391578fe04fde9cfa19698878c81e (diff) | |
download | mrust-1c50e757b45f64ead016d6cd2bf27585ba5dce04.tar.gz |
AST - Rename MetaItem and MetaItems to Attribute and AttributeList
Diffstat (limited to 'src/expand/std_prelude.cpp')
-rw-r--r-- | src/expand/std_prelude.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/expand/std_prelude.cpp b/src/expand/std_prelude.cpp index e12a441c..6b81b71e 100644 --- a/src/expand/std_prelude.cpp +++ b/src/expand/std_prelude.cpp @@ -8,8 +8,8 @@ class Decorator_NoStd: { public: AttrStage stage() const override { return AttrStage::Pre; } - - void handle(const Span& sp, const AST::MetaItem& mi, AST::Crate& crate) const override { + + void handle(const Span& sp, const AST::Attribute& mi, AST::Crate& crate) const override { if( crate.m_load_std != AST::Crate::LOAD_STD && crate.m_load_std != AST::Crate::LOAD_CORE ) { ERROR(sp, E0000, "Invalid use of #![no_std] with itself or #![no_core]"); } @@ -22,7 +22,7 @@ class Decorator_NoCore: public: AttrStage stage() const override { return AttrStage::Pre; } - void handle(const Span& sp, const AST::MetaItem& mi, AST::Crate& crate) const override { + void handle(const Span& sp, const AST::Attribute& mi, AST::Crate& crate) const override { if( crate.m_load_std != AST::Crate::LOAD_STD && crate.m_load_std != AST::Crate::LOAD_NONE ) { ERROR(sp, E0000, "Invalid use of #![no_core] with itself or #![no_std]"); } @@ -42,7 +42,7 @@ class Decorator_NoPrelude: public: AttrStage stage() const override { return AttrStage::Pre; } - void handle(const Span& sp, const AST::MetaItem& mi, ::AST::Crate& crate, const AST::Path& path, AST::Module& mod, AST::Item&i) const override { + void handle(const Span& sp, const AST::Attribute& mi, ::AST::Crate& crate, const AST::Path& path, AST::Module& mod, AST::Item&i) const override { if( i.is_Module() ) { i.as_Module().m_insert_prelude = false; } @@ -58,7 +58,7 @@ class Decorator_PreludeImport: public: AttrStage stage() const override { return AttrStage::Post; } - void handle(const Span& sp, const AST::MetaItem& mi, ::AST::Crate& crate, const AST::Path& path, AST::Module& mod, AST::Item&i) const override { + void handle(const Span& sp, const AST::Attribute& mi, ::AST::Crate& crate, const AST::Path& path, AST::Module& mod, AST::Item&i) const override { if( i.is_Use() ) { const auto& p = i.as_Use().path; // TODO: Ensure that this statement is a glob (has a name of "") |