Removed bad spacing in ObjectInitializationValues.ToString

If a value had more initialzation values inside of it, it would leave a space
before the newline. This was causing the parser test to believe the parser to be
failing. The parser now passes the test.
This commit is contained in:
Sasha Koshka 2022-08-17 19:40:16 -04:00
parent 6a5851c9eb
commit 63110d9a32

View File

@ -104,12 +104,12 @@ func (attributes *ObjectInitializationValues) ToString (
for _, name := range sortMapKeysAlphabetically(attributes.attributes) {
value := attributes.attributes[name]
output += doIndent(indent, ".", name, " ")
output += doIndent(indent, ".", name)
if value.kind == ArgumentKindObjectInitializationValues {
output += "\n"
output += value.ToString(indent + 1, true)
} else {
output += value.ToString(0, false) + "\n"
output += " " + value.ToString(0, false) + "\n"
}
}