Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the PPI CPAN distribution.

Report information
The Basics
Id: 16831
Status: resolved
Priority: 0/
Queue: PPI

People
Owner: Nobody in particular
Requestors: nospam-abuse [...] bloodgate.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.109
Fixed in: (no value)



Subject: until () { } not parsed as compound statement
"until () BLOCK continue BLOCK" is just like while, but with a reversed condition. However, PPI parses them differently, making it hard to recognize "until" loops by looking at the parsed result (and thus tripping my code up :): perl examples/test.pl 'until ($a < $b) { $c ++; }' PPI::Document PPI::Statement PPI::Token::Word 'until' PPI::Structure::Condition ( ... ) PPI::Statement::Expression PPI::Token::Symbol '$a' PPI::Token::Operator '<' PPI::Token::Symbol '$b' PPI::Structure::Block { ... } PPI::Statement PPI::Token::Symbol '$c' PPI::Token::Operator '++' PPI::Token::Structure ';' perl examples/test.pl 'while ($a < $b) { $c ++; }' PPI::Document PPI::Statement::Compound PPI::Token::Word 'while' PPI::Structure::Condition ( ... ) PPI::Statement::Expression PPI::Token::Symbol '$a' PPI::Token::Operator '<' PPI::Token::Symbol '$b' PPI::Structure::Block { ... } PPI::Statement PPI::Token::Symbol '$c' PPI::Token::Operator '++' PPI::Token::Structure ';' In case of "until", the first PPI::Statement should also be a PPI::Statement::Compound. Best wishes, Tels