Skip to main content

classify_line

Function classify_line 

Source
pub fn classify_line(line: &str) -> LineKind
Expand description

Reads line as far as its first tokens, and says which of LineKind it opens.

A line whose first token is unknown to the lexer reads as a statement, so the error it raises is the one its own text earns rather than one about text wrapped around it.