| 467 | } |
| 468 | |
| 469 | void Emitter::FlowMapPrepareSimpleKey(EmitterNodeType::value child) { |
| 470 | const std::size_t lastIndent = m_pState->LastIndent(); |
| 471 | |
| 472 | if (!m_pState->HasBegunNode()) { |
| 473 | if (m_stream.comment()) |
| 474 | m_stream << "\n"; |
| 475 | m_stream << IndentTo(lastIndent); |
| 476 | if (m_pState->CurGroupChildCount() == 0) |
| 477 | m_stream << "{"; |
| 478 | else |
| 479 | m_stream << ","; |
| 480 | } |
| 481 | |
| 482 | switch (child) { |
| 483 | case EmitterNodeType::NoType: |
| 484 | break; |
| 485 | case EmitterNodeType::Property: |
| 486 | case EmitterNodeType::Scalar: |
| 487 | case EmitterNodeType::FlowSeq: |
| 488 | case EmitterNodeType::FlowMap: |
| 489 | SpaceOrIndentTo( |
| 490 | m_pState->HasBegunContent() || m_pState->CurGroupChildCount() > 0, |
| 491 | lastIndent); |
| 492 | break; |
| 493 | case EmitterNodeType::BlockSeq: |
| 494 | case EmitterNodeType::BlockMap: |
| 495 | assert(false); |
| 496 | break; |
| 497 | } |
| 498 | } |
| 499 | |
| 500 | void Emitter::FlowMapPrepareSimpleKeyValue(EmitterNodeType::value child) { |
| 501 | const std::size_t lastIndent = m_pState->LastIndent(); |
nothing calls this directly
no test coverage detected