mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
Add "addstrings" option (disabled by default) to select whether to automatically concatenate strings during constant folding.
This commit is contained in:
parent
6ea01c4242
commit
8f83e2f1ab
3 changed files with 14 additions and 7 deletions
|
@ -225,7 +225,8 @@ class foldconst(object):
|
|||
op1 = lval['value']
|
||||
op2 = rval['value']
|
||||
if nt == '+':
|
||||
result = lslfuncs.add(op1, op2)
|
||||
if ltype != 'string' or rtype != 'string' or self.addstrings:
|
||||
result = lslfuncs.add(op1, op2)
|
||||
elif nt == '-':
|
||||
result = lslfuncs.sub(op1, op2)
|
||||
elif nt == '*':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue