Simple structure

This commit is contained in:
2026-03-13 16:03:13 +01:00
parent 40c36621eb
commit 2d1e41a3e8
5 changed files with 24 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
pub mod parser;
pub mod runtime;
+21
View File
@@ -0,0 +1,21 @@
pub struct Program {
pub functions: Vec<Function>,
}
pub struct Function {
pub name: String,
pub params: Vec<String>,
pub body: Vec<Instruction>,
}
pub struct Instruction {
pub opcode: String,
pub operands: Vec<Operand>,
}
pub enum Operand {
Global(String),
Local(String),
Number(i64),
Pointer(Box<Operand>),
}
+1
View File
@@ -0,0 +1 @@
pub mod ast;
View File