Add new reserved symbols.

This commit is contained in:
Stephen Chung
2022-06-10 08:47:22 +08:00
parent 09e19790fe
commit 206318e14c
2 changed files with 9 additions and 0 deletions

View File

@@ -1992,6 +1992,7 @@ fn get_next_token_inner(
return Some((Token::NotEqualsTo, start_pos));
}
('!', '.') => return Some((Token::Reserved("!.".into()), start_pos)),
('!', ..) => return Some((Token::Bang, start_pos)),
('|', '|') => {
@@ -2032,6 +2033,9 @@ fn get_next_token_inner(
('$', ..) => return Some((Token::Reserved("$".into()), start_pos)),
('?', '.') => return Some((Token::Reserved("?.".into()), start_pos)),
('?', ..) => return Some((Token::Reserved("?".into()), start_pos)),
(ch, ..) if ch.is_whitespace() => (),
(ch, ..) => {