Fix bugs, add propper tests

This commit is contained in:
2026-02-03 13:20:23 +02:00
parent 081ff9a27a
commit 4b61adea5d
58 changed files with 1103 additions and 285 deletions

View File

@@ -19,7 +19,7 @@ pub struct Scope {
pub inner_scope: Option<Box<Scope>>
}
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Default)]
pub struct Program {
pub ast: expr::Block,
pub structs: HashMap<Ident, LocBox<Struct>>,
@@ -32,7 +32,9 @@ pub struct Program {
pub literals: HashMap<String, Literal>, // string is id of literal
pub struct_literals: HashMap<String, StructLit>, // string is id of literal
pub scope: Option<Scope>,
pub curr_fn_args: HashMap<Ident, LocBox<Type>>
pub curr_fn_args: HashMap<Ident, LocBox<Type>>,
pub curr_struct: Option<Ident>,
pub included_files: Vec<String>,
}