nomo/tests/cases/multiple.3-instructions.snap
Marcel Müller 9940881e46 Add conditional value emitting
Signed-off-by: Marcel Müller <neikos@neikos.email>
2026-03-15 12:46:00 +01:00

47 lines
1 KiB
Text

---
source: tests/file_tests.rs
expression: emit
info:
input: "Hi there! My name is {{= name }} {{= lastname }}"
context:
name: Hemera
lastname: Green
---
VMInstructions {
labels: {},
instructions: [
AppendContent {
content: "Hi there! My name is" (0..20),
},
AppendContent {
content: " " (20..21),
},
LoadFromContextToSlot {
name: "name" (25..29),
slot: VariableSlot {
index: 0,
},
fail_on_not_found: true,
},
EmitFromSlot {
slot: VariableSlot {
index: 0,
},
},
AppendContent {
content: " " (32..33),
},
LoadFromContextToSlot {
name: "lastname" (37..45),
slot: VariableSlot {
index: 1,
},
fail_on_not_found: true,
},
EmitFromSlot {
slot: VariableSlot {
index: 1,
},
},
],
}