Special-case "switch" in _c_base.pm (#37)

This commit is contained in:
Joey Pabalinas (jp) 2018-06-05 12:02:38 -10:00 committed by Pragmatic Software
parent 2f190a57c3
commit ebd36fdcc7
1 changed files with 10 additions and 1 deletions

View File

@ -287,7 +287,16 @@ sub preprocess_code {
$ret =~ s/^\s+//;
$ret =~ s/\s+$//;
if(not length $ret or $ret eq "else" or $ret eq "while" or $ret eq "if" or $ret eq "for" or $ident eq "for" or $ident eq "while" or $ident eq "if") {
if(not length $ret
or $ret eq "switch"
or $ret eq "else"
or $ret eq "while"
or $ret eq "if"
or $ret eq "for"
or $ident eq "switch"
or $ident eq "for"
or $ident eq "while"
or $ident eq "if") {
$precode .= "$ret $ident ($params) $potential_body";
next;
} else {