| 87 | } |
| 88 | |
| 89 | std::unique_ptr<Tokenizer> Tokenizer::createFromFile(const std::filesystem::path& path) |
| 90 | { |
| 91 | if (hasExtension(path, "gz")) |
| 92 | { |
| 93 | std::string str = decompressFile(path); |
| 94 | return std::make_unique<Tokenizer>(std::move(str), path); |
| 95 | } |
| 96 | else |
| 97 | { |
| 98 | std::string str = readFile(path); |
| 99 | return std::make_unique<Tokenizer>(std::move(str), path); |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | std::unique_ptr<Tokenizer> Tokenizer::createFromString(std::string str) |
| 104 | { |
nothing calls this directly
no test coverage detected