my $r;
my $c = 1;
for (; not null $op->sibling; $op = $op->sibling) {
- my $n = name($op);
- next if $n eq 'nextstate';
my ($rc, $lc) = $self->inspect($op);
- $r = add $r, scale $c, $rc if defined $rc;
- if (zero $lc) {
- $c = 1 - count $r;
- return $r, $c ? { 0 => $c } : undef
- }
+ return $rc, $lc if defined $rc and not defined $lc;
+ $r = add $r, scale $c, $rc;
$c *= count $lc;
}