Added tokenstream parser procedure
This commit is contained in:
parent
3dbbe2f716
commit
fecf3b6a2c
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user