Parse and ast math expressions
Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
parent
8cc8488de4
commit
8c02dbd672
8 changed files with 196 additions and 51 deletions
|
|
@ -1,6 +1,15 @@
|
|||
---
|
||||
source: tests/file_tests.rs
|
||||
expression: ast
|
||||
info:
|
||||
input: "{{= _name }}\n{{= a_name }}\n{{= name }}\n{{= _name1 }}\n{{= _namE }}\n{{= name1 }}"
|
||||
context:
|
||||
_namE: Foo
|
||||
name1: Foo
|
||||
name: Foo
|
||||
_name: Foo
|
||||
a_name: Foo
|
||||
_name1: Foo
|
||||
input_file: tests/cases/identifiers.nomo
|
||||
---
|
||||
TemplateAst {
|
||||
|
|
@ -26,34 +35,34 @@ TemplateAst {
|
|||
Interpolation {
|
||||
prev_whitespace_content: None,
|
||||
expression: VariableAccess(
|
||||
[Ident]"1name" (31..36),
|
||||
[Ident]"name" (31..35),
|
||||
),
|
||||
post_whitespace_content: Some(
|
||||
[Whitespace]"\n" (39..40),
|
||||
[Whitespace]"\n" (38..39),
|
||||
),
|
||||
},
|
||||
Interpolation {
|
||||
prev_whitespace_content: None,
|
||||
expression: VariableAccess(
|
||||
[Ident]"_name1" (44..50),
|
||||
[Ident]"_name1" (43..49),
|
||||
),
|
||||
post_whitespace_content: Some(
|
||||
[Whitespace]"\n" (53..54),
|
||||
[Whitespace]"\n" (52..53),
|
||||
),
|
||||
},
|
||||
Interpolation {
|
||||
prev_whitespace_content: None,
|
||||
expression: VariableAccess(
|
||||
[Ident]"_namE" (58..63),
|
||||
[Ident]"_namE" (57..62),
|
||||
),
|
||||
post_whitespace_content: Some(
|
||||
[Whitespace]"\n" (66..67),
|
||||
[Whitespace]"\n" (65..66),
|
||||
),
|
||||
},
|
||||
Interpolation {
|
||||
prev_whitespace_content: None,
|
||||
expression: VariableAccess(
|
||||
[Ident]"name1" (71..76),
|
||||
[Ident]"name1" (70..75),
|
||||
),
|
||||
post_whitespace_content: None,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue