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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user