Files
hakorune/tools/hako_parser/cli.hako
nyash-codex 772149c86d 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>
2025-11-08 15:49:25 +09:00

19 lines
691 B
Plaintext

// tools/hako_parser/cli.hako - HakoParserBox CLI (MVP skeleton)
using tools.hako_parser.parser_core as HakoParserCoreBox
using tools.hako_parser.ast_emit as HakoAstEmitBox
static box HakoParserBox {
run(args) {
if args == null || args.size() < 1 { print("[parser/error] missing path"); return 2 }
local path = args.get(0)
local f = new FileBox(); if f.open(path) == 0 { print("[parser/error] open fail: " + path); return 2 }
local text = f.read(); f.close()
local ast = HakoParserCoreBox.parse(text)
local json = HakoAstEmitBox.to_json(ast)
print(json)
return 0
}
}
static box HakoParserCliMain { method main(args) { return HakoParserBox.run(args) } }