fmt
change oolxyxprpzwmwwzqvlxytqkmqutwzupq
commit 19c332b7d11fffcb90ce68fcfaaa4b1a1f50bc0a
author Alpha Chen <alpha@kejadlen.dev>
date
parent ymmtvmws
diff --git a/rust/src/scanner.rs b/rust/src/scanner.rs
index 9ba9350..69e0977 100644
--- a/rust/src/scanner.rs
+++ b/rust/src/scanner.rs
@@ -194,21 +194,17 @@ impl<'a> Scanner<'a> {
             's' if &self.source[1..self.current] == "uper".as_bytes() => TokenKind::Super,
             'v' if &self.source[1..self.current] == "ar".as_bytes() => TokenKind::Var,
             'w' if &self.source[1..self.current] == "hile".as_bytes() => TokenKind::While,
-            'f' if self.current > 1 => {
-                match self.source[1] as char {
-                    'a' if &self.source[2..self.current] == "lse".as_bytes() => TokenKind::False,
-                    'o' if &self.source[2..self.current] == "r".as_bytes() => TokenKind::For,
-                    'u' if &self.source[2..self.current] == "n".as_bytes() => TokenKind::Fun,
-                    _ => TokenKind::Identifier,
-                }
+            'f' if self.current > 1 => match self.source[1] as char {
+                'a' if &self.source[2..self.current] == "lse".as_bytes() => TokenKind::False,
+                'o' if &self.source[2..self.current] == "r".as_bytes() => TokenKind::For,
+                'u' if &self.source[2..self.current] == "n".as_bytes() => TokenKind::Fun,
+                _ => TokenKind::Identifier,
+            },
+            't' if self.current > 1 => match self.source[1] as char {
+                'h' if &self.source[2..self.current] == "is".as_bytes() => TokenKind::This,
+                'r' if &self.source[2..self.current] == "ue".as_bytes() => TokenKind::True,
+                _ => TokenKind::Identifier,
             },
-            't' if self.current > 1 => {
-                match self.source[1] as char {
-                    'h' if &self.source[2..self.current] == "is".as_bytes() => TokenKind::This,
-                    'r' if &self.source[2..self.current] == "ue".as_bytes() => TokenKind::True,
-                    _ => TokenKind::Identifier,
-                }
-            }
             _ => TokenKind::Identifier,
         }
     }