diff options
author | David Mitchell <davem@iabyn.com> | 2017-02-14 16:21:40 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2017-02-14 17:49:58 +0000 |
commit | cbb658a1562fa3da6a29d865ee9b0ba564affb3f (patch) | |
tree | 589633f4573ab73fd953e474ec61366915b44de5 /regexec.c | |
parent | 4ee16520199a0e11bf4dbdbac71f0a64e5510271 (diff) | |
download | perl-cbb658a1562fa3da6a29d865ee9b0ba564affb3f.tar.gz |
Add a comment on why TRIE.jump does a UNWIND_PAREN
(it wasn't obvious to me)
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -5736,6 +5736,11 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog) { U8 *uc; if ( ST.jump ) { + /* undo any captures done in the tail part of a branch, + * e.g. + * /(?:X(.)(.)|Y(.)).../ + * where the trie just matches X then calls out to do the + * rest of the branch */ REGCP_UNWIND(ST.cp); UNWIND_PAREN(ST.lastparen, ST.lastcloseparen); } |