Lots of work on unicode support

This commit is contained in:
2023-05-19 00:23:23 -04:00
parent a25213d259
commit 7e25be10a4
10 changed files with 249 additions and 228 deletions

View File

@@ -181,8 +181,14 @@ int32_t read_ascii_char(string_view &source);
// Read a UTF8 codepoint from a string_view.
//
// If the next thing in the string_view isn't a valid
// codepoint, returns -1 and doesn't update the view.
// If the string_view is empty, returns -1 and doesn't update
// the string_view.
//
// If the string_view contains an unfinished but possibly valid
// codepoint, returns -1 and doesn't update the string_view.
//
// If the next thing in the string_view is an invalid codepoint,
// returns -2 and doesn't update the string_view.
//
int32_t read_codepoint_utf8(string_view &source);