line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Perl::Lexer::Token; |
2
|
3
|
|
|
3
|
|
20
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
84
|
|
3
|
3
|
|
|
3
|
|
16
|
use warnings; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
66
|
|
4
|
3
|
|
|
3
|
|
1256
|
use utf8; |
|
3
|
|
|
|
|
30
|
|
|
3
|
|
|
|
|
14
|
|
5
|
3
|
|
|
3
|
|
106
|
use 5.010000; |
|
3
|
|
|
|
|
10
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub inspect { |
8
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
9
|
0
|
|
|
|
|
0
|
my $ret = '
|
10
|
0
|
|
|
|
|
0
|
$ret .= $self->name . ' ' . lc($self->type_str); |
11
|
0
|
0
|
|
|
|
0
|
if (UNIVERSAL::isa($self->yylval, 'B::SVOP')) { |
12
|
0
|
|
|
|
|
0
|
$ret .= ' ' . $self->yylval_svop; |
13
|
|
|
|
|
|
|
} else { |
14
|
0
|
|
0
|
|
|
0
|
$ret .= ' ' . ($self->yylval || '-'); |
15
|
|
|
|
|
|
|
} |
16
|
0
|
|
|
|
|
0
|
$ret .= '>'; |
17
|
0
|
|
|
|
|
0
|
return $ret; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub name { |
21
|
14
|
|
|
14
|
1
|
11852
|
my $self = shift; |
22
|
14
|
|
|
|
|
87
|
_name($self->[0]); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub type { |
26
|
8
|
|
|
8
|
1
|
642
|
my $self = shift; |
27
|
8
|
|
|
|
|
44
|
_type($self->[0]); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub type_str { |
31
|
0
|
|
|
0
|
1
|
0
|
my $type = shift->type; |
32
|
|
|
|
|
|
|
+{ |
33
|
|
|
|
|
|
|
Perl::Lexer::TOKENTYPE_NONE() => 'NONE', |
34
|
|
|
|
|
|
|
Perl::Lexer::TOKENTYPE_IVAL() => 'IVAL', |
35
|
|
|
|
|
|
|
Perl::Lexer::TOKENTYPE_OPNUM() => 'OPNUM', |
36
|
|
|
|
|
|
|
Perl::Lexer::TOKENTYPE_PVAL() => 'PVAL', |
37
|
|
|
|
|
|
|
Perl::Lexer::TOKENTYPE_OPVAL() => 'OPVAL', |
38
|
0
|
|
|
|
|
0
|
}->{$type}; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub yylval { |
42
|
9
|
|
|
9
|
1
|
19
|
my $self = shift; |
43
|
9
|
|
|
|
|
90
|
return $self->[1]; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub yylval_svop { |
47
|
4
|
|
|
4
|
1
|
9
|
my $self = shift; |
48
|
4
|
50
|
|
|
|
19
|
Carp::croak("It's not SVOP") unless UNIVERSAL::isa($self->[1], 'B::SVOP'); |
49
|
4
|
|
|
|
|
18
|
return _yylval_svop($self->[1]); |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1; |
54
|
|
|
|
|
|
|
__END__ |