Skip to content

[stdlib] Add Unicode script data to scalar properties - #42227

Merged
Azoy merged 2 commits into
swiftlang:mainfrom
Azoy:add-script-data
Apr 8, 2022
Merged

[stdlib] Add Unicode script data to scalar properties#42227
Azoy merged 2 commits into
swiftlang:mainfrom
Azoy:add-script-data

Conversation

@Azoy

@Azoy Azoy commented Apr 6, 2022

Copy link
Copy Markdown
Contributor

I made the script and scriptExtensions return UInt8 because the Unicode.Script enum defined in the regex parser cannot be made SPI in the stdlib due to the fact that we bootstrap the regex parser using the system's SDK (which won't have this SPI symbol). We can teach the parser to store strings instead and define the enum here as SPI for the string processing module to turn it into the enum.

This depends on swiftlang/swift-experimental-string-processing#255

@Azoy
Azoy requested review from lorentey, milseman and rxwei April 6, 2022 21:35

@lorentey lorentey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We must follow the Leading Underscore Rule when naming non-public interfaces, in every stdlib module.

Comment thread stdlib/public/core/UnicodeSPI.swift Outdated
Comment thread stdlib/public/core/UnicodeSPI.swift Outdated
@Azoy

Azoy commented Apr 6, 2022

Copy link
Copy Markdown
Contributor Author

We must follow the Leading Underscore Rule when naming non-public interfaces, in every stdlib module.

oops forgot, thanks!

@Azoy

Azoy commented Apr 7, 2022

Copy link
Copy Markdown
Contributor Author

@swift-ci please smoke test

@Azoy
Azoy force-pushed the add-script-data branch from 8f2ba5f to 9bd7cb8 Compare April 7, 2022 22:21
@Azoy

Azoy commented Apr 7, 2022

Copy link
Copy Markdown
Contributor Author

@swift-ci please smoke test

Comment thread stdlib/public/stubs/Unicode/UnicodeScalarProps.cpp Outdated
forgot underscore part 2

add build rules back in for right now

indents
@Azoy
Azoy force-pushed the add-script-data branch from 9bd7cb8 to 1a3f791 Compare April 7, 2022 23:20
@Azoy

Azoy commented Apr 7, 2022

Copy link
Copy Markdown
Contributor Author

@swift-ci please smoke test

@Azoy
Azoy merged commit ef2c999 into swiftlang:main Apr 8, 2022
@Azoy
Azoy deleted the add-script-data branch April 8, 2022 04:04
Azoy added a commit to Azoy/swift that referenced this pull request Jun 1, 2022
[stdlib] Add Unicode script data to scalar properties
Azoy added a commit that referenced this pull request Jun 1, 2022
* Merge pull request #42227 from Azoy/add-script-data

[stdlib] Add Unicode script data to scalar properties

* Add Script and Script Extension tests (#59194)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants