From 63110d9a32369ea85f77dba4e2b8869769289155 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Wed, 17 Aug 2022 19:40:16 -0400 Subject: [PATCH] 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. --- parser/tree-tostring.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parser/tree-tostring.go b/parser/tree-tostring.go index 0c2ed33..75698ca 100644 --- a/parser/tree-tostring.go +++ b/parser/tree-tostring.go @@ -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" } }