ecma262 icon indicating copy to clipboard operation
ecma262 copied to clipboard

Editorial: Fix incorrect use of UnicodeMatchPropertyValue

Open gibson042 opened this issue 7 months ago • 2 comments

Fixes #3586 Closes #3590

Also includes commits with incidental fixes in nearby algorithms and steps.

gibson042 avatar May 04 '25 17:05 gibson042

I have another question, if you search "scx" in https://unicode.org/Public/UCD/latest/ucd/PropertyValueAliases.txt, you will find there is no record for it. And according to the spec,

UnicodePropertyValueExpression :: UnicodePropertyName = UnicodePropertyValue

It is a Syntax Error if the source text matched by UnicodePropertyValue is not a property value or property value alias for the Unicode property or property alias given by the source text matched by UnicodePropertyName listed in PropertyValueAliases.txt.

All RegExp that have the form of /\p{Script_Extensions=Anything}/u (e.g., /\p{Script_Extensions=Zanabazar_Square}/u) are an early error, but it is not true in the implementation.

Jack-Works avatar May 07 '25 06:05 Jack-Works

Nice observation, @Jack-Works! Unicode property Script_Extensions (scx) is unusual in being set-valued rather than scalar-valued, and as such need special consideration in our spec. I have added editorial corrections to this PR, and opened #3590 for a potential followup.

gibson042 avatar May 08 '25 19:05 gibson042