Skip to content

Commit

Permalink
Rollup merge of #51502 - jebrosen:pub_parse_methods, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Make parse_seq_to_end and parse_path public

(see rwf2/Rocket#660, #51265)

Rocket currently uses `parse_seq_to_end` and `parse_path` in its codegen macros. Assuming I tested correctly, this is the minimal set of methods that are currently necessary to build Rocket again. I would be happy to add documentation of this and Rocket's other usages, if desired.
  • Loading branch information
Mark-Simulacrum authored Jun 12, 2018
2 parents 2b21f66 + 7e56261 commit 1e06b17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libsyntax/parse/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@ impl<'a> Parser<'a> {
/// Parse a sequence, including the closing delimiter. The function
/// f must consume tokens until reaching the next separator or
/// closing bracket.
crate fn parse_seq_to_end<T, F>(&mut self,
pub fn parse_seq_to_end<T, F>(&mut self,
ket: &token::Token,
sep: SeqSep,
f: F)
Expand Down Expand Up @@ -1886,7 +1886,7 @@ impl<'a> Parser<'a> {
/// `a::b::C::<D>` (with disambiguator)
/// `Fn(Args)` (without disambiguator)
/// `Fn::(Args)` (with disambiguator)
crate fn parse_path(&mut self, style: PathStyle) -> PResult<'a, ast::Path> {
pub fn parse_path(&mut self, style: PathStyle) -> PResult<'a, ast::Path> {
self.parse_path_common(style, true)
}

Expand Down

0 comments on commit 1e06b17

Please sign in to comment.