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
18 lines • 861 B
JavaScript
;
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const ts = __importStar(require("ts-morph"));
const _1 = require(".");
const utility_1 = require("../utility");
function compileParenthesizedExpression(state, node) {
const expStr = _1.compileExpression(state, utility_1.skipNodesDownwards(node.getExpression()));
return ts.TypeGuards.isExpressionStatement(utility_1.skipNodesUpwards(node.getParent())) ? expStr : `(${expStr})`;
}
exports.compileParenthesizedExpression = compileParenthesizedExpression;
//# sourceMappingURL=parenthesized.js.map