Fix PRMMinimize behaviour on simple paren'ed expressions
parent
5481e5015f
commit
5e5433f33a
|
@ -1059,3 +1059,10 @@ func = do
|
|||
stmt2
|
||||
)
|
||||
`shouldReturn` thing
|
||||
|
||||
#golden minimize parens basic test
|
||||
-- brittany { lconfig_operatorParenthesisRefactorMode: PRMMinimize }
|
||||
func = func (abc) (def)
|
||||
#expected
|
||||
-- brittany { lconfig_operatorParenthesisRefactorMode: PRMMinimize }
|
||||
func = func abc def
|
||||
|
|
|
@ -184,8 +184,9 @@ addAllParens topLevelParen = \case
|
|||
|
||||
remSuperfluousParens :: Int -> OpTree -> OpTree
|
||||
remSuperfluousParens outerFixity = \case
|
||||
x@OpLeaf{} -> x
|
||||
x@OpUnknown{} -> x
|
||||
x@OpLeaf{} -> x
|
||||
OpUnknown _ locO locC c [] -> OpUnknown NoParen locO locC c []
|
||||
x@OpUnknown{} -> x
|
||||
OpKnown paren locO locC fixity c cs ->
|
||||
OpKnown
|
||||
-- We do not support removing superfluous parens around
|
||||
|
|
Loading…
Reference in New Issue