Adjust pp interface to that printing a crate (an reproducing literals/comments) takes a reader, not just a filename. Fixes first big pp-fuzzer bug.

This commit is contained in:
Graydon Hoare 2011-07-25 14:04:38 -07:00
parent 5749a2deac
commit 552bff8a21
4 changed files with 37 additions and 26 deletions

View file

@ -217,8 +217,9 @@ fn pretty_print_input(session::session sess, ast::crate_cfg cfg,
ann = pprust::no_ann();
}
}
pprust::print_crate(sess.get_codemap(), crate, input, ioivec::stdout(),
ann);
pprust::print_crate(sess.get_codemap(), crate, input,
ioivec::file_reader(input),
ioivec::stdout(), ann);
}
fn version(str argv0) {