Re: [Parseperl-discuss] How should "for qw<blah> {}" parse?
Brought to you by:
adamkennedy
|
From: Chris D. <ch...@ch...> - 2008-07-10 03:15:48
|
Elliot,
Are you sure that's valid syntax? I don't think it's legal to omit
the parens.
% perl -le'for qw<a b c> { }'
Missing $ on loop variable at -e line 1.
Did you mean "for (qw<a b c>) { }" ?
% ppidump 'for (qw<blah>) { }'
PPI::Document
PPI::Statement::Compound
PPI::Token::Word 'for'
PPI::Structure::ForLoop ( ... )
PPI::Statement
PPI::Token::QuoteLike::Words 'qw<blah>'
PPI::Structure::Block { ... }
Chris
On Jul 9, 2008, at 6:55 PM, Elliot Shank wrote:
> Currently, it's pretty ugly:
>
> PPI::Document
> PPI::Statement::Compound
> PPI::Token::Word 'for'
> PPI::Statement
> PPI::Token::QuoteLike::Words 'qw<blah>'
> PPI::Structure::Block { ... }
>
> Should that be
>
> PPI::Document
> PPI::Statement::Compound
> PPI::Token::Word 'for'
> PPI::Token::QuoteLike::Words 'qw<blah>'
> PPI::Structure::Block { ... }
>
> or
>
> PPI::Document
> PPI::Statement::Compound
> PPI::Token::Word 'for'
> PPI::Structure::ForLoop ...
> PPI::Statement
> PPI::Token::QuoteLike::Words 'qw<blah>'
> PPI::Structure::Block { ... }
>
> ----------------------------------------------------------------------
> ---
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> _______________________________________________
> Parseperl-discuss mailing list
> Par...@li...
> https://lists.sourceforge.net/lists/listinfo/parseperl-discuss
|