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

sub name beginning with x and a number parsed as the x operator #122

Closed
moregan opened this issue Nov 14, 2014 · 5 comments
Closed

sub name beginning with x and a number parsed as the x operator #122

moregan opened this issue Nov 14, 2014 · 5 comments

Comments

@moregan
Copy link
Collaborator

moregan commented Nov 14, 2014

PPI 1.220:

ppidump 'sub x64 {}'
                    PPI::Document
                      PPI::Statement
[    1,   1,   1 ]     PPI::Token::Word     'sub'
[    1,   5,   5 ]     PPI::Token::Operator     'x'
[    1,   6,   6 ]     PPI::Token::Number   '64'
                        PPI::Structure::Block   { ... }

whereas something other than 'x' is find:

ppidump 'sub X64 {}'
                    PPI::Document
                      PPI::Statement::Sub
[    1,   1,   1 ]     PPI::Token::Word     'sub'
[    1,   5,   5 ]     PPI::Token::Word     'X64'
                        PPI::Structure::Block   { ... }
@moregan
Copy link
Collaborator Author

moregan commented Nov 15, 2014

This is a regression between 1.215 and 1.218

@moregan
Copy link
Collaborator Author

moregan commented Nov 15, 2014

also a regression:

ppidump 'package x64 {}'
                    PPI::Document
                      PPI::Statement::Package
[    1,   1,   1 ]     PPI::Token::Word         'package'
[    1,   9,   9 ]     PPI::Token::Operator     'x'
[    1,  10,  10 ]     PPI::Token::Number       '64'
                        PPI::Structure::Block   { ... }

@moregan
Copy link
Collaborator Author

moregan commented Nov 17, 2014

also a regression:

ppidump 'LABEL: x64'
                    PPI::Document
                      PPI::Statement::Compound
[    1,   1,   1 ]     PPI::Token::Label        'LABEL:'
                      PPI::Statement
[    1,   8,   8 ]     PPI::Token::Operator     'x'
[    1,   9,   9 ]     PPI::Token::Number       '64'

@moregan moregan mentioned this issue Nov 17, 2014
wchristian pushed a commit that referenced this issue Nov 21, 2014
Conflicts:
	t/ppi_statement_package.t
	t/ppi_token_operator.t
@wchristian wchristian added this to the 1.222 milestone Nov 21, 2014
@wchristian
Copy link
Member

Split into 3 new commits, cleaned up a bit and pushed to master.

wchristian pushed a commit that referenced this issue May 14, 2017
wchristian pushed a commit that referenced this issue May 14, 2017
@wchristian
Copy link
Member

Thanks, this has been cherry-picked and released. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants