File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -4,4 +4,28 @@ import { TSHelper as tsHelper } from "../TSHelper";
44import * as ts from "typescript" ;
55
66export class LuaTranspiler51 extends LuaTranspiler {
7+ public transpileLoopBody (
8+ node : ts . WhileStatement
9+ | ts . DoStatement
10+ | ts . ForStatement
11+ | ts . ForOfStatement
12+ | ts . ForInStatement
13+ ) : string {
14+ this . loopStack . push ( this . genVarCounter ) ;
15+ this . genVarCounter ++ ;
16+ let result = this . indent + "do\n" ;
17+ this . pushIndent ( ) ;
18+ result += this . transpileStatement ( node . statement ) ;
19+ this . popIndent ( ) ;
20+ result += this . indent + "end\n" ;
21+ return result ;
22+ }
23+
24+ public transpileContinue ( ) : string {
25+ throw new TranspileError (
26+ "Unsupported continue statement, " +
27+ "continue is not supported in Lua ${this.options.luaTarget}." ,
28+ null
29+ ) ;
30+ }
731}
You can’t perform that action at this time.
0 commit comments