cleanup:
if (!parser_leaveblock(parser))
retval = false;
- return !!block;
+ return retval && !!block;
}
static ast_block* parse_block(parser_t *parser, bool warnreturn)
}
if (parser->tok == '#') {
- ast_function *func;
+ ast_function *func = NULL;
if (localblock) {
parseerror(parser, "cannot declare builtins within functions");
if (!parser_next(parser)) {
parseerror(parser, "expected comma or semicolon");
- ast_function_delete(func);
+ if (func)
+ ast_function_delete(func);
var->constval.vfunc = NULL;
break;
}