Definition at line 44 of file SourceManager.h.
◆ addFile()
void SourceManager::addFile |
( |
std::string_view |
path | ) |
|
|
inline |
Add a file and its contents to the SourceManager.
- Parameters
-
Definition at line 52 of file SourceManager.h.
54 if(path.size() < 5 || path.substr(path.size() - 5) !=
".java") {
57 std::ifstream file{std::string{path}};
61 files_.emplace_back(path, std::istreambuf_iterator<char>{file},
this);
◆ getBuffer()
static std::string const& SourceManager::getBuffer |
( |
SourceFile |
file | ) |
|
|
inlinestatic |
Get the buffer for a file.
- Parameters
-
file | The file to get the buffer for |
- Returns
- A string_view of the buffer
Definition at line 103 of file SourceManager.h.
104 return static_cast<File const*
>(file.id_)->buffer;
◆ print()
static void SourceManager::print |
( |
std::ostream & |
os, |
|
|
SourceFile const & |
file |
|
) |
| |
|
inlinestatic |
Print the name of the file to the output stream.
- Parameters
-
os | The output stream to print to |
file | The SourceFile to print |
Definition at line 92 of file SourceManager.h.
93 if(file.id_ ==
nullptr) {
96 os << static_cast<File const*>(file.id_)->name;
The documentation for this class was generated from the following file: