mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
Fix bug where (typecast)[single_expr] was output as (typecast)(list)single_expr, producing a syntax error in the output for lack of extra parentheses.
This commit is contained in:
parent
6b7b366f63
commit
2044f888d4
1 changed files with 2 additions and 1 deletions
|
@ -262,6 +262,7 @@ class outscript(object):
|
|||
expr = child[0]
|
||||
if expr['nt'] in ('CONST', 'IDENT', 'V++', 'V--', 'VECTOR',
|
||||
'ROTATION', 'LIST', 'FIELD', 'PRINT', 'FNCALL'):
|
||||
if expr['nt'] != 'LIST' or len(expr['ch']) != 1:
|
||||
return ret + self.OutExpr(expr)
|
||||
return ret + '(' + self.OutExpr(expr) + ')'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue