aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/expand/rust-macro-expand.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/expand/rust-macro-expand.h')
-rw-r--r--gcc/rust/expand/rust-macro-expand.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/rust/expand/rust-macro-expand.h b/gcc/rust/expand/rust-macro-expand.h
index 92cb06d..7e684a9 100644
--- a/gcc/rust/expand/rust-macro-expand.h
+++ b/gcc/rust/expand/rust-macro-expand.h
@@ -27,7 +27,7 @@ struct MacroExpander
ExpansionCfg cfg;
unsigned int expansion_depth = 0;
- MacroExpander (AST::Crate &crate, ExpansionCfg cfg) : cfg (cfg), crate (crate)
+ MacroExpander (AST::Crate &crate, ExpansionCfg cfg, Session &session) : cfg (cfg), crate (crate), session (session)
{}
~MacroExpander () = default;
@@ -40,11 +40,15 @@ struct MacroExpander
// should this be public or private?
void expand_invoc (std::unique_ptr<AST::MacroInvocation> &invoc);
+ void expand_cfg_attrs(std::vector<AST::Attribute>& attrs);
+ bool check_cfg(AST::Attribute& attr);
+
/* TODO: make it extend ASTVisitor so that individual items can be accessed
* properly? */
private:
AST::Crate &crate;
+ Session &session;
};
} // namespace Rust