mirror of https://github.com/libAthena/athena.git
YAML fix for last fix
This commit is contained in:
parent
6a76fa90dc
commit
c0441e7c7a
|
@ -102,7 +102,6 @@ class ATDNAEmitVisitor : public clang::RecursiveASTVisitor<ATDNAEmitVisitor>
|
||||||
std::string m_fieldName;
|
std::string m_fieldName;
|
||||||
std::string m_sizeExpr;
|
std::string m_sizeExpr;
|
||||||
std::string m_ioOp;
|
std::string m_ioOp;
|
||||||
bool m_isDNAType;
|
|
||||||
bool m_output = true;
|
bool m_output = true;
|
||||||
|
|
||||||
YAMLFieldNode(Type tp) : m_type(tp) {}
|
YAMLFieldNode(Type tp) : m_type(tp) {}
|
||||||
|
@ -125,17 +124,10 @@ class ATDNAEmitVisitor : public clang::RecursiveASTVisitor<ATDNAEmitVisitor>
|
||||||
out << " }\n";
|
out << " }\n";
|
||||||
break;
|
break;
|
||||||
case Type::Value:
|
case Type::Value:
|
||||||
if (m_isDNAType)
|
if (!p)
|
||||||
{
|
out << " " << m_fieldName << " = " << m_ioOp << ";\n";
|
||||||
out << " " << m_fieldName << "." << m_ioOp << ";\n";
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
out << " " << m_ioOp << "\n";
|
||||||
if (!p)
|
|
||||||
out << " " << m_fieldName << " = " << m_ioOp << ";\n";
|
|
||||||
else
|
|
||||||
out << " " << m_ioOp << "\n";
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case Type::VectorRefSize:
|
case Type::VectorRefSize:
|
||||||
if (!p)
|
if (!p)
|
||||||
|
@ -2041,11 +2033,20 @@ class ATDNAEmitVisitor : public clang::RecursiveASTVisitor<ATDNAEmitVisitor>
|
||||||
if (ioOp.empty())
|
if (ioOp.empty())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
outputNodes.emplace_back(YAMLFieldNode::Type::Value);
|
if (isDNAType)
|
||||||
YAMLFieldNode& outNode = outputNodes.back();
|
{
|
||||||
outNode.m_fieldName = fieldName;
|
outputNodes.emplace_back(YAMLFieldNode::Type::Record);
|
||||||
outNode.m_isDNAType = isDNAType;
|
YAMLFieldNode& outNode = outputNodes.back();
|
||||||
outNode.m_ioOp = ioOp;
|
outNode.m_fieldName = fieldName;
|
||||||
|
outNode.m_fieldNameBare = fieldNameBare;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
outputNodes.emplace_back(YAMLFieldNode::Type::Value);
|
||||||
|
YAMLFieldNode& outNode = outputNodes.back();
|
||||||
|
outNode.m_fieldName = fieldName;
|
||||||
|
outNode.m_ioOp = ioOp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (!tsDecl->getName().compare("Vector"))
|
else if (!tsDecl->getName().compare("Vector"))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue