| … | |
… | |
| 175 | sub _check { |
175 | sub _check { |
| 176 | my $self = shift; |
176 | my $self = shift; |
| 177 | my $super = ref($self); $super =~ s/LimitedPolynomial/Parser/; |
177 | my $super = ref($self); $super =~ s/LimitedPolynomial/Parser/; |
| 178 | &{$super."::_check"}($self); |
178 | &{$super."::_check"}($self); |
| 179 | my $op = $self->{op}; |
179 | my $op = $self->{op}; |
| 180 | return if LimitedPolynomail::isConstant($op); |
180 | return if LimitedPolynomial::isConstant($op); |
| 181 | $self->Error("You can only use '%s' with monomials",$self->{def}{string}) |
181 | $self->Error("You can only use '%s' with monomials",$self->{def}{string}) |
| 182 | if $op->{isPoly}; |
182 | if $op->{isPoly}; |
| 183 | $self->{isPoly} = 2; |
183 | $self->{isPoly} = 2; |
| 184 | $self->{powers} = {%{$op->{powers}}} if $op->{powers}; |
184 | $self->{powers} = {%{$op->{powers}}} if $op->{powers}; |
| 185 | } |
185 | } |