Fix util::ostringstream, fix pretty-printing, stub out new globals

This commit is contained in:
2023-03-05 01:51:25 -05:00
parent db234c2934
commit 86a27ef2d4
13 changed files with 455 additions and 282 deletions

View File

@@ -22,6 +22,14 @@
#include "luastack.hpp"
#include <ostream>
struct PrettyPrintOptions {
bool indent;
int level;
bool expand;
PrettyPrintOptions() : indent(true), level(0), expand(true) {}
void parse(LuaKeywordParser &kp);
};
// Atomic print to a stream.
//
// This prints an atomic value to a stream. If you give it a table,
@@ -32,6 +40,6 @@ void atomic_print(LuaStack &LS, LuaSlot val, bool quote, std::ostream *os);
// Pretty print to a stream.
//
void pprint(LuaStack &LS, LuaSlot val, bool indent, std::ostream *os);
void pprint(LuaStack &LS, LuaSlot val, const PrettyPrintOptions &opts, std::ostream *os);
#endif // PPRINT_HPP