diff options
author | Vincent Ambo <mail@tazj.in> | 2022-08-09T14·44+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-08-13T18·28+0000 |
commit | a93933b487cf710400c9126d97450264138695df (patch) | |
tree | 3b8f747de27f73acb6c87893233335b60ca9a6c5 /tvix/eval/src/opcode.rs | |
parent | 3577841bdedddffb411c07ed050b25b986d1d0d6 (diff) |
feat(tvix): implement string interpolation r/4434
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>
Diffstat (limited to 'tvix/eval/src/opcode.rs')
-rw-r--r-- | tvix/eval/src/opcode.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tvix/eval/src/opcode.rs b/tvix/eval/src/opcode.rs index adfa2433fcc3..0af8f23fc79d 100644 --- a/tvix/eval/src/opcode.rs +++ b/tvix/eval/src/opcode.rs @@ -35,4 +35,7 @@ pub enum OpCode { // Lists OpList(usize), + + // Strings + OpInterpolate(usize), } |