Migrate the return bool outside of block_t

This is a flag that gets set by the return function. But we only need one,
not per-block. Move it into libdata.
This commit is contained in:
ridiculousfish
2019-05-19 19:29:25 -07:00
parent 9a541d9ed4
commit 686b84396c
5 changed files with 11 additions and 19 deletions

View File

@@ -831,6 +831,9 @@ static bool exec_block_or_func_process(parser_t &parser, std::shared_ptr<job_t>
parser.allow_function();
parser.pop_block(fb);
// If we returned due to a return statement, then stop returning now.
parser.libdata().returning = false;
} else {
assert(p->type == process_type_t::block_node);
assert(p->block_node_source && p->internal_block_node && "Process is missing node info");