MCPcopy Index your code
hub / github.com/TypeScriptToLua/TypeScriptToLua / printWhileStatement

Method printWhileStatement

src/LuaPrinter.ts:488–500  ·  view source on GitHub ↗
(statement: lua.WhileStatement)

Source from the content-addressed store, hash-verified

486 }
487
488 public printWhileStatement(statement: lua.WhileStatement): SourceNode {
489 const chunks: SourceChunk[] = [];
490
491 chunks.push(this.indent("while "), this.printExpression(statement.condition), " do\n");
492
493 this.pushIndent();
494 chunks.push(this.printBlock(statement.body));
495 this.popIndent();
496
497 chunks.push(this.indent("end"));
498
499 return this.concatNodes(...chunks);
500 }
501
502 public printRepeatStatement(statement: lua.RepeatStatement): SourceNode {
503 const chunks: SourceChunk[] = [];

Callers 1

Calls 6

indentMethod · 0.95
printExpressionMethod · 0.95
pushIndentMethod · 0.95
printBlockMethod · 0.95
popIndentMethod · 0.95
concatNodesMethod · 0.95

Tested by

no test coverage detected