Skip to content

Commit

Permalink
[Yapsi] used delegation instain copy-paste
Browse files Browse the repository at this point in the history
Who kill their babbies, because they cannot frigth back?
  • Loading branch information
Carl Masak committed Aug 9, 2010
1 parent ea9058b commit c0dc9f1
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/Yapsi.pm
Expand Up @@ -83,12 +83,7 @@ class Yapsi::Perl6::Actions {
};

method TOP($/) {
@vars = ();
traverse-top-down($/, :skip['block'], :action(&find-declarations));
my $name = unique-block();
make my $block = { :$name, :vars(@vars.clone) };
traverse-top-down($/,
:action(&connect-blocks.assuming($name, $block)));
block($/);
}

method block($/) {
Expand Down

0 comments on commit c0dc9f1

Please sign in to comment.