Phase 25.1b: Step2完了(FuncBodyBasicLowerBox導入)

Step2実装内容:
- FuncBodyBasicLowerBox導入(defs専用下請けモジュール)
- _try_lower_local_if_return実装(Local+単純if)
- _inline_local_ints実装(軽い正規化)
- minimal lowers統合(Return/BinOp/IfCompare/MethodArray系)

Fail-Fast体制確立:
- MirBuilderBox: defs_onlyでも必ずタグ出力
- [builder/selfhost-first:unsupported:defs_only]
- [builder/selfhost-first:unsupported:no_match]

Phase構造整備:
- Phase 25.1b README新設(Step0-3計画)
- Phase 25.2b README新設(次期計画)
- UsingResolverBox追加(using system対応準備)

スモークテスト:
- stage1_launcher_program_to_mir_canary_vm.sh追加

Next: Step3 LoopForm対応

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
nyash-codex
2025-11-15 22:32:13 +09:00
parent 6856922374
commit 7ca7f646de
31 changed files with 1670 additions and 323 deletions

View File

@ -106,6 +106,9 @@ pub enum ParseError {
#[error("Invalid statement at line {line}")]
InvalidStatement { line: usize },
#[error("Unsupported identifier '{name}' at line {line}")]
UnsupportedIdentifier { name: String, line: usize },
#[error("Circular dependency detected between static boxes: {cycle}")]
CircularDependency { cycle: String },
@ -215,6 +218,17 @@ impl NyashParser {
let mut tokenizer = crate::tokenizer::NyashTokenizer::new(pre);
let tokens = tokenizer.tokenize()?;
for tok in &tokens {
if let TokenType::IDENTIFIER(name) = &tok.token_type {
if name == "self" {
return Err(ParseError::UnsupportedIdentifier {
name: name.clone(),
line: tok.line,
});
}
}
}
let mut parser = Self::new(tokens);
parser.debug_fuel = fuel;
let result = parser.parse();