diff options
Diffstat (limited to 'thirdparty/pcre2/src/pcre2_xclass.c')
-rw-r--r-- | thirdparty/pcre2/src/pcre2_xclass.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/thirdparty/pcre2/src/pcre2_xclass.c b/thirdparty/pcre2/src/pcre2_xclass.c index 8b052be66a..bb57196449 100644 --- a/thirdparty/pcre2/src/pcre2_xclass.c +++ b/thirdparty/pcre2/src/pcre2_xclass.c @@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel Original API code Copyright (c) 1997-2012 University of Cambridge - New API code Copyright (c) 2016-2019 University of Cambridge + New API code Copyright (c) 2016-2022 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -135,6 +135,7 @@ while ((t = *data++) != XCL_END) { const ucd_record *prop = GET_UCD(c); BOOL isprop = t == XCL_PROP; + BOOL ok; switch(*data) { @@ -160,6 +161,12 @@ while ((t = *data++) != XCL_END) if ((data[1] == prop->script) == isprop) return !negated; break; + case PT_SCX: + ok = (data[1] == prop->script || + MAPBIT(PRIV(ucd_script_sets) + UCD_SCRIPTX_PROP(prop), data[1]) != 0); + if (ok == isprop) return !negated; + break; + case PT_ALNUM: if ((PRIV(ucp_gentype)[prop->chartype] == ucp_L || PRIV(ucp_gentype)[prop->chartype] == ucp_N) == isprop) @@ -207,6 +214,17 @@ while ((t = *data++) != XCL_END) } break; + case PT_BIDICL: + if ((UCD_BIDICLASS_PROP(prop) == data[1]) == isprop) + return !negated; + break; + + case PT_BOOL: + ok = MAPBIT(PRIV(ucd_boolprop_sets) + + UCD_BPROPS_PROP(prop), data[1]) != 0; + if (ok == isprop) return !negated; + break; + /* The following three properties can occur only in an XCLASS, as there is no \p or \P coding for them. */ |