Add if else if chains
Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
parent
ef02e94591
commit
ff308649b9
10 changed files with 241 additions and 115 deletions
|
|
@ -7,16 +7,16 @@ TemplateAst {
|
|||
root: [
|
||||
ConditionalChain {
|
||||
chain: [
|
||||
IfConditional {
|
||||
if_block: Block {
|
||||
prev_whitespace_content: None,
|
||||
Block {
|
||||
prev_whitespace_content: None,
|
||||
expression: IfConditional {
|
||||
expression: VariableAccess(
|
||||
[Ident]"test" (6..10),
|
||||
),
|
||||
post_whitespace_content: Some(
|
||||
[Whitespace]"\n " (13..18),
|
||||
),
|
||||
},
|
||||
post_whitespace_content: Some(
|
||||
[Whitespace]"\n " (13..18),
|
||||
),
|
||||
},
|
||||
ConditionalContent {
|
||||
content: [
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ input_file: tests/cases/condition.nomo
|
|||
emit_slot: VariableSlot {
|
||||
index: 0,
|
||||
},
|
||||
jump: 3,
|
||||
jump: 9223372036854775807,
|
||||
},
|
||||
AppendContent {
|
||||
content: "\n " (13..18),
|
||||
|
|
@ -22,6 +22,12 @@ input_file: tests/cases/condition.nomo
|
|||
AppendContent {
|
||||
content: "Hello World!" (18..30),
|
||||
},
|
||||
Jump {
|
||||
jump: 3,
|
||||
},
|
||||
AppendContent {
|
||||
content: "\n " (13..18),
|
||||
},
|
||||
AppendContent {
|
||||
content: "\n" (30..31),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@ source: tests/file_tests.rs
|
|||
expression: output
|
||||
input_file: tests/cases/condition.nomo
|
||||
---
|
||||
"\n Hello World!\n\n\nmore"
|
||||
"\n Hello World!\n\nmore"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue