blob: a526e4867afad78378fae949e72ed519bf39cb1b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#ifndef WILLOWC_INCLUDE_SOURCEMANAGER_HPP
#define WILLOWC_INCLUDE_SOURCEMANAGER_HPP
#include <filesystem>
#include <memory>
#include <string>
#include <vector>
namespace willowc {
using FileID = std::uint32_t;
class SourceManager {
struct File {
std::string path;
std::unique_ptr<char[]> buf;
};
public:
std::optional<FileID> addFile(std::string_view path);
private:
std::vector<File> file_table;
};
} // namespace willowc
#endif // WILLOWC_INCLUDE_SOURCEMANAGER_HPP
|