futilehdl/src/frontend/callable.rs

18 lines
297 B
Rust
Raw Normal View History

use super::types::Type;
2022-02-15 20:32:55 +00:00
pub struct Callable {
pub name: String,
2022-02-15 20:32:55 +00:00
pub args: Vec<(Option<String>, Type)>,
pub ret_type: Option<Type>,
}
2022-02-15 20:32:55 +00:00
impl<'ty> Callable {
pub fn name(&self) -> &str {
&self.name
}
pub fn argcount(&self) -> usize {
self.args.len()
}
}