Refactored tokentrees into their own files in preparation for tokenstreams. Modified tests to point to the new file now.

This commit is contained in:
cgswords
2016-06-20 08:49:33 -07:00
committed by cgswords
parent 5522e678bc
commit d59accfb06
34 changed files with 342 additions and 287 deletions

View File

@@ -14,10 +14,11 @@ use parse::{lexer, new_parser_from_source_str};
use parse::parser::Parser;
use parse::token;
use ptr::P;
use tokenstream;
use std::iter::Peekable;
/// Map a string to tts, using a made-up filename:
pub fn string_to_tts(source_str: String) -> Vec<ast::TokenTree> {
pub fn string_to_tts(source_str: String) -> Vec<tokenstream::TokenTree> {
let ps = ParseSess::new();
filemap_to_tts(&ps, ps.codemap().new_filemap("bogofile".to_string(), None, source_str))
}