Skip to content

Commit

Permalink
Implement parsing of "private" methods
Browse files Browse the repository at this point in the history
  • Loading branch information
sorear committed Jul 28, 2010
1 parent c2b609a commit cd418a6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Niecza/Actions.pm
Expand Up @@ -1463,13 +1463,18 @@ sub routine_def { my ($cl, $M) = @_;

sub method_def { my ($cl, $M) = @_;
my $scope = $::SCOPE // 'has';
my $type = $M->{type} ? $M->{type}->Str : '';
$scope = 'anon' if !$M->{longname};
my $name = $M->{longname} ? $cl->mangle_longname($M->{longname}, "method definition") : undef;

if ($M->{trait}[0] || $M->{sigil}) {
$M->sorry("Method traits NYI");
return;
}
if ($type eq '^') {
$M->sorry("Metamethod mixins NYI");
return;
}
if (@{ $M->{multisig} } > 1) {
$M->sorry("Multiple multisigs (what?) NYI");
return;
Expand All @@ -1493,7 +1498,7 @@ sub method_def { my ($cl, $M) = @_;
$M->{multisig}[0]{_ast}->for_method : undef));

$M->{_ast} = $cl->block_to_closure($M, $bl, outer_key => $sym,
method_too => ($scope ne 'anon' ? $name : undef));
method_too => ($scope ne 'anon' ? "$type$name" : undef));
}

sub block { my ($cl, $M) = @_;
Expand Down

0 comments on commit cd418a6

Please sign in to comment.