]> ocean-lang.org Git - ocean/commit
oceani: move var_block_close() calls to the code sections that close the block
authorNeilBrown <neil@brown.name>
Sat, 6 Nov 2021 02:04:54 +0000 (13:04 +1100)
committerNeilBrown <neil@brown.name>
Mon, 8 Nov 2021 09:56:36 +0000 (20:56 +1100)
commit875d537b75aadc54c94d41585248d0377c6816cc
tree9e466485750caf0c48416057ed36d16d8ae0ba1f
parent6a546ea265d0ee30152298463e9e7b7c2f53b3b0
oceani: move var_block_close() calls to the code sections that close the block

Rather than calling var_block_close() from common non-terminals, move
the calls into the body of the parent non-terminal.  This places them
after the 'struct exec' which represents the scope has been created.

This is needed to attach the variables to the point where their scope is
closed, so they can be freed.

This change helped me focus on some untested - and broken - code.

Signed-off-by: NeilBrown <neil@brown.name>
csrc/oceani-tests.mdc
csrc/oceani.mdc