diff options
author | John Hodge <tpg@mutabah.net> | 2016-03-15 21:32:48 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-03-15 21:32:48 +0800 |
commit | 124cf9fc5fb6c0b7f70ef94382efd5190019edac (patch) | |
tree | 3e2b3e42e49b51d8ddcb0c52616e201b18b2a23e /src/include/synext.hpp | |
parent | 9a3987bb1575c4ab1eae9c065e907773fa3dcf17 (diff) | |
download | mrust-124cf9fc5fb6c0b7f70ef94382efd5190019edac.tar.gz |
Expand - More attribute handling
Diffstat (limited to 'src/include/synext.hpp')
-rw-r--r-- | src/include/synext.hpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/include/synext.hpp b/src/include/synext.hpp index aa72e985..58b4f608 100644 --- a/src/include/synext.hpp +++ b/src/include/synext.hpp @@ -7,16 +7,21 @@ #include "../ast/item.hpp" #include <span.hpp> +class TypeRef; namespace AST { class Crate; class MetaItem; class Path; + +// class StructItem; + typedef Named<::TypeRef> StructItem; class Module; class Item; - class ExprNode; class Expr; + class ExprNode; + class ExprNode_Match_Arm; class MacroInvocation; } @@ -44,16 +49,12 @@ public: virtual void handle(const AST::MetaItem& mi, AST::Crate& crate) const {} virtual void handle(const AST::MetaItem& mi, AST::Crate& crate, AST::MacroInvocation& mac) const {} virtual void handle(const AST::MetaItem& mi, AST::Crate& crate, const AST::Path& path, AST::Module& mod, AST::Item&i) const {} - virtual void handle(const AST::MetaItem& mi, AST::Crate& crate, ::std::unique_ptr<AST::ExprNode>& expr) const {}; -}; - -enum class MacroPosition -{ - Item, - Stmt, - Expr, - Type, - Pattern, + // NOTE: To delete, set the type to Invalid + virtual void handle(const AST::MetaItem& mi, AST::Crate& crate, ::AST::StructItem& si) const {} + + virtual void handle(const AST::MetaItem& mi, AST::Crate& crate, ::std::unique_ptr<AST::ExprNode>& expr) const {} + // NOTE: To delete, clear the patterns vector + virtual void handle(const AST::MetaItem& mi, AST::Crate& crate, ::AST::ExprNode_Match_Arm& expr) const {} }; class ExpandProcMacro |