develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r35147 - branches/rvar2/languages/perl6/src/parser

From:
jonathan
Date:
January 7, 2009 09:51
Subject:
[svn:parrot] r35147 - branches/rvar2/languages/perl6/src/parser
Message ID:
20090107175119.377C5CB9F9@x12.develooper.com
Author: jonathan
Date: Wed Jan  7 09:51:18 2009
New Revision: 35147

Modified:
   branches/rvar2/languages/perl6/src/parser/actions.pm

Log:
[rakudo] Delete now-unused subroutine from actions.pm (we've got all of the functionality that it contained re-implemented).

Modified: branches/rvar2/languages/perl6/src/parser/actions.pm
==============================================================================
--- branches/rvar2/languages/perl6/src/parser/actions.pm	(original)
+++ branches/rvar2/languages/perl6/src/parser/actions.pm	Wed Jan  7 09:51:18 2009
@@ -1284,65 +1284,6 @@
 }
 
 
-sub apply_package_traits($package, $traits) {
-    for $traits {
-        my $aux := $_<trait_auxiliary>;
-        # Apply any "is" traits through MMD.
-        if $aux<sym> eq 'is' {
-            # Check it's not a compiler-handled one.
-            if $aux<name> ne 'also' {
-                # Emit the call.
-                my @identifier := Perl6::Compiler.parse_name(~$aux<name>);
-                my $name := @identifier.pop();
-                my $superclass := PAST::Var.new(
-                                      :name($name),
-                                      :scope('package'),
-                                      :viviself('Undef')
-                                  );
-                if +@identifier != 0 {
-                    $superclass.namespace(@identifier);
-                }
-                $package.push(
-                    PAST::Op.new(
-                        :pasttype('call'),
-                        :name('trait_auxiliary:is'),
-                        $superclass,
-                        PAST::Var.new(
-                            :name('def'),
-                            :scope('register')
-                        )
-                    )
-                );
-            }
-        }
-        elsif $aux<sym> eq 'does' {
-            # Role.
-            my @identifier := Perl6::Compiler.parse_name(~$aux<name>);
-            my $name := @identifier.pop();
-            my $role_name := PAST::Var.new(
-                                 :name($name),
-                                 :namespace(@identifier),
-                                 :scope('package'),
-                             );
-            $package.push(
-                PAST::Op.new(
-                    :pasttype('call'),
-                    :name('!keyword_does'),
-                    PAST::Var.new(
-                        :name('def'),
-                        :scope('register')
-                    ),
-                    $role_name
-                )
-            );
-        }
-        else {
-            $traits.panic("Currently only is and does traits are supported on packages.");
-        }
-    }
-}
-
-
 method package_declarator($/, $key) {
     our @?PKGDECL;
     my $sym := ~$<sym>;



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About