| 643 | } |
| 644 | |
| 645 | void Emitter::BlockMapPrepareSimpleKeyValue(EmitterNodeType::value child) { |
| 646 | const std::size_t curIndent = m_pState->CurIndent(); |
| 647 | const std::size_t nextIndent = curIndent + m_pState->CurGroupIndent(); |
| 648 | |
| 649 | if (!m_pState->HasBegunNode()) { |
| 650 | if (m_pState->HasAlias()) { |
| 651 | m_stream << " "; |
| 652 | } |
| 653 | m_stream << ":"; |
| 654 | } |
| 655 | |
| 656 | switch (child) { |
| 657 | case EmitterNodeType::NoType: |
| 658 | break; |
| 659 | case EmitterNodeType::Property: |
| 660 | case EmitterNodeType::Scalar: |
| 661 | case EmitterNodeType::FlowSeq: |
| 662 | case EmitterNodeType::FlowMap: |
| 663 | SpaceOrIndentTo(true, nextIndent); |
| 664 | break; |
| 665 | case EmitterNodeType::BlockSeq: |
| 666 | case EmitterNodeType::BlockMap: |
| 667 | m_stream << "\n"; |
| 668 | break; |
| 669 | } |
| 670 | } |
| 671 | |
| 672 | // SpaceOrIndentTo |
| 673 | // . Prepares for some more content by proper spacing |
nothing calls this directly
no test coverage detected