about summary refs log tree commit diff
path: root/tvix/eval/src/eval.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src/eval.rs')
-rw-r--r--tvix/eval/src/eval.rs14
1 files changed, 11 insertions, 3 deletions
diff --git a/tvix/eval/src/eval.rs b/tvix/eval/src/eval.rs
index a12add48b552..31280e4cd197 100644
--- a/tvix/eval/src/eval.rs
+++ b/tvix/eval/src/eval.rs
@@ -14,8 +14,16 @@ pub fn interpret(code: &str) -> EvalResult<Value> {
         println!("{}", ast.root().dump());
     }
 
-    let code = crate::compiler::compile(ast)?;
-    println!("code: {:?}", code);
+    let result = crate::compiler::compile(ast)?;
+    println!("code: {:?}", result.chunk);
 
-    crate::vm::run_chunk(code)
+    for warning in result.warnings {
+        eprintln!(
+            "warning: {:?} at {:?}",
+            warning.kind,
+            warning.node.text_range().start()
+        )
+    }
+
+    crate::vm::run_chunk(result.chunk)
 }