Work transfer from laptop
This commit is contained in:
+2
-2
@@ -1,5 +1,5 @@
|
||||
(define-syntax when (condition :rest body)
|
||||
"alsdkjalsk djalksdj alksjd lakjd"
|
||||
"Doc String for 'when'"
|
||||
`(if ,condition ,(pair prog body) nil))
|
||||
|
||||
(define-syntax unless (condition :rest body)
|
||||
@@ -238,4 +238,4 @@ las argument."
|
||||
(eval (pair printf-quoted (extend (list :@sep (eval sep) :@end (eval end)) args))))
|
||||
|
||||
(define-syntax pe (expr)
|
||||
`(printf ,expr "evaluates to" (eval ,expr)))
|
||||
`(printf ',expr "evaluates to" ,(eval expr)))
|
||||
|
||||
+4
-7
@@ -34,17 +34,14 @@ proc built_in_load(String* file_name, Environment* env) -> Lisp_Object* {
|
||||
if (file_content) {
|
||||
Lisp_Object* result = Memory::nil;
|
||||
Lisp_Object_Array_List* program;
|
||||
try {
|
||||
program = Parser::parse_program(file_name, file_content);
|
||||
}
|
||||
try program = Parser::parse_program(file_name, file_content);
|
||||
|
||||
for (int i = 0; i < program->next_index; ++i) {
|
||||
try {
|
||||
result = eval_expr(program->data[i], env);
|
||||
}
|
||||
try result = eval_expr(program->data[i], env);
|
||||
}
|
||||
return result;
|
||||
} else {
|
||||
create_generic_error("The file '%s' was not found", file_name);
|
||||
create_generic_error("The file '%s' was not found", Memory::get_c_str(file_name));
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ proc apply_arguments_to_function(Lisp_Object* arguments, Function* function) ->
|
||||
|
||||
String_Array_List* read_in_keywords = create_String_array_list();
|
||||
|
||||
if (Memory::get_type(arguments) == Lisp_Object_Type::Nil)
|
||||
if (arguments == Memory::nil)
|
||||
goto checks;
|
||||
// keyword arguments: use all given ones and keep track of the
|
||||
// added ones (array list), if end of parameters in encountered or
|
||||
|
||||
+8
-2
@@ -480,14 +480,20 @@ proc test_singular_t_and_nil() -> testresult {
|
||||
|
||||
proc test_file(const char* file) -> testresult {
|
||||
Memory::reset();
|
||||
assert_no_error();
|
||||
|
||||
Environment* env = Memory::create_built_ins_environment();
|
||||
assert_no_error();
|
||||
|
||||
Parser::init(env);
|
||||
assert_no_error();
|
||||
|
||||
built_in_load(Memory::create_string("pre.slime"), env);
|
||||
Lisp_Object* result = built_in_load(Memory::create_string(file), env);
|
||||
|
||||
assert_no_error();
|
||||
|
||||
Lisp_Object* result = built_in_load(Memory::create_string(file), env);
|
||||
assert_no_error();
|
||||
|
||||
return pass;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user