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:
@ -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();
|
||||
|
||||
Reference in New Issue
Block a user