How to use the lua-types.callStatement 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
export function ExpressionStatement(node) {
  if (bt.isCallExpression(node.expression)) return t.callStatement(this.transform(node.expression));
  // In most cases these are not identical, but it should be handled inside expressions
  return this.transform(node.expression);
}
github ark120202 / babel-lua / packages / babel-plugin-lua-generator / src / transformers / statements.js View on Github external
export function ThrowStatement(node) {
  return t.callStatement(t.callExpression(t.identifier('error'), [this.transform(node.argument)]));
}