From 8b70e1a81402e4e5aeb9a77e1dc35dd0eadbb86b Mon Sep 17 00:00:00 2001 From: Adrian Thurston Date: Tue, 13 Oct 2020 08:40:15 -0700 Subject: if using loop labels for breaking, don't put the label at the end also This isn't tolerated in rust codegen, but other langs handled it ok. --- libfsm/tabbreak.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libfsm/tabbreak.cc b/libfsm/tabbreak.cc index 5ded768a..ee82cc0c 100644 --- a/libfsm/tabbreak.cc +++ b/libfsm/tabbreak.cc @@ -301,8 +301,9 @@ void TabBreak::writeExec() if ( loopLabels ) { out << BREAK( _again ) << ";\n}\n"; } - - out << "\n" << EMIT_LABEL( _again ); + else { + out << "\n" << EMIT_LABEL( _again ); + } if ( !noEnd && eof ) { out << -- cgit v1.2.1