roza/lib/Compiler.hpp

28 lines
564 B
C++
Raw Normal View History

2023-08-30 18:06:26 +00:00
#ifndef roza_COMPILER_HPP
#define roza_COMPILER_HPP
#include "commons.hpp"
#include "Program.hpp"
#include "Node.hpp"
#include "opcodes.hpp"
#include "StatusLog.hpp"
namespace roza
{
class Compiler
{
public:
explicit Compiler(StatusLog& log);
virtual ~Compiler();
std::shared_ptr<Program> compile(std::shared_ptr<Node> root);
void compile_node(std::shared_ptr<Node> root, std::shared_ptr<Program> prog);
void compile_children(std::shared_ptr<Node> root, std::shared_ptr<Program> prog);
private:
StatusLog& m_log;
};
}
#endif