Skip to content

Commit

Permalink
added some more documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
thesuhas committed Nov 7, 2024
1 parent cf37a7c commit 104903a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ir/module/module_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,15 @@ pub enum Types {
}

impl Types {
/// Return the params of a Function Type
pub fn params(&self) -> Vec<DataType> {
match &self {
Types::FuncType { params, .. } => params.to_vec(),
_ => panic!("Not a function!"),
}
}

/// Return the params of a Function Type
pub fn results(&self) -> Vec<DataType> {
match &self {
Types::FuncType { results, .. } => results.to_vec(),
Expand Down

0 comments on commit 104903a

Please sign in to comment.