enum TokenType { InvalidChar, MalformedString, MalformedComment, Int, Plus, Minus, Asterisk, Slash, Percent, LParen, RParen, } struct Position { index: usize, line: i32, col: i32, } struct Token { token_type: TokenType, pos: Position, length: usize, } struct Lexer<'a> { text: &'a str, i: i32, } impl<'a> Lexer<'a> { pub fn new(text: &'a str) -> Self { Self { text, i: 0 } } } impl<'a> Iterator for Lexer<'a> { type Item = Token; fn next(&mut self) -> Option { todo!() } } fn main() { println!("Hello, world!"); }