This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Move comment closer to code it applies to
authorKarl Williamson <khw@cpan.org>
Mon, 1 Sep 2014 20:48:02 +0000 (14:48 -0600)
committerKarl Williamson <khw@cpan.org>
Sun, 7 Sep 2014 03:12:05 +0000 (21:12 -0600)
regcomp.c

index ea9c368..de27b3d 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -14004,6 +14004,11 @@ parseit:
            }
        } /* end of namedclass \blah */
 
+        if (skip_white) {
+            RExC_parse = regpatws(pRExC_state, RExC_parse,
+                                FALSE /* means don't recognize comments */ );
+        }
+
         /* Here, we have a single value.  If 'range' is set, it is the ending
          * of a range--check its validity.  Later, we will handle each
          * individual code point in the range.  If 'range' isn't set, this
@@ -14011,11 +14016,6 @@ parseit:
          * ahead to see if the next real character to be processed is the range
          * indicator--the minus sign */
 
-        if (skip_white) {
-            RExC_parse = regpatws(pRExC_state, RExC_parse,
-                                FALSE /* means don't recognize comments */ );
-        }
-
        if (range) {
            if (prevvalue > value) /* b-a */ {
                const int w = RExC_parse - rangebegin;