Skip to content

Commit e101f09

Browse files
committed
重新将data导入lua
1 parent e91956c commit e101f09

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

CodeFormatLib/src/CodeFormatLib.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,13 @@ void PushDiagnosticToLua(lua_State *L, std::vector<LuaDiagnosticInfo> &diagnosti
346346
lua_pushstring(L, "type");
347347
lua_pushstring(L, GetDiagnosisString(diagnosticInfo.Type).c_str());
348348
lua_rawset(L, -3);
349+
350+
// data
351+
if (!diagnosticInfo.Data.empty()) {
352+
lua_pushstring(L, "data");
353+
lua_pushlstring(L, diagnosticInfo.Data.c_str(), diagnosticInfo.Data.size());
354+
lua_rawset(L, -3);
355+
}
349356
}
350357

351358
// range

0 commit comments

Comments
 (0)