X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/84159251c92a2b86596502042a94252226c7ba6a..6429869b8e4c941462c3b00b0e44dcccb91d5564:/toke.c diff --git a/toke.c b/toke.c index 6d28ec0..df73b88 100644 --- a/toke.c +++ b/toke.c @@ -9048,12 +9048,12 @@ S_pmflag(pTHX_ const char* const valid_flags, U32 * pmfl, char** s, char* charse /* Adds, subtracts to/from 'pmfl' based on regex modifier flags found in * the parse starting at 's', based on the subset that are valid in this * context input to this routine in 'valid_flags'. Advances s. Returns - * TRUE if the input was a valid flag, so the next char may be as well; - * otherwise FALSE. 'charset' should point to a NUL upon first call on the - * current regex. This routine will set it to any charset modifier found. - * The caller shouldn't change it. This way, another charset modifier - * encountered in the parse can be detected as an error, as we have decided - * to allow only one */ + * TRUE if the input should be treated as a valid flag, so the next char + * may be as well; otherwise FALSE. 'charset' should point to a NUL upon + * first call on the current regex. This routine will set it to any + * charset modifier found. The caller shouldn't change it. This way, + * another charset modifier encountered in the parse can be detected as an + * error, as we have decided to allow only one */ const char c = **s; STRLEN charlen = UTF ? UTF8SKIP(*s) : 1; @@ -9063,6 +9063,8 @@ S_pmflag(pTHX_ const char* const valid_flags, U32 * pmfl, char** s, char* charse yyerror_pv(Perl_form(aTHX_ "Unknown regexp modifier \"/%.*s\"", charlen, *s), UTF ? SVf_UTF8 : 0); (*s) += charlen; + /* Pretend that it worked, so will continue processing before + * dieing */ return TRUE; } return FALSE;