| 357 | } |
| 358 | |
| 359 | void Emitter::BlockSeqPrepareNode(EmitterNodeType::value child) { |
| 360 | const std::size_t curIndent = m_pState->CurIndent(); |
| 361 | const std::size_t nextIndent = curIndent + m_pState->CurGroupIndent(); |
| 362 | |
| 363 | if (child == EmitterNodeType::NoType) |
| 364 | return; |
| 365 | |
| 366 | if (!m_pState->HasBegunContent()) { |
| 367 | if (m_pState->CurGroupChildCount() > 0 || m_stream.comment()) { |
| 368 | m_stream << "\n"; |
| 369 | } |
| 370 | m_stream << IndentTo(curIndent); |
| 371 | m_stream << "-"; |
| 372 | } |
| 373 | |
| 374 | switch (child) { |
| 375 | case EmitterNodeType::NoType: |
| 376 | break; |
| 377 | case EmitterNodeType::Property: |
| 378 | case EmitterNodeType::Scalar: |
| 379 | case EmitterNodeType::FlowSeq: |
| 380 | case EmitterNodeType::FlowMap: |
| 381 | SpaceOrIndentTo(m_pState->HasBegunContent(), nextIndent); |
| 382 | break; |
| 383 | case EmitterNodeType::BlockSeq: |
| 384 | m_stream << "\n"; |
| 385 | break; |
| 386 | case EmitterNodeType::BlockMap: |
| 387 | if (m_pState->HasBegunContent() || m_stream.comment()) |
| 388 | m_stream << "\n"; |
| 389 | break; |
| 390 | } |
| 391 | } |
| 392 | |
| 393 | void Emitter::FlowMapPrepareNode(EmitterNodeType::value child) { |
| 394 | if (m_pState->CurGroupChildCount() % 2 == 0) { |
nothing calls this directly
no test coverage detected