18 lines
317 B
Rust
18 lines
317 B
Rust
|
use super::types::Type;
|
||
|
|
||
|
pub struct Callable<'ty> {
|
||
|
pub name: String,
|
||
|
pub args: Vec<(Option<String>, Type<'ty>)>,
|
||
|
pub ret_type: Option<Type<'ty>>,
|
||
|
}
|
||
|
|
||
|
impl<'ty> Callable<'ty> {
|
||
|
pub fn name(&self) -> &str {
|
||
|
&self.name
|
||
|
}
|
||
|
|
||
|
pub fn argcount(&self) -> usize {
|
||
|
self.args.len()
|
||
|
}
|
||
|
}
|