public: publish selfhost snapshot to public repo (SSOT using + AST merge + JSON VM fixes)

- SSOT using profiles (aliases/packages via nyash.toml), AST prelude merge
- Parser/member guards; Builder pin/PHI and instance→function rewrite (dev on)
- VM refactors (handlers split) and JSON roundtrip/nested stabilization
- CURRENT_TASK.md updated with scope and acceptance criteria

Notes: dev-only guards remain togglable via env; no default behavior changes for prod.
This commit is contained in:
nyash-codex
2025-09-26 14:34:42 +09:00
parent ecd46161b3
commit cdf826cbe7
44 changed files with 6264 additions and 576 deletions

View File

@ -295,19 +295,15 @@ static box StringUtils {
}
local acc = 0
local digits = "0123456789"
loop(i < s.length()) {
// 各桁の数値を計算
local ch = s.substring(i, i + 1)
// '0'..'9' 前提is_integer で検証済み)
// 文字を数値へ: (ch - '0') 相当の分岐
local digit = 0
if ch == "0" { digit = 0 } else { if ch == "1" { digit = 1 } else { if ch == "2" { digit = 2 } else { if ch == "3" { digit = 3 } else {
if ch == "4" { digit = 4 } else { if ch == "5" { digit = 5 } else { if ch == "6" { digit = 6 } else { if ch == "7" { digit = 7 } else {
if ch == "8" { digit = 8 } else { if ch == "9" { digit = 9 } else { digit = 0 } } } } } } } } }
acc = acc * 10 + digit
// '0'..'9' → 位置で数値化
local d = this.index_of(digits, ch)
if d < 0 { break }
acc = acc * 10 + d
i = i + 1
}
if neg { return 0 - acc } else { return acc }
}