This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Add some comments
authorKarl Williamson <khw@cpan.org>
Thu, 20 Feb 2020 22:39:52 +0000 (15:39 -0700)
committerKarl Williamson <khw@cpan.org>
Thu, 27 Feb 2020 17:58:08 +0000 (10:58 -0700)
regcomp.c

index 2a12d76..0a73f3e 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -13468,6 +13468,8 @@ S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
        /* Special Escapes */
        case 'A':
            RExC_seen_zerolen++;
+            /* Under wildcards, this is changed to match \n; should be
+             * invisible to the user, as they have to compile under /m */
             if (RExC_pm_flags & PMf_WILDCARD) {
                 ret = reg_node(pRExC_state, MBOL);
             }
@@ -13510,6 +13512,7 @@ S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
             }
        case 'Z':
             if (RExC_pm_flags & PMf_WILDCARD) {
+                /* See comment under \A above */
                 ret = reg_node(pRExC_state, MEOL);
             }
             else {
@@ -13520,6 +13523,7 @@ S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
            goto finish_meta_pat;
        case 'z':
             if (RExC_pm_flags & PMf_WILDCARD) {
+                /* See comment under \A above */
                 ret = reg_node(pRExC_state, MEOL);
             }
             else {