diff options
Diffstat (limited to 'src/lang/tokenizer.rs')
-rw-r--r-- | src/lang/tokenizer.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lang/tokenizer.rs b/src/lang/tokenizer.rs index 1d62f3e..6de825b 100644 --- a/src/lang/tokenizer.rs +++ b/src/lang/tokenizer.rs @@ -425,9 +425,12 @@ impl<T: Iterator<Item=char>> Tokenizer<T> { floating = true; buffer.push(cc); buffer.push(ncc); - } else { + } else if ncc.is_digit(10) { buffer.push(cc); buffer.push(ncc); + } else { + self.push_back(ncc); + return Ok(Token::Integer(0)); } } else { buffer.push(cc); |