Skip to content

Commit f9787c4

Browse files
DoctorGesterPerryvw
authored andcommitted
Added transformers for not emitted statement and partial expressions (#348)
1 parent acd394b commit f9787c4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/LuaTransformer.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ export class LuaTransformer {
139139
return this.transformContinueStatement(node as ts.ContinueStatement);
140140
case ts.SyntaxKind.EmptyStatement:
141141
return this.transformEmptyStatement(node as ts.EmptyStatement);
142+
case ts.SyntaxKind.NotEmittedStatement:
143+
return undefined;
142144
default:
143145
throw TSTLErrors.UnsupportedKind("Statement", node.kind, node);
144146
}
@@ -1553,10 +1555,14 @@ export class LuaTransformer {
15531555
case ts.SyntaxKind.EmptyStatement:
15541556
// TODO move to extra function (consistency)
15551557
return undefined;
1558+
case ts.SyntaxKind.NotEmittedStatement:
1559+
return undefined;
15561560
case ts.SyntaxKind.ClassExpression:
15571561
const className = tstl.createIdentifier("____");
15581562
const classDeclaration = this.transformClassDeclaration(expression as ts.ClassExpression, className);
15591563
return this.createImmediatelyInvokedFunctionExpression(classDeclaration, className, expression);
1564+
case ts.SyntaxKind.PartiallyEmittedExpression:
1565+
return this.transformExpression((expression as ts.PartiallyEmittedExpression).expression);
15601566
default:
15611567
throw TSTLErrors.UnsupportedKind("expression", expression.kind, expression);
15621568
}

0 commit comments

Comments
 (0)