File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,8 @@ pub struct BasicMacroExpander {
4848 pub span : Option < Span >
4949}
5050
51- pub trait MacroExpander {
51+ /// Represents a thing that maps token trees to Macro Results
52+ pub trait TTMacroExpander {
5253 fn expand ( & self ,
5354 ecx : & mut ExtCtxt ,
5455 span : Span ,
@@ -60,7 +61,7 @@ pub type MacroExpanderFn =
6061 fn ( ecx : & mut ExtCtxt , span : codemap:: Span , token_tree : & [ ast:: TokenTree ] )
6162 -> Box < MacResult > ;
6263
63- impl MacroExpander for BasicMacroExpander {
64+ impl TTMacroExpander for BasicMacroExpander {
6465 fn expand ( & self ,
6566 ecx : & mut ExtCtxt ,
6667 span : Span ,
@@ -259,7 +260,7 @@ pub enum SyntaxExtension {
259260 /// A normal, function-like syntax extension.
260261 ///
261262 /// `bytes!` is a `NormalTT`.
262- NormalTT ( Box < MacroExpander + ' static > , Option < Span > ) ,
263+ NormalTT ( Box < TTMacroExpander + ' static > , Option < Span > ) ,
263264
264265 /// A function-like syntax extension that has an extra ident before
265266 /// the block.
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ use ast::{TTDelim};
1313use ast;
1414use codemap:: { Span , Spanned , DUMMY_SP } ;
1515use ext:: base:: { ExtCtxt , MacResult , MacroDef } ;
16- use ext:: base:: { NormalTT , MacroExpander } ;
16+ use ext:: base:: { NormalTT , TTMacroExpander } ;
1717use ext:: base;
1818use ext:: tt:: macro_parser:: { Success , Error , Failure } ;
1919use ext:: tt:: macro_parser:: { NamedMatch , MatchedSeq , MatchedNonterminal } ;
@@ -95,7 +95,7 @@ struct MacroRulesMacroExpander {
9595 rhses : Vec < Rc < NamedMatch > > ,
9696}
9797
98- impl MacroExpander for MacroRulesMacroExpander {
98+ impl TTMacroExpander for MacroRulesMacroExpander {
9999 fn expand ( & self ,
100100 cx : & mut ExtCtxt ,
101101 sp : Span ,
You can’t perform that action at this time.
0 commit comments