Migrate loop status from blocks into libdata

Blocks will soon need to be shared across parsers. Migrate the loop status
(like break or continue) from the block into the libdata. It turns out we
only ever need one, we don't need to track this per-block.

Make it an enum class.
This commit is contained in:
ridiculousfish
2019-05-18 23:12:34 -07:00
parent ff3fe961f4
commit cd7e8f4103
4 changed files with 25 additions and 34 deletions

View File

@@ -138,8 +138,6 @@ void parser_t::push_block_int(block_t *new_current) {
new_current->skip = false;
}
new_current->loop_status = LOOP_NORMAL;
// Push it onto our stack. This acquires ownership because of unique_ptr.
this->block_stack.emplace_back(new_current);