Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Move Regex.ACCEPTS to core.
  • Loading branch information
jnthn committed Feb 23, 2010
1 parent 7452234 commit 3b44842
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions build/Makefile.in
Expand Up @@ -188,6 +188,7 @@ CORE_SOURCES = \
src/core/Parameter.pm \
src/core/Signature.pm \
src/core/Block.pm \
src/core/Regex.pm \
src/core/system.pm \
src/cheats/match-bool.pm \
src/cheats/setup-io.pm \
Expand Down
8 changes: 0 additions & 8 deletions src/builtins/Regex.pir
Expand Up @@ -18,14 +18,6 @@ This file sets up the Perl 6 C<Regex> class, the class for regexes.
p6meta.'new_class'('Regex', 'parent'=>'Method')
.end

.sub 'ACCEPTS' :method
.param pmc topic
.local pmc match
match = topic.'match'(self)
store_dynamic_lex '$/', match
.return (match)
.end

=over 4

=back
Expand Down
7 changes: 7 additions & 0 deletions src/core/Regex.pm
@@ -0,0 +1,7 @@
augment class Regex {
method ACCEPTS($topic) {
my $match = $topic.match(self);
pir::store_dynamic_lex__vSP('$/', $match);
$match
}
}

0 comments on commit 3b44842

Please sign in to comment.