This commit is contained in:
Michael Davidsaver
2020-08-10 12:09:55 -07:00
parent edce454dc7
commit 8182b01ef1
2 changed files with 14 additions and 5 deletions
+12 -1
View File
@@ -94,7 +94,7 @@ StoreType TypeCode::storedAs() const
return StoreType::Compound;
} else {
throw std::logic_error("TypeCode::storedAs() not map");
throw std::logic_error(SB()<<"TypeCode::storedAs("<<(*this)<<") not map");
}
}
@@ -165,6 +165,17 @@ const char* TypeCode::name() const
return "\?\?\?_t";
}
std::ostream& operator<<(std::ostream& strm, TypeCode c)
{
auto name = c.name();
if(name[0]!='?') {
strm<<name;
} else {
strm<<"TypeCode(0x"<<std::hex<<(unsigned)c.code<<")";
}
return strm;
}
void Member::Helper::node_validate(const Member* parent, const std::string& id, TypeCode code)
{
if(!id.empty() && code.scalarOf()!=TypeCode::Struct && code.scalarOf()!=TypeCode::Union)