-
Notifications
You must be signed in to change notification settings - Fork 433
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
syntax: loosen ASCII compatible rules
Previously, patterns like `(?-u:☃)` were banned under the logic that Unicode scalar values shouldn't be available unless Unicode mode is enabled. But since patterns are required to be UTF-8, there really isn't any difficulty in just interpreting Unicode literals as their corresponding UTF-8 encoding. Note though that Unicode character classes, even things like `(?-u:[☃])`, remain banned. We probably could make character classes work too, but it's unclear how that plays with ASCII compatible mode requiring that a single byte is the fundamental atom of matching (where as Unicode mode requires that Unicode scalar values are the fundamental atom of matching).
- Loading branch information
1 parent
cfd0ca2
commit 04f5d7b
Showing
2 changed files
with
12 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters