Changeset 22005
- Timestamp:
- 08/22/08 11:08:07 (3 months ago)
- Files:
-
- 3 modified
-
docs/Perl6/Spec/Functions.pod (modified) (4 diffs)
-
src/perl6/STD.pm (modified) (5 diffs)
-
src/perl6/gimme5 (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
docs/Perl6/Spec/Functions.pod
r21375 r22005 13 13 Mark Stosberg <mark@summersault.com> 14 14 Date: 12 Mar 2005 15 Last Modified: 18 Jul200816 Version: 2 315 Last Modified: 22 Aug 2008 16 Version: 24 17 17 18 18 This document attempts to document the list of builtin functions in Perl 6. … … 560 560 =item delete 561 561 562 our List m ulti method delete (@array : *@indices ) is export562 our List method delete (@array : *@indices ) is export 563 563 564 564 Sets elements specified by C<@indices> in the invocant to a … … 577 577 =item exists 578 578 579 our Bool m ulti method exists (@array : Int *@indices ) is export579 our Bool method exists (@array : Int *@indices ) 580 580 581 581 True if the specified Array element has been assigned to. This … … 585 585 an error. 586 586 587 A nunary form is expected. See C<Hash::delete>.587 A unary form is expected. See C<Hash::delete>. 588 588 589 589 -
src/perl6/STD.pm
r22002 r22005 154 154 say print open close printf sprintf slurp unlink link symlink 155 155 elems grep map first reduce sort push reverse take splice 156 exists delete157 156 158 157 zip each roundrobin caller … … 180 179 push @routinenames, "HOW", "fail", "temp", "let"; 181 180 182 # if True ref False unlesslength bless delete exists181 # please don't add: ref length bless delete exists 183 182 184 183 my %routinenames; … … 458 457 459 458 token ws { 460 # XXX exists is a p5ism 461 :my @stub = return self if exists self.<_>[self.pos]<ws>; 459 :my @stub = return self if self.<_>[self.pos].:exists<ws>; 462 460 :my $startpos = self.pos; 463 461 … … 3313 3311 # hopefully we can include these tokens in any outer LTM matcher 3314 3312 regex stdstopper { 3315 :my @stub = return self if exists self.<_>[self.pos]<endstmt>;3313 :my @stub = return self if self.<_>[self.pos].:exists<endstmt>; 3316 3314 [ 3317 3315 | <?terminator> … … 3975 3973 token in (Str $stop, Str $insides, Str $name = $insides) { 3976 3974 :my $GOAL is context = $stop; 3977 <x=$insides> $stop {{ $/.{$insides} = $<x>; delete $<x> }} || <.panic: "Unable to parse $name; couldn't find final '$stop'">3975 <x=$insides> $stop {{ $/.{$insides} = $<x>; $/.:delete<x> }} || <.panic: "Unable to parse $name; couldn't find final '$stop'"> 3978 3976 } 3979 3977 -
src/perl6/gimme5
r21975 r22005 80 80 $f =~ s/\\x([0-9a-fA-F]{3,4})/\\x{$1}/g; 81 81 $f =~ s!\$([0-9]+)!\$\$C{$1}!g; 82 $f =~ s/(\S+\.):(exists|delete)/$2 $1/g if $f =~ /\.:(exists|delete)/; 82 83 while ($f ne "") { 83 84 #print "$f\n" if $trace;
