Skip to content

Commit

Permalink
Parsing for <?> etc
Browse files Browse the repository at this point in the history
  • Loading branch information
sorear committed Aug 20, 2010
1 parent 7ec8a8d commit 8513447
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/Niecza/Actions.pm
Expand Up @@ -625,6 +625,26 @@ sub assertion__S_method { my ($cl, $M) = @_;
zyg => $M->{assertion}{_ast}->zyg);
}

sub assertion__S_Question { my ($cl, $M) = @_;
if ($M->{assertion}) {
$M->{_ast} = RxOp::Before->new(zyg => [$M->{assertion}{_ast}]);
} else {
$M->{_ast} = RxOp::Sequence->new;
}
}

sub assertion__S_Bang { my ($cl, $M) = @_;
if ($M->{assertion}) {
$M->{_ast} = RxOp::Before->new(zyg => [$M->{assertion}{_ast}]);
} else {
$M->{_ast} = RxOp::None->new;
}
}

sub assertion__S_Cur_Ly { my ($cl, $M) = @_;
$M->{_ast} = RxOp::CheckBlock->new(block => $M->{embeddedblock}{_ast});
}

# These have effects only in the parser, so undef ast is correct.
sub mod_value {}
sub mod_internal {}
Expand Down

0 comments on commit 8513447

Please sign in to comment.