Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Ib9abc9d2dcd036d3680c5aa3dc919bfa6a6a6964
34 lines
557 B
C++
34 lines
557 B
C++
#ifndef NIX_IRC_EVALUATOR_H
|
|
#define NIX_IRC_EVALUATOR_H
|
|
|
|
#include "types.h"
|
|
#include <memory>
|
|
#include <vector>
|
|
|
|
namespace nix {
|
|
class EvalState;
|
|
class Value;
|
|
class PosIdx;
|
|
} // namespace nix
|
|
|
|
namespace nix_irc {
|
|
|
|
class IRValue;
|
|
class IREnvironment;
|
|
|
|
class Evaluator {
|
|
public:
|
|
explicit Evaluator(nix::EvalState& state);
|
|
~Evaluator();
|
|
|
|
void eval_to_nix(const std::shared_ptr<Node>& ir_node, nix::Value& result,
|
|
IREnvironment* env = nullptr);
|
|
|
|
private:
|
|
struct Impl;
|
|
std::unique_ptr<Impl> pImpl;
|
|
};
|
|
|
|
} // namespace nix_irc
|
|
|
|
#endif
|