Introduce JumpLabels instead of manually correct jump positions

Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
Marcel Müller 2026-03-11 15:50:05 +01:00
parent e64256b65f
commit 7182024342
12 changed files with 485 additions and 381 deletions

View file

@ -3,22 +3,25 @@ source: tests/file_tests.rs
expression: emit
input_file: tests/cases/interpolation.nomo
---
[
AppendContent {
content: "Hello! I'm" (0..10),
},
AppendContent {
content: " " (10..11),
},
LoadFromContextToSlot {
name: "name" (15..19),
slot: VariableSlot {
index: 0,
VMInstructions {
labels: {},
instructions: [
AppendContent {
content: "Hello! I'm" (0..10),
},
},
EmitFromSlot {
slot: VariableSlot {
index: 0,
AppendContent {
content: " " (10..11),
},
},
]
LoadFromContextToSlot {
name: "name" (15..19),
slot: VariableSlot {
index: 0,
},
},
EmitFromSlot {
slot: VariableSlot {
index: 0,
},
},
],
}