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