@@ -36,8 +36,13 @@ pub mod rt {
36
36
use parse;
37
37
use print:: pprust;
38
38
39
+ // NOTE remove this after snapshot
40
+ // (stage0 quasiquoter needs this)
41
+ #[ cfg( stage0) ]
39
42
pub use ast:: * ;
43
+ #[ cfg( stage0) ]
40
44
pub use parse:: token:: * ;
45
+
41
46
pub use parse:: new_parser_from_tts;
42
47
pub use codemap:: { BytePos , Span , dummy_spanned} ;
43
48
@@ -72,7 +77,7 @@ pub mod rt {
72
77
73
78
impl ToSource for ast:: Ident {
74
79
fn to_source ( & self ) -> String {
75
- get_ident ( * self ) . get ( ) . to_string ( )
80
+ token :: get_ident ( * self ) . get ( ) . to_string ( )
76
81
}
77
82
}
78
83
@@ -685,11 +690,14 @@ fn expand_wrapper(cx: &ExtCtxt,
685
690
sp : Span ,
686
691
cx_expr : @ast:: Expr ,
687
692
expr : @ast:: Expr ) -> @ast:: Expr {
688
- let uses = vec ! [ cx. view_use_glob( sp, ast:: Inherited ,
689
- ids_ext( vec![ "syntax" . to_string( ) ,
690
- "ext" . to_string( ) ,
691
- "quote" . to_string( ) ,
692
- "rt" . to_string( ) ] ) ) ] ;
693
+ let uses = [
694
+ & [ "syntax" , "ext" , "quote" , "rt" ] ,
695
+ & [ "syntax" , "ast" ] ,
696
+ & [ "syntax" , "parse" , "token" ] ,
697
+ ] . iter ( ) . map ( |path| {
698
+ let path = path. iter ( ) . map ( |s| s. to_string ( ) ) . collect ( ) ;
699
+ cx. view_use_glob ( sp, ast:: Inherited , ids_ext ( path) )
700
+ } ) . collect ( ) ;
693
701
694
702
let stmt_let_ext_cx = cx. stmt_let ( sp, false , id_ext ( "ext_cx" ) , cx_expr) ;
695
703
0 commit comments