Skip to content

Commit

Permalink
Bring Rakudo up-to-date with recent PGE and compiler tools
Browse files Browse the repository at this point in the history
in trunk (which themselves were changed in order to more
accurately reflect recent changes in S05).
  • Loading branch information
pmichaud committed Mar 31, 2009
1 parent 766b10d commit c015556
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion build/PARROT_REVISION
@@ -1 +1 @@
37752
37824
5 changes: 3 additions & 2 deletions src/builtins/match.pir
Expand Up @@ -27,7 +27,8 @@ src/builtins/match.pir - Perl6 builtins for smart matching

=item make($item)

Equivalent to C<$/.result_object($item)>. This changes the item value of the current match object.
Equivalent to C<$/."!make"($item)>. This sets the ast value of
the current match object.

=cut

Expand All @@ -36,7 +37,7 @@ Equivalent to C<$/.result_object($item)>. This changes the item value of the cu
$P0 = getinterp
$P1 = $P0['lexpad';1]
$P2 = $P1['$/']
$P2.'result_object'(value)
$P2.'!make'(value)
.end


Expand Down
12 changes: 9 additions & 3 deletions src/parser/actions.pm
Expand Up @@ -1259,12 +1259,18 @@ method post_constraint($/) {


method parameter($/) {
my $var := $( $<named_param> ?? $<named_param> !! $<param_var> );
my $sigil := $<named_param> ?? $<named_param><param_var><sigil> !! $<param_var><sigil>;
my $quant := $<quant>;

## if it was type a type capture and nothing else, need to make a PAST::Var
unless $<param_var> || $<named_param> {
my $var;
if $<named_param> {
$var := $( $<named_param> );
}
elsif $<param_var> {
$var := $( $<param_var> );
}
else {
unless $<type_constraint> == 1 {
$/.panic("Invalid signature; cannot have two consecutive parameter separators.");
}
Expand Down Expand Up @@ -2399,7 +2405,7 @@ method quote_term($/, $key) {
my $past;
if ($key eq 'literal') {
$past := PAST::Val.new(
:value( ~$<quote_literal> ),
:value( ~$($<quote_literal>) ),
:returns('Str'), :node($/)
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/parser/grammar.pg
Expand Up @@ -541,7 +541,7 @@ token parameter {
$I0 = match['type_constraint']
$I0 = $I0 > 0
.return ($I0)
}}> <?>
}}>
]
<trait>*
<post_constraint>*
Expand Down
2 changes: 1 addition & 1 deletion src/parser/quote_expression.pir
Expand Up @@ -472,7 +472,7 @@
goto scan_loop

succeed:
mob.'result_object'(literal)
mob.'!make'(literal)
mob.'to'(pos)
.return (mob)
fail_backchar_digit:
Expand Down
4 changes: 0 additions & 4 deletions src/setting/Match.pm
Expand Up @@ -50,10 +50,6 @@ class Match is also {
}
}

multi method ast() {
return $(self);
}

multi method caps() {
my @caps = gather {
for @(self).pairs, %(self).pairs -> $p {
Expand Down

0 comments on commit c015556

Please sign in to comment.