Add preprocessor skip option, command line options and help, options for all functions, and enhance parentheses removal.

This commit is contained in:
Sei Lisa 2014-07-28 02:13:08 +02:00
parent ae94e80c34
commit eab0bec84b
4 changed files with 99 additions and 27 deletions

View file

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