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
60
61
62
---
source: crates/aiken-lang/src/parser/expr/anonymous_function.rs
description: "Code:\n\nfn (Foo { my_field } : Foo) { my_field * 2 }"
---
Fn {
location: 0..44,
fn_style: Plain,
arguments: [
UntypedArg {
by: ByPattern(
Constructor {
is_record: true,
location: 4..20,
name: "Foo",
arguments: [
CallArg {
label: Some(
"my_field",
),
location: 10..18,
value: Var {
location: 10..18,
name: "my_field",
},
},
],
module: None,
constructor: (),
spread_location: None,
tipo: (),
},
),
location: 4..26,
annotation: Some(
Constructor {
location: 23..26,
module: None,
name: "Foo",
arguments: [],
},
),
doc: None,
is_validator_param: false,
},
],
body: BinOp {
location: 30..42,
name: MultInt,
left: Var {
location: 30..38,
name: "my_field",
},
right: UInt {
location: 41..42,
value: "2",
base: Decimal {
numeric_underscore: false,
},
},
},
return_annotation: None,
}