line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
5
|
use Moops; |
|
2
|
|
|
|
|
1434
|
|
|
2
|
|
|
|
|
166
|
|
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# PODNAME: MarpaX::Languages::M4::Impl::Value |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# ABSTRACT: M4 Macro Parse Value generic implementation |
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
1
|
|
3166
|
class MarpaX::Languages::M4::Impl::Value { |
|
2
|
|
|
1
|
|
11875
|
|
|
2
|
|
|
|
|
3125
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
56
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
266
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
64
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
44
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
79
|
|
|
1
|
|
|
|
|
28
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
3517
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
371
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
123
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
71
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
179
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
803
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
1650
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
21
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
88
|
|
|
1
|
|
|
|
|
6287
|
|
8
|
1
|
|
|
1
|
|
355
|
use MarpaX::Languages::M4::Role::Value; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
9
|
|
9
|
1
|
|
|
1
|
|
429
|
use MarpaX::Languages::M4::Type::Macro -all; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
11
|
|
10
|
1
|
|
|
1
|
|
998
|
use MarpaX::Languages::M4::Type::Value -all; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
12
|
|
11
|
1
|
|
|
1
|
|
1090
|
use MooX::HandlesVia; |
|
1
|
|
|
|
|
677
|
|
|
1
|
|
|
|
|
5
|
|
12
|
1
|
|
|
1
|
|
386
|
use Types::Common::Numeric -all; |
|
1
|
|
|
|
|
9860
|
|
|
1
|
|
|
|
|
7
|
|
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
|
|
12
|
our $VERSION = '0.020'; # VERSION |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
|
|
3
|
our $AUTHORITY = 'cpan:JDDPAUSE'; # AUTHORITY |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
has _value => ( |
19
|
|
|
|
|
|
|
is => 'rw', |
20
|
|
|
|
|
|
|
isa => ArrayRef [ Str | M4Macro ], |
21
|
4999
|
|
|
|
|
216691
|
default => sub { [] }, |
22
|
1
|
|
|
|
|
5
|
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
|
18703
|
around BUILDARGS(CodeRef $orig: ClassName $class, @args) { |
|
1
|
50
|
|
9510
|
|
2
|
|
|
1
|
50
|
|
|
|
106
|
|
|
1
|
50
|
|
|
|
6
|
|
|
1
|
50
|
|
|
|
2
|
|
|
1
|
50
|
|
|
|
114
|
|
|
1
|
100
|
|
|
|
7
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
174
|
|
|
1
|
|
|
|
|
25305
|
|
|
9510
|
|
|
|
|
21399
|
|
|
9510
|
|
|
|
|
22685
|
|
|
9510
|
|
|
|
|
16742
|
|
|
9510
|
|
|
|
|
16449
|
|
|
9510
|
|
|
|
|
15925
|
|
|
9510
|
|
|
|
|
50099
|
|
|
9510
|
|
|
|
|
40571
|
|
|
9510
|
|
|
|
|
14594
|
|
|
9510
|
|
|
|
|
24597
|
|
|
4511
|
|
|
|
|
17323
|
|
|
4999
|
|
|
|
|
18865
|
|
|
4519
|
|
|
|
|
12941
|
|
|
4519
|
|
|
|
|
7056
|
|
36
|
4519
|
100
|
|
|
|
76287
|
if ( @args ) { |
37
|
2879
|
|
|
|
|
137163
|
return $class->$orig( _value => \@args ); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
else { |
40
|
2879
|
|
|
|
|
4378
|
return $class->$orig(); |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
}; |
43
|
|
|
|
|
|
|
|
44
|
1
|
50
|
|
1
|
|
1057
|
method value_elements { |
|
1
|
|
|
4519
|
|
2
|
|
|
1
|
|
|
|
|
67
|
|
|
9510
|
|
|
|
|
443197
|
|
|
2879
|
|
|
|
|
43406
|
|
|
5545
|
|
|
|
|
329261
|
|
45
|
5545
|
|
|
|
|
25047
|
return $self->_value_elements; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
1
|
50
|
|
1
|
|
1016
|
method value_firstElement { |
|
1
|
|
|
2879
|
|
1
|
|
|
1
|
|
|
|
|
70
|
|
|
9510
|
|
|
|
|
28189
|
|
|
5545
|
|
|
|
|
13247
|
|
|
5545
|
|
|
|
|
7948
|
|
49
|
5545
|
|
|
|
|
23160
|
return $self->_value_get(0); |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
1
|
50
|
66
|
1
|
|
5780
|
method value_push (Str|M4Macro @elements --> M4Value) { |
|
1
|
50
|
|
5545
|
|
2
|
|
|
1
|
50
|
|
|
|
107
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
153
|
|
|
9510
|
|
|
|
|
14256
|
|
|
5545
|
|
|
|
|
8945
|
|
|
5545
|
|
|
|
|
91860
|
|
|
5545
|
|
|
|
|
327912
|
|
|
7375
|
|
|
|
|
226219
|
|
|
7375
|
|
|
|
|
17619
|
|
|
7375
|
|
|
|
|
16833
|
|
53
|
7375
|
|
|
|
|
17097
|
$self->_value_push(@elements); |
54
|
4496
|
|
|
|
|
7784
|
return $self; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
1
|
50
|
33
|
1
|
|
8480
|
method value_concat (Undef|M4Macro $macro?, Undef|PositiveOrZeroInt $paramPos? --> M4Value) { |
|
1
|
50
|
|
7375
|
|
3
|
|
|
1
|
100
|
|
|
|
155
|
|
|
1
|
50
|
|
|
|
7
|
|
|
1
|
100
|
|
|
|
2
|
|
|
1
|
100
|
|
|
|
159
|
|
|
1
|
50
|
|
|
|
6
|
|
|
1
|
100
|
|
|
|
2
|
|
|
1
|
|
|
|
|
374
|
|
|
9510
|
|
|
|
|
24910
|
|
|
4496
|
|
|
|
|
12775
|
|
|
7375
|
|
|
|
|
101989
|
|
|
7375
|
|
|
|
|
15579
|
|
|
4496
|
|
|
|
|
6201
|
|
|
4496
|
|
|
|
|
18063
|
|
|
7375
|
|
|
|
|
12265
|
|
|
7375
|
|
|
|
|
132825
|
|
|
42
|
|
|
|
|
2925
|
|
|
42
|
|
|
|
|
1385
|
|
|
7333
|
|
|
|
|
362609
|
|
|
4454
|
|
|
|
|
222680
|
|
58
|
4454
|
100
|
|
|
|
192542
|
if ( $self->_value_count <= 0 ) { |
59
|
4454
|
|
|
|
|
10525
|
$self->_value( [''] ); |
60
|
12
|
|
|
|
|
517
|
return $self; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
4442
|
100
|
|
|
|
132436
|
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
|
|
|
|
|
236511
|
my $firstElement = $self->_value_get(0); |
69
|
2879
|
|
50
|
|
|
88467
|
$paramPos //= 0; |
70
|
2879
|
100
|
100
|
|
|
128325
|
if ( M4Macro->check($firstElement) |
71
|
|
|
|
|
|
|
&& $macro->macro_paramCanBeMacro($paramPos) ) |
72
|
|
|
|
|
|
|
{ |
73
|
|
|
|
|
|
|
# |
74
|
|
|
|
|
|
|
# Return first M4Macro element |
75
|
|
|
|
|
|
|
# |
76
|
7333
|
|
|
|
|
547269
|
$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
|
|
|
|
|
26855
|
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.020 |
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 |