Skip to content

Commit

Permalink
Implement (expr)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan O'Rear committed Jul 13, 2010
1 parent d9f32f0 commit e7d7f2c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Niecza/Actions.pm
Expand Up @@ -179,6 +179,11 @@ sub circumfix__S_Lt_Gt { my ($cl, $M) = @_;
}
sub circumfix__S_LtLt_GtGt { goto &circumfix__S_Lt_Gt }

sub circumfix__S_Paren_Thesis { my ($cl, $M) = @_;
$M->{_ast} = Op::StatementList->new(children =>
[ grep { defined $_ } @{ $M->{semilist}{_ast} } ]);
}

sub infixish { my ($cl, $M) = @_;
$M->sorry("Metaoperators NYI") if $M->{infix_postfix_meta_operator}[0];
$M->sorry("Adverbs NYI") if $M->{colonpair};
Expand Down Expand Up @@ -858,6 +863,10 @@ sub statementlist { my ($cl, $M) = @_;
[ grep { defined $_ } map { $_->{_ast} } @{ $M->{statement} } ]);
}

sub semilist { my ($cl, $M) = @_;
$M->{_ast} = [ map { $_->{_ast} } @{ $M->{statement} } ];
}

sub package_def { my ($cl, $M) = @_;
if ($::PKGDECL ne 'class') {
$M->sorry('Non-class package definitions are not yet supported');
Expand Down

0 comments on commit e7d7f2c

Please sign in to comment.