Fixed minor things that used the old API, compiles/links/runs\!

This commit is contained in:
Jesse Beder
2011-09-10 22:59:27 -05:00
parent f7b2247217
commit 80cf3c98db
4 changed files with 12 additions and 1 deletions

View File

@@ -37,14 +37,17 @@ public:
void parse(std::istream& input)
{
try {
#if YAML_CPP_OLD_API
YAML::Parser parser(input);
YAML::Node doc;
NullEventHandler handler;
while(parser.GetNextDocument(doc)) {
YAML::Emitter emitter;
emitter << doc;
std::cout << emitter.c_str() << "\n";
}
#else
// TODO: Parse with new API
#endif
} catch(const YAML::Exception& e) {
std::cerr << e.what() << "\n";
}