From: Steve Hancock Date: Thu, 8 Jul 2021 13:30:26 +0000 (-0700) Subject: Fix problem caused by side comment after pointer, part 2 X-Git-Tag: 20210625.02~3 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=18067721fec90b017bfccbb5e0ab57f02ba6fdc5;p=perltidy.git Fix problem caused by side comment after pointer, part 2 --- diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm index a96375ad..dae48ae2 100644 --- a/lib/Perl/Tidy/Tokenizer.pm +++ b/lib/Perl/Tidy/Tokenizer.pm @@ -3729,10 +3729,10 @@ EOM next; } - # A bare word preceded by -> is an identifier; mark as 'w'. - # Fixes c037. + # Scan a bare word following a -> as an identifir; it could + # have a long package name. Fixes c037, c041. if ( $last_nonblank_token eq '->' ) { - $type = 'w'; + scan_bare_identifier(); next; } diff --git a/local-docs/BugLog.pod b/local-docs/BugLog.pod index 8faed76c..b0b13ca5 100644 --- a/local-docs/BugLog.pod +++ b/local-docs/BugLog.pod @@ -2,6 +2,26 @@ =over 4 +=item B + +This is related to the previous issue, c037. The following snippet was misparsed +at the old style ' package separater due to the side comment following the +pointer. + + @ret + = + $o + -># + SUPER'method + ( + 'whatever' + ) + ; + +This is fixed in this update, case c041. + +7 Jul 2021. + =item B The following test script @@ -27,7 +47,7 @@ The problem was caused by a side comment between the pointer '->' and the word 'package'. This caused package to be misparsed as a keyword, causing the error. -This is fixed in this update, case c037. +This is fixed in this update, case c037, 96f2ebb. =item B @@ -56,7 +76,7 @@ expressions has been corrected. Some simple examples: This fixes case c036. -6 Jul 2021. +6 Jul 2021, e233d41. =item B @@ -73,7 +93,7 @@ before the '#'). This update fixes this issue, c033. -5 Jul 2021. +5 Jul 2021, 0d784e0. =item B @@ -93,7 +113,7 @@ start a format statement. This was fixed by requiring a format statement to begin where a new statement can occur. This fixes issue c035. -5 Jan 2021. +5 Jan 2021, 2ef16fb. =item B