| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Jmespath::Ast; |
|
2
|
2
|
|
|
2
|
|
8
|
use strict; |
|
|
2
|
|
|
|
|
1
|
|
|
|
2
|
|
|
|
|
47
|
|
|
3
|
2
|
|
|
2
|
|
6
|
use warnings; |
|
|
2
|
|
|
|
|
2
|
|
|
|
2
|
|
|
|
|
923
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub comparator { |
|
7
|
119
|
|
|
119
|
0
|
112
|
my ($class, $name, $first, $second) = @_; |
|
8
|
119
|
|
|
|
|
327
|
return { type => 'comparator', |
|
9
|
|
|
|
|
|
|
children => [$first, $second], |
|
10
|
|
|
|
|
|
|
value => $name, |
|
11
|
|
|
|
|
|
|
}; |
|
12
|
|
|
|
|
|
|
} |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub current_node { |
|
15
|
20
|
|
|
20
|
0
|
53
|
return { type => 'current', children => [] }; |
|
16
|
|
|
|
|
|
|
} |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub expref { |
|
19
|
28
|
|
|
28
|
0
|
27
|
my ( $class, $expression ) = @_; |
|
20
|
28
|
|
|
|
|
68
|
return { type => 'expref', 'children' => [$expression] }; |
|
21
|
|
|
|
|
|
|
} |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub function_expression { |
|
24
|
177
|
|
|
177
|
0
|
174
|
my ($class, $name, $args) = @_; |
|
25
|
177
|
|
|
|
|
474
|
return { type => 'function_expression', children => $args, value => $name }; |
|
26
|
|
|
|
|
|
|
} |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub field { |
|
29
|
1453
|
|
|
1453
|
0
|
1270
|
my ($class, $name) = @_; |
|
30
|
1453
|
|
|
|
|
3806
|
return { type => 'field', children => [], value => $name }; |
|
31
|
|
|
|
|
|
|
} |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub filter_projection { |
|
34
|
81
|
|
|
81
|
0
|
78
|
my ($class, $left, $right, $comp) = @_; |
|
35
|
81
|
|
|
|
|
186
|
return { type => 'filter_projection', children => [ $left, $right, $comp ] }; |
|
36
|
|
|
|
|
|
|
} |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub flatten { |
|
39
|
96
|
|
|
96
|
0
|
91
|
my ($class, $node) = @_; |
|
40
|
96
|
|
|
|
|
238
|
return { type => 'flatten', children => [$node] }; |
|
41
|
|
|
|
|
|
|
} |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub identity { |
|
44
|
253
|
|
|
253
|
0
|
612
|
return { type => 'identity', 'children' => [] }; |
|
45
|
|
|
|
|
|
|
} |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub index_of { |
|
48
|
113
|
|
|
113
|
0
|
100
|
my ($class, $index) = @_; |
|
49
|
113
|
|
|
|
|
284
|
return { type => 'index', value => $index, children => [] }; |
|
50
|
|
|
|
|
|
|
} |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub index_expression { |
|
53
|
130
|
|
|
130
|
0
|
123
|
my ($class, $children) = @_; |
|
54
|
130
|
|
|
|
|
235
|
return { type => 'index_expression', children => $children }; |
|
55
|
|
|
|
|
|
|
} |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub key_val_pair { |
|
58
|
64
|
|
|
64
|
0
|
65
|
my ($class, $key_name, $node) = @_; |
|
59
|
64
|
|
|
|
|
151
|
return { type => 'key_val_pair', children => [$node], value => $key_name }; |
|
60
|
|
|
|
|
|
|
} |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub literal { |
|
63
|
226
|
|
|
226
|
0
|
186
|
my ($class, $literal_value) = @_; |
|
64
|
226
|
|
|
|
|
568
|
return { type => 'literal', value => $literal_value, children => [] }; |
|
65
|
|
|
|
|
|
|
} |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
sub multi_select_hash { |
|
68
|
34
|
|
|
34
|
0
|
38
|
my ($class, $nodes) = @_; |
|
69
|
34
|
|
|
|
|
91
|
return {type => 'multi_select_hash', children => $nodes }; |
|
70
|
|
|
|
|
|
|
} |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub multi_select_list { |
|
73
|
31
|
|
|
31
|
0
|
34
|
my ($class, $nodes) = @_; |
|
74
|
31
|
|
|
|
|
78
|
return { type => 'multi_select_list', children => $nodes }; |
|
75
|
|
|
|
|
|
|
} |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub or_expression { |
|
78
|
48
|
|
|
48
|
0
|
44
|
my ($class, $left, $right) = @_; |
|
79
|
48
|
|
|
|
|
103
|
return { type => 'or_expression', children => [$left, $right]}; |
|
80
|
|
|
|
|
|
|
} |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
sub and_expression { |
|
83
|
30
|
|
|
30
|
0
|
30
|
my ($class, $left, $right) = @_; |
|
84
|
30
|
|
|
|
|
69
|
return { type => 'and_expression', children => [$left, $right]}; |
|
85
|
|
|
|
|
|
|
} |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
sub not_expression { |
|
88
|
14
|
|
|
14
|
0
|
13
|
my ($class, $expr) = @_; |
|
89
|
14
|
|
|
|
|
34
|
return { type => 'not_expression', children => [$expr] }; |
|
90
|
|
|
|
|
|
|
} |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
sub pipe_oper { |
|
93
|
22
|
|
|
22
|
0
|
33
|
my ($class, $left, $right) = @_; |
|
94
|
22
|
|
|
|
|
52
|
return { type => 'pipe', children => [$left, $right]}; |
|
95
|
|
|
|
|
|
|
} |
|
96
|
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
sub projection { |
|
98
|
191
|
|
|
191
|
0
|
187
|
my ($class, $left, $right) = @_; |
|
99
|
191
|
|
|
|
|
477
|
return { type => 'projection', children => [$left, $right] }; |
|
100
|
|
|
|
|
|
|
} |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
sub subexpression { |
|
103
|
153
|
|
|
153
|
0
|
130
|
my ($class, $children) = @_; |
|
104
|
153
|
|
|
|
|
352
|
return { type => 'subexpression', children => $children}; |
|
105
|
|
|
|
|
|
|
} |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
sub slice { |
|
108
|
38
|
|
|
38
|
0
|
43
|
my ($class, $start, $end, $step) = @_; |
|
109
|
38
|
|
|
|
|
133
|
return { type => 'slice', children => [$start, $end, $step]}; |
|
110
|
|
|
|
|
|
|
} |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
sub value_projection { |
|
113
|
55
|
|
|
55
|
0
|
54
|
my ($class, $left, $right) = @_; |
|
114
|
55
|
|
|
|
|
141
|
return { type => 'value_projection', children => [$left, $right] }; |
|
115
|
|
|
|
|
|
|
} |
|
116
|
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
1; |