File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,8 @@ pub struct BasicMacroExpander {
48
48
pub span : Option < Span >
49
49
}
50
50
51
- pub trait MacroExpander {
51
+ /// Represents a thing that maps token trees to Macro Results
52
+ pub trait TTMacroExpander {
52
53
fn expand ( & self ,
53
54
ecx : & mut ExtCtxt ,
54
55
span : Span ,
@@ -60,7 +61,7 @@ pub type MacroExpanderFn =
60
61
fn ( ecx : & mut ExtCtxt , span : codemap:: Span , token_tree : & [ ast:: TokenTree ] )
61
62
-> Box < MacResult > ;
62
63
63
- impl MacroExpander for BasicMacroExpander {
64
+ impl TTMacroExpander for BasicMacroExpander {
64
65
fn expand ( & self ,
65
66
ecx : & mut ExtCtxt ,
66
67
span : Span ,
@@ -259,7 +260,7 @@ pub enum SyntaxExtension {
259
260
/// A normal, function-like syntax extension.
260
261
///
261
262
/// `bytes!` is a `NormalTT`.
262
- NormalTT ( Box < MacroExpander + ' static > , Option < Span > ) ,
263
+ NormalTT ( Box < TTMacroExpander + ' static > , Option < Span > ) ,
263
264
264
265
/// A function-like syntax extension that has an extra ident before
265
266
/// the block.
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ use ast::{TTDelim};
13
13
use ast;
14
14
use codemap:: { Span , Spanned , DUMMY_SP } ;
15
15
use ext:: base:: { ExtCtxt , MacResult , MacroDef } ;
16
- use ext:: base:: { NormalTT , MacroExpander } ;
16
+ use ext:: base:: { NormalTT , TTMacroExpander } ;
17
17
use ext:: base;
18
18
use ext:: tt:: macro_parser:: { Success , Error , Failure } ;
19
19
use ext:: tt:: macro_parser:: { NamedMatch , MatchedSeq , MatchedNonterminal } ;
@@ -95,7 +95,7 @@ struct MacroRulesMacroExpander {
95
95
rhses : Vec < Rc < NamedMatch > > ,
96
96
}
97
97
98
- impl MacroExpander for MacroRulesMacroExpander {
98
+ impl TTMacroExpander for MacroRulesMacroExpander {
99
99
fn expand ( & self ,
100
100
cx : & mut ExtCtxt ,
101
101
sp : Span ,
You can’t perform that action at this time.
0 commit comments