Skip to content

Commit

Permalink
Add stream_to_parser_with_base_dir
Browse files Browse the repository at this point in the history
  • Loading branch information
topecongiro committed May 21, 2019
1 parent b7f6b8a commit e186d3f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/libsyntax/parse/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,13 @@ pub fn stream_to_parser(sess: &ParseSess, stream: TokenStream) -> Parser<'_> {
Parser::new(sess, stream, None, true, false)
}

/// Given stream, the `ParseSess` and the base directory, produces a parser.
pub fn stream_to_parser_with_base_dir<'a>(sess: &'a ParseSess,
stream: TokenStream,
base_dir: Directory<'a>) -> Parser<'a> {
Parser::new(sess, stream, Some(base_dir), true, false)
}

/// A sequence separator.
pub struct SeqSep {
/// The seperator token.
Expand Down

0 comments on commit e186d3f

Please sign in to comment.