From: Steve Hancock Date: Wed, 31 Jul 2024 15:24:09 +0000 (-0700) Subject: adjust strength of ^^ X-Git-Tag: 20240511.08~2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=394d60ed75e4f6343c824b27aa2098d05cade280;p=perltidy.git adjust strength of ^^ --- diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 24c6a200..e402ef25 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -4646,10 +4646,11 @@ EOM $right_bond_strength{'&&'} = NOMINAL; $left_bond_strength{'&&'} = $left_bond_strength{'||'} + 0.1; - # set strength of ^^ a little lower than ||. See git157. - # Note that 0 ^^ 0 || 1 = 0 ^^ (0 || 1) is true + # set strength of ^^ above && and ||. See git157. Note that: + # "1 || 0 ^^ 0 || 1" = true, so ^^ is stronger than || + # "1 && 0 ^^ 1 = true, so ^^ is stronger than && $right_bond_strength{'^^'} = NOMINAL; - $left_bond_strength{'^^'} = $left_bond_strength{'||'} - 0.1; + $left_bond_strength{'^^'} = $left_bond_strength{'||'} + 0.15; $left_bond_strength{';'} = VERY_STRONG; $right_bond_strength{';'} = VERY_WEAK;