Set alias nodes to return the tag of their anchor

This commit is contained in:
Jesse Beder
2010-03-15 04:10:36 +00:00
parent 2226987442
commit 083a97b171

View File

@@ -77,7 +77,7 @@ namespace YAML
bool IsReferenced() const { return m_referenced; } bool IsReferenced() const { return m_referenced; }
// for tags // for tags
const std::string GetTag() const { return m_tag; } // TODO: should an aliased node return its alias's tag? const std::string GetTag() const { return IsAlias() ? m_pIdentity->GetTag() : m_tag; }
// emitting // emitting
friend Emitter& operator << (Emitter& out, const Node& node); friend Emitter& operator << (Emitter& out, const Node& node);