libsyntax: Fix tests.

This commit is contained in:
Patrick Walton
2014-01-30 18:46:19 -08:00
committed by Huon Wilson
parent 52eeed2f73
commit b890237e79
7 changed files with 52 additions and 50 deletions

View File

@@ -19,7 +19,7 @@ use parse::token;
// and the ParseSess
pub fn string_to_tts_and_sess (source_str : ~str) -> (~[ast::TokenTree], @ParseSess) {
let ps = new_parse_sess(None);
(filemap_to_tts(ps,string_to_filemap(ps,source_str,@"bogofile")),ps)
(filemap_to_tts(ps,string_to_filemap(ps,source_str,~"bogofile")),ps)
}
// map a string to tts, using a made-up filename:
@@ -30,7 +30,7 @@ pub fn string_to_tts(source_str : ~str) -> ~[ast::TokenTree] {
pub fn string_to_parser_and_sess(source_str: ~str) -> (Parser,@ParseSess) {
let ps = new_parse_sess(None);
(new_parser_from_source_str(ps,~[],@"bogofile",source_str),ps)
(new_parser_from_source_str(ps,~[],~"bogofile",source_str),ps)
}
// map string to parser (via tts)