Add parsing for conditionals (cont.)

Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
Marcel Müller 2026-03-08 15:06:29 +01:00
parent 974086a877
commit 8afc2d1bde
29 changed files with 994 additions and 746 deletions

View file

@ -0,0 +1,42 @@
---
source: tests/file_tests.rs
expression: emit
input_file: tests/cases/condition.nomo
---
[
LoadFromContextToSlot {
name: "test" (6..10),
slot: VariableSlot {
index: 0,
},
},
JumpIfNotTrue {
emit_slot: VariableSlot {
index: 0,
},
jump: 3,
},
AppendContent {
content: "\n " (13..18),
},
AppendContent {
content: "Hello World!" (18..30),
},
AppendContent {
content: "\n" (30..31),
},
AppendContent {
content: "\n\n" (40..42),
},
LoadFromContextToSlot {
name: "stuff" (46..51),
slot: VariableSlot {
index: 1,
},
},
EmitFromSlot {
slot: VariableSlot {
index: 1,
},
},
]