Phase 2 Complete: Conditional debug system + Final verification

Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-08-20 00:12:35 +00:00
parent ce16f592b8
commit 46836680b9
3 changed files with 33 additions and 6 deletions

View File

@ -29,6 +29,15 @@ fn debug_log(msg: &str) {
}
}
// Conditional debug macro - only outputs if NYASH_DEBUG=1 environment variable is set
macro_rules! debug_trace {
($($arg:tt)*) => {
if std::env::var("NYASH_DEBUG").unwrap_or_default() == "1" {
eprintln!($($arg)*);
}
};
}
/// 実行時エラー
#[derive(Error, Debug)]
pub enum RuntimeError {