🚀 feat: ":"継承演算子実装+全14Box型の包括的ドキュメント化完成

## 🔧 言語機能改善
- from予約語問題を解決する":"継承演算子を実装
- box Child : Parent 構文でより直感的な継承表現
- tokenizer/parserを更新、from を変数名として使用可能に

## 📚 ドキュメント大改善(1000行以上追加)
全14Box型に包括的なJavaDoc風ドキュメントを追加:
- StringBox: 文字列操作メソッド群
- IntegerBox/BoolBox: 基本データ型と演算子
- MathBox/RandomBox/TimeBox: 計算・ユーティリティ
- ConsoleBox/DebugBox/SoundBox: システムIO
- MapBox/NullBox: データ構造
- EguiBox: デスクトップGUI
- SimpleIntentBox: P2P通信

各Boxに概要・メソッド一覧・使用例・実用例・注意事項を完備

## 🧹 プロジェクト整理
- ルートディレクトリから60個のテストファイルを削除
  (development/root_tests/に移動済み)
- 不要ファイル削除: bmp, tar.xz, html, 空フォルダ等
- examplesフォルダへ適切なファイルを移動

## 📝 その他の更新
- CLAUDE.md: パーサーデバッグ機能の説明追加
- sessions/: AI相談記録2件を保存
  - from予約語問題の解決策検討
  - 標準Box型(ArrayBox等)の設計相談
This commit is contained in:
Moe Charm
2025-08-10 11:32:32 +09:00
parent e7f6666917
commit ccb3204a35
89 changed files with 1536 additions and 3027 deletions

View File

@ -1,5 +1,53 @@
// Nyash Box Implementations Module
// Everything is Box哲学に基づく各Box型の実装
/*! 🎯 Nyash Box実装モジュール
* Everything is Box哲学に基づく各Box型の実装
*
* ## 📦 利用可能なBox一覧
*
* ### 🔤 基本データ型Box
* - **StringBox**: 文字列操作 - `"Hello".length()`, `str.split(",")`
* - **IntegerBox**: 整数計算 - `42.add(8)`, `num.toString()`
* - **BoolBox**: 真偽値 - `true.not()`, `flag.toString()`
*
* ### 🧮 計算・ユーティリティBox
* - **MathBox**: 数学関数 - `Math.sin(x)`, `Math.random()`
* - **TimeBox**: 時間操作 - `Time.now()`, `time.format()`
* - **RandomBox**: 乱数生成 - `Random.int(10)`, `Random.choice(array)`
*
* ### 🖥️ システム・IO Box
* - **ConsoleBox**: コンソール出力 - `console.log()`, `console.error()`
* - **DebugBox**: デバッグ支援 - `debug.trace()`, `debug.memory()`
* - **SoundBox**: 音声再生 - `sound.beep()`, `sound.play(file)`
*
* ### 🗄️ コレクション・データBox
* - **MapBox**: キー値ストレージ - `map.set(key, val)`, `map.get(key)`
* - **NullBox**: NULL値表現 - `null.toString()` → "void"
*
* ### 🖼️ GUI・グラフィックBox
* - **EguiBox**: デスクトップGUI - `gui.setTitle()`, `gui.run()`
*
* ### 🌐 Web専用Box (WASM環境)
* - **WebDisplayBox**: HTML表示 - `display.show(html)`
* - **WebConsoleBox**: ブラウザコンソール - `webConsole.log()`
* - **WebCanvasBox**: Canvas描画 - `canvas.drawRect()`
*
* ### 🔗 通信・ネットワークBox
* - **SimpleIntentBox**: P2P通信 - `intent.send()`, `intent.on()`
*
* ## 💡 使用例
* ```nyash
* // 基本的な使い方
* local str, num, result
* str = "Nyash"
* num = 42
* result = str.concat(" v") + num.toString()
*
* // GUIアプリ作成
* local app
* app = new EguiBox()
* app.setTitle("My App")
* app.run()
* ```
*/
// Nyashは意図的にJavaScript/TypeScriptスタイルのcamelCase命名規約を採用
#![allow(non_snake_case)]