amvm 0.1.0

Apika's My Virtual Machine. A virtual machine with Intermediate Lenguage
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::{AmvmScope, Command, Value};

use super::{commands, AmvmResult};

pub fn eval(scope: &mut AmvmScope, body: &Vec<Command>) -> AmvmResult {
    let mut scope = scope.create_sub(body.clone());

    for cmd in scope.body.clone().iter() {
        commands::eval(&mut scope, cmd)?;
    }

    Ok(Value::Null)
}