fixed bug with ends_identifier
This commit is contained in:
parent
b210ad5e19
commit
4f8ff35d0f
@ -127,7 +127,7 @@ fn tokenize_identifier(c: char, iter: &mut Peekable<Chars>) -> Result<Token, Tok
|
|||||||
use self::Token::*;
|
use self::Token::*;
|
||||||
let mut buffer = String::new();
|
let mut buffer = String::new();
|
||||||
buffer.push(c);
|
buffer.push(c);
|
||||||
buffer.extend(iter.peeking_take_while(ends_identifier));
|
buffer.extend(iter.peeking_take_while(|x| !ends_identifier(x)));
|
||||||
|
|
||||||
Ok(match &buffer[..] {
|
Ok(match &buffer[..] {
|
||||||
"if" => Keyword(Kw::If),
|
"if" => Keyword(Kw::If),
|
||||||
|
Loading…
Reference in New Issue
Block a user