| 501 | } |
| 502 | |
| 503 | static int run_compile_script(lua_State *L, char **argv, int script) |
| 504 | { |
| 505 | const char *fname = argv[script]; |
| 506 | boost::filesystem::path filepath(fname); |
| 507 | std::string out_path = std::string(fname) + ".out"; |
| 508 | char error[LUA_VM_EXCEPTION_STRNG_MAX_LENGTH] = "\0"; |
| 509 | auto result = thinkyoung::lua::lib::compilefile_to_file(fname, out_path.c_str(), error, true); |
| 510 | if (strlen(error) > 0) |
| 511 | { |
| 512 | perror(error); |
| 513 | } |
| 514 | return LUA_OK; |
| 515 | } |
| 516 | |
| 517 | static int run_disassemble_script(lua_State *L, char **argv, int script) |
| 518 | { |
no test coverage detected