added separators

This commit is contained in:
afonya2 2025-04-23 21:04:44 +02:00
parent d294a06820
commit 95e427f8d1
Signed by: afonya
GPG key ID: EBB9C4CAFAAFB2DC

View file

@ -210,6 +210,8 @@ pub fn lex(input: String) -> Vec<Token> {
read_comment(&splitted, &mut pos, true); read_comment(&splitted, &mut pos, true);
} else if is_operator(char) { } else if is_operator(char) {
out.push(Token { typ: TokenType::OPERATOR, value: String::from(char), pos: pos-1 }); out.push(Token { typ: TokenType::OPERATOR, value: String::from(char), pos: pos-1 });
} else if is_sep(char) {
out.push(Token { typ: TokenType::SEPARATOR, value: String::from(char), pos: pos-1 });
} else { } else {
read_identifier(&splitted, &mut pos, &mut out); read_identifier(&splitted, &mut pos, &mut out);
} }