Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[mm] do a bit of reference pruning
Don't link parser Bodys into the metamodel
  • Loading branch information
sorear committed Sep 19, 2010
1 parent 0cb1071 commit c73de8d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Metamodel.pm
Expand Up @@ -327,6 +327,7 @@ sub Op::SubDef::begin {
$body->strong_used(1);
$opensubs[-1]->body_of->add_method($self->method_too, $body);
}
delete $self->{$_} for (qw( body method_too proto_too exports once ));
}

sub Op::PackageDef::begin {
Expand All @@ -344,6 +345,8 @@ sub Op::PackageDef::begin {
$ns->obj($obj);
$opensubs[-1]->add_my_sub($self->bodyvar, $body);
}

delete $self->{$_} for (qw(name body exports ourpkg));
}

sub Op::Augment::begin {
Expand All @@ -353,6 +356,8 @@ sub Op::Augment::begin {
my $pkg = $opensubs[-1]->find_pkg([ @{ $self->pkg }, $self->name ]);
my $body = $self->body->begin(body_of => $pkg, augmenting => 1, once => 1);
$opensubs[-1]->add_my_sub($self->bodyvar, $body);

delete $self->{$_} for (qw(name body pkg));
}

### Code goes here to generate C# from the metamodel
Expand Down

0 comments on commit c73de8d

Please sign in to comment.