mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
Add type casting comparison to CompareTrees.
It can now resolve e.g. (string)llGetPermissions() == (string)llGetPermissions() to TRUE.
This commit is contained in:
parent
dc117c2cbf
commit
ea9711642c
1 changed files with 3 additions and 0 deletions
|
@ -163,6 +163,9 @@ class foldconst(object):
|
|||
and all(self.CompareTrees(node1['ch'][i],
|
||||
node2['ch'][i])
|
||||
for i in xrange(len(node1['ch'])))
|
||||
or node1['nt'] == node2['nt'] == 'CAST'
|
||||
and node1['t'] == node2['t']
|
||||
and self.CompareTrees(node1['ch'][0], node2['ch'][0])
|
||||
)
|
||||
|
||||
def FoldStmt(self, parent, index):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue