diff options
author | Adrian Thurston <thurston@colm.net> | 2020-10-13 08:40:15 -0700 |
---|---|---|
committer | Adrian Thurston <thurston@colm.net> | 2020-10-13 08:40:15 -0700 |
commit | 8b70e1a81402e4e5aeb9a77e1dc35dd0eadbb86b (patch) | |
tree | b431b6ad8c2a198ad670d26d5dc1c91371d16575 | |
parent | 8a55bd50f0dbf7c15853cf5a0fc53f49bfb4a34c (diff) | |
download | colm-8b70e1a81402e4e5aeb9a77e1dc35dd0eadbb86b.tar.gz |
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.
-rw-r--r-- | libfsm/tabbreak.cc | 5 |
1 files 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 << |