Skip to content

Commit 9dde669

Browse files
committed
弃用rapidjson,改为nlohmann/json
1 parent 8aeb648 commit 9dde669

File tree

271 files changed

+22185
-48050
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

271 files changed

+22185
-48050
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
build
33
.vs
44
out
5+
build_script

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ elseif(${EMMY_LUA_VERSION} STREQUAL "jit")
2626
#add_definitions(-DEMMY_LUA_JIT_SUPPORT_LUA_SETFUNCS)
2727
endif()
2828

29-
add_definitions(-DEMMY_CORE_VERSION="1.3.0")
29+
add_definitions(-DEMMY_CORE_VERSION="1.4.0")
3030

3131
if(EMMY_USE_LUA_SOURCE)
3232
add_definitions(-DEMMY_USE_LUA_SOURCE)

emmy_debugger/CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ add_dependencies(
1111

1212
target_include_directories(emmy_debugger PUBLIC
1313
${emmy_SOURCE_DIR}/include
14-
${emmy_SOURCE_DIR}/third-party/rapidjson-1.1.0/include
14+
${emmy_SOURCE_DIR}/third-party/nlohmann/include
1515
${emmy_SOURCE_DIR}/third-party/libuv-1.29.0/include
1616
PRIVATE src
1717
)
@@ -55,7 +55,6 @@ target_sources(emmy_debugger PUBLIC
5555
${emmy_debugger_SOURCE_DIR}/src/lua_version.cpp
5656
)
5757

58-
target_compile_definitions(emmy_debugger PUBLIC -DRAPIDJSON_HAS_STDSTRING)
5958

6059
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
6160
target_compile_options(emmy_debugger PUBLIC /utf-8)
@@ -121,8 +120,6 @@ else()
121120
${emmy_debugger_SOURCE_DIR}/src/api/lua_state/lua_state_jit.cpp
122121
)
123122

124-
125-
126123
endif(EMMY_USE_LUA_SOURCE)
127124

128125

emmy_debugger/src/emmy_debugger.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616
#include "emmy_debugger/emmy_debugger.h"
1717
#include <algorithm>
18+
#include <cassert>
1819
#include <sstream>
1920
#include "emmy_debugger/emmy_facade.h"
2021
#include "emmy_debugger/hook_state.h"
@@ -928,6 +929,9 @@ bool Debugger::DoEval(std::shared_ptr<EvalContext> evalContext)
928929
}
929930
// LOAD AS "return expr"
930931
std::string statement = "return ";
932+
// 如果是 aaa:bbbb 则纠正为aaa.bbbb
933+
934+
931935
statement.append(evalContext->expr);
932936
int r = luaL_loadstring(L, statement.c_str());
933937
if (r == LUA_ERRSYNTAX)

0 commit comments

Comments
 (0)