Add basic scripting support.

- Fix certain bugs in ruby parser
- And a lot more cleanup/minor fixes.
This commit is contained in:
2026-09-08 18:07:39 +01:00
parent a5794d9ab3
commit bb3ce7549a
20 changed files with 410 additions and 84 deletions
+3 -2
View File
@@ -14,8 +14,8 @@ struct HistoryItem {
struct GenericBuffer : ShardBuffer {
uint64_t base_version{0};
std::chrono::system_clock::time_point timestamp;
std::string action;
std::chrono::system_clock::time_point timestamp{std::chrono::system_clock::now()};
std::string action{"Created buffer."};
std::filesystem::path save_path{};
std::vector<HistoryItem> undo_stack;
std::vector<HistoryItem> redo_stack;
@@ -24,6 +24,7 @@ struct GenericBuffer : ShardBuffer {
: ShardBuffer(name, nullptr, nullptr, Kind::Generic) {}
~GenericBuffer();
void language(BEd &ctx, std::string name);
void list_history(BEd &ctx);
ReadonlyBuffer *get_history(uint64_t version);
void snapshot(std::string action);