wright::lexer::trivial

Function try_consume_trivial_token

Source
pub fn try_consume_trivial_token(lexer: &mut Lexer) -> Option<Token>
Available on crate feature lexer only.
Expand description

Attempt to consume a “trivial” token from the start of the Lexer’s Lexer::remaining fragment.

Leave the lexer unmodified if one is not available.