diff --git a/kabel-rs/src/lexer.rs b/kabel-rs/src/lexer.rs index fdec5b8..31710fa 100644 --- a/kabel-rs/src/lexer.rs +++ b/kabel-rs/src/lexer.rs @@ -15,7 +15,7 @@ pub fn lexer(text_source: &str) -> Result, Box> { }; for (i, c) in text_source.chars().enumerate() { - dbg!("{} into {}", &c, &state); + dbg!("Begin", &c, &state); // Commenting end if state.commenting && c == '\n' { @@ -104,7 +104,7 @@ pub fn lexer(text_source: &str) -> Result, Box> { state.current_token = String::new(); continue; } - "(" => { + "(" => {t w state.lexed.push(Token::Bracket(Bracket::Open)); state.current_token = String::new(); continue; @@ -149,6 +149,7 @@ pub fn lexer(text_source: &str) -> Result, Box> { &_ => {} } state.current_token.push(c); + dbg!("End", &c, &state); } Ok(state.lexed) diff --git a/kabel-rs/src/main.rs b/kabel-rs/src/main.rs index 45b5969..9697b6b 100644 --- a/kabel-rs/src/main.rs +++ b/kabel-rs/src/main.rs @@ -44,7 +44,7 @@ fn main() -> Result<(), Box> { Ok(lexed) => lexed, }; - dbg!("Lexed length {}", lexed.len()); + dbg!(lexed.len()); Ok(()) }