parser: document parse_pat
.
This commit is contained in:
parent
b7178ef983
commit
92d66a1317
@ -16,6 +16,10 @@ type Expected = Option<&'static str>;
|
|||||||
|
|
||||||
impl<'a> Parser<'a> {
|
impl<'a> Parser<'a> {
|
||||||
/// Parses a pattern.
|
/// Parses a pattern.
|
||||||
|
///
|
||||||
|
/// Corresponds to `pat<no_top_alt>` in RFC 2535 and does not admit or-patterns
|
||||||
|
/// at the top level. Used when parsing the parameters of lambda expressions,
|
||||||
|
/// functions, function pointers, and `pat` macro fragments.
|
||||||
pub fn parse_pat(&mut self, expected: Expected) -> PResult<'a, P<Pat>> {
|
pub fn parse_pat(&mut self, expected: Expected) -> PResult<'a, P<Pat>> {
|
||||||
self.parse_pat_with_range_pat(true, expected)
|
self.parse_pat_with_range_pat(true, expected)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user