Subject: | parse "A"x6 as x operator |
Date: | Thu, 24 Jul 2008 12:01:40 +1000 |
To: | bug-PPI [...] rt.cpan.org |
From: | Kevin Ryde <user42 [...] zip.com.au> |
Running
ppidump 'print 123,("A")x6'
gives
PPI::Document
PPI::Statement
PPI::Token::Word 'print'
PPI::Token::Number '123'
PPI::Token::Operator ','
PPI::Structure::List ( ... )
PPI::Statement::Expression
PPI::Token::Quote::Double '"A"'
PPI::Token::Word 'x6'
where I hoped the "x" would be a PPI:Token::Operator, which is how I
believe it runs, eg.
perl -e 'print 123,("A")x6'
prints
123AAAAAA
(Of course I can imagine hairy stuff goes on between what's a word and
what's an "x" operator, so maybe this example is a bit ambiguous.)