P0-1: Map bad-key tags for get/set/delete + smokes; String substring clamp smoke; P0-2: Bridge no‑op(Method) + Gate‑C invalid header smokes; P1: v1 bridge Closure captures appended to argv

This commit is contained in:
nyash-codex
2025-11-02 13:29:27 +09:00
parent ff62eb0d97
commit 110b4f3321
14 changed files with 275 additions and 59 deletions

View File

@ -0,0 +1,18 @@
// CommonImportsBox - Unified import utilities for string operations
// Consolidates frequently used StringHelpers and StringOps imports
using "lang/src/shared/common/string_helpers.hako" as StringHelpers
using selfhost.shared.common.string_ops as StringOps
static box CommonImportsBox {
// Provides access to common string utilities
// Boxes can import this instead of individual modules
static helpers() { return StringHelpers }
static ops() { return StringOps }
// Commonly used string operations
static read_digits(text, pos) { return StringHelpers.read_digits(text, pos) }
static to_i64(digits) { return StringHelpers.to_i64(digits) }
static index_of_from(text, pattern, start) { return StringOps.index_of_from(text, pattern, start) }
static substring(text, start, end) { return StringOps.substring(text, start, end) }
}

View File

@ -0,0 +1,18 @@
// EntryPointBaseBox - Common entry point for standalone boxes
// Eliminates repetitive main(args){ return 0 } boilerplate
static box EntryPointBaseBox {
// Standard entry point implementation
// Can be overridden by specific boxes if needed
static main(args) {
return 0
}
// Entry point with validation
static safe_main(args) {
if args == null {
return 1
}
return EntryPointBaseBox.main(args)
}
}