51 lines
1.5 KiB
Text
51 lines
1.5 KiB
Text
---
|
|
source: tests/file_tests.rs
|
|
expression: ast
|
|
info:
|
|
input: "{{ if test }}\n Hello World!\n{{ end }}\n\n{{= stuff }}"
|
|
context:
|
|
stuff: more
|
|
test: true
|
|
---
|
|
TemplateAst {
|
|
root: [
|
|
ConditionalChain {
|
|
chain: [
|
|
Block {
|
|
prev_whitespace_content: None,
|
|
expression: IfConditional {
|
|
expression: VariableAccess(
|
|
[Ident]"test" (6..10),
|
|
),
|
|
},
|
|
post_whitespace_content: Some(
|
|
[Whitespace]"\n " (13..18),
|
|
),
|
|
},
|
|
ConditionalContent {
|
|
content: [
|
|
StaticContent(
|
|
[Content]"Hello World!" (18..30),
|
|
),
|
|
],
|
|
},
|
|
Block {
|
|
prev_whitespace_content: Some(
|
|
[Whitespace]"\n" (30..31),
|
|
),
|
|
expression: EndBlock,
|
|
post_whitespace_content: Some(
|
|
[Whitespace]"\n\n" (40..42),
|
|
),
|
|
},
|
|
],
|
|
},
|
|
Interpolation {
|
|
prev_whitespace_content: None,
|
|
expression: VariableAccess(
|
|
[Ident]"stuff" (46..51),
|
|
),
|
|
post_whitespace_content: None,
|
|
},
|
|
],
|
|
}
|