refactor(compiler): Stage-B compiler simplification and test infrastructure
**Compiler Simplification (compiler_stageb.hako):** - Remove complex fallback system (_fallback_enabled, _fallback_program) - Remove flag parsing system (_collect_flags, _parse_signed_int) - Streamline to single-method implementation (main only) - Focus: parse args/env → extract main body → FlowEntry emit - 149 lines simplified, better maintainability **Parser Cleanup:** - Fix trailing whitespace in members.rs (static_def) - Add child_env module to runner/mod.rs **Test Infrastructure (stageb_helpers.sh):** - Enhance Stage-B test helper functions - Better error handling and diagnostics **Context:** These changes were made during PHI UseBeforeDef debugging session. Simplified compiler_stageb.hako eliminates unnecessary complexity while maintaining core Stage-B compilation functionality. **Impact:** ✅ Reduced Stage-B compiler complexity (-12 lines net) ✅ Clearer single-responsibility implementation ✅ Better test infrastructure support 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -17,6 +17,7 @@ use nyash_rust::backend::llvm_compile_and_execute;
|
||||
use std::{fs, process};
|
||||
mod box_index;
|
||||
mod build;
|
||||
pub(crate) mod child_env;
|
||||
mod cli_directives;
|
||||
mod demos;
|
||||
mod dispatch;
|
||||
|
||||
Reference in New Issue
Block a user