fix operator parsing
This commit is contained in:
parent
1f7ae2e30f
commit
47d56a7b44
@ -102,7 +102,7 @@ pub fn tokenize(input: &str) -> Option<Vec<Token>> {
|
|||||||
let mut buffer = String::with_capacity(20);
|
let mut buffer = String::with_capacity(20);
|
||||||
buffer.push(c);
|
buffer.push(c);
|
||||||
loop {
|
loop {
|
||||||
if iter.peek().map_or(false, |x| !char::is_alphanumeric(*x)) {
|
if iter.peek().map_or(false, |x| !char::is_alphanumeric(*x) && !char::is_whitespace(*x)) {
|
||||||
let n = iter.next().unwrap();
|
let n = iter.next().unwrap();
|
||||||
buffer.push(n);
|
buffer.push(n);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user