WIP commit to re-add and refactor config, repl, and library code

Signed-off-by: Ava Hahn <ava@aidanis.online>
This commit is contained in:
Ava Hahn 2023-02-27 17:30:49 -08:00
parent 93a1e06a53
commit ae365ad63c
Signed by untrusted user who does not match committer: affine
GPG key ID: 3A4645B8CF806069
10 changed files with 758 additions and 67 deletions

View file

@ -18,7 +18,7 @@
use crate::eval::eval;
use crate::segment::{Seg, Ctr, Type};
use std::collections::HashMap;
use std::rc::Rc;
pub struct SymTable(HashMap<String, Symbol>);
#[derive(Debug, Clone)]
@ -39,7 +39,7 @@ pub struct UserFn {
*/
#[derive(Clone)]
pub enum ValueType {
Internal(Box<fn(&Seg, &mut SymTable) -> Ctr>),
Internal(Rc<dyn Fn(&Seg, &mut SymTable) -> Ctr>),
FuncForm(UserFn),
VarForm(Box<Ctr>)
}