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

Method HandleBlockSequence

lib/yamlcpp/src/singledocparser.cpp:165–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165void SingleDocParser::HandleBlockSequence(EventHandler& eventHandler) {
166 // eat start token
167 m_scanner.pop();
168 m_pCollectionStack->PushCollectionType(CollectionType::BlockSeq);
169
170 while (true) {
171 if (m_scanner.empty())
172 throw ParserException(m_scanner.mark(), ErrorMsg::END_OF_SEQ);
173
174 Token token = m_scanner.peek();
175 if (token.type != Token::BLOCK_ENTRY && token.type != Token::BLOCK_SEQ_END)
176 throw ParserException(token.mark, ErrorMsg::END_OF_SEQ);
177
178 m_scanner.pop();
179 if (token.type == Token::BLOCK_SEQ_END)
180 break;
181
182 // check for null
183 if (!m_scanner.empty()) {
184 const Token& nextToken = m_scanner.peek();
185 if (nextToken.type == Token::BLOCK_ENTRY ||
186 nextToken.type == Token::BLOCK_SEQ_END) {
187 eventHandler.OnNull(nextToken.mark, NullAnchor);
188 continue;
189 }
190 }
191
192 HandleNode(eventHandler);
193 }
194
195 m_pCollectionStack->PopCollectionType(CollectionType::BlockSeq);
196}
197
198void SingleDocParser::HandleFlowSequence(EventHandler& eventHandler) {
199 // eat start token

Callers

nothing calls this directly

Calls 8

ParserExceptionFunction · 0.85
PushCollectionTypeMethod · 0.80
peekMethod · 0.80
PopCollectionTypeMethod · 0.80
popMethod · 0.45
emptyMethod · 0.45
markMethod · 0.45
OnNullMethod · 0.45

Tested by

no test coverage detected