You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At present, the function name and variable name of Zig language can only use ASCII characters. It is expected that future versions will consider allowing the use of unicode encoded characters in identifiers.
There are four functions in unicodeid.zig: isID_Start(), isID_Continue(), isXID_Start(), isXID_Continue()
It can judge the derived property of UTF-8 character encoding in UTF-8 string.
The four functions can be used in the. Identifier and else branches of the src/lib/std/zig/tokenizer.zig and src/lib/std/zig/c/tokenizer.zig next() functions, as required, to allow the use of UTF-8 characters conforming to unicode encoding in identifiers.
The text was updated successfully, but these errors were encountered:
At present, the function name and variable name of Zig language can only use ASCII characters. It is expected that future versions will consider allowing the use of unicode encoded characters in identifiers.
I wrote a program fragment to judge unicode character derived property for reference, see: https://github.com/sxwangzhiwen/unicodeid
The source of data acquisition and generation is https://www.unicode.org/Public/UCD/latest/ucd/DerivedCoreProperties.txt
There are four functions in unicodeid.zig: isID_Start(), isID_Continue(), isXID_Start(), isXID_Continue()
It can judge the derived property of UTF-8 character encoding in UTF-8 string.
The four functions can be used in the. Identifier and else branches of the src/lib/std/zig/tokenizer.zig and src/lib/std/zig/c/tokenizer.zig next() functions, as required, to allow the use of UTF-8 characters conforming to unicode encoding in identifiers.
The text was updated successfully, but these errors were encountered: