Phase 30.1 & 73: Stage-3 features env and JoinIR flag cleanup

This commit is contained in:
nyash-codex
2025-11-30 14:30:28 +09:00
parent 2ea0f2a202
commit a3d5bacc55
163 changed files with 638 additions and 576 deletions

View File

@ -192,16 +192,7 @@ impl NyashParser {
/// Helper: env-gated Stage-3 enable check.
fn is_stage3_enabled() -> bool {
let on = |key: &str| {
std::env::var(key)
.ok()
.map(|v| {
let lv = v.to_ascii_lowercase();
lv == "1" || lv == "true" || lv == "on"
})
.unwrap_or(false)
};
on("NYASH_PARSER_STAGE3") || on("HAKO_PARSER_STAGE3")
crate::config::env::parser_stage3_enabled()
}
/// Parse break statement