UNPKG

roblox-ts

Version:

<div align="center"><img width=25% src="https://i.imgur.com/yCjHmng.png"></div> <h1 align="center"><a href="https://roblox-ts.github.io/">roblox-ts</a></h1> <div align="center">A TypeScript-to-Lua Compiler for Roblox</div> <br> <div align="center"> <a hr

23 lines 878 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const _1 = require("."); const utility_1 = require("../utility"); function compileDoStatement(state, node) { state.pushIdStack(); let result = state.indent + "repeat\n"; state.pushIndent(); result += state.indent + "do\n"; state.pushIndent(); result += _1.compileLoopBody(state, node.getStatement()); state.popIndent(); result += state.indent + "end;\n"; state.enterPrecedingStatementContext(); const condition = _1.compileExpression(state, utility_1.skipNodesDownwards(node.getExpression())); result += state.exitPrecedingStatementContextAndJoin(); state.popIndent(); result += state.indent + `until not (${condition});\n`; state.popIdStack(); return result; } exports.compileDoStatement = compileDoStatement; //# sourceMappingURL=do.js.map