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:
MultisampledNight 2024-01-12 17:23:17 +01:00
commit fcf7e909ee
No known key found for this signature in database
GPG key ID: 6D525AA147CBDAE2
14 changed files with 198 additions and 143 deletions

View file

@ -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 {