import gleam/list import nibble/lexer.{type Token, Keep} pub fn chars() -> lexer.Lexer(String, Nil) { lexer.simple([lexer.custom(fn(_, lexeme, _) { Keep(lexeme, Nil) })]) } pub fn run( lexer: lexer.Lexer(String, Nil), on input: String, ) -> List(Token(String)) { let assert Ok(tokens) = lexer.run(input, lexer) // Nibble's lexer prepends an empty string to the quasi_lexer's // otherwise acceptable output tokens |> list.drop(1) }