alists and plists now
This commit is contained in:
+3
-5
@@ -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
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user