Analyzer安定化完了: NYASH_DISABLE_PLUGINS=1復元 + plugin無効化根治
## 修正内容 1. **hako_check.sh/run_tests.sh**: NYASH_DISABLE_PLUGINS=1 + NYASH_BOX_FACTORY_POLICY=builtin_first追加 2. **src/box_factory/plugin.rs**: NYASH_DISABLE_PLUGINS=1チェック追加 3. **src/box_factory/mod.rs**: plugin shortcut pathでNYASH_DISABLE_PLUGINS尊重 4. **tools/hako_check/render/graphviz.hako**: smart quotes修正(parse error解消) ## 根本原因 - NYASH_USE_PLUGIN_BUILTINS=1が自動設定され、ArrayBox/MapBoxがplugin経由で生成を試行 - bid/registry.rsで"Plugin loading temporarily disabled"の状態でも試行されエラー - mod.rs:272のshortcut pathがNYASH_DISABLE_PLUGINSを無視していた ## テスト結果 - 10/11 PASS(HC011,13-18,21-22,31) - HC012: 既存issue(JSON安定化未完) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
// tools/hako_parser/parser_core.hako — HakoParserCoreBox (token-based MVP)
|
||||
// tools/hako_parser/parser_core.hako - HakoParserCoreBox (token-based MVP)
|
||||
using selfhost.shared.common.string_helpers as Str
|
||||
using tools.hako_parser.tokenizer as HakoTokenizerBox
|
||||
|
||||
@ -6,11 +6,13 @@ static box HakoParserCoreBox {
|
||||
// Parse .hako source into minimal AST map:
|
||||
// {
|
||||
// uses: Array<String>,
|
||||
// aliases: Array<{name,alias}>,
|
||||
// boxes: Array<{name,is_static,methods:Array<{name,arity,span}>}>
|
||||
// }
|
||||
parse(text) {
|
||||
local ast = new MapBox()
|
||||
ast.set("uses", new ArrayBox())
|
||||
ast.set("aliases", new ArrayBox())
|
||||
ast.set("boxes", new ArrayBox())
|
||||
ast.set("includes", new ArrayBox())
|
||||
if text == null { return ast }
|
||||
@ -27,9 +29,18 @@ static box HakoParserCoreBox {
|
||||
p = me._advance(p, N)
|
||||
local t1 = me._peek(toks, p, N)
|
||||
if me._eq(t1, "STRING") == 1 {
|
||||
ast.get("uses").push(t1.get("lexeme")); p = me._advance(p, N)
|
||||
local mod_name = t1.get("lexeme"); ast.get("uses").push(mod_name); p = me._advance(p, N)
|
||||
// optional: as Alias
|
||||
local t2 = me._peek(toks, p, N); if me._eq(t2, "AS") == 1 { p = me._advance(p, N); local t3=me._peek(toks, p, N); if me._eq(t3, "IDENT")==1 { p = me._advance(p, N) } }
|
||||
local t2 = me._peek(toks, p, N);
|
||||
if me._eq(t2, "AS") == 1 {
|
||||
p = me._advance(p, N)
|
||||
local t3 = me._peek(toks, p, N)
|
||||
if me._eq(t3, "IDENT") == 1 {
|
||||
local alias = t3.get("lexeme"); p = me._advance(p, N)
|
||||
local rec = new MapBox(); rec.set("name", mod_name); rec.set("alias", alias)
|
||||
ast.get("aliases").push(rec)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// tolerate malformed using; skip token
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user