]> git.donarmstrong.com Git - perltidy.git/commitdiff
Fix problem caused by side comment after pointer, part 2
authorSteve Hancock <perltidy@users.sourceforge.net>
Thu, 8 Jul 2021 13:30:26 +0000 (06:30 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Thu, 8 Jul 2021 13:30:26 +0000 (06:30 -0700)
lib/Perl/Tidy/Tokenizer.pm
local-docs/BugLog.pod

index a96375ad806f8e0fb05d169d353a5e77381b2e62..dae48ae29896d4971e57803d509aa05460782698 100644 (file)
@@ -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;
                 }
 
index 8faed76ceeda4a70d3e1a07876cfea8ebf3ab59c..b0b13ca559b3377ea41d5c4992333a02dfee2bd0 100644 (file)
@@ -2,6 +2,26 @@
 
 =over 4
 
+=item B<Fix problem caused by side comment after pointer, part 2>
+
+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<Fix problem caused by side comment after pointer>
 
 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<Fix error parsing '%#' and similar combinations>
 
@@ -56,7 +76,7 @@ expressions has been corrected. Some simple examples:
 
 This fixes case c036.
 
-6 Jul 2021.
+6 Jul 2021, e233d41.
 
 =item B<Fix error parsing '&#'>
 
@@ -73,7 +93,7 @@ before the '#').
 
 This update fixes this issue, c033.
 
-5 Jul 2021.
+5 Jul 2021, 0d784e0.
 
 =item B<Fix error parsing format statement>
 
@@ -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<Fix some incorrect error messages due to side comments>