make symbols and add nil
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
#define SYMBOL_TABLE_SIZE 2048
|
||||
|
||||
typedef char * symbol_t;
|
||||
typedef unsigned int symbol_t;
|
||||
|
||||
#define TYPE_SYMBOL 1
|
||||
#define TYPE_NUMBER 2
|
||||
@@ -18,7 +18,6 @@ typedef char * symbol_t;
|
||||
#define floatp(x) (x->type == TYPE_FLOAT)
|
||||
#define listp(x) (x->type == TYPE_LIST)
|
||||
|
||||
|
||||
typedef struct cell {
|
||||
uint8_t type;
|
||||
union {
|
||||
@@ -35,5 +34,14 @@ typedef struct cell {
|
||||
};
|
||||
};
|
||||
};
|
||||
} cell_t;
|
||||
};
|
||||
|
||||
|
||||
symbol_t intern_symbol(const char *s);
|
||||
symbol_t make_symbol(const char *s);
|
||||
|
||||
static auto NIL = make_symbol("nil");
|
||||
|
||||
|
||||
cell head(cell x);
|
||||
cell tail(cell x);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace neopxl {
|
||||
|
||||
void start();
|
||||
bool blink(bool);
|
||||
void blink();
|
||||
void stop();
|
||||
|
||||
} // namespace neopxl
|
||||
Reference in New Issue
Block a user