mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
Fix bug where assignments were treated as statements.
This caused e.g. b = a = a to raise an exception, when a = a was folded into a ';' which isn't an expression.
This commit is contained in:
parent
a0d4c77081
commit
bdd42199eb
1 changed files with 1 additions and 2 deletions
|
@ -1060,8 +1060,7 @@ class foldconst(object):
|
|||
and child[1]['ch'][0]['name'] == child[0]['ch'][0]['name'] \
|
||||
and child[1]['ch'][0]['scope'] == child[0]['ch'][0]['scope'] \
|
||||
and child[1]['fld'] == child[0]['fld']:
|
||||
node['SEF'] = True
|
||||
self.FoldStmt(parent, index)
|
||||
parent[index] = child[1]
|
||||
return
|
||||
|
||||
if nt == 'IDENT' or nt == 'FLD':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue