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:
@@ -262,7 +262,8 @@ class outscript(object):
|
||||
expr = child[0]
|
||||
if expr['nt'] in ('CONST', 'IDENT', 'V++', 'V--', 'VECTOR',
|
||||
'ROTATION', 'LIST', 'FIELD', 'PRINT', 'FNCALL'):
|
||||
return ret + self.OutExpr(expr)
|
||||
if expr['nt'] != 'LIST' or len(expr['ch']) != 1:
|
||||
return ret + self.OutExpr(expr)
|
||||
return ret + '(' + self.OutExpr(expr) + ')'
|
||||
|
||||
if nt == 'LIST':
|
||||
|
||||
Reference in New Issue
Block a user