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

[svn:parrot] r35801 - trunk/languages/pipp/src/pct

From:
bernhard
Date:
January 20, 2009 05:52
Subject:
[svn:parrot] r35801 - trunk/languages/pipp/src/pct
Message ID:
20090120135209.29486CB9AE@x12.develooper.com
Author: bernhard
Date: Tue Jan 20 05:52:08 2009
New Revision: 35801

Modified:
   trunk/languages/pipp/src/pct/actions.pm

Log:
[Pipp] handle class_member_definition in a single location

Modified: trunk/languages/pipp/src/pct/actions.pm
==============================================================================
--- trunk/languages/pipp/src/pct/actions.pm	(original)
+++ trunk/languages/pipp/src/pct/actions.pm	Tue Jan 20 05:52:08 2009
@@ -765,6 +765,22 @@
                         $( $_<literal> )
                     )
                 );
+
+                # add accessors for the attribute
+                $methods_block.push(
+                    PAST::Block.new(
+                        :blocktype('declaration'),
+                        :name(~$_<var_name><ident>),
+                        :pirflags(':method'),
+                        :node( $/ ),
+                        PAST::Stmts.new(
+                            PAST::Var.new(
+                                :name(~$_<var_name><ident>),
+                                :scope('attribute')
+                            )
+                        )
+                    )
+                );
             }
         }
 
@@ -798,26 +814,6 @@
             $methods_block.push( $($_) );
         }
 
-        # add accessors for the attributes
-        for $<class_member_definition> {
-            if $_<static> {
-                $methods_block.push(
-                    PAST::Block.new(
-                        :blocktype('declaration'),
-                        :name(~$_<var_name><ident>),
-                        :pirflags(':method'),
-                        :node( $/ ),
-                        PAST::Stmts.new(
-                            PAST::Var.new(
-                                :name(~$_<var_name><ident>),
-                                :scope('attribute')
-                            )
-                        )
-                    )
-                );
-            }
-        }
-
         $block.push( $methods_block );
 
         $?CLASS := '';



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