| 64 | |
| 65 | template<size_t size> |
| 66 | void preprocess(const char (&code)[size], std::vector<std::string> &files, const std::string& file0, TokenList& tokenlist, const simplecpp::DUI& dui) |
| 67 | { |
| 68 | if (!files.empty()) |
| 69 | throw std::runtime_error("file list not empty"); |
| 70 | |
| 71 | if (tokenlist.front()) |
| 72 | throw std::runtime_error("token list not empty"); |
| 73 | |
| 74 | simplecpp::OutputList outputList; |
| 75 | const simplecpp::TokenList tokens1(code, files, file0, &outputList); |
| 76 | |
| 77 | // Preprocess.. |
| 78 | simplecpp::TokenList tokens2(files); |
| 79 | simplecpp::FileDataCache cache; |
| 80 | simplecpp::preprocess(tokens2, tokens1, files, cache, dui, &outputList); |
| 81 | Preprocessor preprocessor(tokens2, settingsDefault, *this, Standards::Language::C); |
| 82 | (void)preprocessor.reportOutput(outputList, true); |
| 83 | |
| 84 | // Tokenizer.. |
| 85 | tokenlist.createTokens(std::move(tokens2)); |
| 86 | } |
| 87 | |
| 88 | template<size_t size> |
| 89 | std::vector<RemarkComment> getRemarkComments(const char (&code)[size], ErrorLogger& errorLogger) const |
no test coverage detected