shixian.shi
2024-02-05 94f7bd079c78d6b7f9ab1961e991caa2a929b858
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "graphbuilderadapter.h"
 
#include "yaml-cpp/parser.h"  // IWYU pragma: keep
 
namespace YAML {
class GraphBuilderInterface;
 
void* BuildGraphOfNextDocument(Parser& parser,
                               GraphBuilderInterface& graphBuilder) {
  GraphBuilderAdapter eventHandler(graphBuilder);
  if (parser.HandleNextDocument(eventHandler)) {
    return eventHandler.RootNode();
  } else {
    return NULL;
  }
}
}