mirror of
https://github.com/tiffany352/rink-rs
synced 2024-11-10 13:44:15 +00:00
Fix hang in tokenizing for <<IMAGINARY_UNIT>>
This commit is contained in:
parent
74e4510e43
commit
dddf6f6177
1 changed files with 1 additions and 1 deletions
|
@ -210,7 +210,7 @@ impl<'a> Iterator for TokenIterator<'a> {
|
|||
},
|
||||
'<' => {
|
||||
let mut string = "<IMAGINARY_UNIT>>".chars();
|
||||
while self.0.next() == string.next() {}
|
||||
while self.0.peek().is_some() && self.0.next() == string.next() {}
|
||||
if string.next() == None {
|
||||
Token::ImaginaryUnit
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue