Add default constructor to libclang_parser
This commit is contained in:
parent
d8a230bee7
commit
6f128da87f
3 changed files with 9 additions and 0 deletions
|
|
@ -164,7 +164,12 @@ namespace cppast
|
||||||
public:
|
public:
|
||||||
using config = libclang_compile_config;
|
using config = libclang_compile_config;
|
||||||
|
|
||||||
|
/// \effects Creates a parser using the default logger.
|
||||||
|
libclang_parser();
|
||||||
|
|
||||||
|
/// \effects Creates a parser that will log error messages using the specified logger.
|
||||||
explicit libclang_parser(type_safe::object_ref<const diagnostic_logger> logger);
|
explicit libclang_parser(type_safe::object_ref<const diagnostic_logger> logger);
|
||||||
|
|
||||||
~libclang_parser() noexcept override;
|
~libclang_parser() noexcept override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
||||||
|
|
@ -187,6 +187,8 @@ namespace cppast
|
||||||
[&](const std::string&) { return config; });
|
[&](const std::string&) { return config; });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Parses all files included by `file`.
|
||||||
|
/// \effects For each [cppast::cpp_include_directive]() in file it will parse the included file.
|
||||||
template <class FileParser>
|
template <class FileParser>
|
||||||
void resolve_includes(FileParser& parser, const cpp_file& file,
|
void resolve_includes(FileParser& parser, const cpp_file& file,
|
||||||
typename FileParser::config config)
|
typename FileParser::config config)
|
||||||
|
|
|
||||||
|
|
@ -330,6 +330,8 @@ struct libclang_parser::impl
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
libclang_parser::libclang_parser() : libclang_parser(default_logger()) {}
|
||||||
|
|
||||||
libclang_parser::libclang_parser(type_safe::object_ref<const diagnostic_logger> logger)
|
libclang_parser::libclang_parser(type_safe::object_ref<const diagnostic_logger> logger)
|
||||||
: parser(logger), pimpl_(new impl)
|
: parser(logger), pimpl_(new impl)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue