Function parse_line

Source
pub fn parse_line<'a>(line: &'a str) -> Result<Line<'a>, (String, &'a str)>
Expand description

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