ww source: reject malformed UTF-8

This commit is contained in:
2026-08-22 03:14:53 +09:00
parent d61805262e
commit 4069eda942
10 changed files with 1146 additions and 30 deletions

View File

@@ -203,6 +203,7 @@ struct Lex {
Arena *a; /* token-text arena */
int errs;
u64 nulcount; /* raw NUL bytes diagnosed by the source decoder */
u64 utf8count; /* malformed UTF-8 bytes diagnosed/filtered */
int modreset; /* a `//ww:module-reset` directive was seen in
* the last skipped run; lexnext emits TK_MODRESET
* before the next real token. */