-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
WIP: custom Unicode normalization for Julia identifiers #19464
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
b70cf1b
implement custom Julia Unicode normalization for confusable character…
stevengj 976964c
whoops
stevengj e67feb6
separated julia_charmap into its own file to make it easier to update
stevengj c0e2059
normalize fullwidth -> halfwidth in identifiers, ala NFKC
stevengj 8161e59
make \varepsilon complete to ε (u+03b5), fixes #14751
stevengj 0f82dfc
docs for canonicalization
stevengj a55a95b
normalize fullwidth characters during parsing (fixes #5903)
stevengj 79665e7
typo
stevengj ec0d661
tests
stevengj 7672250
be more cautious about normalizing chars when parsing, so as not to n…
stevengj 595ec59
test fullwidth numeric literals and parens
stevengj b6f5217
typo/clarification
stevengj 61d2b50
update to utf8proc-2.1
stevengj d23a23a
checksum for utf8proc 2.1
stevengj 01dfaa4
moved symbol-normalization test from test/core to test/parse
stevengj 2fdee35
Revert "be more cautious about normalizing chars when parsing, so as …
stevengj a28c90f
Revert "normalize fullwidth characters during parsing (fixes #5903)"
stevengj aedc4c2
remove more references to fullwidth normalization
stevengj b2ee6b6
rm fullwidth identifier normalization
stevengj ab229d7
Merge branch 'master' into id_norm
tkelman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
1 change: 1 addition & 0 deletions
1
deps/checksums/utf8proc-40e605959eb5cb90b2587fa88e3b661558fbc55a.tar.gz/md5
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
f33af304538c3afba3b1d0ebae8e4555 |
1 change: 1 addition & 0 deletions
1
deps/checksums/utf8proc-40e605959eb5cb90b2587fa88e3b661558fbc55a.tar.gz/sha512
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
17a2df079e726a4ae1f10fcf48a7a771c2bcc93c7938f88148e1aa3b6cf9d250eb33cd7a9d8de54f29360e71c71e59b77996ba28dd894676888dc0453d67e9bb |
1 change: 0 additions & 1 deletion
1
deps/checksums/utf8proc-e3a5ed7b8bb5d0c6bb313d3e1f4d072c04113c4b.tar.gz/md5
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
deps/checksums/utf8proc-e3a5ed7b8bb5d0c6bb313d3e1f4d072c04113c4b.tar.gz/sha512
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
UTF8PROC_BRANCH=v2.0.2 | ||
UTF8PROC_SHA1=e3a5ed7b8bb5d0c6bb313d3e1f4d072c04113c4b | ||
UTF8PROC_BRANCH=v2.1 | ||
UTF8PROC_SHA1=40e605959eb5cb90b2587fa88e3b661558fbc55a | ||
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* Array of {original codepoint, replacement codepoint} normalizations | ||
to perform on Julia identifiers, to canonicalize characters that | ||
are both easily confused and easily inputted by accident. */ | ||
static const uint32_t charmap[][2] = { | ||
{ 0x025B, 0x03B5 }, // latin small letter open e -> greek small letter epsilon | ||
{ 0x00B5, 0x03BC }, // micro sign -> greek small letter mu | ||
}; |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update the checksums
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, fixed