3 ms·
I think the rust compiler kind of does this: https://mobile.twitter.com/hmemcpy/status/1151890968477667328?lang=en https://mobile.twitter.com/hmemcpy/status/115
by jabbany 4y ago
I think the rust compiler kind of does this: https://mobile.twitter.com/hmemcpy/status/1151890968477667328?lang=en https://mobile.twitter.com/hmemcpy/status/115189096847766732...
- jancsika 4y agoOoh, good job, Rust!
- jeroenhd 4y agoOnly a partial set, though: https://github.com/rust-lang/rust/blob/master/compiler/rustc_parse/src/lexer/unicode_chars.rs https://github.com/rust-lang/rust/blob/master/compiler/rustc...
- estebank 4y agoThat's only the lexer check. We have further lints that run after parsing to detect Unicode confusables in identifiers as well, as well as two lints for text flow codepoints that can change what the code looks like in editors (one for comments and one for string literals).
- rurban 4y agoYeah, but Rust does it properly by following UTS-39, and not blindly checking for just confusable matches.