print and more

This commit is contained in:
nora 2021-12-29 20:12:45 +01:00
parent ebbc675ffd
commit 9e643b8acd
9 changed files with 150 additions and 54 deletions

View file

@ -1,3 +1,4 @@
use crate::errors::Span;
use crate::value::{HashMap, Symbol};
use std::rc::Rc;
@ -5,6 +6,7 @@ use std::rc::Rc;
pub struct FnBlock {
pub code: Vec<Instr>,
pub stack_sizes: Vec<usize>,
pub spans: Vec<Span>,
pub arity: u8,
}
@ -32,6 +34,9 @@ pub enum Instr {
CmpLessEq,
CmpEq,
CmpNotEq,
/// Println the value on top of the stack
Print,
}
#[derive(Debug)]