aboutsummaryrefslogtreecommitdiff
path: root/src/compile
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-10-11 15:27:27 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-10-11 15:27:27 -0400
commit686150b0cdd4990f020390dbbe52a3dc408cf550 (patch)
treec061337132c887f38f287b0626ac0df92b1478af /src/compile
parente0a04d4171e03ae64b874b7229d25ce940afa301 (diff)
Rename pathtype enum values
Diffstat (limited to 'src/compile')
-rw-r--r--src/compile/optionals.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compile/optionals.c b/src/compile/optionals.c
index bd5f861d..c8a7276c 100644
--- a/src/compile/optionals.c
+++ b/src/compile/optionals.c
@@ -53,7 +53,7 @@ Text_t compile_none(type_t *t) {
if (t == NULL) compiler_err(NULL, NULL, NULL, "I can't compile a `none` value with no type");
if (t == PATH_TYPE) return Text("NONE_PATH");
- else if (t == PATH_TYPE_TYPE) return Text("((OptionalPathType_t){.type = PATH_NONE})");
+ else if (t == PATH_TYPE_TYPE) return Text("((OptionalPathType_t){.type = PATHTYPE_NONE})");
switch (t->tag) {
case BigIntType: return Text("NONE_INT");
@@ -92,8 +92,8 @@ Text_t check_none(type_t *t, Text_t value) {
// NOTE: these use statement expressions ({...;}) because some compilers
// complain about excessive parens around equality comparisons
if (t->tag == PointerType || t->tag == FunctionType || t->tag == CStringType) return Texts("(", value, " == NULL)");
- else if (t == PATH_TYPE) return Texts("((", value, ").type.$tag == PATH_NONE)");
- else if (t == PATH_TYPE_TYPE) return Texts("((", value, ").$tag == PATH_NONE)");
+ else if (t == PATH_TYPE) return Texts("((", value, ").type.$tag == PATHTYPE_NONE)");
+ else if (t == PATH_TYPE_TYPE) return Texts("((", value, ").$tag == PATHTYPE_NONE)");
else if (t->tag == BigIntType) return Texts("((", value, ").small == 0)");
else if (t->tag == ClosureType) return Texts("((", value, ").fn == NULL)");
else if (t->tag == NumType)