From: Steve Hancock Date: Thu, 27 May 2021 00:46:01 +0000 (-0700) Subject: Added optional o in octal number definitions X-Git-Tag: 20210402.01~27 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=544df8c561919aef814f7602aa3a6a00c808b067;p=perltidy.git Added optional o in octal number definitions --- diff --git a/dev-bin/perltidy_random_run.pl b/dev-bin/perltidy_random_run.pl index 9a1b00cf..b31c8642 100755 --- a/dev-bin/perltidy_random_run.pl +++ b/dev-bin/perltidy_random_run.pl @@ -745,7 +745,7 @@ foreach my $line (@lines) { || $line =~ /undefined/ || $line =~ /A fault was/ || $line =~ /STRANGE/ - || length($line) > 80 ) + || length($line) > 90 ) { # ignore last few lines diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm index e04e363f..a9fea6e9 100644 --- a/lib/Perl/Tidy/Tokenizer.pm +++ b/lib/Perl/Tidy/Tokenizer.pm @@ -7755,13 +7755,13 @@ sub scan_number_do { |([xX][0-9a-fA-F_]+) # or octal fraction - |([0-7_]+ # string of octal digits + |([oO]?[0-7_]+ # string of octal digits (\.([0-7][0-7_]*)?)? # optional decimal and fraction [Pp][+-]?[0-7] # REQUIRED exponent, no underscore [0-7_]*) # Additional exponent digits with underscores # or octal integer - |([0-7_]+) # string of octal digits + |([oO]?[0-7_]+) # string of octal digits # or a binary float |([bB][01_]* # 'b' with string of binary digits diff --git a/local-docs/BugLog.pod b/local-docs/BugLog.pod index 5ca2f9f7..07f34efe 100644 --- a/local-docs/BugLog.pod +++ b/local-docs/BugLog.pod @@ -2,12 +2,25 @@ =over 4 +=item B + +An optional letter 'o' or 'O' in the octal representation of numbers, which was +added in perl version 5.33.5, is now recogized. The leading zero is still +required. + +For example: + + $a = 0o100; + $a = 0O100; + +26 May 2021. + =item B This update fixes several problems with -lp formatting which are all somewhat related. -ISSUE #1 (case c002): A problem involving -lp -wn and certain qw lists +ISSUE #1 (cases c002 and c004): A problem involving -lp -wn and certain qw lists The last line of a welded qw list was being outdented even if it contained text as well as the closing container token. This update fixes the problem and @@ -93,7 +106,7 @@ being applied when it should have been. For example (text is shifted right): PROG -25 May 2021. +25 May 2021, 6947fe9. =item B