line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# You may distribute under the terms of either the GNU General Public License |
2
|
|
|
|
|
|
|
# or the Artistic License (the same terms as Perl itself) |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# (C) Paul Evans, 2022-2023 -- leonerd@leonerd.org.uk |
5
|
|
|
|
|
|
|
|
6
|
8
|
|
|
8
|
|
605
|
use v5.26; |
|
8
|
|
|
|
|
27
|
|
7
|
8
|
|
|
8
|
|
45
|
use warnings; |
|
8
|
|
|
|
|
17
|
|
|
8
|
|
|
|
|
241
|
|
8
|
8
|
|
|
8
|
|
47
|
use utf8; |
|
8
|
|
|
|
|
16
|
|
|
8
|
|
|
|
|
54
|
|
9
|
|
|
|
|
|
|
|
10
|
8
|
|
|
8
|
|
942
|
use Object::Pad 0.800 ':experimental(adjust_params)'; |
|
8
|
|
|
|
|
11029
|
|
|
8
|
|
|
|
|
366
|
|
11
|
8
|
|
|
8
|
|
5014
|
use Object::Pad::FieldAttr::Checked; |
|
8
|
|
|
|
|
5260
|
|
|
8
|
|
|
|
|
48
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
package App::sdview::Parser 0.12; |
14
|
|
|
|
|
|
|
role App::sdview::Parser; |
15
|
|
|
|
|
|
|
|
16
|
8
|
|
|
8
|
|
7568
|
use String::Tagged; |
|
8
|
|
|
|
|
64323
|
|
|
8
|
|
|
|
|
368
|
|
17
|
8
|
|
|
8
|
|
4792
|
use Types::Standard; |
|
8
|
|
|
|
|
642524
|
|
|
8
|
|
|
|
|
87
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
my $ListType; |
20
|
|
|
|
|
|
|
BEGIN { |
21
|
8
|
|
|
8
|
|
5561
|
$ListType = Types::Standard::Enum[qw( bullet number text )]; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
# This package is empty but provides a bunch of helper classes |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
class App::sdview::Para::Heading :strict(params) { |
27
|
8
|
|
|
8
|
|
22996
|
use Types::Standard qw( InstanceOf Num ); |
|
8
|
|
|
|
|
22
|
|
|
8
|
|
|
|
|
59
|
|
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
|
0
|
field $level :param :reader :Checked(Num); |
|
0
|
|
|
|
|
0
|
|
30
|
31
|
|
|
31
|
|
910
|
field $text :param :reader :Checked(InstanceOf['String::Tagged']); |
|
31
|
|
|
|
|
149
|
|
31
|
|
|
|
|
|
|
|
32
|
36
|
|
|
36
|
|
2500
|
method type { "head" . $level } |
|
36
|
|
|
|
|
299
|
|
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
class App::sdview::Para::Plain :strict(params) { |
36
|
8
|
|
|
8
|
|
30931
|
use Types::Standard qw( InstanceOf Num ); |
|
8
|
|
|
|
|
19
|
|
|
8
|
|
|
|
|
77
|
|
37
|
|
|
|
|
|
|
|
38
|
144
|
|
|
144
|
|
4787
|
field $text :param :reader :Checked(InstanceOf['String::Tagged']); |
|
144
|
|
|
|
|
586
|
|
39
|
2
|
|
|
2
|
|
9
|
field $indent :param :reader :Checked(Num) = 0; |
40
|
|
|
|
|
|
|
|
41
|
2
|
|
|
93
|
|
11
|
method type { "plain" } |
|
93
|
|
|
|
|
992
|
|
|
93
|
|
|
|
|
456
|
|
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
class App::sdview::Para::Verbatim :strict(params) { |
45
|
8
|
|
|
8
|
|
3209
|
use Types::Standard qw( InstanceOf Num ); |
|
8
|
|
|
|
|
21
|
|
|
8
|
|
|
|
|
48
|
|
46
|
|
|
|
|
|
|
|
47
|
21
|
|
|
21
|
|
57
|
field $text :param :reader :Checked(InstanceOf['String::Tagged']); |
|
21
|
|
|
|
|
135
|
|
48
|
0
|
|
|
0
|
|
0
|
field $indent :param :reader :Checked(Num) = 0; |
49
|
|
|
|
|
|
|
|
50
|
0
|
|
|
8
|
|
0
|
method type { "verbatim" } |
|
8
|
|
|
|
|
24
|
|
|
8
|
|
|
|
|
63
|
|
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
class App::sdview::Para::List :strict(params) { |
54
|
8
|
|
|
8
|
|
3261
|
use Types::Standard qw( Num ); |
|
8
|
|
|
|
|
18
|
|
|
8
|
|
|
|
|
36
|
|
55
|
|
|
|
|
|
|
|
56
|
36
|
|
|
36
|
|
69
|
field $listtype :param :reader :Checked($ListType); |
|
36
|
|
|
|
|
158
|
|
57
|
24
|
|
|
24
|
|
60
|
field $indent :param :reader :Checked(Num); |
|
24
|
|
|
|
|
97
|
|
58
|
9
|
|
|
9
|
|
23
|
field $initial :param :reader :Checked(Num) = 1; # for number lists |
59
|
|
|
|
|
|
|
|
60
|
9
|
|
|
19
|
|
40
|
field @items :reader; |
|
19
|
|
|
|
|
64
|
|
|
19
|
|
|
|
|
73
|
|
61
|
|
|
|
|
|
|
|
62
|
61
|
|
|
61
|
|
477
|
method push_item ( $item ) { push @items, $item; } |
|
61
|
|
|
|
|
83
|
|
|
61
|
|
|
|
|
84
|
|
|
61
|
|
|
|
|
86
|
|
|
61
|
|
|
|
|
230
|
|
63
|
|
|
|
|
|
|
|
64
|
41
|
|
|
41
|
|
3585
|
method type { "list-$listtype" } |
|
41
|
|
|
|
|
277
|
|
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
class App::sdview::Para::ListItem :strict(params) { |
68
|
8
|
|
|
8
|
|
4872
|
use Types::Standard qw( InstanceOf Maybe ); |
|
8
|
|
|
|
|
18
|
|
|
8
|
|
|
|
|
38
|
|
69
|
|
|
|
|
|
|
|
70
|
50
|
|
|
50
|
|
90
|
field $listtype :param :reader :Checked($ListType); |
|
50
|
|
|
|
|
277
|
|
71
|
|
|
|
|
|
|
field $term :param :reader :Checked(Maybe[InstanceOf['String::Tagged']]) = undef; |
72
|
42
|
|
|
42
|
|
117
|
field $text :param :reader :Checked(InstanceOf['String::Tagged']); |
|
42
|
|
|
94
|
|
157
|
|
|
94
|
|
|
|
|
199
|
|
|
94
|
|
|
|
|
386
|
|
73
|
|
|
|
|
|
|
|
74
|
130
|
|
|
130
|
|
2883
|
method type { "item" } |
|
130
|
|
|
|
|
568
|
|
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
class App::sdview::Para::Table :strict(params) { |
78
|
5
|
|
|
5
|
|
438
|
method type { "table" } |
|
5
|
|
|
|
|
39
|
|
79
|
|
|
|
|
|
|
|
80
|
6
|
|
|
6
|
|
16
|
field @rows :reader; |
|
6
|
|
|
|
|
22
|
|
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
ADJUST :params ( :$rows ) { |
83
|
|
|
|
|
|
|
@rows = $rows->@*; |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
} |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
class App::sdview::Para::TableCell :isa(App::sdview::Para::Plain) :strict(params) { |
88
|
8
|
|
|
8
|
|
8008
|
use Types::Standard qw( Enum ); |
|
8
|
|
|
|
|
20
|
|
|
8
|
|
|
|
|
83
|
|
89
|
|
|
|
|
|
|
|
90
|
31
|
|
|
31
|
|
68
|
field $align :param :reader :Checked(Enum[qw( left centre right )]); |
|
31
|
|
|
|
|
127
|
|
91
|
|
|
|
|
|
|
|
92
|
4
|
|
|
4
|
|
389
|
method type { "table-cell" } |
|
4
|
|
|
|
|
20
|
|
93
|
|
|
|
|
|
|
} |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
0x55AA; |