MCPcopy Create free account
hub / github.com/apache/trafficserver / ParseDirectives

Method ParseDirectives

lib/yamlcpp/src/parser.cpp:41–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41void Parser::ParseDirectives() {
42 bool readDirective = false;
43
44 while (!m_pScanner->empty()) {
45 Token& token = m_pScanner->peek();
46 if (token.type != Token::DIRECTIVE) {
47 break;
48 }
49
50 // we keep the directives from the last document if none are specified;
51 // but if any directives are specific, then we reset them
52 if (!readDirective) {
53 m_pDirectives.reset(new Directives);
54 }
55
56 readDirective = true;
57 HandleDirective(token);
58 m_pScanner->pop();
59 }
60}
61
62void Parser::HandleDirective(const Token& token) {
63 if (token.value == "YAML") {

Callers

nothing calls this directly

Calls 4

peekMethod · 0.80
emptyMethod · 0.45
resetMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected