line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Perl::PrereqScanner::NotQuiteLite::Parser::KeywordDeclare; |
2
|
|
|
|
|
|
|
|
3
|
83
|
|
|
83
|
|
1432
|
use strict; |
|
83
|
|
|
|
|
184
|
|
|
83
|
|
|
|
|
2280
|
|
4
|
83
|
|
|
83
|
|
412
|
use warnings; |
|
83
|
|
|
|
|
182
|
|
|
83
|
|
|
|
|
1925
|
|
5
|
83
|
|
|
83
|
|
432
|
use Perl::PrereqScanner::NotQuiteLite::Util; |
|
83
|
|
|
|
|
189
|
|
|
83
|
|
|
|
|
30385
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub register { return { |
8
|
82
|
|
|
82
|
0
|
479
|
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
|
|
|
|
|
11
|
$c->register_sub_keywords(qw/keyword/); |
17
|
1
|
|
|
|
|
5
|
$c->register_keywords(qw/keytype is unkeyword/); |
18
|
1
|
|
|
|
|
4
|
$c->register_op_keywords(qw/is/); |
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
|
|
6
|
$c->register_sub_parser( |
21
|
|
|
|
|
|
|
'keyword', |
22
|
|
|
|
|
|
|
[$class, 'parse_keyword_args', $used_module], |
23
|
|
|
|
|
|
|
); |
24
|
1
|
|
|
|
|
5
|
$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
|
7
|
my ($class, $c, $used_module, $raw_tokens) = @_; |
32
|
|
|
|
|
|
|
|
33
|
3
|
|
|
|
|
11
|
my $tokens = convert_string_tokens($raw_tokens); |
34
|
3
|
|
|
|
|
5
|
shift @$tokens; # discard keyword |
35
|
|
|
|
|
|
|
|
36
|
3
|
50
|
33
|
|
|
12
|
if (ref $tokens->[0] and $tokens->[0][1]) { |
37
|
3
|
|
|
|
|
7
|
$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__ |