line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
7
|
use Moops; |
|
2
|
|
|
|
|
1280
|
|
|
2
|
|
|
|
|
195
|
|
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# PODNAME: MarpaX::Languages::M4::Impl::Value |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# ABSTRACT: M4 Macro Parse Value generic implementation |
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
1
|
|
3048
|
class MarpaX::Languages::M4::Impl::Value { |
|
2
|
|
|
1
|
|
10563
|
|
|
2
|
|
|
|
|
4018
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
41
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
219
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
53
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
38
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
67
|
|
|
1
|
|
|
|
|
26
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
3461
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
308
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
111
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
103
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
219
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
728
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
1610
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
19
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
36
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
72
|
|
|
1
|
|
|
|
|
6084
|
|
8
|
1
|
|
|
1
|
|
261
|
use MarpaX::Languages::M4::Role::Value; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
9
|
1
|
|
|
1
|
|
314
|
use MarpaX::Languages::M4::Type::Macro -all; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
12
|
|
10
|
1
|
|
|
1
|
|
931
|
use MarpaX::Languages::M4::Type::Value -all; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
11
|
|
11
|
1
|
|
|
1
|
|
922
|
use MooX::HandlesVia; |
|
1
|
|
|
|
|
640
|
|
|
1
|
|
|
|
|
5
|
|
12
|
1
|
|
|
1
|
|
395
|
use Types::Common::Numeric -all; |
|
1
|
|
|
|
|
9659
|
|
|
1
|
|
|
|
|
6
|
|
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
|
|
10
|
our $VERSION = '0.018'; # VERSION |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
|
|
3
|
our $AUTHORITY = 'cpan:JDDPAUSE'; # AUTHORITY |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
has _value => ( |
19
|
|
|
|
|
|
|
is => 'rw', |
20
|
|
|
|
|
|
|
isa => ArrayRef [ Str | M4Macro ], |
21
|
4999
|
|
|
|
|
196886
|
default => sub { [] }, |
22
|
1
|
|
|
|
|
4
|
handles_via => 'Array', |
23
|
|
|
|
|
|
|
handles => { |
24
|
|
|
|
|
|
|
_value_push => 'push', |
25
|
|
|
|
|
|
|
_value_get => 'get', |
26
|
|
|
|
|
|
|
_value_count => 'count', |
27
|
|
|
|
|
|
|
_value_grep => 'grep', |
28
|
|
|
|
|
|
|
_value_elements => 'elements' |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
# |
33
|
|
|
|
|
|
|
# perltidier does not like around BUILDARGS(CodeRef $orig: ClassName $class, @args) |
34
|
|
|
|
|
|
|
# |
35
|
1
|
50
|
|
1
|
0
|
17680
|
around BUILDARGS(CodeRef $orig: ClassName $class, @args) { |
|
1
|
50
|
|
9510
|
|
3
|
|
|
1
|
50
|
|
|
|
88
|
|
|
1
|
50
|
|
|
|
6
|
|
|
1
|
50
|
|
|
|
2
|
|
|
1
|
50
|
|
|
|
113
|
|
|
1
|
100
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
182
|
|
|
1
|
|
|
|
|
20668
|
|
|
9510
|
|
|
|
|
19316
|
|
|
9510
|
|
|
|
|
23279
|
|
|
9510
|
|
|
|
|
12456
|
|
|
9510
|
|
|
|
|
16112
|
|
|
9510
|
|
|
|
|
15158
|
|
|
9510
|
|
|
|
|
43545
|
|
|
9510
|
|
|
|
|
29465
|
|
|
9510
|
|
|
|
|
14598
|
|
|
9510
|
|
|
|
|
18089
|
|
|
4511
|
|
|
|
|
12838
|
|
|
4999
|
|
|
|
|
13948
|
|
|
4519
|
|
|
|
|
10742
|
|
|
4519
|
|
|
|
|
5996
|
|
36
|
4519
|
100
|
|
|
|
69074
|
if ( @args ) { |
37
|
2879
|
|
|
|
|
127030
|
return $class->$orig( _value => \@args ); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
else { |
40
|
2879
|
|
|
|
|
4592
|
return $class->$orig(); |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
}; |
43
|
|
|
|
|
|
|
|
44
|
1
|
50
|
|
1
|
|
1028
|
method value_elements { |
|
1
|
|
|
4519
|
|
3
|
|
|
1
|
|
|
|
|
63
|
|
|
9510
|
|
|
|
|
398925
|
|
|
2879
|
|
|
|
|
42028
|
|
|
5545
|
|
|
|
|
295299
|
|
45
|
5545
|
|
|
|
|
19207
|
return $self->_value_elements; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
1
|
50
|
|
1
|
|
1069
|
method value_firstElement { |
|
1
|
|
|
2879
|
|
2
|
|
|
1
|
|
|
|
|
70
|
|
|
9510
|
|
|
|
|
22685
|
|
|
5545
|
|
|
|
|
12026
|
|
|
5545
|
|
|
|
|
7579
|
|
49
|
5545
|
|
|
|
|
21107
|
return $self->_value_get(0); |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
1
|
50
|
66
|
1
|
|
5165
|
method value_push (Str|M4Macro @elements --> M4Value) { |
|
1
|
50
|
|
5545
|
|
2
|
|
|
1
|
50
|
|
|
|
99
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
146
|
|
|
9510
|
|
|
|
|
14622
|
|
|
5545
|
|
|
|
|
8142
|
|
|
5545
|
|
|
|
|
84911
|
|
|
5545
|
|
|
|
|
305716
|
|
|
7375
|
|
|
|
|
198532
|
|
|
7375
|
|
|
|
|
15534
|
|
|
7375
|
|
|
|
|
14644
|
|
53
|
7375
|
|
|
|
|
15334
|
$self->_value_push(@elements); |
54
|
4496
|
|
|
|
|
5788
|
return $self; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
1
|
50
|
33
|
1
|
|
7704
|
method value_concat (Undef|M4Macro $macro?, Undef|PositiveOrZeroInt $paramPos? --> M4Value) { |
|
1
|
50
|
|
7375
|
|
2
|
|
|
1
|
100
|
|
|
|
122
|
|
|
1
|
50
|
|
|
|
6
|
|
|
1
|
100
|
|
|
|
2
|
|
|
1
|
100
|
|
|
|
150
|
|
|
1
|
50
|
|
|
|
5
|
|
|
1
|
100
|
|
|
|
2
|
|
|
1
|
|
|
|
|
323
|
|
|
9510
|
|
|
|
|
22003
|
|
|
4496
|
|
|
|
|
9580
|
|
|
7375
|
|
|
|
|
89906
|
|
|
7375
|
|
|
|
|
13803
|
|
|
4496
|
|
|
|
|
5630
|
|
|
4496
|
|
|
|
|
15013
|
|
|
7375
|
|
|
|
|
11247
|
|
|
7375
|
|
|
|
|
116550
|
|
|
42
|
|
|
|
|
2262
|
|
|
42
|
|
|
|
|
1237
|
|
|
7333
|
|
|
|
|
322321
|
|
|
4454
|
|
|
|
|
196802
|
|
58
|
4454
|
100
|
|
|
|
177019
|
if ( $self->_value_count <= 0 ) { |
59
|
4454
|
|
|
|
|
10048
|
$self->_value( [''] ); |
60
|
12
|
|
|
|
|
442
|
return $self; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
4442
|
100
|
|
|
|
116183
|
if ( M4Macro->check($macro) ) { |
64
|
|
|
|
|
|
|
# |
65
|
|
|
|
|
|
|
# If we are providing a macro parameter, then a M4Macro is allowed if |
66
|
|
|
|
|
|
|
# it is the first element |
67
|
|
|
|
|
|
|
# |
68
|
9904
|
|
|
|
|
219849
|
my $firstElement = $self->_value_get(0); |
69
|
2879
|
|
50
|
|
|
82056
|
$paramPos //= 0; |
70
|
2879
|
100
|
100
|
|
|
123185
|
if ( M4Macro->check($firstElement) |
71
|
|
|
|
|
|
|
&& $macro->macro_paramCanBeMacro($paramPos) ) |
72
|
|
|
|
|
|
|
{ |
73
|
|
|
|
|
|
|
# |
74
|
|
|
|
|
|
|
# Return first M4Macro element |
75
|
|
|
|
|
|
|
# |
76
|
7333
|
|
|
|
|
493156
|
$self->_value( [$firstElement] ); |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
else { |
79
|
|
|
|
|
|
|
# |
80
|
|
|
|
|
|
|
# Skip all M4Macro elements |
81
|
|
|
|
|
|
|
# |
82
|
|
|
|
|
|
|
$self->_value( |
83
|
|
|
|
|
|
|
[ join( '', |
84
|
|
|
|
9904
|
|
|
$self->_value_grep( sub { Str->check($_) } ) ) |
85
|
|
|
|
|
|
|
] |
86
|
|
|
|
|
|
|
); |
87
|
|
|
|
|
|
|
} |
88
|
|
|
|
|
|
|
} |
89
|
|
|
|
|
|
|
else { |
90
|
|
|
|
|
|
|
# |
91
|
|
|
|
|
|
|
# Skip all M4Macro elements |
92
|
|
|
|
|
|
|
# |
93
|
|
|
|
|
|
|
$self->_value( |
94
|
|
|
|
2879
|
|
|
[ join( '', $self->_value_grep( sub { Str->check($_) } ) ) ] |
95
|
|
|
|
|
|
|
); |
96
|
|
|
|
|
|
|
} |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
return $self; |
99
|
|
|
|
|
|
|
} |
100
|
|
|
|
|
|
|
|
101
|
9510
|
|
|
|
|
21302
|
with 'MarpaX::Languages::M4::Role::Value'; |
102
|
|
|
|
|
|
|
} |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
1; |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
__END__ |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=pod |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=encoding UTF-8 |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=head1 NAME |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
MarpaX::Languages::M4::Impl::Value - M4 Macro Parse Value generic implementation |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=head1 VERSION |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
version 0.018 |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=head1 AUTHOR |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
Jean-Damien Durand <jeandamiendurand@free.fr> |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
This software is copyright (c) 2015 by Jean-Damien Durand. |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
129
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=cut |