mirror of
https://forge.katzen.cafe/katzen-cafe/iowo.git
synced 2026-01-16 16:43:05 +01:00
feat(ir): replace Rpl with GraphIr
Semi-broken as atm the CLI just does nothing except printing the parsed IR, instead of actually executing it.
This commit is contained in:
parent
ccbccfb11b
commit
fcf7e909ee
14 changed files with 198 additions and 143 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use rpl::instructions::Instruction;
|
||||
use ir::instruction::Kind;
|
||||
use value::Dynamic;
|
||||
|
||||
mod debug;
|
||||
|
|
@ -17,10 +17,10 @@ pub enum Executors {
|
|||
}
|
||||
|
||||
trait Executor {
|
||||
fn execute(instruction: Instruction, input: Option<Dynamic>) -> Option<Dynamic>;
|
||||
fn execute(instruction: Kind, input: Option<Dynamic>) -> Option<Dynamic>;
|
||||
}
|
||||
|
||||
pub fn execute_all(instructions: Vec<Instruction>) {
|
||||
pub fn execute_all(instructions: Vec<Kind>) {
|
||||
let mut tmp = None;
|
||||
|
||||
for instruction in instructions {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue