主な変更: - ✅ HC011 (dead methods) 実装・テスト緑 - ✅ HC016 (unused alias) 実装・テスト緑 - ✅ HC017 (non-ascii quotes) 実装完了 - 🔧 tokenizer/parser_core 強化(AST優先ルート) - 🛡️ plugin_guard.rs 追加(stderr専用出力) - 📋 テストインフラ整備(run_tests.sh改善) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
19 lines
693 B
Plaintext
19 lines
693 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) } }
|