parser: Parse char immediates into Expr::Number

This commit is contained in:
John 2024-07-31 11:36:37 -05:00
parent d4c5005d8a
commit 822c7f3700

View File

@ -173,6 +173,10 @@ impl<'t> Parser<'t> {
self.take(); self.take();
Expr::Number(n) Expr::Number(n)
} }
Kind::Char(c) => {
self.take();
Expr::Number(c as _)
}
Kind::Identifier => { Kind::Identifier => {
self.take(); self.take();
Expr::Ident(lexeme) Expr::Ident(lexeme)