mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
Add "lazy lists" assignment support (mylist[index] = value).
Add support for LAMBDA (empty) tree nodes while on it, that allow us to define private stuff at the top without caring about Loc.
This commit is contained in:
parent
7e521780d6
commit
b73805e0ce
4 changed files with 75 additions and 19 deletions
|
@ -1015,9 +1015,10 @@ class foldconst(object):
|
|||
node['SEF'] = True
|
||||
return
|
||||
|
||||
if nt in ('JUMP', '@', 'V++', 'V--', '--V', '++V'):
|
||||
# These all have side effects, as in, can't be eliminated as
|
||||
# statements.
|
||||
if nt in ('JUMP', '@', 'V++', 'V--', '--V', '++V', 'LAMBDA'):
|
||||
# Except LAMBDA, these all have side effects, as in, can't be
|
||||
# eliminated as statements.
|
||||
# LAMBDA can't be eliminated without scrolling Loc's.
|
||||
return
|
||||
|
||||
assert False, 'Internal error: This should not happen, node type = ' \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue