zhifu gao
2023-04-07 0cc7af2c894a31f1b6d95d8af7e4efa414e2a11b
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;
  }
}
}