mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
Add preprocessor skip option, command line options and help, options for all functions, and enhance parentheses removal.
This commit is contained in:
parent
ae94e80c34
commit
eab0bec84b
4 changed files with 99 additions and 27 deletions
|
@ -262,12 +262,13 @@ class outscript(object):
|
|||
first = False
|
||||
return ret + ')\n' + self.OutCode(code)
|
||||
|
||||
def output(self, symtab):
|
||||
def output(self, symtab, options = ('optimizesigns',)):
|
||||
# Build a sorted list of dict entries
|
||||
order = []
|
||||
self.symtab = symtab
|
||||
|
||||
self.optsigns = True
|
||||
# Optimize signs
|
||||
self.optsigns = 'optimizesigns' in options
|
||||
|
||||
for i in symtab:
|
||||
item = []
|
||||
|
@ -284,9 +285,6 @@ class outscript(object):
|
|||
for name in order[0]:
|
||||
sym = symtab[0][name]
|
||||
|
||||
#DEBUG
|
||||
#print name, repr(sym)
|
||||
|
||||
ret += self.dent()
|
||||
if sym[1] == 'State':
|
||||
if name == 'default':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue