implemented callstack and envistack

This commit is contained in:
Felix Brendel
2019-07-17 23:20:07 +02:00
parent e266667607
commit 7cebcd1823
14 changed files with 259 additions and 221 deletions
+3 -3
View File
@@ -426,7 +426,7 @@ namespace Parser {
inject_scl(macro);
// macro->value.function = function;
define_symbol(symbol_for_macro, macro, environment_for_macros);
define_symbol(symbol_for_macro, macro);
// print_environment(environment_for_macros);
return Memory::nil;
@@ -452,7 +452,7 @@ namespace Parser {
// if not it is regular code, dont touch.
break;
Lisp_Object* macro = try_lookup_symbol(parsed_symbol, environment_for_macros);
Lisp_Object* macro = try_lookup_symbol(parsed_symbol, get_current_environment());
if (macro &&
Memory::get_type(macro) == Lisp_Object_Type::Function &&
macro->value.function.type == Function_Type::Macro)
@@ -474,7 +474,7 @@ namespace Parser {
defer {
macro->value.function.type = Function_Type::Macro;
};
try expression = eval_expr(expression, environment_for_macros);
try expression = eval_expr(expression);
break;
} else break;
}