From 842f415a6161722eb2c7a7b92a1309c255e000d3 Mon Sep 17 00:00:00 2001 From: Jonathan Worthington Date: Tue, 28 Sep 2010 21:28:38 +0200 Subject: [PATCH] Add a type attribute to DNST::MethodCall. --- dotnet/compiler/DNST.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dotnet/compiler/DNST.pm b/dotnet/compiler/DNST.pm index 6fa5a40..a61f339 100644 --- a/dotnet/compiler/DNST.pm +++ b/dotnet/compiler/DNST.pm @@ -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 } @@ -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; }