From 620ebeab8d6040c20c3278acebeafd02a67057a5 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 2 Sep 2024 20:22:13 -0400 Subject: Fixing string methods --- compile.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'compile.c') diff --git a/compile.c b/compile.c index 35c5f8f9..a4972b14 100644 --- a/compile.c +++ b/compile.c @@ -2679,6 +2679,8 @@ CORD compile(env_t *env, ast_t *ast) if (lang && streq(f->field, "text_content")) { CORD text = compile_to_pointer_depth(env, f->fielded, 0, false); return CORD_all("((Text_t)", text, ")"); + } else if (streq(f->field, "length")) { + return CORD_all("Int64_to_Int((", compile_to_pointer_depth(env, f->fielded, 0, false), ").length)"); } code_err(ast, "There is no '%s' field on %T values", f->field, value_t); } -- cgit v1.2.3