feat: 配列/Mapリテラル糖衣構文の実装とネームスペース解決の改善計画
- ArrayLiteral/MapLiteralのAST定義追加
- パーサーで[...]と{...}構文をサポート
- MIR Builderでnew Box() + push/setへのdesugaring実装
- テストケースとスモークスクリプト追加
- CURRENT_TASK.mdにネームスペース解決Phase-1計画を追記
- 3段階解決順序(ローカル→エイリアス→プラグイン)の設計合意
This commit is contained in:
@ -183,7 +183,7 @@ impl NyashRunner {
|
||||
// Prefer MIR signature when available, but fall back to runtime coercions to keep VM/JIT consistent.
|
||||
let (ety, sval) = if let Some(func) = compile_result.module.functions.get("main") {
|
||||
use nyash_rust::mir::MirType;
|
||||
use nyash_rust::box_trait::{NyashBox, IntegerBox, BoolBox, StringBox};
|
||||
use nyash_rust::box_trait::{IntegerBox, BoolBox, StringBox};
|
||||
use nyash_rust::boxes::FloatBox;
|
||||
match &func.signature.return_type {
|
||||
MirType::Float => {
|
||||
@ -272,7 +272,7 @@ impl NyashRunner {
|
||||
format!("./{}", filename)
|
||||
}
|
||||
|
||||
use std::collections::{HashSet, VecDeque};
|
||||
use std::collections::HashSet;
|
||||
|
||||
fn walk_with_state(node: &ASTNode, runtime: &NyashRuntime, stack: &mut Vec<String>, visited: &mut HashSet<String>) {
|
||||
match node {
|
||||
|
||||
Reference in New Issue
Block a user