mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-29 00:56:15 +02:00
4feb7d9f71
Also move `SourcePath` into `libutil`. These changes allow `error.hh` and `error.cc` to access source path and position information, which we can use to produce better error messages (for example, we could consider omitting filenames when two or more consecutive stack frames originate from the same file).
16 lines
313 B
C++
16 lines
313 B
C++
#include "input-accessor.hh"
|
|
#include "source-path.hh"
|
|
|
|
namespace nix {
|
|
|
|
/**
|
|
* An input accessor for an in-memory file system.
|
|
*/
|
|
struct MemoryInputAccessor : InputAccessor
|
|
{
|
|
virtual SourcePath addFile(CanonPath path, std::string && contents) = 0;
|
|
};
|
|
|
|
ref<MemoryInputAccessor> makeMemoryInputAccessor();
|
|
|
|
}
|