Skip to main content

TokenCallback

Type Alias TokenCallback 

pub type TokenCallback = Arc<dyn Fn(Token) -> Result<Token, LexError> + Send + Sync>;
Expand description

A per-terminal token callback (lexer_callbacks). Arc so one callback can be held by more than one composed chain, unlike the POC.

Aliased Typeยง

pub struct TokenCallback { /* private fields */ }