- if (!ast_block_exprs_add(body, root)) {
- parseerror(parser, "failed to build accessor search block");
- goto cleanup;
- }
-
- fval = ast_value_new(ast_ctx(array), funcname, TYPE_FUNCTION);
- if (!fval) {
- parseerror(parser, "failed to create accessor function value");
- goto cleanup;
- }
- fval->expression.next = (ast_expression*)ast_value_new(ast_ctx(array), "<void>", TYPE_VOID);
-
- (void)!ast_value_set_name(value, "value"); /* not important */
- if (!ast_expression_common_params_add(&fval->expression, index)) {
- parseerror(parser, "failed to build array setter");
- goto cleanup;
- }
- if (!ast_expression_common_params_add(&fval->expression, value)) {
- ast_delete(index);
- parseerror(parser, "failed to build array setter");
- goto cleanup2;
- }
-
- func = ast_function_new(ast_ctx(array), funcname, fval);
- if (!func) {
- parseerror(parser, "failed to create accessor function node");
- goto cleanup2;
- }
-
- if (!ast_function_blocks_add(func, body))
- goto cleanup2;
-
+ (void)!ast_block_exprs_add(body, root);
+ (void)!ast_function_blocks_add(func, body);