]> git.lizzy.rs Git - rust.git/commitdiff
test case support fns, remove debugging test case
authorJohn Clements <clements@racket-lang.org>
Tue, 9 Jul 2013 23:00:41 +0000 (16:00 -0700)
committerJohn Clements <clements@racket-lang.org>
Fri, 6 Sep 2013 20:35:09 +0000 (13:35 -0700)
src/libsyntax/ext/expand.rs

index ca82fd09a6b2fd3a09ae12bdb909d5115d698458..baa4e616b4f044bebc4a6f720c0867df149225a8 100644 (file)
@@ -1462,10 +1462,14 @@ fn fake_print_crate(s: @pprust::ps, crate: &ast::Crate) {
         pprust::print_mod(s, &crate.module, crate.attrs);
     }
 
-    //fn expand_and_resolve(crate_str: @str) -> ast::crate {
-        //let (crate_ast,ps) = string_to_crate_and_sess(crate_str);
+    fn expand_crate_str(crate_str: @str) -> @ast::Crate {
+        let (crate_ast,ps) = string_to_crate_and_sess(crate_str);
         // the cfg argument actually does matter, here...
-        //let expanded_ast = expand_crate(ps,~[],crate_ast);
+        expand_crate(ps,~[],crate_ast)
+    }
+
+    //fn expand_and_resolve(crate_str: @str) -> ast::crate {
+        //let expanded_ast = expand_crate_str(crate_str);
         // std::io::println(fmt!("expanded: %?\n",expanded_ast));
         //mtwt_resolve_crate(expanded_ast)
     //}