diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-03-03 18:15:45 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-03-03 18:15:45 -0500 |
| commit | 8fab88c56f95c03ffcb4be178f5dbb21b239d95e (patch) | |
| tree | 3c2e721b8ea55d43b94fa9f315659580652573c5 /structs.c | |
| parent | 07f0a18136a7883d1f3edd3e08253bd3020294a8 (diff) | |
Rename Str -> Text
Diffstat (limited to 'structs.c')
| -rw-r--r-- | structs.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -5,7 +5,7 @@ #include <stdio.h> #include "ast.h" -#include "builtins/string.h" +#include "builtins/text.h" #include "compile.h" #include "environment.h" #include "typecheck.h" @@ -69,7 +69,7 @@ static CORD compile_compare_method(env_t *env, ast_t *ast) case BoolType: case IntType: case NumType: case PointerType: case FunctionType: cmp_func = CORD_all(cmp_func, "diff = (x->", field->name, " > y->", field->name, ") - (x->", field->name, " < y->", field->name, ");"); break; - case StringType: + case TextType: cmp_func = CORD_all(cmp_func, "diff = CORD_cmp(x->", field->name, ", y->", field->name, ");"); break; default: @@ -95,7 +95,7 @@ static CORD compile_equals_method(env_t *env, ast_t *ast) case BoolType: case IntType: case NumType: case PointerType: case FunctionType: eq_func = CORD_all(eq_func, "if (x->", field->name, " != y->", field->name, ") return no;\n"); break; - case StringType: + case TextType: eq_func = CORD_all(eq_func, "if (CORD_cmp(x->", field->name, ", y->", field->name, ") != 0) return no;\n"); break; default: |
