Add undocumented -O options 'LSO' and 'Expr'.

For unit testing.
This commit is contained in:
Sei Lisa 2017-01-04 05:08:09 +01:00
parent 35687f1b0f
commit 06edf8f152

10
main.py
View file

@ -306,7 +306,7 @@ validoptions = frozenset(('extendedglobalexpr','breakcont','extendedtypecast',
'lazylists','enableswitch','errmissingdefault','funcoverride','optimize',
'optsigns','optfloats','constfold','dcr','shrinknames','addstrings',
'foldtabs','warntabs','processpre','explicitcast',
'help'
'help','lso','expr'
# 'clear' is handled as a special case
))
@ -461,6 +461,14 @@ def main(argv):
shortname = arg
del opts
if 'lso' in options:
lslopt.lslcommon.LSO = True
options.remove('lso')
if 'expr' in options:
lslopt.lslcommon.IsCalc = True
options.remove('expr')
if 'help' in options:
Usage(argv[0], 'optimizer-options')
return 0