This commit is contained in:
2026-06-01 23:03:35 -04:00
parent 1d568f8ce3
commit c2a8c50a6d
5 changed files with 64 additions and 8 deletions
+35
View File
@@ -4,4 +4,39 @@ pub use namespace::*;
use super::Id;
pub struct Fn {
pub body: Body,
}
pub struct Body {
pub statements: Vec<Statement>,
}
pub struct Statement {
ty: StatementTy,
}
pub enum StatementTy {
Define,
Assign {
target: VarId,
ty: TypeId,
val: VarId,
},
Call {
target: VarId,
args: Vec<VarId>,
},
}
pub struct Var {
const_: bool,
ty: TypeId,
}
pub enum Type {
Unsigned(u8),
Signed(u8),
}
pub type VarId = u32;
pub type TypeId = u32;