Skip to content

Commit

Permalink
More fixes to Match objects.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmichaud committed Apr 21, 2009
1 parent e31a6f8 commit 6ea0aa1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/classes/Code.pir
Expand Up @@ -70,7 +70,8 @@ for executable objects.
push_eh not_regex
$P0 = getinterp
$P1 = $P0['lexpad';1]
$P1['$/'] = match
$P2 = new 'Perl6Scalar', match
$P1['$/'] = $P2
not_regex:
.return (match)
.end
Expand Down
16 changes: 10 additions & 6 deletions src/classes/Match.pir
Expand Up @@ -34,17 +34,21 @@ properly delegate to the underlying Capture PMC.

=cut

.sub 'hash' :method
.sub '' :method('item')
.return (self)
.end

.sub '' :method('hash')
$P0 = getattribute self, ['Capture'], 'proxy'
$P1 = $P0.'hash'()
.return ($P1)
.end

#.sub 'list' :method
# $P0 = getattribute self, ['Capture'], 'proxy'
# $P1 = $P0.'list'()
# .return ($P1)
#.end
.sub '' :method('list')
$P0 = getattribute self, ['Capture'], 'proxy'
$P1 = $P0.'list'()
.return ($P1)
.end


=item of
Expand Down

0 comments on commit 6ea0aa1

Please sign in to comment.