fixed numbers inside identifiers
This commit is contained in:
parent
95e427f8d1
commit
4476e1db96
1 changed files with 2 additions and 2 deletions
|
@ -109,10 +109,10 @@ fn read_identifier(splitted: &Vec<&str>, pos: &mut usize, out: &mut Vec<Token>)
|
|||
while pos < &mut splitted.len() {
|
||||
let prev_char = splitted[*pos-1];
|
||||
let char = splitted[*pos];
|
||||
*pos += 1;
|
||||
if is_operator(char) || is_sep(char) || char == "\n" || char == "\r" {
|
||||
if is_operator(char) || is_sep(char) || char == "\n" || char == "\r" || (prev_char == " " && is_number(char)) {
|
||||
break;
|
||||
}
|
||||
*pos += 1;
|
||||
if prev_char == " " {
|
||||
word_pos.push(*pos-1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue