diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-09-02 20:22:13 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-09-02 20:22:13 -0400 |
| commit | 620ebeab8d6040c20c3278acebeafd02a67057a5 (patch) | |
| tree | 63d9cd54d41d74b2b3f5b870967d3ad2933e5e08 /compile.c | |
| parent | 337aa911a9027602d47cd56ddbfcde0230a48943 (diff) | |
Fixing string methods
Diffstat (limited to 'compile.c')
| -rw-r--r-- | compile.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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); } |
