Add function asting

Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
Marcel Müller 2026-03-13 09:08:06 +01:00
parent 70f616d60c
commit cb55c00739
4 changed files with 97 additions and 4 deletions

View file

@ -0,0 +1,53 @@
---
source: src/ast/mod.rs
expression: ast
---
TemplateAst {
root: [
Interpolation {
prev_whitespace_content: None,
expression: FunctionCall {
name: VariableAccess(
[Ident]"foo" (4..7),
),
args: [
Operation {
op: Times,
lhs: Literal {
source: [Literal(Integer(2))]"2" (8..9),
value: Integer {
value: 2,
},
},
rhs: Literal {
source: [Literal(Integer(3))]"3" (12..13),
value: Integer {
value: 3,
},
},
},
FunctionCall {
name: VariableAccess(
[Ident]"bar" (15..18),
),
args: [
Operation {
op: Plus,
lhs: Literal {
source: [Literal(Integer(2))]"2" (19..20),
value: Integer {
value: 2,
},
},
rhs: VariableAccess(
[Ident]"baz" (23..26),
),
},
],
},
],
},
post_whitespace_content: None,
},
],
}