| 71 | } |
| 72 | |
| 73 | Result MathParser::bracket(QString s) //throws Exception |
| 74 | { |
| 75 | QChar zeroChar = s.at(0); |
| 76 | if (zeroChar == '(') { |
| 77 | Result r = plusMinus(s.mid(1)); |
| 78 | if (!r.rest.isEmpty() && r.rest.at(0) == ')') |
| 79 | r.rest = r.rest.mid(1); |
| 80 | else |
| 81 | qWarning() << "Error: not close bracket"; |
| 82 | return r; |
| 83 | } |
| 84 | return functionVariable(s); |
| 85 | } |
| 86 | |
| 87 | Result MathParser::functionVariable(QString s) //throws Exception |
| 88 | { |