Skip to content

Commit

Permalink
Refactored resolved callee representation
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacShelton committed Nov 7, 2024
1 parent bdcb61b commit 04fe7ce
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ impl Command {
}

let Some(filename) = filename else {
// TODO: Implement proper error handling and improve error message
eprintln!("error: No folder or filename specified");
return Err(());
};
Expand Down
1 change: 0 additions & 1 deletion src/resolve/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ mod global_variable;
mod helper_expr;
mod initialized;
mod job;
mod polymorph;
mod stmt;
mod type_ctx;
mod type_definition;
Expand Down
9 changes: 8 additions & 1 deletion src/resolved/expr/call.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
use super::TypedExpr;
use crate::resolved::FunctionRef;
use crate::resolved::{FunctionRef, PolyValue};
use std::collections::HashMap;

#[derive(Clone, Debug)]
pub struct Call {
pub function: FunctionRef,
pub arguments: Vec<TypedExpr>,
}

#[derive(Clone, Debug)]
pub struct Callee {
pub function: FunctionRef,
pub recipe: HashMap<String, PolyValue>,
}
2 changes: 2 additions & 0 deletions src/resolved/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ mod global;
mod helper_expr;
mod human_name;
mod overload;
mod polymorph;
mod stmt;
mod structure;
mod type_decl;
Expand All @@ -26,6 +27,7 @@ pub use global::*;
pub use helper_expr::*;
pub use human_name::*;
pub use overload::*;
pub use polymorph::*;
use slotmap::{new_key_type, SlotMap};
use std::collections::HashMap;
pub use stmt::*;
Expand Down
File renamed without changes.

0 comments on commit 04fe7ce

Please sign in to comment.