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
---
source: crates/aiken-lang/src/parser/expr/anonymous_function.rs
description: "Code:\n\nfn (Foo { my_field, .. } as x) { my_field * my_other_field }"
---
Fn {
location: 0..60,
fn_style: Plain,
arguments: [
UntypedArg {
by: ByPattern(
Assign {
name: "x",
location: 4..29,
pattern: Constructor {
is_record: true,
location: 4..24,
name: "Foo",
arguments: [
CallArg {
label: Some(
"my_field",
),
location: 10..18,
value: Var {
location: 10..18,
name: "my_field",
},
},
],
module: None,
constructor: (),
spread_location: Some(
20..22,
),
tipo: (),
},
},
),
location: 4..29,
annotation: None,
doc: None,
is_validator_param: false,
},
],
body: BinOp {
location: 33..58,
name: MultInt,
left: Var {
location: 33..41,
name: "my_field",
},
right: Var {
location: 44..58,
name: "my_other_field",
},
},
return_annotation: None,
}