From 1c50e757b45f64ead016d6cd2bf27585ba5dce04 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 20 May 2018 15:02:17 +0800 Subject: AST - Rename MetaItem and MetaItems to Attribute and AttributeList --- src/expand/cfg.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/expand/cfg.cpp') diff --git a/src/expand/cfg.cpp b/src/expand/cfg.cpp index a2fca312..773a38c4 100644 --- a/src/expand/cfg.cpp +++ b/src/expand/cfg.cpp @@ -30,7 +30,7 @@ void Cfg_SetValueCb(::std::string name, ::std::function& expr) const override { + void handle(const Span& sp, const AST::Attribute& mi, ::AST::Crate& crate, ::std::unique_ptr& expr) const override { DEBUG("#[cfg] expr - " << mi); if( check_cfg(sp, mi) ) { // Leave @@ -144,7 +144,7 @@ class CCfgHandler: expr.reset(); } } - void handle(const Span& sp, const AST::MetaItem& mi, AST::Crate& crate, const AST::Module& mod, AST::ImplDef& impl) const override { + void handle(const Span& sp, const AST::Attribute& mi, AST::Crate& crate, const AST::Module& mod, AST::ImplDef& impl) const override { DEBUG("#[cfg] impl - " << mi); if( check_cfg(sp, mi) ) { // Leave @@ -154,32 +154,32 @@ class CCfgHandler: } } - void handle(const Span& sp, const AST::MetaItem& mi, AST::Crate& crate, ::AST::StructItem& si) const override { + void handle(const Span& sp, const AST::Attribute& mi, AST::Crate& crate, ::AST::StructItem& si) const override { DEBUG("#[cfg] struct item - " << mi); if( !check_cfg(sp, mi) ) { si.m_name = ""; } } - void handle(const Span& sp, const AST::MetaItem& mi, AST::Crate& crate, ::AST::TupleItem& i) const override { + void handle(const Span& sp, const AST::Attribute& mi, AST::Crate& crate, ::AST::TupleItem& i) const override { DEBUG("#[cfg] tuple item - " << mi); if( !check_cfg(sp, mi) ) { i.m_type = ::TypeRef(sp); } } - void handle(const Span& sp, const AST::MetaItem& mi, AST::Crate& crate, ::AST::EnumVariant& i) const override { + void handle(const Span& sp, const AST::Attribute& mi, AST::Crate& crate, ::AST::EnumVariant& i) const override { DEBUG("#[cfg] enum variant - " << mi); if( !check_cfg(sp, mi) ) { i.m_name = ""; } } - void handle(const Span& sp, const AST::MetaItem& mi, AST::Crate& crate, ::AST::ExprNode_Match_Arm& i) const override { + void handle(const Span& sp, const AST::Attribute& mi, AST::Crate& crate, ::AST::ExprNode_Match_Arm& i) const override { DEBUG("#[cfg] match arm - " << mi); if( !check_cfg(sp, mi) ) { i.m_patterns.clear(); } } - void handle(const Span& sp, const AST::MetaItem& mi, AST::Crate& crate, ::AST::ExprNode_StructLiteral::Ent& i) const override { + void handle(const Span& sp, const AST::Attribute& mi, AST::Crate& crate, ::AST::ExprNode_StructLiteral::Ent& i) const override { DEBUG("#[cfg] struct lit - " << mi); if( !check_cfg(sp, mi) ) { i.value.reset(); -- cgit v1.2.3