Move src/syn/word.rs to src/scope.rs; add BuiltinFn
* crate::scope instead of crate::syn::word, which makes more sense because scopes are not really used in syntax at all * Reference-counted BuiltinFn values are available for creation now Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -13,8 +13,6 @@ pub enum RuntimeError {
|
||||
|
||||
#[error("cannot call non-quote value '{0}'")]
|
||||
CannotCall(String),
|
||||
//#[error("stack underflow")]
|
||||
//StackUnderflow,
|
||||
}
|
||||
|
||||
pub type Result<T, E = RuntimeError> = std::result::Result<T, E>;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use crate::object::Value;
|
||||
use crate::syn::words::Word;
|
||||
use crate::scope::Word;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum Inst {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
use crate::compile::Compile;
|
||||
use crate::object::*;
|
||||
use crate::syn::{ast::SpExpr, words::*};
|
||||
use crate::scope::*;
|
||||
use crate::syn::ast::SpExpr;
|
||||
use crate::vm::{error::*, inst::*};
|
||||
use std::cell::RefCell;
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
Reference in New Issue
Block a user