yaml-cpp/util/sandbox.cpp

37 lines
1.0 KiB
C++
Raw Normal View History

2012-05-20 10:46:08 +04:00
#include <iostream>
#include "yaml-cpp/emitterstyle.h"
2014-03-23 07:46:04 +04:00
#include "yaml-cpp/eventhandler.h"
#include "yaml-cpp/yaml.h" // IWYU pragma: keep
2014-03-22 21:49:16 +04:00
class NullEventHandler : public YAML::EventHandler {
public:
typedef YAML::Mark Mark;
typedef YAML::anchor_t anchor_t;
NullEventHandler() = default;
2014-03-22 21:49:16 +04:00
virtual void OnDocumentStart(const Mark&) {}
virtual void OnDocumentEnd() {}
virtual void OnNull(const Mark&, anchor_t) {}
virtual void OnAlias(const Mark&, anchor_t) {}
virtual void OnScalar(const Mark&, const std::string&, anchor_t,
const std::string&) {}
virtual void OnSequenceStart(const Mark&, const std::string&, anchor_t,
YAML::EmitterStyle::value style) {}
2014-03-22 21:49:16 +04:00
virtual void OnSequenceEnd() {}
virtual void OnMapStart(const Mark&, const std::string&, anchor_t,
YAML::EmitterStyle::value style) {}
2014-03-22 21:49:16 +04:00
virtual void OnMapEnd() {}
};
2014-03-22 21:49:16 +04:00
int main() {
2015-01-25 02:58:58 +03:00
YAML::Node root;
for (;;) {
2015-01-25 02:58:58 +03:00
YAML::Node node;
root = node;
}
2014-03-22 21:49:16 +04:00
return 0;
2012-05-20 10:46:08 +04:00
}