Add parser, vm, objects

Big ol thing. You should check it out sometime

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2022-01-07 20:30:55 -08:00
parent 946a927b09
commit 9e20dcf59c
17 changed files with 712 additions and 84 deletions

19
src/syn/ast.rs Normal file
View File

@@ -0,0 +1,19 @@
use crate::object::{Float, Int, Str, Value};
use crate::syn::span::*;
#[derive(Debug, Clone, PartialEq)]
pub enum Expr {
Atom(SpAtom),
Quote(Vec<SpExpr>),
}
#[derive(Debug, Clone, PartialEq)]
pub enum Atom {
Word(Str),
Float(Float),
Int(Int),
Str(Str),
}
pub type SpAtom = Spanned<Atom>;
pub type SpExpr = Spanned<Expr>;