feat: 配列/Mapリテラル糖衣構文の実装とネームスペース解決の改善計画

- ArrayLiteral/MapLiteralのAST定義追加
- パーサーで[...]と{...}構文をサポート
- MIR Builderでnew Box() + push/setへのdesugaring実装
- テストケースとスモークスクリプト追加
- CURRENT_TASK.mdにネームスペース解決Phase-1計画を追記
- 3段階解決順序(ローカル→エイリアス→プラグイン)の設計合意
This commit is contained in:
Selfhosting Dev
2025-09-16 06:13:44 +09:00
parent 18bc386bc5
commit 6ca56b0652
27 changed files with 446 additions and 50 deletions

View File

@ -47,7 +47,7 @@ impl NyashInterpreter {
}
"MathBox" => {
if let Ok(reg) = self.runtime.box_registry.lock() {
if let Ok(b) = reg.create_box("MathBox", &[]) {
if let Ok(_b) = reg.create_box("MathBox", &[]) {
// Note: execute_math_method expects builtin MathBox; plugin path should route via VM/BoxCall in new pipeline.
// Here we simply return void; method paths should prefer plugin invoke in VM.
return Ok(Box::new(VoidBox::new()));