From c035e7855da16ec1cbccf9655d1ebf9d632b687c Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 22 May 2017 15:11:39 +0200 Subject: 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 --- lib/AspectC/Repo.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/AspectC/Repo.pm') 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; } -- cgit v1.2.3