feat(tvix): implement string interpolation

This adds a new instruction which assembles an interpolated string
from a specified number of fragments, which are already going to be
located on the stack in the right position.

This will raise a type error if any of the fragments do not evaluate
to a string.

Change-Id: I5756248fa3e9fcc3d063c14db40b332f7e20a588
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6098
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
This commit is contained in:
Vincent Ambo 2022-08-09 17:44:34 +03:00 committed by tazjin
parent 3577841bde
commit a93933b487
3 changed files with 25 additions and 1 deletions

View file

@ -35,4 +35,7 @@ pub enum OpCode {
// Lists
OpList(usize),
// Strings
OpInterpolate(usize),
}