line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Perl::PrereqScanner::NotQuiteLite::Parser::KeywordDeclare; |
2
|
|
|
|
|
|
|
|
3
|
82
|
|
|
82
|
|
1111
|
use strict; |
|
82
|
|
|
|
|
156
|
|
|
82
|
|
|
|
|
1895
|
|
4
|
82
|
|
|
82
|
|
334
|
use warnings; |
|
82
|
|
|
|
|
143
|
|
|
82
|
|
|
|
|
1553
|
|
5
|
82
|
|
|
82
|
|
331
|
use Perl::PrereqScanner::NotQuiteLite::Util; |
|
82
|
|
|
|
|
168
|
|
|
82
|
|
|
|
|
26367
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub register { return { |
8
|
81
|
|
|
81
|
0
|
378
|
use => { |
9
|
|
|
|
|
|
|
'Keyword::Declare' => 'parse_keyword_declare_args', |
10
|
|
|
|
|
|
|
}, |
11
|
|
|
|
|
|
|
}} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub parse_keyword_declare_args { |
14
|
1
|
|
|
1
|
0
|
3
|
my ($class, $c, $used_module, $raw_tokens) = @_; |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
|
|
4
|
$c->register_sub_keywords(qw/keyword/); |
17
|
1
|
|
|
|
|
3
|
$c->register_keywords(qw/keytype is unkeyword/); |
18
|
1
|
|
|
|
|
3
|
$c->register_op_keywords(qw/is/); |
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
|
|
5
|
$c->register_sub_parser( |
21
|
|
|
|
|
|
|
'keyword', |
22
|
|
|
|
|
|
|
[$class, 'parse_keyword_args', $used_module], |
23
|
|
|
|
|
|
|
); |
24
|
1
|
|
|
|
|
3
|
$c->register_keyword_parser( |
25
|
|
|
|
|
|
|
'unkeyword', |
26
|
|
|
|
|
|
|
[$class, 'parse_unkeyword_args', $used_module], |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub parse_keyword_args { |
31
|
3
|
|
|
3
|
0
|
6
|
my ($class, $c, $used_module, $raw_tokens) = @_; |
32
|
|
|
|
|
|
|
|
33
|
3
|
|
|
|
|
10
|
my $tokens = convert_string_tokens($raw_tokens); |
34
|
3
|
|
|
|
|
4
|
shift @$tokens; # discard keyword |
35
|
|
|
|
|
|
|
|
36
|
3
|
50
|
33
|
|
|
12
|
if (ref $tokens->[0] and $tokens->[0][1]) { |
37
|
3
|
|
|
|
|
8
|
$c->register_keywords($tokens->[0][1]); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub parse_unkeyword_args { |
42
|
0
|
|
|
0
|
0
|
|
my ($class, $c, $used_module, $raw_tokens) = @_; |
43
|
|
|
|
|
|
|
|
44
|
0
|
|
|
|
|
|
my $tokens = convert_string_tokens($raw_tokens); |
45
|
0
|
|
|
|
|
|
shift @$tokens; # discard unkeyword |
46
|
|
|
|
|
|
|
|
47
|
0
|
0
|
0
|
|
|
|
if (ref $tokens->[0] and $tokens->[0][1]) { |
48
|
0
|
|
|
|
|
|
$c->remove_keywords($tokens->[0][0]); |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
__END__ |