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

Method printRepeatStatement

src/LuaPrinter.ts:502–514  ·  view source on GitHub ↗
(statement: lua.RepeatStatement)

Source from the content-addressed store, hash-verified

500 }
501
502 public printRepeatStatement(statement: lua.RepeatStatement): SourceNode {
503 const chunks: SourceChunk[] = [];
504
505 chunks.push(this.indent("repeat\n"));
506
507 this.pushIndent();
508 chunks.push(this.printBlock(statement.body));
509 this.popIndent();
510
511 chunks.push(this.indent("until "), this.printExpression(statement.condition));
512
513 return this.concatNodes(...chunks);
514 }
515
516 public printForStatement(statement: lua.ForStatement): SourceNode {
517 const ctrlVar = this.printExpression(statement.controlVariable);

Callers 1

Calls 6

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

Tested by

no test coverage detected