28 lines
564 B
C++
28 lines
564 B
C++
|
#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
|