Added more tests for the newline, and disallowed newlines after implicit block keys

This commit is contained in:
Jesse Beder
2010-10-22 03:53:33 +00:00
parent 1e4210401f
commit 6b7cb45ac8
5 changed files with 58 additions and 8 deletions

View File

@@ -47,11 +47,10 @@ int main(int argc, char **argv)
YAML::Parser parser(input);
YAML::Node doc;
NullEventHandler handler;
// while(parser.GetNextDocument(doc)) {
while(parser.HandleNextDocument(handler)) {
// YAML::Emitter emitter;
// emitter << doc;
// std::cout << emitter.c_str() << "\n";
while(parser.GetNextDocument(doc)) {
YAML::Emitter emitter;
emitter << doc;
std::cout << emitter.c_str() << "\n";
}
} catch(const YAML::Exception& e) {
std::cerr << e.what() << "\n";