From 8fab88c56f95c03ffcb4be178f5dbb21b239d95e Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 3 Mar 2024 18:15:45 -0500 Subject: Rename Str -> Text --- typecheck.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'typecheck.c') diff --git a/typecheck.c b/typecheck.c index aba9ec2b..75417e63 100644 --- a/typecheck.c +++ b/typecheck.c @@ -257,8 +257,8 @@ type_t *get_type(env_t *env, ast_t *ast) code_err(ast, "'&' stack references can only be used on variables or fields of variables"); } - case StringJoin: case StringLiteral: { - return Type(StringType); + case TextJoin: case TextLiteral: { + return Type(TextType); } case Var: { auto var = Match(ast, Var); @@ -510,10 +510,10 @@ type_t *get_type(env_t *env, ast_t *ast) if (!type_eq(lhs_t, rhs_t)) code_err(ast, "The type on the left side of this concatenation doesn't match the right side: %T vs. %T", lhs_t, rhs_t); - if (lhs_t->tag == ArrayType || lhs_t->tag == StringType) + if (lhs_t->tag == ArrayType || lhs_t->tag == TextType) return lhs_t; - code_err(ast, "Only array/string value types support concatenation, not %T", lhs_t); + code_err(ast, "Only array/text value types support concatenation, not %T", lhs_t); } case BINOP_EQ: case BINOP_NE: case BINOP_LT: case BINOP_LE: case BINOP_GT: case BINOP_GE: { if (!can_promote(lhs_t, rhs_t) && !can_promote(rhs_t, lhs_t)) -- cgit v1.2.3