[−][src]Function whenever_parser::parse_line
pub fn parse_line<'a>(line: &'a str) -> Result<Line<'a>, (String, &'a str)>
Turn the input into an AST.
Returns the root of the AST, an ast::Line
struct.
Errors
Will return an description of the error and a slice of the input where the error happened:
- input could not be tokenized (see
lexer::eat
) - a token that was not expected in that context was found
- an
ast::Line
could have been built but there were remaining tokens