Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Apr 8, 2022

Conversation

Azoy
Copy link
Contributor

@Azoy Azoy commented Apr 6, 2022

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 milseman, lorentey and rxwei April 6, 2022 21:35
Copy link
Member

@lorentey lorentey left a comment

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.

stdlib/public/core/UnicodeSPI.swift Outdated Show resolved Hide resolved
stdlib/public/core/UnicodeSPI.swift Outdated Show resolved Hide resolved
@Azoy
Copy link
Contributor Author

Azoy commented Apr 6, 2022

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

oops forgot, thanks!

@Azoy
Copy link
Contributor Author

Azoy commented Apr 7, 2022

@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
Copy link
Contributor Author

Azoy commented Apr 7, 2022

@swift-ci please smoke test

stdlib/public/stubs/Unicode/UnicodeScalarProps.cpp Outdated Show resolved Hide resolved
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
Copy link
Contributor Author

Azoy commented Apr 7, 2022

@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