diff options
author | John Hodge <tpg@ucc.asn.au> | 2019-05-19 22:15:02 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2019-05-19 22:15:02 +0800 |
commit | b48167dec0c1c05b463991a8db5a8db70a5ae604 (patch) | |
tree | eadc95ab546a617d298fb3a16fb080e1bc4355e8 /src/include/synext_macro.hpp | |
parent | dab5cf5462d8fce6d6fcaa1343df8f5f3b763b8a (diff) | |
download | mrust-b48167dec0c1c05b463991a8db5a8db70a5ae604.tar.gz |
All - Switch to using interned (de-duplicated) RcString-s instead of std::string for paths/identifiers
Diffstat (limited to 'src/include/synext_macro.hpp')
-rw-r--r-- | src/include/synext_macro.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/include/synext_macro.hpp b/src/include/synext_macro.hpp index d414ceb0..e62a6126 100644 --- a/src/include/synext_macro.hpp +++ b/src/include/synext_macro.hpp @@ -27,7 +27,10 @@ class TokenStream; class ExpandProcMacro { public: - virtual ::std::unique_ptr<TokenStream> expand(const Span& sp, const AST::Crate& crate, const ::std::string& ident, const TokenTree& tt, AST::Module& mod) = 0; + virtual ::std::unique_ptr<TokenStream> expand(const Span& sp, const AST::Crate& crate, const TokenTree& tt, AST::Module& mod) = 0; + virtual ::std::unique_ptr<TokenStream> expand_ident(const Span& sp, const AST::Crate& crate, const RcString& ident, const TokenTree& tt, AST::Module& mod) { + ERROR(sp, E0000, "macro doesn't take an identifier"); + } }; struct MacroDef; |