]> git.donarmstrong.com Git - perltidy.git/commitdiff
add patch for git #162
authorSteve Hancock <perltidy@users.sourceforge.net>
Sat, 17 Aug 2024 22:47:11 +0000 (15:47 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Sat, 17 Aug 2024 22:47:11 +0000 (15:47 -0700)
CHANGES.md
lib/Perl/Tidy/Tokenizer.pm

index 3d5053adadb47858bddee5d057431f5b419a99bc..a60594cc8918a78b9de3495077d432e2960c4c15 100644 (file)
@@ -2,6 +2,9 @@
 
 ## 2024 05 11.09
 
+    - Add partial support for Syntax::Operator::In and Syntax::Keyword::Match
+      (see git #162).
+
     - Add --timeout-in-seconds=n, or -tos=n.  When the standard input supplies
       the input stream, and the input has not been received within n seconds,
       perltidy will end with a timeout message.  The intention is to catch
index caaf4f325e0ee0480298c85b5d01481e3fd322dd..4af3faa5989c14e7ababd10f8531a9ef5e0facc5 100644 (file)
@@ -3826,6 +3826,12 @@ EOM
             $type = 'J';
         }
 
+        # mark colon as attribute if an error would occur otherwise; git #162
+        elsif ( !$rcurrent_depth->[QUESTION_COLON] ) {
+            $type = 'A';
+            $self->[_in_attribute_list_] = 1;
+        }
+
         # otherwise, it should be part of a ?/: operator
         else {
             ( $type_sequence, $indent_flag ) =
@@ -4600,6 +4606,11 @@ EOM
 
                 }
 
+                # patch for Syntax::Operator::In, git #162
+                elsif ( $tok eq 'in' && $next_nonblank_token eq ':' ) {
+
+                }
+
                 # Fix part 1 for git #63 in which a comment falls
                 # between an -> and the following word.  An
                 # alternate fix would be to change operator_expected