diff options
Diffstat (limited to 'compile.c')
| -rw-r--r-- | compile.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -2194,6 +2194,11 @@ CORD compile(env_t *env, ast_t *ast) CORD self = compile_to_pointer_depth(env, call->self, 1, false); (void)compile_arguments(env, ast, NULL, call->args); return CORD_all("Array$clear(", self, ")"); + } else if (streq(call->name, "find")) { + CORD self = compile_to_pointer_depth(env, call->self, 0, false); + arg_t *arg_spec = new(arg_t, .name="item", .type=item_t); + return CORD_all("Array$find_value(", self, ", ", compile_arguments(env, ast, arg_spec, call->args), + ", ", compile_type_info(env, self_value_t), ")"); } else if (streq(call->name, "from")) { CORD self = compile_to_pointer_depth(env, call->self, 0, false); arg_t *arg_spec = new(arg_t, .name="first", .type=INT_TYPE); |
