Skip to content

Commit

Permalink
Improved readability, but failed to resolve the issue of fun tokens n…
Browse files Browse the repository at this point in the history
…ot being separated
  • Loading branch information
LunaStev committed Dec 19, 2024
1 parent 2bdcc4f commit 3e2429a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,11 @@ impl<'a> Lexer<'a> {
}

fn identifier(&mut self) -> String {
let start = if self.current > 0 { self.current - 1 } else { 0 };
let start = if self.current > 0 {
self.current - 1
} else {
0
};

while !self.is_at_end() && self.peek().is_alphanumeric() {
self.advance();
Expand Down

0 comments on commit 3e2429a

Please # to comment.