Skip to content

Commit

Permalink
Parse my ($foo, $bar)
Browse files Browse the repository at this point in the history
  • Loading branch information
sorear committed Sep 14, 2010
1 parent d4df43e commit f52ccae
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Niecza/Actions.pm
Expand Up @@ -1741,10 +1741,17 @@ sub scoped { my ($cl, $M) = @_;
$M->{package_declarator} // $M->{multi_declarator})->{_ast};
}

# :: Op (but adds decls)
# :: Op
sub declarator { my ($cl, $M) = @_;
if ($M->{signature}) {
$M->sorry("Signature declarations NYI");
my @p = @{ $M->{signature}{_ast}->params };
# TODO: keep the original signature around somewhere := can find it
for (@p) {
# TODO: fanciness checks
$_ = Op::Lexical->new(node($M), name => $_->slot, list => $_->list,
hash => $_->hash, declaring => 1);
}
$M->{_ast} = Op::SimpleParcel->new(node($M), items => \@p);
return;
}
$M->{_ast} = $M->{variable_declarator} ? $M->{variable_declarator}{_ast} :
Expand Down

0 comments on commit f52ccae

Please sign in to comment.