2023-05-18 19:03:29 +08:00
|
|
|
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
// Can be used to reconfigure visibility/exports for public APIs
|
|
|
|
#ifndef LUACODEGEN_API
|
|
|
|
#define LUACODEGEN_API extern
|
|
|
|
#endif
|
|
|
|
|
2023-07-28 23:13:53 +08:00
|
|
|
typedef struct lua_State lua_State;
|
2023-05-18 19:03:29 +08:00
|
|
|
|
|
|
|
// returns 1 if Luau code generator is supported, 0 otherwise
|
2023-05-20 03:37:30 +08:00
|
|
|
LUACODEGEN_API int luau_codegen_supported(void);
|
2023-05-18 19:03:29 +08:00
|
|
|
|
|
|
|
// create an instance of Luau code generator. you must check that this feature is supported using luau_codegen_supported().
|
|
|
|
LUACODEGEN_API void luau_codegen_create(lua_State* L);
|
|
|
|
|
|
|
|
// build target function and all inner functions
|
|
|
|
LUACODEGEN_API void luau_codegen_compile(lua_State* L, int idx);
|