How to use the lua-types.booleanLiteral function in lua-types

To help you get started, we’ve selected a few lua-types examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ark120202 / babel-lua / packages / babel-plugin-lua-generator / src / transformers / statements.js View on Github external
if (numericResult) {
    return t.forNumericStatement(
      this.transform(numericResult.variable),
      this.transform(numericResult.start),
      this.transform(numericResult.end),
      this.transform(numericResult.step),
      this.transformBlock(node.body),
    );
  }

  // Use `while` for more complicated cases
  const body = this.transformBlock(node.body);
  if (node.update) body.push(this.transform(bt.expressionStatement(node.update)));
  return [
    ...(node.init ? this.transform(node.init) : []),
    t.whileStatement(node.test ? this.transform(node.test) : t.booleanLiteral(true), body),
  ];
}
github ark120202 / babel-lua / packages / babel-plugin-lua-generator / src / transformers / types.js View on Github external
export function BooleanLiteral(node) {
  return t.booleanLiteral(node.value);
}