Maybe fix lexer lexeme issue once and for all

This is an ongoing off-by-one bug that I have not expended enough
brainpower to try to fix. Sometimes lexer outputs were getting chopped
off by one character at the EOF. I have changed a <= to a < to detect if
we're at EOF and that appears to have fixed everything. Getting really
tired of this but hopefully that's all that's needed.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2024-10-15 14:04:15 -07:00
parent 9452a720cc
commit c286937e0a

View File

@@ -76,7 +76,7 @@ impl Lexer {
}
pub fn is_eof(&self) -> bool {
self.index >= self.text.len()
self.index > self.text.len()
}
pub fn lexeme(&self) -> &str {