aboutsummaryrefslogtreecommitdiff
path: root/ast.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-11 13:55:41 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-11 13:55:41 -0400
commitb0b23acf887bec28b5ef8d0dfe448c4228ee0eb3 (patch)
treed2ad22c1850acd186ed1286bd6fa759cdea6487e /ast.c
parent2c90750a3eed81d07f2e74acd9744de0b9853b11 (diff)
Rename "Nil"->"Null" for consistency
Diffstat (limited to 'ast.c')
-rw-r--r--ast.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ast.c b/ast.c
index 98d6f60d..1e89d29b 100644
--- a/ast.c
+++ b/ast.c
@@ -96,7 +96,7 @@ CORD ast_to_xml(ast_t *ast)
switch (ast->tag) {
#define T(type, ...) case type: { auto data = ast->__data.type; (void)data; return CORD_asprintf(__VA_ARGS__); }
T(Unknown, "<Unknown>")
- T(Nil, "<Nil>%r</Nil>", type_ast_to_xml(data.type))
+ T(Null, "<Null>%r</Null>", type_ast_to_xml(data.type))
T(Bool, "<Bool value=\"%s\" />", data.b ? "yes" : "no")
T(Var, "<Var>%s</Var>", data.name)
T(Int, "<Int bits=\"%d\">%s</Int>", data.bits, data.str)
@@ -197,7 +197,7 @@ int printf_ast(FILE *stream, const struct printf_info *info, const void *const a
PUREFUNC bool is_idempotent(ast_t *ast)
{
switch (ast->tag) {
- case Int: case Bool: case Num: case Var: case Nil: case TextLiteral: return true;
+ case Int: case Bool: case Num: case Var: case Null: case TextLiteral: return true;
case Index: {
auto index = Match(ast, Index);
return is_idempotent(index->indexed) && index->index != NULL && is_idempotent(index->index);