// Copyright (C) 2017-2018 Jonathan Müller // This file is subject to the license terms in the LICENSE file // found in the top-level directory of this distribution. #ifndef CPPAST_PREPROCESSOR_HPP_INCLUDED #define CPPAST_PREPROCESSOR_HPP_INCLUDED #include #include namespace cppast { namespace detail { struct pp_macro { std::unique_ptr macro; unsigned line; }; struct pp_include { std::string file_name, full_path; cpp_include_kind kind; unsigned line; }; struct pp_doc_comment { std::string comment; unsigned line; enum { c, cpp, end_of_line, } kind; bool matches(const cpp_entity& e, unsigned line); }; struct preprocessor_output { std::string source; std::vector includes; std::vector macros; std::vector comments; }; preprocessor_output preprocess(const libclang_compile_config& config, const char* path, const diagnostic_logger& logger); } } // namespace cppast::detail #endif // CPPAST_PREPROCESSOR_HPP_INCLUDED