Allow deriving Parse for keywords.

This commit is contained in:
Emilio Cobos Álvarez 2017-11-12 05:43:53 +01:00
parent da3dd05ff9
commit 7036cb0077
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
5 changed files with 126 additions and 38 deletions

View file

@ -149,8 +149,10 @@ pub trait Parse : Sized {
/// Parse a value of this type.
///
/// Returns an error on failure.
fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
-> Result<Self, ParseError<'i>>;
fn parse<'i, 't>(
context: &ParserContext,
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>>;
}
impl<T> Parse for Vec<T>