aboutsummaryrefslogtreecommitdiff
path: root/src/lexer
diff options
context:
space:
mode:
Diffstat (limited to 'src/lexer')
-rw-r--r--src/lexer/mod.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/lexer/mod.rs b/src/lexer/mod.rs
index d2d4aaa22..5255c3d56 100644
--- a/src/lexer/mod.rs
+++ b/src/lexer/mod.rs
@@ -52,6 +52,8 @@ fn next_token_inner(c: char, ptr: &mut Ptr) -> SyntaxKind {
52 '~' => return TILDE, 52 '~' => return TILDE,
53 '?' => return QUESTION, 53 '?' => return QUESTION,
54 '$' => return DOLLAR, 54 '$' => return DOLLAR,
55
56 // Multi-byte tokens.
55 '.' => return match (ptr.next(), ptr.nnext()) { 57 '.' => return match (ptr.next(), ptr.nnext()) {
56 (Some('.'), Some('.')) => { 58 (Some('.'), Some('.')) => {
57 ptr.bump(); 59 ptr.bump();
@@ -76,6 +78,24 @@ fn next_token_inner(c: char, ptr: &mut Ptr) -> SyntaxKind {
76 } 78 }
77 _ => COLON 79 _ => COLON
78 }, 80 },
81 '=' => return match ptr.next() {
82 Some('=') => {
83 ptr.bump();
84 EQEQ
85 }
86 Some('>') => {
87 ptr.bump();
88 FAT_ARROW
89 }
90 _ => EQ,
91 },
92 '!' => return match ptr.next() {
93 Some('=') => {
94 ptr.bump();
95 NEQ
96 }
97 _ => NOT,
98 },
79 _ => (), 99 _ => (),
80 } 100 }
81 ERROR 101 ERROR