mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
Fix a few more statements missing.
This commit is contained in:
parent
dde3c08f61
commit
3dd73f218f
1 changed files with 3 additions and 1 deletions
|
@ -13,6 +13,8 @@ class optimizer(object):
|
|||
LSL2PythonType = {'integer':int, 'float':float, 'string':unicode, 'key':lslfuncs.Key,
|
||||
'vector':lslfuncs.Vector, 'rotation':lslfuncs.Quaternion, 'list':list}
|
||||
|
||||
ignored_stmts = frozenset(('V++','V--','--V','++V',';','STATE','JUMP','@'))
|
||||
|
||||
def FoldAndRemoveEmptyStmts(self, lst):
|
||||
"""Utility function for elimination of useless expressions in FOR"""
|
||||
x = 0
|
||||
|
@ -337,7 +339,7 @@ class optimizer(object):
|
|||
pass
|
||||
return
|
||||
|
||||
if code0 in ('V++','V--','--V','++V',';'):
|
||||
if code0 in self.ignored_stmts:
|
||||
return
|
||||
|
||||
raise Exception('Internal error: This should not happen, node = ' + code0) # pragma: no cover
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue