@@ -499,23 +499,23 @@ function Unparser:unparseExpression(expression, tabbing)
499499 return lhs .. self :optionalWhitespace () .. op .. self :optionalWhitespace () .. rhs ;
500500 end
501501
502- k = AstKind .StrCatExpression ;
503- if ( expression .kind == k ) then
504- local lhs = self :unparseExpression (expression .lhs , tabbing );
505- if ( Ast .astKindExpressionToNumber (expression .lhs .kind ) >= Ast .astKindExpressionToNumber (k ) ) then
506- lhs = " (" .. lhs .. " )" ;
502+ k = AstKind .StrCatExpression
503+ if expression .kind == k then
504+ local lhs = self :unparseExpression (expression .lhs , tabbing )
505+ if Ast .astKindExpressionToNumber (expression .lhs .kind ) >= Ast .astKindExpressionToNumber (k ) then
506+ lhs = " (" .. lhs .. " )"
507507 end
508508
509- local rhs = self :unparseExpression (expression .rhs , tabbing );
510- if ( Ast .astKindExpressionToNumber (expression .rhs .kind ) >= Ast .astKindExpressionToNumber (k ) ) then
511- rhs = " (" .. rhs .. " )" ;
509+ local rhs = self :unparseExpression (expression .rhs , tabbing )
510+ if Ast .astKindExpressionToNumber (expression .rhs .kind ) >= Ast .astKindExpressionToNumber (k ) then
511+ rhs = " (" .. rhs .. " )"
512512 end
513513
514- if ( self .numberCharsLookup [string.sub (lhs , # lhs , # lhs )]) then
515- lhs = lhs .. " " ;
514+ if self .numberCharsLookup [string.sub (lhs , # lhs , # lhs )] then
515+ lhs = lhs .. " "
516516 end
517517
518- return lhs .. self :optionalWhitespace () .. " .. " .. self :optionalWhitespace () .. rhs ;
518+ return lhs .. self :optionalWhitespace () .. ( tostring ( rhs ): sub ( 1 , 1 ) == " . " and " .. " or " .. " ) .. self :optionalWhitespace () .. rhs
519519 end
520520
521521 local arithmeticOps = {
0 commit comments