about summary refs log tree commit diff
path: root/tvix/eval/src/compiler.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src/compiler.rs')
-rw-r--r--tvix/eval/src/compiler.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/tvix/eval/src/compiler.rs b/tvix/eval/src/compiler.rs
index 5ad8215b10d3..5da844448860 100644
--- a/tvix/eval/src/compiler.rs
+++ b/tvix/eval/src/compiler.rs
@@ -32,6 +32,12 @@ impl Compiler {
                 self.compile_string(op)
             }
 
+            // The interpolation node is just a wrapper around the
+            // inner value of a fragment, it only requires unwrapping.
+            rnix::SyntaxKind::NODE_STRING_INTERPOL => {
+                self.compile(node.first_child().expect("TODO (should not be possible)"))
+            }
+
             rnix::SyntaxKind::NODE_BIN_OP => {
                 let op = rnix::types::BinOp::cast(node).expect("TODO (should not be possible)");
                 self.compile_binop(op)
@@ -112,7 +118,7 @@ impl Compiler {
         }
 
         if count != 1 {
-            todo!("assemble string interpolation instruction")
+            self.chunk.add_op(OpCode::OpInterpolate(count));
         }
 
         Ok(())