line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# pyyaml/lib/yaml/tokens.py |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package YAML::Perl::Tokens; |
4
|
8
|
|
|
8
|
|
43
|
use strict; |
|
8
|
|
|
|
|
21
|
|
|
8
|
|
|
|
|
309
|
|
5
|
8
|
|
|
8
|
|
43
|
use warnings; |
|
8
|
|
|
|
|
14
|
|
|
8
|
|
|
|
|
256
|
|
6
|
8
|
|
|
8
|
|
42
|
use YAML::Perl::Base -base; |
|
8
|
|
|
|
|
15
|
|
|
8
|
|
|
|
|
73
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
package YAML::Perl::Token; |
9
|
8
|
|
|
8
|
|
64
|
use YAML::Perl::Base -base; |
|
8
|
|
|
|
|
31
|
|
|
8
|
|
|
|
|
48
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
field 'start_mark'; |
12
|
|
|
|
|
|
|
field 'end_mark'; |
13
|
|
|
|
|
|
|
|
14
|
8
|
|
|
8
|
|
47
|
use overload '""' => 'stringify'; |
|
8
|
|
|
|
|
15
|
|
|
8
|
|
|
|
|
73
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub stringify { |
17
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
18
|
0
|
|
0
|
|
|
|
my $class = ref($self) || $self; |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
my @attributes = grep not(/_mark$/), keys %$self; |
21
|
0
|
|
|
|
|
|
my $arguments = join ', ', map |
22
|
|
|
|
|
|
|
sprintf("%s=%s", $_, $self->{$_}), @attributes; |
23
|
0
|
|
|
|
|
|
return "$class ($arguments)"; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
package YAML::Perl::Token::Directive; |
27
|
8
|
|
|
8
|
|
1878
|
use YAML::Perl::Token -base; |
|
8
|
|
|
|
|
20
|
|
|
8
|
|
|
|
|
87
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
field id => ''; |
30
|
|
|
|
|
|
|
field 'name'; |
31
|
|
|
|
|
|
|
field 'value'; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
package YAML::Perl::Token::DocumentStart; |
34
|
8
|
|
|
8
|
|
53
|
use YAML::Perl::Token -base; |
|
8
|
|
|
|
|
15
|
|
|
8
|
|
|
|
|
43
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
field id => ''; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
package YAML::Perl::Token::DocumentEnd; |
39
|
8
|
|
|
8
|
|
51
|
use YAML::Perl::Token -base; |
|
8
|
|
|
|
|
17
|
|
|
8
|
|
|
|
|
43
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
field id => ''; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
package YAML::Perl::Token::StreamStart; |
44
|
8
|
|
|
8
|
|
68
|
use YAML::Perl::Token -base; |
|
8
|
|
|
|
|
28
|
|
|
8
|
|
|
|
|
64
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
field id => ''; |
47
|
|
|
|
|
|
|
field 'encoding'; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
package YAML::Perl::Token::StreamEnd; |
50
|
8
|
|
|
8
|
|
59
|
use YAML::Perl::Token -base; |
|
8
|
|
|
|
|
22
|
|
|
8
|
|
|
|
|
47
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
field id => ''; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
package YAML::Perl::Token::BlockSequenceStart; |
55
|
8
|
|
|
8
|
|
45
|
use YAML::Perl::Token -base; |
|
8
|
|
|
|
|
15
|
|
|
8
|
|
|
|
|
40
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
field id => ''; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
package YAML::Perl::Token::BlockMappingStart; |
60
|
8
|
|
|
8
|
|
44
|
use YAML::Perl::Token -base; |
|
8
|
|
|
|
|
16
|
|
|
8
|
|
|
|
|
39
|
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
field id => ''; |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
package YAML::Perl::Token::BlockEnd; |
65
|
8
|
|
|
8
|
|
47
|
use YAML::Perl::Token -base; |
|
8
|
|
|
|
|
55
|
|
|
8
|
|
|
|
|
45
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
field id => ''; |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
package YAML::Perl::Token::FlowSequenceStart; |
71
|
8
|
|
|
8
|
|
47
|
use YAML::Perl::Token -base; |
|
8
|
|
|
|
|
18
|
|
|
8
|
|
|
|
|
40
|
|
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
field id => '['; |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
package YAML::Perl::Token::FlowMappingStart; |
77
|
8
|
|
|
8
|
|
45
|
use YAML::Perl::Token -base; |
|
8
|
|
|
|
|
18
|
|
|
8
|
|
|
|
|
43
|
|
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
field id => '{'; |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
package YAML::Perl::Token::FlowSequenceEnd; |
83
|
8
|
|
|
8
|
|
48
|
use YAML::Perl::Token -base; |
|
8
|
|
|
|
|
16
|
|
|
8
|
|
|
|
|
46
|
|
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
field id => ']'; |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
package YAML::Perl::Token::FlowMappingEnd; |
89
|
8
|
|
|
8
|
|
59
|
use YAML::Perl::Token -base; |
|
8
|
|
|
|
|
16
|
|
|
8
|
|
|
|
|
43
|
|
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
field id => '}'; |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
package YAML::Perl::Token::Key; |
95
|
8
|
|
|
8
|
|
51
|
use YAML::Perl::Token -base; |
|
8
|
|
|
|
|
13
|
|
|
8
|
|
|
|
|
82
|
|
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
field id => '?'; |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
package YAML::Perl::Token::Value; |
101
|
8
|
|
|
8
|
|
65
|
use YAML::Perl::Token -base; |
|
8
|
|
|
|
|
14
|
|
|
8
|
|
|
|
|
45
|
|
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
field id => ':'; |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
package YAML::Perl::Token::BlockEntry; |
107
|
8
|
|
|
8
|
|
48
|
use YAML::Perl::Token -base; |
|
8
|
|
|
|
|
17
|
|
|
8
|
|
|
|
|
41
|
|
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
field id => '-'; |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
package YAML::Perl::Token::FlowEntry; |
113
|
8
|
|
|
8
|
|
53
|
use YAML::Perl::Token -base; |
|
8
|
|
|
|
|
14
|
|
|
8
|
|
|
|
|
71
|
|
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
field id => ','; |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
package YAML::Perl::Token::Alias; |
118
|
8
|
|
|
8
|
|
57
|
use YAML::Perl::Token -base; |
|
8
|
|
|
|
|
26
|
|
|
8
|
|
|
|
|
67
|
|
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
field id => ''; |
121
|
|
|
|
|
|
|
field 'value'; |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
package YAML::Perl::Token::Anchor; |
124
|
8
|
|
|
8
|
|
48
|
use YAML::Perl::Token -base; |
|
8
|
|
|
|
|
20
|
|
|
8
|
|
|
|
|
50
|
|
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
field id => ''; |
127
|
|
|
|
|
|
|
field 'value'; |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
package YAML::Perl::Token::Tag; |
130
|
8
|
|
|
8
|
|
55
|
use YAML::Perl::Token -base; |
|
8
|
|
|
|
|
16
|
|
|
8
|
|
|
|
|
52
|
|
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
field id => ''; |
133
|
|
|
|
|
|
|
field 'value'; |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
package YAML::Perl::Token::Scalar; |
136
|
8
|
|
|
8
|
|
54
|
use YAML::Perl::Token -base; |
|
8
|
|
|
|
|
19
|
|
|
8
|
|
|
|
|
43
|
|
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
field id => ''; |
139
|
|
|
|
|
|
|
field 'value'; |
140
|
|
|
|
|
|
|
field 'plain'; |
141
|
|
|
|
|
|
|
field 'style'; |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
1; |