resurgence 0.1.8

A VM backend designed to be embedded in an application
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::{collections::HashMap};
use crate::objects::codeholder::CodeHolder;
mod generate_instruction;
mod abstraction;

/// `CodeBuilder<'a>`: Helps contruct bytecode to be used by the VM
struct CodeBuilder<'a> {
    /// Reference to a `CodeHolder` 
    code_holder: &'a mut CodeHolder,

    /// Holds function symbols 
    func_symbols: HashMap<String, usize>,
    
    /// Holds variable symbols
    var_symbols: Vec<HashMap<String, u32>>
}