From 8a16c4083d9e771ef1a1f39988c679b4763b7da3 Mon Sep 17 00:00:00 2001 From: moculus Date: Sun, 15 Jul 2007 15:48:51 +0000 Subject: [PATCH] fixed bug in switch() constructions --HG-- branch : pmacs2 --- mode_c.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mode_c.py b/mode_c.py index a0adc02..b7856a2 100644 --- a/mode_c.py +++ b/mode_c.py @@ -113,14 +113,17 @@ class CTabber(tab2.StackTabber): self._opt_pop('cond') self._opt_pop('cont') self._opt_pop('cond') - #currlvl = self.get_curr_level() elif fqname == 'keyword': if token.string in ('do', 'else', 'for', 'if', 'while'): self._append('cond', currlvl + 4) elif token.string == 'break': - self._opt_pop('case') + self._opt_pop('case', 'while', 'for') + elif token.string == 'continue': + self._opt_pop('while', 'for') elif token.string == 'case': + self._opt_pop('case') + currlvl = self.get_curr_level() self._opt_append('case', currlvl + 4) elif fqname == 'string.start':