Files
hakorune/docs/archive/roadmap/phases/phase-12.7/grammar-specs
nyash-codex 811dfebf98 fix(joinir): Phase 241-EX - Remove hardcoded 'sum' check from Pattern3
Remove legacy hardcoded 'sum' carrier validation that was blocking
array_filter patterns with different accumulator names (e.g., 'out').

Before: Pattern3 required carrier named 'sum' to exist
After: Pattern3 uses carrier_info generically (any carrier name works)

Test results:
- phase49_joinir_array_filter_smoke: PASS 
- phase49_joinir_array_filter_fallback: PASS 
- phase49_joinir_array_filter_ab_comparison: PASS 
- Full suite: 909/909 PASS, 0 FAIL

Also: Archive old roadmap documentation (67k lines moved to docs/archive/)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 00:48:42 +09:00
..

Nyash文法改革仕様書

このフォルダには、Phase 12.7で決定されたNyash文法改革の仕様書が含まれています。

📄 ドキュメント一覧

📝 最終決定事項

  • grammar-reform-final-decision.txt - 文法改革の最終決定
    • 予約語15個への削減
    • peek構文の導入
    • birth統一コンストラクタ
    • フィールド宣言の明示化

📐 技術仕様

  • grammar-technical-spec.txt - 詳細な技術仕様書
    • 構文のBNF定義
    • パーサー実装ガイド
    • 後方互換性の考慮事項

🎯 文法改革の要点

15個の予約語

box, new, me, public, if, else, loop, break, continue, 
peek, return, import, from, birth, fn

主要な変更点

1. peek構文switch/case代替

peek value {
    "hello" => print("Hi!")
    42 => print("The answer")
    else => print("Other")
}

2. birth統一コンストラクタ

box Life {
    init { name, energy }
    
    birth(lifeName) {  // すべてのBoxでbirth使用
        me.name = lifeName
        me.energy = 100
    }
}

3. fn{}でFunctionBox作成

local add = fn{a, b => a + b}

4. フィールド宣言の明示化

box Person {
    init { name, age }  // フィールドを明示的に宣言
}

🔄 実装状況

  • 仕様決定完了
  • ChatGPT5による基本実装
  • 🔄 テスト作成中
  • 📅 完全移行Phase 12.7-B

詳細な実装については、implementation/フォルダを参照してください。