Added tokenstream parser procedure

This commit is contained in:
cgswords 2016-07-14 09:52:43 -07:00
parent 3dbbe2f716
commit fecf3b6a2c

View File

@ -224,10 +224,18 @@ pub fn filemap_to_parser<'a>(sess: &'a ParseSess,
// compiler expands into it
pub fn new_parser_from_tts<'a>(sess: &'a ParseSess,
cfg: ast::CrateConfig,
tts: Vec<tokenstream::TokenTree>) -> Parser<'a> {
tts: Vec<tokenstream::TokenTree>)
-> Parser<'a> {
tts_to_parser(sess, tts, cfg)
}
pub fn new_parser_from_ts<'a>(sess: &'a ParseSess,
cfg: ast::CrateConfig,
ts: tokenstream::TokenStream)
-> Parser<'a> {
tts_to_parser(sess, ts.tts, cfg)
}
// base abstractions