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
refactor(selfhost): finish id-constant coverage (word_id returns + id compares)
Follow-up to the previous sweep, which only converted the wid:/code: arg
sites and kind assignments. Convert the remaining raw token/word ids:
- word_id: returns WORD_* instead of raw 1..30 (the not-a-keyword `return 0`
sentinel stays).
- is_ident_tok: k == TOK_IDENT || k == TOK_KEYWORD (was 1 || 6).
- starts_top_level_item: WORD_* disjunction (was raw v == 17 || 16 || ...).
- parser is_feature_tok: WORD_* disjunction (was raw v == 26 || 9 || ...).
Also narrow the coverage comment to name exactly what is covered (kinds,
symbol codes, word ids — including word_id returns and the id compares) and
what intentionally is not (raw ASCII char-code compares in the char
scanners, and the 0 / -1 sentinels), so it no longer over-claims.
Corpus parity still byte-for-byte green over 556 files (lexer/parser/checker).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
return v == 17 || v == 16 || v == 3 || v == 2 || v == 4 || v == 1 || v == 13 || v == 14 || v == 9 || v == 7 || v == 8
706
+
return v == WORD_FEATURES || v == WORD_PROFILE || v == WORD_CLASS || v == WORD_STRUCT || v == WORD_RESOURCE || v == WORD_FN || v == WORD_PUB || v == WORD_ASYNC || v == WORD_NATIVE || v == WORD_PROTOCOL || v == WORD_IMPL
701
707
}
702
708
703
709
fn function_signature_end(toks: read List<Tok>, start: read Int) -> Int {
0 commit comments