The easy way to do this is just to store a slice of script_extensions for each code point / range, but there's actually a limited set of ways script_extensions mix (taken from here):
We can very easily make a single enum value for each one, and programmatically generate an intersect() function that can calculate intersections. This would be faster.
(For performance it would also probably be worth only running these checks on non-ascii identifiers)
This is needed for mixed script detection.
The easy way to do this is just to store a slice of script_extensions for each code point / range, but there's actually a limited set of ways script_extensions mix (taken from here):
We can very easily make a single enum value for each one, and programmatically generate an
intersect()
function that can calculate intersections. This would be faster.(For performance it would also probably be worth only running these checks on non-ascii identifiers)