Nothing fancy yet. This commit adds a bunch of stuff (oops): * compiling code * VM with instructions * remove eval.rs and just eval in the Machine struct itself * squash most warnings now that we're using stuff here And probably more. But that's all for now folks Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
22 lines
369 B
Rust
22 lines
369 B
Rust
use crate::object::{Float, Int, Str};
|
|
use crate::syn::span::*;
|
|
|
|
#[derive(Debug, Clone, PartialEq)]
|
|
pub enum Expr {
|
|
Atom(SpAtom),
|
|
Quote(Vec<SpExpr>),
|
|
}
|
|
|
|
#[derive(Debug, Clone, PartialEq)]
|
|
pub enum Atom {
|
|
Assign(Str),
|
|
Word(Str),
|
|
Float(Float),
|
|
Int(Int),
|
|
Str(Str),
|
|
Apply,
|
|
}
|
|
|
|
pub type SpAtom = Spanned<Atom>;
|
|
pub type SpExpr = Spanned<Expr>;
|