refactor: type
This commit is contained in:
25
src/ty/internal/func.rs
Normal file
25
src/ty/internal/func.rs
Normal file
@@ -0,0 +1,25 @@
|
||||
use ecow::EcoString;
|
||||
|
||||
use crate::bytecode::{OpCodes, ThunkIdx};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum Param {
|
||||
Ident(EcoString),
|
||||
Formals {
|
||||
formals: Vec<(EcoString, Option<ThunkIdx>)>,
|
||||
ellipsis: bool,
|
||||
alias: Option<EcoString>,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Func {
|
||||
pub param: Param,
|
||||
pub opcodes: OpCodes
|
||||
}
|
||||
|
||||
impl PartialEq for Func {
|
||||
fn eq(&self, _: &Self) -> bool {
|
||||
false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user