line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
=head1 NAME |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
PPIx::Regexp::Token::GroupType::Switch - Represent the introducing characters for a switch |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 SYNOPSIS |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use PPIx::Regexp::Dumper; |
8
|
|
|
|
|
|
|
PPIx::Regexp::Dumper->new( 'qr{(?(1)foo|bar)}smx' ) |
9
|
|
|
|
|
|
|
->print(); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 INHERITANCE |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
C is a |
14
|
|
|
|
|
|
|
L. |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
C has no descendants. |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 DESCRIPTION |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
This class represents the characters right after a left parenthesis that |
21
|
|
|
|
|
|
|
introduce a switch. Strictly speaking these characters are '?(', but |
22
|
|
|
|
|
|
|
this class only takes the '?'. |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 METHODS |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
This class provides no public methods beyond those provided by its |
27
|
|
|
|
|
|
|
superclass. |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=cut |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
package PPIx::Regexp::Token::GroupType::Switch; |
32
|
|
|
|
|
|
|
|
33
|
9
|
|
|
9
|
|
65
|
use strict; |
|
9
|
|
|
|
|
18
|
|
|
9
|
|
|
|
|
278
|
|
34
|
9
|
|
|
9
|
|
52
|
use warnings; |
|
9
|
|
|
|
|
27
|
|
|
9
|
|
|
|
|
235
|
|
35
|
|
|
|
|
|
|
|
36
|
9
|
|
|
9
|
|
44
|
use base qw{ PPIx::Regexp::Token::GroupType }; |
|
9
|
|
|
|
|
21
|
|
|
9
|
|
|
|
|
722
|
|
37
|
|
|
|
|
|
|
|
38
|
9
|
|
|
9
|
|
63
|
use PPIx::Regexp::Constant qw{ @CARP_NOT }; |
|
9
|
|
|
|
|
20
|
|
|
9
|
|
|
|
|
1204
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
our $VERSION = '0.087'; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub __match_setup { |
43
|
32
|
|
|
32
|
|
117
|
my ( undef, $tokenizer ) = @_; # Invocant unused |
44
|
32
|
|
|
|
|
155
|
$tokenizer->expect( qw{ PPIx::Regexp::Token::Condition } ); |
45
|
32
|
|
|
|
|
70
|
return; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
9
|
|
|
|
|
682
|
use constant DEF => { |
49
|
|
|
|
|
|
|
'?' => { |
50
|
|
|
|
|
|
|
expl => q, |
51
|
|
|
|
|
|
|
intro => '5.005', |
52
|
|
|
|
|
|
|
}, |
53
|
9
|
|
|
9
|
|
61
|
}; |
|
9
|
|
|
|
|
29
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
__PACKAGE__->__setup_class( |
56
|
|
|
|
|
|
|
{ |
57
|
|
|
|
|
|
|
suffix => '(', |
58
|
|
|
|
|
|
|
}, |
59
|
|
|
|
|
|
|
); |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
__END__ |