From 8fce7a2eae4fc254517f49a9d37f566b85c4e08b Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Fri, 29 Dec 2017 19:19:17 +0330 Subject: load.py recognized function entries correctly now. minor fixes and updates. --- bruiser/bruiser.cpp | 41 ++++++++++++++--------------------------- 1 file changed, 14 insertions(+), 27 deletions(-) (limited to 'bruiser/bruiser.cpp') diff --git a/bruiser/bruiser.cpp b/bruiser/bruiser.cpp index 46f8323..dff1bb1 100644 --- a/bruiser/bruiser.cpp +++ b/bruiser/bruiser.cpp @@ -111,8 +111,7 @@ cl::opt NonCLILuaScript("lua", cl::desc("specifies a lua script for class LuaEngine { public: - LuaEngine() - { + LuaEngine() { LS = luaL_newstate(); } @@ -131,62 +130,49 @@ class LuaEngine #undef OPEN_LUA_LIBS - void LoadAuxLibs(void) - { + void LoadAuxLibs(void) { luaL_requiref(LS, "table", luaopen_table, 1); luaL_requiref(LS, "io", luaopen_io, 1); luaL_requiref(LS, "string", luaopen_string, 1); } - void LoadEverylib(void) - { + void LoadEverylib(void) { luaL_openlibs(LS); } - void RunString(char* __lua_string) - { + void RunString(char* __lua_string) {} - } - - void RunChunk(char* __lua_chunk) - { + void RunChunk(char* __lua_chunk) { dostring(LS, __lua_chunk, "test"); } - int RunScript(char* __lua_script) - { + int RunScript(char* __lua_script) { return luaL_dofile(LS, __lua_script); } - void Test(void) - { + void Test(void) { luaL_dofile(LS, "./lua-scripts/test.lua"); luaL_dofile(LS, "./lua-scripts/test1.lua"); luaL_dofile(LS, "./lua-scripts/test2.lua"); } - void Test2(void) - { + void Test2(void) { luaL_dofile(LS, "./lua-scripts/test1.lua"); } - void Test3(void) - { + void Test3(void) { luaL_dofile(LS, "./lua-scripts/test2.lua"); } - void Test4(void) - { + void Test4(void) { luaL_dofile(LS, "./lua-scripts/test3.lua"); } - lua_State* GetLuaState(void) - { + lua_State* GetLuaState(void) { return this->LS; } - void Cleanup(void) - { + void Cleanup(void) { lua_close(LS); } @@ -296,6 +282,7 @@ class PyExec { } } hexobj.push_back(tempvec); + tempvec.clear(); } } } @@ -1758,7 +1745,7 @@ int main(int argc, const char **argv) CommonOptionsParser op(argc, argv, BruiserCategory); ClangTool Tool(op.getCompilations(), op.getSourcePathList()); std::vector> ASTs; - auto buildASTRes = Tool.buildASTs(ASTs); + //auto buildASTRes = Tool.buildASTs(ASTs); CompilationDatabase &CDB = op.getCompilations(); std::vector CCV = CDB.getAllCompileCommands(); -- cgit v1.2.3