Fix bug in printing trailing comma when dumping AST for a structure.
This commit is contained in:
parent
74426f7570
commit
a76d1c211b
8 changed files with 28 additions and 26 deletions
|
|
@ -2050,13 +2050,15 @@ public:
|
|||
// Add struct/block members
|
||||
if (isStruct() && structure) {
|
||||
appendStr("{");
|
||||
bool hasHiddenMember = true;
|
||||
for (size_t i = 0; i < structure->size(); ++i) {
|
||||
if (! (*structure)[i].type->hiddenMember()) {
|
||||
if (!hasHiddenMember)
|
||||
appendStr(", ");
|
||||
typeString.append((*structure)[i].type->getCompleteString());
|
||||
typeString.append(" ");
|
||||
typeString.append((*structure)[i].type->getFieldName());
|
||||
if (i < structure->size() - 1)
|
||||
appendStr(", ");
|
||||
hasHiddenMember = false;
|
||||
}
|
||||
}
|
||||
appendStr("}");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue