fixed bug in switch() constructions

--HG--
branch : pmacs2
This commit is contained in:
moculus 2007-07-15 15:48:51 +00:00
parent e566ad2f66
commit 8a16c4083d
1 changed files with 5 additions and 2 deletions

View File

@ -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':