Lex '**' as power sign

This commit is contained in:
bakk 2021-05-17 18:14:48 +02:00
parent 48e94b1cdb
commit 0c454fb6f4

View File

@ -119,6 +119,15 @@ impl<'a> Lexer<'a> {
self.advance(); self.advance();
// Handle **
if let (TokenKind::Star, Some(c)) = (token.kind, self.peek()) {
if *c == '*' {
self.advance();
return build(TokenKind::Power, "", span);
}
}
token token
} }