fix: formatter idempotency for nested groupings (#7345)

Currently, for something like `(((((node))))) @cap`, the formatter will
produce `((node)) @cap`, and then after another pass it will produce
`(node) @cap`. This commit makes it so that all extraneous parentheses
are removed on the first pass.
This commit is contained in:
Riley Bruins 2024-11-10 18:59:21 -08:00 committed by GitHub
parent 8e40904e49
commit a069bb62a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -248,6 +248,7 @@ local format_queries = [[
"(" @format.remove
.
[
(grouping)
(anonymous_node
name: (string) .)
(named_node