fixed bug in switch() constructions
--HG-- branch : pmacs2
This commit is contained in:
parent
e566ad2f66
commit
8a16c4083d
|
@ -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':
|
||||
|
|
Loading…
Reference in New Issue