A few small fixes to the pretty-printer

This commit is contained in:
2026-02-19 00:22:42 -05:00
parent 7039c43065
commit 68b88a19f4

View File

@@ -223,19 +223,19 @@ public:
if (needcomma) (*output_) << ",";
needcomma = true;
tabify(level + 1);
if (LS.isstring(key) && sv::is_lua_id(LS.ckstring(key))) {
(*output_) << LS.ckstring(key);
} else if (LS.istoken(key)) {
atomic_print(LUA_TLIGHTUSERDATA, key, false);
} else {
(*output_) << "[";
pprint_r(level + 1, false, key);
(*output_) << "]";
}
if (indent_) {
(*output_) << " = ";
} else {
(*output_) << "=";
if (!LS.rawequal(key, (i/2))) {
if (LS.isstring(key) && sv::is_lua_id(LS.ckstring(key))) {
(*output_) << LS.ckstring(key);
} else {
(*output_) << "[";
pprint_r(level + 1, false, key);
(*output_) << "]";
}
if (indent_) {
(*output_) << " = ";
} else {
(*output_) << "=";
}
}
pprint_r(level + 1, false, val);
}