Show
Ignore:
Timestamp:
07/29/08 11:36:12 (5 months ago)
Author:
fglock
Message:

[v6.pm] fixed bare_sigil

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • perl5/Pugs-Compiler-Perl6/lib/Pugs/Grammar/Expression.pm

    r21601 r21606  
    208208            $m2 = Pugs::Grammar::Quote->parse( $match, { p => $pos } ) 
    209209                unless $m2; 
     210                 
     211            my $cap = $m2->(); 
     212            #print Dumper($cap); 
     213            if ( ref($cap) && exists $cap->{bare_sigil} ) { 
     214                unless (  $m2->tail =~ /^\s*[\,\)\}\]]/s  
     215                       || $m2->tail =~ /^\s*$/s 
     216                       ) { 
     217                    undef $m2 
     218                } 
     219            } 
     220 
    210221        } 
    211222        # print "Lexer: m1 = " . Dumper($m1) . "m2 = " . Dumper($m2); 
     
    456467        $m = undef; 
    457468        if ( $m1 && $m2 ) { 
    458             if ( exists $m2->()->{bare_sigil} && $m2->tail =~ /^\s*[\,\)\}\]]/ ) { 
    459                 $m = $m2 
     469            if ( exists $m2->()->{bare_sigil} ) { 
     470                if (  $m2->tail =~ /^\s*[\,\)\}\]]/s  
     471                   || $m2->tail =~ /^\s*$/s 
     472                   ) { 
     473                    $m = $m2 
     474                } 
     475                else { 
     476                    $m = $m1 
     477                } 
    460478            } 
    461479            else {