mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 12:41:17 +00:00
Began new-api branch, and removed all traces of the old api from this branch
This commit is contained in:
@@ -37,18 +37,8 @@ public:
|
||||
void parse(std::istream& input)
|
||||
{
|
||||
try {
|
||||
#ifdef YAML_CPP_OLD_API
|
||||
YAML::Parser parser(input);
|
||||
YAML::Node doc;
|
||||
while(parser.GetNextDocument(doc)) {
|
||||
YAML::Emitter emitter;
|
||||
emitter << doc;
|
||||
std::cout << emitter.c_str() << "\n";
|
||||
}
|
||||
#else
|
||||
YAML::Node doc = YAML::Load(input);
|
||||
std::cout << doc << "\n";
|
||||
#endif
|
||||
} catch(const YAML::Exception& e) {
|
||||
std::cerr << e.what() << "\n";
|
||||
}
|
||||
|
Reference in New Issue
Block a user