We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e5a9516 commit 35126a9Copy full SHA for 35126a9
ast/print.go
@@ -212,6 +212,9 @@ func (n *MapNode) String() string {
212
213
func (n *PairNode) String() string {
214
if str, ok := n.Key.(*StringNode); ok {
215
+ if utils.IsValidIdentifier(str.Value) {
216
+ return fmt.Sprintf("%s: %s", str.Value, n.Value.String())
217
+ }
218
return fmt.Sprintf("%s: %s", str.String(), n.Value.String())
219
}
220
return fmt.Sprintf("(%s): %s", n.Key.String(), n.Value.String())
0 commit comments