Skip to content

Commit

Permalink
Add a type attribute to DNST::MethodCall.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Sep 28, 2010
1 parent c0c6232 commit 842f415
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion dotnet/compiler/DNST.pm
Expand Up @@ -174,6 +174,7 @@ class DNST::MethodCall is DNST::Node {
has $!on;
has $!name;
has $!void;
has $!type;

method on($set?) {
if $set { $!on := $set }
Expand All @@ -190,11 +191,17 @@ class DNST::MethodCall is DNST::Node {
$!void
}

method new(:$name!, :$on, :$void, *@children) {
method type($set?) {
if $set { $!type := $set }
$!type
}

method new(:$name!, :$on, :$void, :$type, *@children) {
my $obj := self.CREATE;
if $on { $obj.on($on); }
$obj.name($name);
$obj.void($void);
$obj.type($type);
$obj.set_children(@children);
$obj;
}
Expand Down

0 comments on commit 842f415

Please sign in to comment.