mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
Use frozenset more consistently
This commit is contained in:
parent
d9938f1a37
commit
4fd4bf71aa
6 changed files with 23 additions and 23 deletions
|
@ -34,9 +34,9 @@ class optimizer(foldconst, renamer, deadcode, lastpass):
|
|||
}
|
||||
|
||||
# explicitly exclude assignments
|
||||
binary_ops = frozenset(('+','-','*','/','%','<<','>>','<','<=','>','>=',
|
||||
'==','!=','|','^','&','||','&&'))
|
||||
assign_ops = frozenset(('=','+=','-=','*=','/=','%=','&=','|=','^=','<<=','>>='))
|
||||
binary_ops = frozenset({'+','-','*','/','%','<<','>>','<','<=','>','>=',
|
||||
'==','!=','|','^','&','||','&&'})
|
||||
assign_ops = frozenset({'=','+=','-=','*=','/=','%=','&=','|=','^=','<<=','>>='})
|
||||
|
||||
def Cast(self, value, newtype):
|
||||
"""Return a CAST node if the types are not equal, otherwise the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue