fix: Phase 2 — HIGH #6,9,10,11,12,19,23,32,46,47

Files modified (5):
  compiler/gengo/gengo.go — #6,#32: Deduplicate 3 Generate functions into 1
    doGenerate(file, debug, library) replaces 170 lines of copy-paste
    Dead GenerateDebug method removed
  cmd/five/main.go — #9,10,11,12: Fix 5 silently ignored errors
    filepath.Abs, tidy.Run, tidyCmd.CombinedOutput now checked
  hbrtl/strings.go — #19: Str() now reads caller's nWidth/nDec params
    Was ignoring explicit Str(123, 10, 2) arguments
  compiler/pp/pp.go — #46: Fix stale "NOT implemented" comment
    #47: Extract maxIncludeDepth constant
  compiler/lexer/lexer.go — #23: Remove unused LookupKeyword result

Issues resolved: 10 (HIGH: 7, MEDIUM: 3)
Total fixed: 26/53

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-01 11:47:26 +09:00
parent 207fa9f7dd
commit f950cb0784
5 changed files with 115 additions and 135 deletions

View File

@@ -666,9 +666,6 @@ func (l *Lexer) scanPreprocessor(start int) token.Token {
l.advance()
}
directive := l.src[kwStart:l.pos]
upper := token.LookupKeyword(directive)
_ = upper
full := l.src[start:l.pos]
switch {
case matchCI(directive, "include"):