90 lines
2 KiB
Text
90 lines
2 KiB
Text
---
|
|
source: tests/file_tests.rs
|
|
expression: emit
|
|
info:
|
|
input: "{{ if test }}\n Not Hello World! :C\n{{ else if another_test }}\n Hello World!\n{{ end }}"
|
|
context:
|
|
test: false
|
|
stuff: more
|
|
another_test: true
|
|
---
|
|
VMInstructions {
|
|
labels: {
|
|
LabelSlot {
|
|
index: 0,
|
|
}: 14,
|
|
LabelSlot {
|
|
index: 2,
|
|
}: 7,
|
|
LabelSlot {
|
|
index: 4,
|
|
}: 14,
|
|
},
|
|
instructions: [
|
|
LoadFromContextToSlot {
|
|
name: "test" (6..10),
|
|
slot: VariableSlot {
|
|
index: 1,
|
|
},
|
|
fail_on_not_found: true,
|
|
},
|
|
JumpIfNotTrue {
|
|
emit_slot: VariableSlot {
|
|
index: 1,
|
|
},
|
|
jump: LabelSlot {
|
|
index: 2,
|
|
},
|
|
},
|
|
AppendContent {
|
|
content: "\n " (13..18),
|
|
},
|
|
AppendContent {
|
|
content: "Not Hello World! :C" (18..37),
|
|
},
|
|
AppendContent {
|
|
content: "\n" (37..38),
|
|
},
|
|
Jump {
|
|
jump: LabelSlot {
|
|
index: 0,
|
|
},
|
|
},
|
|
AppendContent {
|
|
content: "\n " (13..18),
|
|
},
|
|
LoadFromContextToSlot {
|
|
name: "another_test" (49..61),
|
|
slot: VariableSlot {
|
|
index: 3,
|
|
},
|
|
fail_on_not_found: true,
|
|
},
|
|
JumpIfNotTrue {
|
|
emit_slot: VariableSlot {
|
|
index: 3,
|
|
},
|
|
jump: LabelSlot {
|
|
index: 4,
|
|
},
|
|
},
|
|
AppendContent {
|
|
content: "\n " (64..69),
|
|
},
|
|
AppendContent {
|
|
content: "Hello World!" (69..81),
|
|
},
|
|
AppendContent {
|
|
content: "\n" (81..82),
|
|
},
|
|
Jump {
|
|
jump: LabelSlot {
|
|
index: 0,
|
|
},
|
|
},
|
|
AppendContent {
|
|
content: "\n " (64..69),
|
|
},
|
|
NoOp,
|
|
],
|
|
}
|