summaryrefslogtreecommitdiff
path: root/lib/AspectC
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2017-05-22 15:11:39 +0200
committerDaniel Friesel <derf@finalrewind.org>2017-05-22 15:11:39 +0200
commitc035e7855da16ec1cbccf9655d1ebf9d632b687c (patch)
tree77543db8e0c232aba30acb60ec495d13690e3b90 /lib/AspectC
parent01d09b5e812dca0578e9ae8523c7edc952a53316 (diff)
support benchmark values via attributes (for int) and slice variables (complex data)
Can be made less of a hack as soon as AC++ supports attributes with arguments
Diffstat (limited to 'lib/AspectC')
-rw-r--r--lib/AspectC/Repo.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/AspectC/Repo.pm b/lib/AspectC/Repo.pm
index 2ddccfd..ec5bcd0 100644
--- a/lib/AspectC/Repo.pm
+++ b/lib/AspectC/Repo.pm
@@ -132,6 +132,16 @@ sub parse_xml {
my $hash_key = sprintf( '%s(%s)', $name, join( q{, }, @args ) );
$class->{function}{$hash_key} = $fun;
}
+
+ for my $vnode ( $node->findnodes('./children/Variable') ) {
+ my $name = $vnode->getAttribute('name');
+ my ($sig_node) = $vnode->findnodes('./type/Type');
+ my $signature = $vnode->getAttribute('signature');
+ $class->{variable}{$name} = {
+ type => $signature,
+ };
+ }
+
$self->{class}{$class_name} = $class;
}