Skip to content

Commit 3f054ab

Browse files
committed
Fixed mismatched pretty printed parens
1 parent 2f1db57 commit 3f054ab

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

pkg/parsing/parser.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ func (node ASTNode) PrettyPrint(indent int) string {
7575
for _, elem := range node.Children {
7676
output += elem.PrettyPrint(childIndent)
7777
}
78+
output += fmt.Sprintf("%s}\n", strings.Repeat(" ", nextIndent))
7879
}
7980
output += fmt.Sprintf("%s}\n", spaces)
8081
return output

pkg/parsing/parser_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,14 @@ var prettyPrinted = `ASTProjection {
5050
ASTField {
5151
value: "baz"
5252
}
53+
}
5354
}
5455
ASTField {
5556
value: "qux"
5657
}
58+
}
5759
}
60+
}
5861
}
5962
`
6063

@@ -74,7 +77,9 @@ var prettyPrintedCompNode = `ASTFilterProjection {
7477
ASTField {
7578
value: "c"
7679
}
80+
}
7781
}
82+
}
7883
}
7984
`
8085

0 commit comments

Comments
 (0)