From 06edf8f15276f7b0a41f00d6d52e5778f4c3d242 Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Wed, 4 Jan 2017 05:08:09 +0100 Subject: [PATCH] Add undocumented -O options 'LSO' and 'Expr'. For unit testing. --- main.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 8b0ffec..4e27650 100755 --- a/main.py +++ b/main.py @@ -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