line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::Xatena::Node::Comment; |
2
|
|
|
|
|
|
|
|
3
|
17
|
|
|
17
|
|
96
|
use strict; |
|
17
|
|
|
|
|
40
|
|
|
17
|
|
|
|
|
581
|
|
4
|
17
|
|
|
17
|
|
135
|
use warnings; |
|
17
|
|
|
|
|
33
|
|
|
17
|
|
|
|
|
493
|
|
5
|
17
|
|
|
17
|
|
83
|
use base qw(Text::Xatena::Node); |
|
17
|
|
|
|
|
35
|
|
|
17
|
|
|
|
|
365
|
|
6
|
|
|
|
|
|
|
use constant { |
7
|
17
|
|
|
|
|
3757
|
BEGINNING => qr/^(.*))?$/, |
8
|
|
|
|
|
|
|
ENDOFNODE => qr/^-->$/, |
9
|
17
|
|
|
17
|
|
103
|
}; |
|
17
|
|
|
|
|
59
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub parse { |
12
|
252
|
|
|
252
|
0
|
424
|
my ($class, $s, $parent, $stack) = @_; |
13
|
252
|
100
|
|
|
|
629
|
if ($s->scan(BEGINNING)) { |
14
|
8
|
|
|
|
|
30
|
my $pre = $s->matched->[1]; |
15
|
8
|
|
|
|
|
487
|
push @$parent, $pre; |
16
|
8
|
100
|
|
|
|
20
|
unless ($s->matched->[2]) { |
17
|
4
|
|
|
|
|
14
|
$s->scan_until(ENDOFNODE); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
8
|
|
|
|
|
44
|
my $node = $class->new; |
21
|
8
|
|
|
|
|
30
|
push @$parent, $node; |
22
|
8
|
|
|
|
|
52
|
return 1; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub as_html { |
27
|
8
|
|
|
8
|
0
|
15
|
my ($self, $context, %opts) = @_; |
28
|
8
|
|
|
|
|
28
|
''; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
__END__ |