FIX - fix minus/negative number conflict.
This commit is contained in:
parent
9bd66c7db3
commit
2a181e5aab
@ -891,7 +891,8 @@ impl<'a> TokenIterator<'a> {
|
|||||||
}
|
}
|
||||||
'-' => match self.char_stream.peek() {
|
'-' => match self.char_stream.peek() {
|
||||||
// Negative number?
|
// Negative number?
|
||||||
Some('0'..='9') => negated = true,
|
Some('0'..='9') if self.last.is_next_unary() => negated = true,
|
||||||
|
Some('0'..='9') => return Some((Token::Minus, pos)),
|
||||||
Some('=') => {
|
Some('=') => {
|
||||||
self.char_stream.next();
|
self.char_stream.next();
|
||||||
self.advance();
|
self.advance();
|
||||||
|
Loading…
Reference in New Issue
Block a user