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:
parent
93a1e06a53
commit
ae365ad63c
10 changed files with 758 additions and 67 deletions
|
|
@ -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>)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue