The tiniest bit of actual progress.
This commit is contained in:
parent
114c64501a
commit
0b2aa4e070
3 changed files with 20 additions and 5 deletions
|
|
@ -136,4 +136,10 @@
|
|||
*/
|
||||
#define payload(obj) ((tag32(obj) < 7) ? ((obj & MASK32) << 4) : (obj << 8))
|
||||
|
||||
#define errorp(obj) (tag32(obj) == ERRORTV)
|
||||
|
||||
#define integerp(obj) (tag32(obj) == INTEGERTV)
|
||||
|
||||
#define charp(obj) (tag32(obj) == CHARTV)
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -31,6 +31,18 @@ void showbits( unsigned int x )
|
|||
printf("\n");
|
||||
}
|
||||
|
||||
void show(uint64_t x) {
|
||||
if(integerp(x)) {
|
||||
// integer
|
||||
printf("%d", (int)payload(x));
|
||||
} else if(charp(x)) {
|
||||
// character
|
||||
printf("#\\%c", (char)payload(x));
|
||||
}
|
||||
// we're compiling Lisp, not Scheme, so we don't have an explicit boolean
|
||||
// type
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
printf( "Naegling, a compiler for Beowulf: version %s\n", VERSION);
|
||||
|
|
@ -39,6 +51,3 @@ int main(int argc, char **argv) {
|
|||
printf("%d\n", val);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,6 @@
|
|||
#ifndef __naegling_version_h
|
||||
#define __naegling_version_h
|
||||
|
||||
#define VERSIOM "Aelfhere"
|
||||
#define VERSION "Aelfhere"
|
||||
|
||||
#ifndef
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue