refactor: type

This commit is contained in:
2025-05-03 20:33:59 +08:00
parent 3f0cb2c2fa
commit 4a310ff317
23 changed files with 475 additions and 309 deletions

25
src/ty/internal/func.rs Normal file
View 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
}
}