Struct luthor::StateFunction [] [src]

pub struct StateFunction(pub fn(_: &mut Tokenizer) -> Option<StateFunction>);

A recursive function type used by lexers to manage their state. Based on Rob Pike's "Lexical Scanning in Go" talk, these functions are invoked in a call/return loop (letting the current function determine the next) until a None value is returned, after which lexing is complete.

See the lexers module for examples.