mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
Fix bug with tab handling.
Commit 5804a9a
introduced a bug where having the foldtabs option disabled (normal) prevented optimizations of functions. Fix it for good (hopefully). While on it, rename the nofoldtabs option to warntabs, making it default, and use it to disable a warning when there are tabs in a string.
This commit is contained in:
parent
95bd3209be
commit
b7e6e6f7b1
4 changed files with 23 additions and 18 deletions
7
main.py
7
main.py
|
@ -281,8 +281,9 @@ Optimizer options (+ means active by default, - means inactive by default):
|
|||
expansion of functions that produce strings with tabs.
|
||||
The resulting source isn't guaranteed to be
|
||||
copy-paste-able to the viewer.
|
||||
nofoldtabs - Suppress warning when a function can't be optimized
|
||||
because it generates a string or list with a tab.
|
||||
warntabs + Suppress warning when a function can't be optimized
|
||||
because it generates a string or list with a tab, or
|
||||
when a string contains a tab.
|
||||
skippreproc + Skip preprocessor directives in the source as if they
|
||||
were comments. Not useful unless the script is itself
|
||||
the output of a preprocessor like GNU cpp, which inserts
|
||||
|
@ -303,7 +304,7 @@ def main():
|
|||
|
||||
# Default options
|
||||
options = set(('extendedglobalexpr','extendedtypecast','extendedassignment',
|
||||
'allowkeyconcat','allowmultistrings','skippreproc','optimize',
|
||||
'allowkeyconcat','allowmultistrings','skippreproc','warntabs','optimize',
|
||||
'optsigns','optfloats','constfold','dcr','errmissingdefault',
|
||||
))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue