line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Perl::PrereqScanner::NotQuiteLite::Parser::Syntax; |
2
|
|
|
|
|
|
|
|
3
|
83
|
|
|
83
|
|
1411
|
use strict; |
|
83
|
|
|
|
|
170
|
|
|
83
|
|
|
|
|
2214
|
|
4
|
83
|
|
|
83
|
|
402
|
use warnings; |
|
83
|
|
|
|
|
172
|
|
|
83
|
|
|
|
|
1922
|
|
5
|
83
|
|
|
83
|
|
454
|
use Perl::PrereqScanner::NotQuiteLite::Util; |
|
83
|
|
|
|
|
166
|
|
|
83
|
|
|
|
|
33516
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
my %Unsupported = map {$_ => 1} qw( |
8
|
|
|
|
|
|
|
); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub register { return { |
12
|
82
|
|
|
82
|
0
|
471
|
use => { |
13
|
|
|
|
|
|
|
syntax => 'parse_syntax_args', |
14
|
|
|
|
|
|
|
}, |
15
|
|
|
|
|
|
|
}} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub parse_syntax_args { |
18
|
1
|
|
|
1
|
0
|
2
|
my ($class, $c, $used_module, $raw_tokens) = @_; |
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
|
|
3
|
my $tokens = convert_string_tokens($raw_tokens); |
21
|
|
|
|
|
|
|
|
22
|
1
|
50
|
|
|
|
3
|
if (is_version($tokens->[0])) { |
23
|
0
|
|
|
|
|
0
|
$c->add($used_module => shift @$tokens); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
1
|
50
|
|
|
|
3
|
return if ref $tokens->[0]; |
27
|
|
|
|
|
|
|
|
28
|
1
|
|
|
|
|
2
|
my $feature_name = $tokens->[0]; |
29
|
|
|
|
|
|
|
|
30
|
1
|
|
|
|
|
10
|
my $name = |
31
|
|
|
|
|
|
|
join '::', |
32
|
|
|
|
|
|
|
map ucfirst, |
33
|
|
|
|
|
|
|
split m{/}, |
34
|
|
|
|
|
|
|
join '', |
35
|
|
|
|
|
|
|
map ucfirst, |
36
|
|
|
|
|
|
|
split qr{_}, $feature_name; |
37
|
|
|
|
|
|
|
|
38
|
1
|
|
|
|
|
5
|
my $feature_module = "Syntax::Feature::$name"; |
39
|
1
|
50
|
|
|
|
3
|
if (is_module_name($feature_module)) { |
40
|
1
|
|
|
|
|
4
|
$c->add($feature_module => 0); |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
1
|
50
|
|
|
|
38
|
if ($feature_name =~ /^q[sil]$/) { |
44
|
1
|
|
|
|
|
9
|
$c->register_quotelike_keywords($feature_name, 'q'.$feature_name); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
# Some of the features change syntax too much |
48
|
1
|
50
|
|
|
|
129
|
if ($Unsupported{$feature_name}) { |
49
|
0
|
|
|
|
|
|
$c->{aborted} = "syntax '$feature_name'"; |
50
|
0
|
|
|
|
|
|
$c->{ended} = 1; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
1; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
__END__ |