parser: remove NIL as a known value

Not really needed or necessary.
This commit is contained in:
2026-01-29 03:15:12 +00:00
parent 2e24d3a618
commit 8764b65aff
3 changed files with 1 additions and 4 deletions

View File

@@ -25,7 +25,6 @@ typedef enum
/// Known symbols - may reference callables or values. /// Known symbols - may reference callables or values.
typedef enum typedef enum
{ {
AST_KNOWN_NIL = 0,
AST_KNOWN_PUTSTR, AST_KNOWN_PUTSTR,
NUM_AST_KNOWNS, NUM_AST_KNOWNS,

View File

@@ -13,8 +13,6 @@ const char *ast_known_to_cstr(ast_known_t known)
{ {
switch (known) switch (known)
{ {
case AST_KNOWN_NIL:
return "nil";
case AST_KNOWN_PUTSTR: case AST_KNOWN_PUTSTR:
return "putstr"; return "putstr";
default: default:

View File

@@ -125,7 +125,7 @@ parse_err_t parse_symbol(parse_stream_t *stream, ast_node_t *ret)
symbol.size = sv_while(symbol, SYMBOL_CHARS); symbol.size = sv_while(symbol, SYMBOL_CHARS);
// see if symbol is one of the already known symbols // see if symbol is one of the already known symbols
static_assert(NUM_AST_KNOWNS == 2, "Expected number of AST KNOWN"); static_assert(NUM_AST_KNOWNS == 1, "Expected number of AST_KNOWNs");
for (ast_known_t i = 0; i < NUM_AST_KNOWNS; ++i) for (ast_known_t i = 0; i < NUM_AST_KNOWNS; ++i)
{ {
const char *possible_known = ast_known_to_cstr(i); const char *possible_known = ast_known_to_cstr(i);