(statement: lua.ForInStatement)
| 537 | } |
| 538 | |
| 539 | public printForInStatement(statement: lua.ForInStatement): SourceNode { |
| 540 | const names = this.joinChunksWithComma(statement.names.map(i => this.printIdentifier(i))); |
| 541 | const expressions = this.joinChunksWithComma(statement.expressions.map(e => this.printExpression(e))); |
| 542 | |
| 543 | const chunks: SourceChunk[] = []; |
| 544 | |
| 545 | chunks.push(this.indent("for "), ...names, " in ", ...expressions, " do\n"); |
| 546 | |
| 547 | this.pushIndent(); |
| 548 | chunks.push(this.printBlock(statement.body)); |
| 549 | this.popIndent(); |
| 550 | chunks.push(this.indent("end")); |
| 551 | |
| 552 | return this.createSourceNode(statement, chunks); |
| 553 | } |
| 554 | |
| 555 | public printGotoStatement(statement: lua.GotoStatement): SourceNode { |
| 556 | return this.createSourceNode(statement, [this.indent("goto "), statement.label]); |
no test coverage detected