syntax: Remove SyntaxExtension::DeclMacro
It's a less powerful duplicate of `SyntaxExtension::NormalTT`
This commit is contained in:
parent
edb925a91f
commit
8edbbacbca
9 changed files with 81 additions and 106 deletions
|
|
@ -13,6 +13,7 @@ use syntax::ast;
|
|||
use syntax::ext::hygiene;
|
||||
use syntax::ext::build::AstBuilder;
|
||||
use syntax::ext::base::{TTMacroExpander, ExtCtxt, MacResult, MacEager, NormalTT};
|
||||
use syntax::ext::hygiene::Transparency;
|
||||
use syntax::print::pprust;
|
||||
use syntax::ptr::P;
|
||||
use syntax::symbol::Symbol;
|
||||
|
|
@ -43,6 +44,7 @@ pub fn plugin_registrar(reg: &mut Registry) {
|
|||
NormalTT {
|
||||
expander: Box::new(Expander { args: args, }),
|
||||
def_info: None,
|
||||
transparency: Transparency::SemiTransparent,
|
||||
allow_internal_unstable: None,
|
||||
allow_internal_unsafe: false,
|
||||
local_inner_macros: false,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
error: no rules expected the token `enum E { }`
|
||||
--> $DIR/nonterminal-matching.rs:19:10
|
||||
|
|
||||
LL | macro n(a $nt_item b) {
|
||||
| --------------------- when calling this macro
|
||||
...
|
||||
LL | n!(a $nt_item b);
|
||||
| ^^^^^^^^ no rules expected this token in macro call
|
||||
...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue