// We parse the negation
ok = parse(node[0], c, true);
// Setup the kind
- if(ok) {
+ if (ok) {
d_op = negateOp(d_op);
}
break;
// All relation operators are parsed on both sides
d_op = node.getKind();
ok = parse(node[0], c, negated);
- if(ok) {
+ if (ok) {
ok = parse(node[1],-c, negated);
}
break;
}
case kind::MULT: {
// Only unit multiplication of variables
- if(node.getNumChildren() == 2 && node[0].isConst()) {
+ if (node.getNumChildren() == 2 && node[0].isConst()) {
Rational a = node[0].getConst<Rational>();
- if(a == 1 || a == -1) {
- return parse(node[1], c * a.sgn(), negated);
+ if (a == 1 || a == -1) {
+ ok = parse(node[1], c * a.sgn(), negated);
} else {
ok = false;
}
case kind::PLUS: {
for(unsigned i = 0; i < node.getNumChildren(); ++i) {
- bool ok = parse(node[i], c, negated);
+ ok = parse(node[i], c, negated);
if(!ok) {
break;
}
case kind::MINUS: {
ok = parse(node[0], c, negated);
- if(ok) {
+ if (ok) {
ok = parse(node[1], -c, negated);
}
break;
}
default: {
- if(c > 0) {
- if(d_x.isNull()) {
+ if (c > 0) {
+ if (d_x.isNull()) {
d_x = node;
} else {
ok = false;
}
} else {
- if(d_y.isNull()) {
+ if (d_y.isNull()) {
d_y = node;
} else {
ok = false;