mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +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,
|
LSL2PythonType = {'integer':int, 'float':float, 'string':unicode, 'key':lslfuncs.Key,
|
||||||
'vector':lslfuncs.Vector, 'rotation':lslfuncs.Quaternion, 'list':list}
|
'vector':lslfuncs.Vector, 'rotation':lslfuncs.Quaternion, 'list':list}
|
||||||
|
|
||||||
|
ignored_stmts = frozenset(('V++','V--','--V','++V',';','STATE','JUMP','@'))
|
||||||
|
|
||||||
def FoldAndRemoveEmptyStmts(self, lst):
|
def FoldAndRemoveEmptyStmts(self, lst):
|
||||||
"""Utility function for elimination of useless expressions in FOR"""
|
"""Utility function for elimination of useless expressions in FOR"""
|
||||||
x = 0
|
x = 0
|
||||||
|
@ -337,7 +339,7 @@ class optimizer(object):
|
||||||
pass
|
pass
|
||||||
return
|
return
|
||||||
|
|
||||||
if code0 in ('V++','V--','--V','++V',';'):
|
if code0 in self.ignored_stmts:
|
||||||
return
|
return
|
||||||
|
|
||||||
raise Exception('Internal error: This should not happen, node = ' + code0) # pragma: no cover
|
raise Exception('Internal error: This should not happen, node = ' + code0) # pragma: no cover
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue