Implement C++ pretty-printer

This commit is contained in:
2021-09-08 01:32:08 -04:00
parent 67b309a0b7
commit bac1a7b876
9 changed files with 322 additions and 454 deletions

View File

@@ -12,14 +12,6 @@
#include "luastack.hpp"
// Starting at the specified root, find tables recursively.
//
// Returns a table containing every table found, in tabcount.
// The value associated with the table is the number of times the
// table was found.
//
void table_findtables(LuaStack &LS0, LuaSlot root, LuaSlot tabcount);
// table_clear
//
// Remove all key/value pairs from the table. Does not remove
@@ -33,6 +25,13 @@ void table_clear(LuaStack &LS0, LuaSlot tab);
//
bool table_equal(LuaStack &LS0, LuaSlot tab1, LuaSlot tab2);
// table_getpairs
//
// Get a table containing the key-value pairs in tab. Optionally sort
// the pairs. Return true if all keys were sortable.
//
bool table_getpairs(LuaStack &LS0, LuaSlot tab, LuaSlot pairs, bool sort);
// table_findremove
//
// Given a vector and a value, remove the specified value from