]> ocean-lang.org Git - ocean/commit
parsergen: avoid creating extra line in code blocks.
authorNeilBrown <neil@brown.name>
Sat, 20 Nov 2021 00:37:52 +0000 (11:37 +1100)
committerNeilBrown <neil@brown.name>
Sat, 20 Nov 2021 00:37:52 +0000 (11:37 +1100)
commit025b04b80f75fd004da2b5e884b35233ede2f6f5
treeaf89cbf649cec64371389a443a0fd4ccc2ed54d4
parent234ae7c044ea183c719799a5369b2cfcbc69fd27
parsergen: avoid creating extra line in code blocks.

When performing coverage analysis, it is important that the line numbers
seen in the .c file are fairly accurate.
Currently we a lines to the end of a code block, and they appear to have
line numbers that correspond to whatever appears after the code block.
This is confusing.

So put all that extra code on the last line (matching the }$).
Also switch back to "gen_reduce" immediately after the code block.

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