| 498 | } |
| 499 | |
| 500 | void Emitter::FlowMapPrepareSimpleKeyValue(EmitterNodeType::value child) { |
| 501 | const std::size_t lastIndent = m_pState->LastIndent(); |
| 502 | |
| 503 | if (!m_pState->HasBegunNode()) { |
| 504 | if (m_stream.comment()) |
| 505 | m_stream << "\n"; |
| 506 | m_stream << IndentTo(lastIndent); |
| 507 | if (m_pState->HasAlias()) { |
| 508 | m_stream << " "; |
| 509 | } |
| 510 | m_stream << ":"; |
| 511 | } |
| 512 | |
| 513 | switch (child) { |
| 514 | case EmitterNodeType::NoType: |
| 515 | break; |
| 516 | case EmitterNodeType::Property: |
| 517 | case EmitterNodeType::Scalar: |
| 518 | case EmitterNodeType::FlowSeq: |
| 519 | case EmitterNodeType::FlowMap: |
| 520 | SpaceOrIndentTo( |
| 521 | m_pState->HasBegunContent() || m_pState->CurGroupChildCount() > 0, |
| 522 | lastIndent); |
| 523 | break; |
| 524 | case EmitterNodeType::BlockSeq: |
| 525 | case EmitterNodeType::BlockMap: |
| 526 | assert(false); |
| 527 | break; |
| 528 | } |
| 529 | } |
| 530 | |
| 531 | void Emitter::BlockMapPrepareNode(EmitterNodeType::value child) { |
| 532 | if (m_pState->CurGroupChildCount() % 2 == 0) { |
nothing calls this directly
no test coverage detected