Changeset 22567

Show
Ignore:
Timestamp:
10/10/08 18:43:06 (6 weeks ago)
Author:
lwall
Message:

[viv] --match to attach match objects

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/perl6/viv

    r22565 r22567  
    1313$::ACTIONS = 'Actions'; 
    1414my $OPT_pos = 0; 
     15my $OPT_match = 0; 
    1516 
    1617sub MAIN { 
     
    2930        } 
    3031        elsif ($switch eq '--pos') { 
    31             $OPT_pos = 1; 
     32            $OPT_pos = 1;       # attach position and prior ws len 
     33        } 
     34        elsif ($switch eq '--match') { 
     35            $OPT_match = 1;     # attach match object 
    3236        } 
    3337    } 
     
    6367        gen_class($class); 
    6468        bless $r, $class unless ref($r) =~ /^VAST/; 
     69        $r->{MATCH} = $match if $OPT_match; 
    6570        $match->{''} = $r; 
    6671    }