Add conditional value emitting
Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
parent
662e574588
commit
9940881e46
10 changed files with 82 additions and 11 deletions
|
|
@ -4,8 +4,8 @@ expression: emit
|
|||
info:
|
||||
input: "{{ if test -}}\n Hello {{= stuff -}}\n{{- end }}"
|
||||
context:
|
||||
stuff: Hemera
|
||||
test: true
|
||||
stuff: Hemera
|
||||
---
|
||||
VMInstructions {
|
||||
labels: {
|
||||
|
|
@ -22,6 +22,7 @@ VMInstructions {
|
|||
slot: VariableSlot {
|
||||
index: 1,
|
||||
},
|
||||
fail_on_not_found: true,
|
||||
},
|
||||
JumpIfNotTrue {
|
||||
emit_slot: VariableSlot {
|
||||
|
|
@ -42,6 +43,7 @@ VMInstructions {
|
|||
slot: VariableSlot {
|
||||
index: 3,
|
||||
},
|
||||
fail_on_not_found: true,
|
||||
},
|
||||
EmitFromSlot {
|
||||
slot: VariableSlot {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue