Skip to content

Commit bafbf92

Browse files
committed
ParenthesizedExrpession support
1 parent 9a8b1ba commit bafbf92

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

dist/Transpiler.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,8 @@ var LuaTranspiler = /** @class */ (function () {
326326
return this.transpileNewExpression(node);
327327
case ts.SyntaxKind.ComputedPropertyName:
328328
return "[" + this.transpileExpression(node.expression) + "]";
329+
case ts.SyntaxKind.ParenthesizedExpression:
330+
return "(" + this.transpileExpression(node.expression) + ")";
329331
case ts.SyntaxKind.SuperKeyword:
330332
return "self.__base";
331333
case ts.SyntaxKind.TypeAssertionExpression:

src/Transpiler.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,8 @@ export class LuaTranspiler {
358358
return this.transpileNewExpression(<ts.NewExpression>node);
359359
case ts.SyntaxKind.ComputedPropertyName:
360360
return "[" + this.transpileExpression((<ts.ComputedPropertyName>node).expression) + "]";
361+
case ts.SyntaxKind.ParenthesizedExpression:
362+
return "(" + this.transpileExpression((<ts.ParenthesizedExpression>node).expression) + ")";
361363
case ts.SyntaxKind.SuperKeyword:
362364
return "self.__base";
363365
case ts.SyntaxKind.TypeAssertionExpression:

0 commit comments

Comments
 (0)