Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capture variables above $9 misparsed #37

Closed
moregan opened this issue Feb 10, 2014 · 0 comments
Closed

Capture variables above $9 misparsed #37

moregan opened this issue Feb 10, 2014 · 0 comments
Milestone

Comments

@moregan
Copy link
Collaborator

moregan commented Feb 10, 2014

Perl-Critic/Perl-Critic#455
https://rt.cpan.org/Public/Bug/Display.html?id=72980

PPI does not recognize that the numbered capture variables can go higher than $9. E.g. for:

$_ = 'xxxxxxxxxxxxxxxxxxxx';
/(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)/;
my $x = $13;
print $x;
ppidump 'my $x = $13;'
                    PPI::Document
                      PPI::Statement::Variable
[    1,   1,   1 ]     PPI::Token::Word         'my'
[    1,   4,   4 ]     PPI::Token::Symbol       '$x'
[    1,   7,   7 ]     PPI::Token::Operator     '='
[    1,   9,   9 ]     PPI::Token::Magic        '$1'
[    1,  11,  11 ]     PPI::Token::Number       '3'
[    1,  12,  12 ]     PPI::Token::Structure    ';'
moregan added a commit to moregan/PPI that referenced this issue Mar 14, 2014
moregan added a commit to moregan/PPI that referenced this issue Mar 14, 2014
moregan added a commit to moregan/PPI that referenced this issue Mar 14, 2014
moregan added a commit to moregan/PPI that referenced this issue Aug 23, 2014
moregan added a commit to moregan/PPI that referenced this issue Aug 24, 2014
moregan added a commit to moregan/PPI that referenced this issue Aug 24, 2014
@wchristian wchristian added this to the 1.220 milestone Nov 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants