Add serialization example
This commit is contained in:
parent
b69e7bfacd
commit
9329fc75ec
6 changed files with 174 additions and 26 deletions
|
|
@ -13,7 +13,7 @@
|
|||
// parses all files in that directory
|
||||
// and invokes the callback for each of them
|
||||
template <typename Callback>
|
||||
int example_main(int argc, char* argv[], const cppast::cpp_entity_index& index, Callback cb)
|
||||
int example_main(int argc, char* argv[], const cppast::cpp_entity_index& index, Callback cb) try
|
||||
{
|
||||
if (argc != 2)
|
||||
{
|
||||
|
|
@ -47,5 +47,10 @@ int example_main(int argc, char* argv[], const cppast::cpp_entity_index& index,
|
|||
|
||||
return 0;
|
||||
}
|
||||
catch (std::exception& ex)
|
||||
{
|
||||
std::cerr << ex.what() << '\n';
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif // CPPAST_EXAMPLE_PARSER_HPP_INCLUDED
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue