Commit Graph

5 Commits

Author SHA1 Message Date
Rui Ueyama 37998be0c1 Improve error message for multibyte characters 2020-12-07 12:00:06 +09:00
Rui Ueyama adb8b98889 [GNU] Accept $ as an identifier character 2020-12-07 12:00:06 +09:00
Rui Ueyama 0e5d250ebf Allow multibyte UTF-8 character in identifier 2020-12-07 12:00:06 +09:00
Rui Ueyama a57c661d46 Accept multibyte character as wide character literal
On most Unix-like systems, wide character literal is 32-bit long
and encodes a Unicode code point. On Windows, that is 16-bit
long and encodes a UTF-16 code unit. Clearly, there's a portability
issue here. Personally I've never used wide characters in my code
as I didn't find it useful.

Being said that, some header files contain wide character literal,
so we need to support that so that chibicc can include such files.

We assume that source files are always encoded in UTF-8.
2020-12-07 12:00:06 +09:00
Rui Ueyama c31886aa7a Add \u and \U escape sequences 2020-12-07 12:00:06 +09:00