mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2026-02-08 18:16:28 +00:00
Add EmitterStyle, which will allow sequence or map style (i.e., flow or block) to be preserved between parsing and emitting
This commit is contained in:
@@ -30,7 +30,8 @@ void GraphBuilderAdapter::OnScalar(const Mark &mark, const std::string &tag,
|
||||
|
||||
void GraphBuilderAdapter::OnSequenceStart(const Mark &mark,
|
||||
const std::string &tag,
|
||||
anchor_t anchor) {
|
||||
anchor_t anchor,
|
||||
EmitterStyle::value style) {
|
||||
void *pNode = m_builder.NewSequence(mark, tag, GetCurrentParent());
|
||||
m_containers.push(ContainerFrame(pNode));
|
||||
RegisterAnchor(anchor, pNode);
|
||||
@@ -44,7 +45,8 @@ void GraphBuilderAdapter::OnSequenceEnd() {
|
||||
}
|
||||
|
||||
void GraphBuilderAdapter::OnMapStart(const Mark &mark, const std::string &tag,
|
||||
anchor_t anchor) {
|
||||
anchor_t anchor,
|
||||
EmitterStyle::value style) {
|
||||
void *pNode = m_builder.NewMap(mark, tag, GetCurrentParent());
|
||||
m_containers.push(ContainerFrame(pNode, m_pKeyNode));
|
||||
m_pKeyNode = NULL;
|
||||
|
||||
Reference in New Issue
Block a user