move to meson for build system
This commit is contained in:
parent
fdd1ee61b5
commit
9616fb616e
28 changed files with 123 additions and 24 deletions
20
src/print.c
Normal file
20
src/print.c
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "object.h"
|
||||
#include "print.h"
|
||||
|
||||
V print(O o) {
|
||||
if (o == NIL) {
|
||||
printf("nil");
|
||||
} else if (IMM(o)) {
|
||||
printf("%" PRIdPTR, ORD(o));
|
||||
} else {
|
||||
printf("<obj type=%ld ptr=%p>", type(o), (void *)o);
|
||||
}
|
||||
}
|
||||
|
||||
V println(O o) {
|
||||
print(o);
|
||||
putchar('\n');
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue