From b7273904c8ae112c94a87ef30a4c1ec8b2a6076a Mon Sep 17 00:00:00 2001 From: rnordier Date: Fri, 21 May 1999 14:46:52 +0000 Subject: Improve handling of "do ... while" following "else". This change eliminates some incorrect "Unmatched 'else'" errors. --- usr.bin/indent/parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.bin/indent') diff --git a/usr.bin/indent/parse.c b/usr.bin/indent/parse.c index f3a4b44..eeeb30a 100644 --- a/usr.bin/indent/parse.c +++ b/usr.bin/indent/parse.c @@ -310,7 +310,7 @@ reduce() case whilestmt: /* while (...) on top */ if (ps.p_stack[ps.tos - 1] == dohead) { /* it is termination of a do while */ - ps.p_stack[--ps.tos] = stmt; + ps.tos -= 2; break; } else -- cgit v1.1