mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
Enable foldtabs warning
This commit is contained in:
parent
538d9ab66e
commit
a6b3a0946f
2 changed files with 6 additions and 1 deletions
|
@ -196,6 +196,9 @@ class optimizer(object):
|
|||
else:
|
||||
# Call it
|
||||
val = self.functions[code[2]][2](*tuple(x[2] for x in code[3]))
|
||||
if not self.foldtabs and isinstance(val, unicode) and '\t' in val:
|
||||
warning('WARNING: Tab in function result and foldtabs option not used.')
|
||||
return
|
||||
code[:] = [CONSTANT, code[1], val]
|
||||
return
|
||||
|
||||
|
@ -360,6 +363,8 @@ class optimizer(object):
|
|||
if 'optimize' not in options:
|
||||
return
|
||||
|
||||
self.foldtabs = 'foldtabs' in options
|
||||
|
||||
# TODO: Add option to handle local jumps properly.
|
||||
|
||||
self.functions = functions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue