Skip to content

Commit 989b365

Browse files
tomblindPerryvw
authored andcommitted
Moved endline for variable assignments to end of each declaration. fixes #217 (#218)
1 parent 6464aaf commit 989b365

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Transpiler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ export abstract class LuaTranspiler {
266266
case ts.SyntaxKind.FunctionDeclaration:
267267
return this.transpileFunctionDeclaration(node as ts.FunctionDeclaration);
268268
case ts.SyntaxKind.VariableStatement:
269-
return this.indent + this.transpileVariableStatement(node as ts.VariableStatement) + ";\n";
269+
return this.indent + this.transpileVariableStatement(node as ts.VariableStatement);
270270
case ts.SyntaxKind.ExpressionStatement:
271271
return this.indent + this.transpileExpression((node as ts.ExpressionStatement).expression) + ";\n";
272272
case ts.SyntaxKind.ReturnStatement:
@@ -1443,7 +1443,7 @@ export abstract class LuaTranspiler {
14431443
let result = "";
14441444

14451445
node.declarationList.declarations.forEach(declaration => {
1446-
result += this.transpileVariableDeclaration(declaration as ts.VariableDeclaration);
1446+
result += this.transpileVariableDeclaration(declaration as ts.VariableDeclaration) + ";\n";
14471447
if (ts.isIdentifier(declaration.name)) {
14481448
this.pushExport(this.transpileIdentifier(declaration.name as ts.Identifier), node);
14491449
}

0 commit comments

Comments
 (0)