mirror of
https://github.com/Noratrieb/dilaria.git
synced 2026-01-15 01:45:02 +01:00
print and more
This commit is contained in:
parent
ebbc675ffd
commit
9e643b8acd
9 changed files with 150 additions and 54 deletions
|
|
@ -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)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue