1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
source: xee-xpath-ast/src/parser/mod.rs
expression: "ast::ExprSingle::parse(\"function($x, $y) { $x + $y }\")"
---
Ok(Path(PathExpr(
steps: [
PrimaryExpr(InlineFunction(InlineFunction(
params: [
Param(
name: OwnedName(
local_name_str: "x",
namespace_str: "",
prefix_str: "",
),
type_: None,
),
Param(
name: OwnedName(
local_name_str: "y",
namespace_str: "",
prefix_str: "",
),
type_: None,
),
],
return_type: None,
body: Some(Expr([
Path(PathExpr(
steps: [
PrimaryExpr(Expr(Some(Expr([
Binary(BinaryExpr(
operator: Add,
left: PathExpr(
steps: [
PrimaryExpr(VarRef(OwnedName(
local_name_str: "x",
namespace_str: "",
prefix_str: "",
))),
],
),
right: PathExpr(
steps: [
PrimaryExpr(VarRef(OwnedName(
local_name_str: "y",
namespace_str: "",
prefix_str: "",
))),
],
),
)),
])))),
],
)),
])),
wrapper: false,
))),
],
)))