Fix bug with tab handling.
Commit 5804a9a introduced a bug where having the foldtabs option disabled (normal) prevented optimizations of functions. Fix it for good (hopefully). While on it, rename the nofoldtabs option to warntabs, making it default, and use it to disable a warning when there are tabs in a string.
This commit is contained in:
@@ -57,7 +57,8 @@ class optimizer(foldconst, renamer, deadcode):
|
||||
ret['X'] = value['X']
|
||||
return ret
|
||||
|
||||
def optimize(self, treesymtab, options = ('optimize','constfold','dcr')):
|
||||
def optimize(self, treesymtab, options = ('optimize','constfold','dcr',
|
||||
'warntabs')):
|
||||
"""Optimize the symbolic table symtab in place. Requires a table of
|
||||
predefined functions for folding constants.
|
||||
"""
|
||||
@@ -68,7 +69,7 @@ class optimizer(foldconst, renamer, deadcode):
|
||||
self.addstrings = 'addstrings' in options
|
||||
|
||||
self.foldtabs = 'foldtabs' in options
|
||||
self.nofoldtabs = 'nofoldtabs' in options
|
||||
self.warntabs = 'warntabs' in options
|
||||
|
||||
self.shrinknames = 'shrinknames' in options
|
||||
|
||||
|
||||
Reference in New Issue
Block a user