Skip to main content

tokenize

Function tokenize 

Source
pub fn tokenize(source: &str) -> Result<Vec<Token>, LexError>
Expand description

Tokenize a source string into a Vec<Token>, halting at the first lexical error. Callers that need streaming or custom recovery should construct a Lexer directly.

ยงErrors

Returns the first LexError encountered while scanning source.