Fix bug
This commit is contained in:
parent
523bd179a4
commit
3fcb840ce5
@ -82,7 +82,7 @@ fn tokenize(input: &mut Peekable<Chars>) -> Vec<Token> {
|
|||||||
Some('(') => tokens.push(LParen),
|
Some('(') => tokens.push(LParen),
|
||||||
Some(')') => tokens.push(RParen),
|
Some(')') => tokens.push(RParen),
|
||||||
Some(c) if c.is_whitespace() => continue,
|
Some(c) if c.is_whitespace() => continue,
|
||||||
Some(_) => {
|
Some(c) => {
|
||||||
let sym: String = input.peeking_take_while(|next| {
|
let sym: String = input.peeking_take_while(|next| {
|
||||||
match *next {
|
match *next {
|
||||||
'(' | ')' => false,
|
'(' | ')' => false,
|
||||||
@ -90,7 +90,7 @@ fn tokenize(input: &mut Peekable<Chars>) -> Vec<Token> {
|
|||||||
_ => true
|
_ => true
|
||||||
}
|
}
|
||||||
}).collect();
|
}).collect();
|
||||||
tokens.push(Symbol(sym));
|
tokens.push(Symbol(format!("{}{}", c, sym)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user