New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
simple match() implementation #168
Comments
From @cjfieldsAttached is a (very simple) patch for a match() implementation (method chris |
From @cjfields |
From @cjfieldsOn Tue Jul 15 19:48:05 2008, cjfields wrote:
Latest patch modifies ACCEPT to use .match (per pmichaud on p6-compiler). Passes |
From @cjfieldsmatch.diffIndex: CREDITS
===================================================================
--- CREDITS (revision 29534)
+++ CREDITS (working copy)
@@ -157,6 +157,9 @@
D: TAP language author, and Parrot Bug fixes
E: cdolan@cpan.org
+N: Chris Fields (cjfields)
+D: Rakudo patches
+
N: Christoph Otto a.k.a. cotto
D: Patch for key flags in pdd08
D: Range check in Env PMC
Index: languages/perl6/src/builtins/any-str.pir
===================================================================
--- languages/perl6/src/builtins/any-str.pir (revision 29534)
+++ languages/perl6/src/builtins/any-str.pir (working copy)
@@ -75,6 +75,17 @@
.return ($P0)
.end
+=item match()
+
+=cut
+
+.sub 'match' :method
+ .param pmc x
+ .local pmc match
+ match = x(self)
+ .return (match)
+.end
+
=item trans()
Implementation of transliteration
Index: languages/perl6/src/classes/Code.pir
===================================================================
--- languages/perl6/src/classes/Code.pir (revision 29534)
+++ languages/perl6/src/classes/Code.pir (working copy)
@@ -30,7 +30,7 @@
.sub 'ACCEPTS' :method
.param pmc topic
.local pmc match
- match = self(topic)
+ match = topic.'match'(self)
$P0 = getinterp
$P1 = $P0['lexpad';1]
$P1['$/'] = match
|
@cjfields - Status changed from 'new' to 'open' |
From @moritzOn Wed Jul 16 19:36:05 2008, cjfields wrote:
This version of Str.match returns another Str object, when in fact it The corresponding test file is t/spec/S05-substitution/match.t |
From @cjfieldsOn Sun Aug 24 03:05:55 2008, moritz wrote:
This patch is blocking on RT #57094 (which explains why a Str is returned). |
From @cjfieldsUpdated patch (against r30888). |
From @cjfieldsmatch.diffIndex: CREDITS
===================================================================
--- CREDITS (revision 30888)
+++ CREDITS (working copy)
@@ -162,6 +162,9 @@
D: TAP language author, and Parrot Bug fixes
E: cdolan@cpan.org
+N: Chris Fields (cjfields)
+D: Rakudo patches
+
N: Christoph Otto a.k.a. cotto
D: Patch for key flags in pdd08
D: Range check in Env PMC
Index: languages/perl6/src/builtins/any-str.pir
===================================================================
--- languages/perl6/src/builtins/any-str.pir (revision 30888)
+++ languages/perl6/src/builtins/any-str.pir (working copy)
@@ -75,6 +75,17 @@
.return ($P0)
.end
+=item match()
+
+=cut
+
+.sub 'match' :method :multi(_)
+ .param pmc x
+ .local pmc match
+ match = x(self)
+ .return(match)
+.end
+
=item rindex()
=cut
@@ -140,7 +151,6 @@
.return ($S1)
.end
-
=item trans()
Implementation of transliteration
Index: languages/perl6/src/classes/Code.pir
===================================================================
--- languages/perl6/src/classes/Code.pir (revision 30888)
+++ languages/perl6/src/classes/Code.pir (working copy)
@@ -30,7 +30,7 @@
.sub 'ACCEPTS' :method
.param pmc topic
.local pmc match
- match = self(topic)
+ match = topic.'match'(self)
$P0 = getinterp
$P1 = $P0['lexpad';1]
$P1['$/'] = match
|
From @moritzOn Mon Sep 08 07:13:28 2008, cjfields wrote:
Applied as r31185, thanks. (If I show interest in applying patches and then forget them, please |
@moritz - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#56970 (status was 'resolved')
Searchable as RT56970$
The text was updated successfully, but these errors were encountered: