bc: fold zbc_parse_else() into its only caller

While at it, allow newline between "else" and its body

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2018-12-16 19:21:57 +01:00
parent 6d29879c67
commit a50576a415
2 changed files with 26 additions and 38 deletions

View File

@@ -61,6 +61,11 @@ testing "bc if(cond)<NL>" \
"9\n" \
"" "if(0)\n3\n9"
testing "bc if(cond) stmt else<NL>" \
"bc" \
"4\n9\n" \
"" "if(0)3 else\n4\n9"
testing "bc while(cond)<NL>" \
"bc" \
"8\n7\n6\n5\n4\n3\n2\n1\n9\n" \