(ast)
Remove return statements from the root level of an AST.

    PICO-8 never allows a return statement at the root level of cart code. To
    support a library development workflow where the library code contains a
    game loop that tests the library as well as a Lua module return statement,
    return statements are removed silently from the root of a built cart's
    main code. (They are not removed from require()'d carts.)

    This removal occurs in place on the given AST object.

    Args:
        ast: The lua.Lua object.
Remove return statements from the root level of an AST.
Remove return statements from the root level of an AST .
def _remove_global_return(ast):
    """Remove return statements from the root level of an AST.

    PICO-8 never allows a return statement at the root level of cart code. To
    support a library development workflow where the library code contains a
    game loop that tests the library as well as a Lua module return statement,
    return statements are removed silently from the root of a built cart's
    main code. (They are not removed from require()'d carts.)

    This removal occurs in place on the given AST object.

    Args:
        ast: The lua.Lua object.
    """
    # ast.root.stats[:] = [
    #    s for s in ast.root.stats
    #    if not isinstance(s, parser.StatReturn)]
    # ast.reparse(writer_cls=lua.LuaASTEchoWriter)
    pass
def _remove_global_return ( ast ) : # ast.root.stats[:] = [ #    s for s in ast.root.stats #    if not isinstance(s, parser.StatReturn)] # ast.reparse(writer_cls=lua.LuaASTEchoWriter) pass