#ifndef NIX_IRC_IR_GEN_H #define NIX_IRC_IR_GEN_H #include "types.h" #include #include #include #include namespace nix_irc { class IRGenerator { public: IRGenerator(); ~IRGenerator(); void set_string_table(const std::unordered_map& table); uint32_t add_string(const std::string& str); std::shared_ptr generate(const std::shared_ptr& ast); private: struct Impl; std::unique_ptr pImpl; }; class NameResolver { public: NameResolver(); ~NameResolver(); void enter_scope(); void exit_scope(); void bind(const std::string& name); uint32_t resolve(const std::string& name); bool is_bound(const std::string& name) const; private: struct Impl; std::unique_ptr pImpl; }; } #endif