Function rsc::parser::preprocess

source ·
pub fn preprocess(tokens: &[Token]) -> Option<ParserError>
Expand description

For detecting parsing errors using an iterative solution. This function can tell when users accidentally enter an expression such as “2x” (when they mean “2(x)”). But just as easily detects unknowingly valid expressions like “neg 3” where “neg” is currently Token::Identifier.