aboutsummaryrefslogtreecommitdiff
path: root/src/lexer
diff options
context:
space:
mode:
Diffstat (limited to 'src/lexer')
-rw-r--r--src/lexer/mod.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lexer/mod.rs b/src/lexer/mod.rs
index d66046ca1..be86416c4 100644
--- a/src/lexer/mod.rs
+++ b/src/lexer/mod.rs
@@ -59,6 +59,13 @@ fn next_token_inner(c: char, ptr: &mut Ptr) -> SyntaxKind {
59 '~' => return TILDE, 59 '~' => return TILDE,
60 '?' => return QUESTION, 60 '?' => return QUESTION,
61 '$' => return DOLLAR, 61 '$' => return DOLLAR,
62 '&' => return AMPERSAND,
63 '|' => return PIPE,
64 '+' => return PLUS,
65 '*' => return STAR,
66 '/' => return SLASH,
67 '^' => return CARET,
68 '%' => return PERCENT,
62 69
63 // Multi-byte tokens. 70 // Multi-byte tokens.
64 '.' => return match (ptr.next(), ptr.nnext()) { 71 '.' => return match (ptr.next(), ptr.nnext()) {
@@ -103,6 +110,12 @@ fn next_token_inner(c: char, ptr: &mut Ptr) -> SyntaxKind {
103 } 110 }
104 _ => NOT, 111 _ => NOT,
105 }, 112 },
113 '-' => return if ptr.next_is('>') {
114 ptr.bump();
115 THIN_ARROW
116 } else {
117 MINUS
118 },
106 119
107 // If the character is an ident start not followed by another single 120 // If the character is an ident start not followed by another single
108 // quote, then this is a lifetime name: 121 // quote, then this is a lifetime name: