diff --git a/src/built_ins.cpp b/src/built_ins.cpp index 511a4d4..9d5a82e 100644 --- a/src/built_ins.cpp +++ b/src/built_ins.cpp @@ -51,13 +51,6 @@ proc load_built_ins_into_environment(Environment* env) -> void { Lisp_Object* evaluated_arguments; #define cLambda [=](Lisp_Object* arguments, Environment* env) mutable -> Lisp_Object* -#define report_error(_type) { \ - if (log_level == Log_Level::Debug) { \ - printf("Error occurred\nin %s:%d\n", __FILE__, __LINE__); \ - } \ - create_error(_type, current_source_code_location); \ - return nullptr; \ - } proc defun = [&](const char* name, auto fun) { define_symbol( @@ -347,41 +340,6 @@ proc load_built_ins_into_environment(Environment* env) -> void { return value; }); - // defun("define-upwards", cLambda { - // try { - // arguments_length = list_length(arguments); - // } - - // if (arguments_length != 2) { - // report_error(Error_Type::Wrong_Number_Of_Arguments); - // } - - // Lisp_Object* symbol = arguments->value.pair.first; - - // if (symbol->type == Lisp_Object_Type::Pair) { - // try { - // symbol = eval_expr(symbol, env); - // } - // } - - // if (symbol->type != Lisp_Object_Type::Symbol) { - // report_error(Error_Type::Type_Missmatch); - // } - - // if (!env->parent) { - // report_error(Error_Type::Unknown_Error); - // } - - - // Lisp_Object* value = arguments->value.pair.rest->value.pair.first; - // try { - // value = eval_expr(value, env); - // } - - // define_symbol(symbol, value, env->parent); - - // return value; - // }); defun("mutate", cLambda { try evaluated_arguments = eval_arguments(arguments, env, &arguments_length); try assert_arguments_length(2, arguments_length); @@ -969,6 +927,5 @@ proc load_built_ins_into_environment(Environment* env) -> void { return Memory::create_lisp_object_string(resulting_string); }); -#undef report_error #undef cLambda } diff --git a/todo.org b/todo.org index 5d6664f..7546b7f 100644 --- a/todo.org +++ b/todo.org @@ -1,4 +1,5 @@ -* TODO rename sliem to plisk +* TODO rename slime to plisk +* TODO go through sicp and use the examples as test files * TODO BUG 1: eval dot notation #+BEGIN_SRC lisp (eval `(+ . ,(list 1 2 3)))