diff options
author | Vincent Ambo <mail@tazj.in> | 2022-08-10T16·10+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-08-24T21·25+0000 |
commit | 8235384d2d72514e1ef67de1782dc9f604039435 (patch) | |
tree | bfdc0ce3e53285a53d80827f525eae3742395a1f /tvix/eval/src | |
parent | 5685f7c59402439af33f7b6fc1114557f0c33477 (diff) |
chore(tvix/eval): only print AST if requested r/4463
Change-Id: If32c7fd03458a27aecb8c473f2c48b12f8cb5175 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6128 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi> Autosubmit: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/eval/src')
-rw-r--r-- | tvix/eval/src/eval.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tvix/eval/src/eval.rs b/tvix/eval/src/eval.rs index 5e6c53cd8bf5..a12add48b552 100644 --- a/tvix/eval/src/eval.rs +++ b/tvix/eval/src/eval.rs @@ -10,7 +10,9 @@ pub fn interpret(code: &str) -> EvalResult<Value> { todo!() } - println!("{}", ast.root().dump()); + if let Ok(_) = std::env::var("TVIX_DISPLAY_AST") { + println!("{}", ast.root().dump()); + } let code = crate::compiler::compile(ast)?; println!("code: {:?}", code); |