Re: [Parseperl-discuss] Hashref vs block
Brought to you by:
adamkennedy
|
From: Chris D. <ch...@cl...> - 2006-10-05 19:55:56
|
On Sep 25, 2006, at 1:10 PM, Chris Dolan wrote:
> I discovered a problem with anonymous hashref parsing (a pair of
> failing tests added to SVN as rev 1103). The attached fix passes
> all PPI and Perl::Critic tests, but breaks the following common idiom:
>
> my %foo = map({$_ => 1} @foo);
>
> I think the lexer needs a lookahead to detect the lack of a
> following comma to distinguish the following cases:
> map({$_ => 1} @foo);
> foo({$_ => 1}, @foo);
>
> That seems like a non-trivial change to the Lexer code, so I'm
> going to set it aside for now.
>
> Chris
I just added a failing test for the above cases. I'm finding the
Lexer.pm code to be impenetrable, so I'm going to continue to set
this issue aside.
Chris
--
Chris Dolan, Software Developer, Clotho Advanced Media Inc.
608-294-7900, fax 294-7025, 1435 E Main St, Madison WI 53703
vCard: http://www.chrisdolan.net/ChrisDolan.vcf
Clotho Advanced Media, Inc. - Creators of MediaLandscape Software
(http://www.media-landscape.com/) and partners in the revolutionary
Croquet project (http://www.opencroquet.org/)
|