Add parsing for conditionals (cont.)
Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
parent
974086a877
commit
8afc2d1bde
29 changed files with 994 additions and 746 deletions
|
|
@ -6,46 +6,23 @@ input_file: tests/cases/multiple.nomo
|
|||
TemplateAst {
|
||||
root: [
|
||||
StaticContent(
|
||||
TemplateToken {
|
||||
kind: Content,
|
||||
source: "Hi there! My name is",
|
||||
},
|
||||
"Hi there! My name is" (0..20),
|
||||
),
|
||||
Interpolation {
|
||||
prev_whitespace_content: Some(
|
||||
TemplateToken {
|
||||
kind: Whitespace,
|
||||
source: " ",
|
||||
},
|
||||
" " (20..21),
|
||||
),
|
||||
wants_output: TemplateToken {
|
||||
kind: WantsOutput,
|
||||
source: "=",
|
||||
},
|
||||
expression: VariableAccess(
|
||||
TemplateToken {
|
||||
kind: Ident,
|
||||
source: "name",
|
||||
},
|
||||
"name" (25..29),
|
||||
),
|
||||
post_whitespace_content: Some(
|
||||
TemplateToken {
|
||||
kind: Whitespace,
|
||||
source: " ",
|
||||
},
|
||||
" " (32..33),
|
||||
),
|
||||
},
|
||||
Interpolation {
|
||||
prev_whitespace_content: None,
|
||||
wants_output: TemplateToken {
|
||||
kind: WantsOutput,
|
||||
source: "=",
|
||||
},
|
||||
expression: VariableAccess(
|
||||
TemplateToken {
|
||||
kind: Ident,
|
||||
source: "lastname",
|
||||
},
|
||||
"lastname" (37..45),
|
||||
),
|
||||
post_whitespace_content: None,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue