diff options
author | Karl Williamson <khw@cpan.org> | 2020-04-04 21:10:58 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-04-05 06:14:44 -0600 |
commit | 99d2ace527b7c674a6e6c604deb0fa2522cac990 (patch) | |
tree | 2c95a11d84666991bb01b206f9fbcb56d39f85f2 /regcomp.c | |
parent | 8f7b57e5771a5954483812f1c0cc87802c04e81f (diff) | |
download | perl-99d2ace527b7c674a6e6c604deb0fa2522cac990.tar.gz |
regcomp.c: Rmv unnecessary code
As spotted by Hugo van der Sanden, a barckwards reference to a capturing
group doesn't need to look forward instead. If we don't have a
capturing group we already should have, looking forward won't magically
produce it.
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 10 |
1 files changed, 1 insertions, 9 deletions
@@ -11729,16 +11729,8 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth) num = RExC_npar + num; if (num < 1) { - /* It might be a forward reference; we can't fail until - * we know, by completing the parse to get all the - * groups, and then reparsing */ - if (ALL_PARENS_COUNTED) { - RExC_parse++; + RExC_parse++; vFAIL(non_existent_group_msg); - } - else { - REQUIRE_PARENS_PASS; - } } } else if ( paren == '+' ) { num = RExC_npar + num - 1; |