Parser
Add Integer Type as a Literal
@@ -11,6 +11,7 @@ impl PrefixParser for LiteralParser {
Token::Int(x) => Expression::Literal(Literal::Integer(x)),
Token::Str(x) => Expression::Literal(Literal::Str(x)),
Token::Bool(x) => Expression::Literal(Literal::Bool(x)),
+ Token::IntType(x) => Expression::Literal(Literal::Type(Type::from(&x))),
Token::Keyword(Keyword::Fn) => FuncParser::parse_fn_literal(parser),
x => panic!("expected a literal token, but found {}", x.to_string()),
}
