nixd
Loading...
Searching...
No Matches
EvalProvider.h
Go to the documentation of this file.
1#pragma once
2
4
7
8#include <nixt/HookExpr.h>
9#include <nixt/PtrPool.h>
10
11#include <nix/nixexpr.hh>
12
13namespace nixd {
14
16
18 nixt::ValueMap VMap;
19 nixt::EnvMap EMap;
20 std::unique_ptr<nix::EvalState> State;
21
22 llvm::unique_function<void(int)> Ready;
23
24public:
25 EvalProvider(std::unique_ptr<lspserver::InboundPort> In,
26 std::unique_ptr<lspserver::OutboundPort> Out);
27
29
32};
33
34} // namespace nixd
Pointer pool, for RAII memory management.
EvalProvider(std::unique_ptr< lspserver::InboundPort > In, std::unique_ptr< lspserver::OutboundPort > Out)
void onRegisterBC(const rpc::RegisterBCParams &Params)
void onExprValue(const rpc::ExprValueParams &Params, lspserver::Callback< rpc::ExprValueResponse >)
llvm::unique_function< void(llvm::Expected< T >)> Callback
Definition Function.h:14
std::map< std::uintptr_t, nix::Env * > EnvMap
Definition HookExpr.h:10
std::map< std::uintptr_t, nix::Value > ValueMap
Definition HookExpr.h:9
A simple pointer pool, a vector of unique_ptrs.
Definition PtrPool.h:22