diff --git a/src/compiler/ast.rs b/src/compiler/ast.rs index 5246da8..38fafd6 100644 --- a/src/compiler/ast.rs +++ b/src/compiler/ast.rs @@ -4,17 +4,17 @@ use std::fmt; #[derive(Debug, PartialEq)] pub enum Expression<'source> { EmptyLiteral(CodeLocation), - IntLiteral(CodeLocation, u32), + IntLiteral(CodeLocation, i64), BoolLiteral(CodeLocation, bool), Identifier(CodeLocation, &'source str), UnaryOp(CodeLocation, &'source str, Box>), - VarDeclaration(CodeLocation, &'source str, Box>), BinaryOp( CodeLocation, Box>, &'source str, Box>, ), + VarDeclaration(CodeLocation, &'source str, Box>), Conditional( CodeLocation, Box>, diff --git a/src/compiler/parser/mod.rs b/src/compiler/parser/mod.rs index 4ad8163..c030dd9 100644 --- a/src/compiler/parser/mod.rs +++ b/src/compiler/parser/mod.rs @@ -260,7 +260,7 @@ fn parse_int_literal<'source>(pos: &mut usize, tokens: &[Token]) -> Expression<' token.loc, token .text - .parse::() + .parse::() .unwrap_or_else(|_| panic!("Fatal parser error! Invalid value in token {token}")), ) }