Macro expansion!

This commit is contained in:
2026-09-04 05:45:48 -07:00
parent 3b2ecf2b16
commit 8024bcfee3
13 changed files with 373 additions and 56 deletions
+9 -1
View File
@@ -349,7 +349,11 @@ static void print_function(struct PrintContext *restrict pc, LispVal *val) {
print_char(pc, '<');
switch (f->type) {
case FUNCTION_NATIVE:
PRINT_STATIC_BUFFER(pc, "native-function");
if (f->impl.native.no_eval_args) {
PRINT_STATIC_BUFFER(pc, "special-form");
} else {
PRINT_STATIC_BUFFER(pc, "native-function");
}
break;
case FUNCTION_INTERP:
PRINT_STATIC_BUFFER(pc, "interp-function");
@@ -358,6 +362,10 @@ static void print_function(struct PrintContext *restrict pc, LispVal *val) {
abort();
}
print_char(pc, ' ');
if (!NILP(f->name)) {
print_driver(pc, f->name);
print_char(pc, ' ');
}
// large enough for 32 or 64 bit word size
char buffer[32];
int written = snprintf(buffer, sizeof(buffer), "0x%jx", (uintmax_t) &f);