This commit is contained in:
Xuan Son Nguyen 2025-12-25 00:19:23 +01:00
parent 4cbafad4f0
commit 8d8030142e
1 changed files with 28 additions and 0 deletions

28
common/jinja/jinja-vm.cpp Normal file
View File

@ -0,0 +1,28 @@
#include <common.h>
#include <sstream>
struct vm_context {
std::ostringstream out;
};
struct op_base {
virtual ~op_base() = default;
virtual void execute(vm_context & ctx) = 0;
};
struct op_print : public op_base {
std::string message;
op_print(const std::string & message) : message(message) {}
void execute(vm_context & ctx) override {
ctx.out << message;
}
};
struct op_load : public op_base {
std::string dst;
std::string src;
std::string value;
op_load(const std::string & dst) : dst(dst) {}
void execute(vm_context & ctx) override {
}
};