🚀 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:
36
examples/simple_editor.nyash
Normal file
36
examples/simple_editor.nyash
Normal file
@ -0,0 +1,36 @@
|
||||
// SimpleEditor - Nyash GUI Application
|
||||
// Everything is Box哲学によるテキストエディタ実装
|
||||
|
||||
// エディタアプリケーション
|
||||
box SimpleEditor {
|
||||
init { text, app }
|
||||
|
||||
SimpleEditor() {
|
||||
me.text = ""
|
||||
me.app = new EguiBox()
|
||||
me.app.setTitle("Nyash Simple Editor")
|
||||
me.app.setSize(800, 600)
|
||||
}
|
||||
|
||||
setText(newText) {
|
||||
me.text = newText
|
||||
}
|
||||
|
||||
getText() {
|
||||
return me.text
|
||||
}
|
||||
|
||||
run() {
|
||||
print("Starting Simple Editor...")
|
||||
// 現在はrun()がメインスレッド制約でエラーになるが、
|
||||
// 将来的にはGUIが起動する
|
||||
me.app.run()
|
||||
}
|
||||
}
|
||||
|
||||
// メイン処理
|
||||
local editor
|
||||
editor = new SimpleEditor()
|
||||
editor.setText("Welcome to Nyash Simple Editor!\nEverything is Box!")
|
||||
print("Text content: " + editor.getText())
|
||||
editor.run()
|
||||
Reference in New Issue
Block a user