From 96f3bfda2865c46f14fa6998dcf679f1aaf8dcdd Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Thu, 21 Jun 2012 09:40:20 -0600 Subject: [PATCH] toke.c: Add, clarify comments --- toke.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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; -- 1.8.3.1