line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
6
|
use Moops; |
|
2
|
|
|
|
|
1471
|
|
|
2
|
|
|
|
|
211
|
|
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# PODNAME: MarpaX::Languages::M4::Impl::Value |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# ABSTRACT: M4 Macro Parse Value generic implementation |
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
1
|
|
3773
|
class MarpaX::Languages::M4::Impl::Value { |
|
2
|
|
|
1
|
|
11738
|
|
|
2
|
|
|
|
|
2820
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
59
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
301
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
58
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
49
|
|
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
107
|
|
|
1
|
|
|
|
|
31
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
3903
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
527
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
13
|
|
|
1
|
|
|
|
|
170
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
86
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
216
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
1001
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
1766
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
25
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
45
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
103
|
|
|
1
|
|
|
|
|
6389
|
|
8
|
1
|
|
|
1
|
|
502
|
use MarpaX::Languages::M4::Role::Value; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
9
|
|
9
|
1
|
|
|
1
|
|
469
|
use MarpaX::Languages::M4::Type::Macro -all; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
12
|
|
10
|
1
|
|
|
1
|
|
1176
|
use MarpaX::Languages::M4::Type::Value -all; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
11
|
|
11
|
1
|
|
|
1
|
|
1077
|
use MooX::HandlesVia; |
|
1
|
|
|
|
|
795
|
|
|
1
|
|
|
|
|
9
|
|
12
|
1
|
|
|
1
|
|
581
|
use Types::Common::Numeric -all; |
|
1
|
|
|
|
|
10887
|
|
|
1
|
|
|
|
|
12
|
|
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
|
|
11
|
our $VERSION = '0.019'; # VERSION |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
|
|
3
|
our $AUTHORITY = 'cpan:JDDPAUSE'; # AUTHORITY |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
has _value => ( |
19
|
|
|
|
|
|
|
is => 'rw', |
20
|
|
|
|
|
|
|
isa => ArrayRef [ Str | M4Macro ], |
21
|
4999
|
|
|
|
|
208964
|
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
|
19863
|
around BUILDARGS(CodeRef $orig: ClassName $class, @args) { |
|
1
|
50
|
|
9510
|
|
2
|
|
|
1
|
50
|
|
|
|
106
|
|
|
1
|
50
|
|
|
|
6
|
|
|
1
|
50
|
|
|
|
2
|
|
|
1
|
50
|
|
|
|
116
|
|
|
1
|
100
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
171
|
|
|
1
|
|
|
|
|
22255
|
|
|
9510
|
|
|
|
|
22731
|
|
|
9510
|
|
|
|
|
22170
|
|
|
9510
|
|
|
|
|
13379
|
|
|
9510
|
|
|
|
|
14467
|
|
|
9510
|
|
|
|
|
12893
|
|
|
9510
|
|
|
|
|
47590
|
|
|
9510
|
|
|
|
|
31839
|
|
|
9510
|
|
|
|
|
15544
|
|
|
9510
|
|
|
|
|
20040
|
|
|
4511
|
|
|
|
|
14717
|
|
|
4999
|
|
|
|
|
16801
|
|
|
4519
|
|
|
|
|
11730
|
|
|
4519
|
|
|
|
|
6338
|
|
36
|
4519
|
100
|
|
|
|
74081
|
if ( @args ) { |
37
|
2879
|
|
|
|
|
138550
|
return $class->$orig( _value => \@args ); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
else { |
40
|
2879
|
|
|
|
|
4557
|
return $class->$orig(); |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
}; |
43
|
|
|
|
|
|
|
|
44
|
1
|
50
|
|
1
|
|
1085
|
method value_elements { |
|
1
|
|
|
4519
|
|
3
|
|
|
1
|
|
|
|
|
65
|
|
|
9510
|
|
|
|
|
422804
|
|
|
2879
|
|
|
|
|
43946
|
|
|
5545
|
|
|
|
|
317233
|
|
45
|
5545
|
|
|
|
|
23033
|
return $self->_value_elements; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
1
|
50
|
|
1
|
|
991
|
method value_firstElement { |
|
1
|
|
|
2879
|
|
2
|
|
|
1
|
|
|
|
|
70
|
|
|
9510
|
|
|
|
|
26180
|
|
|
5545
|
|
|
|
|
14919
|
|
|
5545
|
|
|
|
|
9209
|
|
49
|
5545
|
|
|
|
|
22587
|
return $self->_value_get(0); |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
1
|
50
|
66
|
1
|
|
5728
|
method value_push (Str|M4Macro @elements --> M4Value) { |
|
1
|
50
|
|
5545
|
|
2
|
|
|
1
|
50
|
|
|
|
106
|
|
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
153
|
|
|
9510
|
|
|
|
|
18543
|
|
|
5545
|
|
|
|
|
9757
|
|
|
5545
|
|
|
|
|
92542
|
|
|
5545
|
|
|
|
|
331546
|
|
|
7375
|
|
|
|
|
217011
|
|
|
7375
|
|
|
|
|
16316
|
|
|
7375
|
|
|
|
|
18599
|
|
53
|
7375
|
|
|
|
|
17232
|
$self->_value_push(@elements); |
54
|
4496
|
|
|
|
|
7323
|
return $self; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
1
|
50
|
33
|
1
|
|
8125
|
method value_concat (Undef|M4Macro $macro?, Undef|PositiveOrZeroInt $paramPos? --> M4Value) { |
|
1
|
50
|
|
7375
|
|
2
|
|
|
1
|
100
|
|
|
|
132
|
|
|
1
|
50
|
|
|
|
6
|
|
|
1
|
100
|
|
|
|
3
|
|
|
1
|
100
|
|
|
|
154
|
|
|
1
|
50
|
|
|
|
6
|
|
|
1
|
100
|
|
|
|
2
|
|
|
1
|
|
|
|
|
319
|
|
|
9510
|
|
|
|
|
22539
|
|
|
4496
|
|
|
|
|
10702
|
|
|
7375
|
|
|
|
|
100590
|
|
|
7375
|
|
|
|
|
15462
|
|
|
4496
|
|
|
|
|
6099
|
|
|
4496
|
|
|
|
|
15387
|
|
|
7375
|
|
|
|
|
14213
|
|
|
7375
|
|
|
|
|
124819
|
|
|
42
|
|
|
|
|
2323
|
|
|
42
|
|
|
|
|
1213
|
|
|
7333
|
|
|
|
|
355078
|
|
|
4454
|
|
|
|
|
216831
|
|
58
|
4454
|
100
|
|
|
|
192575
|
if ( $self->_value_count <= 0 ) { |
59
|
4454
|
|
|
|
|
10683
|
$self->_value( [''] ); |
60
|
12
|
|
|
|
|
503
|
return $self; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
4442
|
100
|
|
|
|
128770
|
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
|
|
|
|
|
240508
|
my $firstElement = $self->_value_get(0); |
69
|
2879
|
|
50
|
|
|
90890
|
$paramPos //= 0; |
70
|
2879
|
100
|
100
|
|
|
132638
|
if ( M4Macro->check($firstElement) |
71
|
|
|
|
|
|
|
&& $macro->macro_paramCanBeMacro($paramPos) ) |
72
|
|
|
|
|
|
|
{ |
73
|
|
|
|
|
|
|
# |
74
|
|
|
|
|
|
|
# Return first M4Macro element |
75
|
|
|
|
|
|
|
# |
76
|
7333
|
|
|
|
|
523526
|
$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
|
|
|
|
|
23813
|
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.019 |
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 |