Open nibags opened 6 years ago
Thanks for submitting this changes! And sorry for the late response...
Unicode escapes look good to me. It would be nice to also have it covered by tests.
Are ~
and @
sigils are still used? I though they were deprecated a long time ago?
Yes, @
and ~
are deprecated! I think I better remove them.
I also added the tests
Sorry, the test I did was making mistakes and I made unnecessary commits
Changes:
\u{NNNNNN}
[2]. However, the bytes and byte strings don't allow unicode escapes [3], therefore, the unicode escape is placed in a different object and new objects are created for byte strings and byte characters.is
&us
(these were depreciated byisize
&usize
[4]).[a-zA-Z\x80-\xff_][a-zA-Z0-9\x80-\xff_]*
[5]). This affects Lifetimes, Macros, functions and types (to do this, I basically added\\x80-\\xFF
, and it works fine. But the POSIX character class[:ascii:]
can also be used, for example:(?:[a-zA-Z0-9_]|[^[:ascii:]])
).~
@
NOTE: The use of non-ASCII characters in identifiers is a feature of Rust, however these have some issues and aren't currently fully supported (there is even the possibility that it will be eliminated in the future) (see ref. [7]).
If you want to make some change, correction, or undo something, I have no problem.
References:
isize
andusize
: https://github.com/rust-lang/rust/issues/22496Some Sources: