Initial commit

This commit is contained in:
2026-08-23 11:11:36 +03:00
commit 0548f8de26
97 changed files with 20841 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
#include <bridge.h>
#include "Luau/AstJsonEncoder.h"
#define ZIG_LUAU_ANALYSIS(name) ZIG_FN(Luau_Analysis_##name)
ZIG_EXPORT const char* ZIG_LUAU_ANALYSIS(AstJsonEncoder_toJson)(Luau::AstNode* node, size_t* len)
{
std::string res = Luau::toJson(node);
char* copy = static_cast<char*>(malloc(res.size()));
if (!copy)
return nullptr;
memcpy(copy, res.data(), res.size());
*len = res.size();
return copy;
}
ZIG_EXPORT void ZIG_LUAU_ANALYSIS(AstJsonEncoder_free)(const char* json)
{
free((void*)json);
}