Further fixes to make minireflect compatible with old behavior.

Change-Id: I92c257ec4ab4a0cf4676bd98523b766ce25bf4f6
This commit is contained in:
Wouter van Oortmerssen
2019-03-21 15:07:24 -07:00
parent f93d0f6ac1
commit 02e73e1ae9

View File

@@ -360,17 +360,21 @@ struct ToStringVisitor : public IterationVisitor {
void Unknown(const uint8_t *) { s += "(?)"; }
void StartVector() {
s += "[";
s += d;
if (vector_delimited) {
s += d;
indent_level++;
append_indent();
} else {
s += " ";
}
}
void EndVector() {
s += d;
if (vector_delimited) {
s += d;
indent_level--;
append_indent();
} else {
s += " ";
}
s += "]";
}
@@ -378,9 +382,11 @@ struct ToStringVisitor : public IterationVisitor {
const TypeTable * /*type_table*/, const uint8_t * /*val*/) {
if (i) {
s += ",";
s += d;
if (vector_delimited) {
s += d;
append_indent();
} else {
s += " ";
}
}
}