mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
Implement the shrinknames option.
Fixes some bugs with the treatment of the shrink attribute, some others with the output of renamed stuff.
This commit is contained in:
parent
847d7b1e20
commit
6c248c46e3
5 changed files with 174 additions and 15 deletions
|
@ -2,7 +2,9 @@
|
|||
import lslfuncs
|
||||
from lslparse import warning
|
||||
|
||||
class optimizer(object):
|
||||
from lslrenamer import renamer
|
||||
|
||||
class optimizer(renamer):
|
||||
|
||||
# Default values per type when declaring variables
|
||||
DefaultValues = {'integer': 0, 'float': 0.0, 'string': u'',
|
||||
|
@ -606,6 +608,9 @@ class optimizer(object):
|
|||
else:
|
||||
self.FoldTree(tree, idx)
|
||||
|
||||
if 'shrinknames' in options:
|
||||
self.AssignNewNames()
|
||||
|
||||
treesymtab = (self.tree, self.symtab)
|
||||
del self.tree
|
||||
del self.symtab
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue