alists and plists now

This commit is contained in:
FelixBrendel
2019-07-05 01:26:00 +02:00
parent d576e7324f
commit e0aaf351c5
14 changed files with 646 additions and 106 deletions
+3 -5
View File
@@ -48,7 +48,7 @@ proc built_in_load(String* file_name, Environment* env) -> Lisp_Object* {
fullpath[0] = '\0';
sprintf(fullpath, "%s%s", exe_path, Memory::get_c_str(file_name));
printf("Fullpath: %s\n", fullpath);
// printf("Fullpath: %s\n", fullpath);
file_content = read_entire_file(fullpath);
if (!file_content) {
@@ -466,14 +466,12 @@ proc load_built_ins_into_environment(Environment* env) -> void {
bool truthy;
try truthy = is_truthy(condition, env);
// printf("arg len is: %d\n", arguments_length);
Lisp_Object* result;
if (truthy)
try result = eval_expr(then_part->value.pair.first, env);
else if (arguments_length == 3)
else
try result = eval_expr(else_part->value.pair.first, env);
else return Memory::nil;
return result;
});
+4 -2
View File
@@ -518,8 +518,10 @@ proc interprete_stdin(bool is_emacs_repl = false) -> void {
delete_error();
continue;
}
print(evaluated);
if (evaluated != Memory::nil) {
print(evaluated);
printf("\n");
}
}
printf("\n");
}
}
+1
View File
@@ -630,6 +630,7 @@ proc run_all_tests() -> bool {
printf("\n-- Test Files --\n");
invoke_test_script("alists");
invoke_test_script("case_and_cond");
invoke_test_script("evaluation_of_default_args");
invoke_test_script("lexical_scope");
invoke_test_script("class_macro");